[go: up one dir, main page]

WO2025001840A1 - Network topology determination method and apparatus, device, and computer readable storage medium - Google Patents

Network topology determination method and apparatus, device, and computer readable storage medium Download PDF

Info

Publication number
WO2025001840A1
WO2025001840A1 PCT/CN2024/098656 CN2024098656W WO2025001840A1 WO 2025001840 A1 WO2025001840 A1 WO 2025001840A1 CN 2024098656 W CN2024098656 W CN 2024098656W WO 2025001840 A1 WO2025001840 A1 WO 2025001840A1
Authority
WO
WIPO (PCT)
Prior art keywords
calculation algorithm
network topology
time
effective time
algorithm
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
PCT/CN2024/098656
Other languages
French (fr)
Chinese (zh)
Inventor
张立
董杰
周天然
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CN202310919266.5A external-priority patent/CN119232630A/en
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of WO2025001840A1 publication Critical patent/WO2025001840A1/en
Anticipated expiration legal-status Critical
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath

Definitions

  • the present application relates to the field of communication technology, and in particular to a method, apparatus, device and computer-readable storage medium for determining a network topology.
  • routing calculation algorithms such as flexible algorithms (flex-algo) and multi-topology algorithms that perform routing calculations based on network topology constraints have emerged.
  • Different routing calculation algorithms can determine different network topologies based on different network topology constraints, and thus can calculate routing information of different network topologies based on different routing calculation algorithms. Therefore, before calculating routes based on any routing calculation algorithm, it is necessary to first determine the network topology of any routing calculation algorithm.
  • the present application provides a method, apparatus, device and computer-readable storage medium for determining a network topology, which are used to determine a network topology used at the effective time of a routing calculation algorithm before the effective time of the routing calculation algorithm.
  • a method for determining a network topology determines a first routing calculation algorithm according to a first time, the first routing calculation algorithm includes first effective time information and a first network topology constraint, the first effective time information includes the effective time of the first routing calculation algorithm, the first effective time information and the first network topology constraint are used to determine the network topology corresponding to the first routing calculation algorithm, and the first time is before the effective time of the first routing calculation algorithm; based on the first effective time information and the first network topology constraint, a first network topology used at the effective time of the first routing calculation algorithm is determined, and the first routing calculation algorithm and the first network topology are determined before the effective time of the first routing calculation algorithm.
  • the method adds first effective time information to a first routing calculation algorithm so that the first routing calculation algorithm becomes effective at the effective time of the first routing calculation algorithm, and then determines in advance before the effective time of the first routing calculation algorithm a first network topology used at the effective time of the first routing calculation algorithm so that the first network topology determined in advance can be directly used at the effective time of the first routing calculation algorithm, thereby improving the efficiency of determining the first network topology, and further improving the efficiency of calculating routing information of the first network topology based on the first routing calculation algorithm.
  • the first routing information of the first network topology is calculated based on the first routing calculation algorithm at a second time, and the second time is before the effective time of the first routing calculation algorithm.
  • the difference between the second time and the effective time of the first routing calculation algorithm is less than the difference threshold, and the difference threshold can be flexibly adjusted according to the application scenario.
  • the difference threshold can be a smaller value, so that the second time is closer to the effective time of the first routing calculation algorithm. Since the first routing calculation algorithm calculates the route in the first network topology, the first routing information is used to forward the message in the first network topology.
  • the first routing information of the first network topology can be calculated in advance based on the routing calculation algorithm before the effective time of the first routing calculation algorithm, so that the first routing information calculated in advance can be directly used to forward messages during the effective time of the first routing calculation algorithm, and there is no need to calculate the first routing information during the effective time of the first routing calculation algorithm, which improves the efficiency of message forwarding based on the first routing information and avoids message loss in the process of calculating the first routing information.
  • the effective time of the first routing calculation algorithm corresponds to the effective time of the first network topology. That is, the effective time of the first routing calculation algorithm can be determined based on the effective time of the first network topology.
  • the network topology before and after the network connection state changes is different, that is, different time periods correspond to different networks.
  • Topology that is, any network topology is valid within the corresponding valid time period, and the valid time period refers to the time period between the valid time and the invalid time. Therefore, the valid time of the first routing calculation algorithm corresponds to the valid time of the first network topology, and the switching of the network topology can be achieved by switching the routing calculation algorithm, thereby avoiding packet loss caused by changes in the network topology.
  • the first effective time information also includes a change period of the effective time of the first routing calculation algorithm, and the change period of the effective time of the first routing calculation algorithm corresponds to the change period of the effective time of the first network topology.
  • the first routing calculation algorithm can be periodically effective, which improves the flexibility of the time constraint of the first routing calculation algorithm.
  • the change period of the effective time of the first routing calculation algorithm corresponds to the change period of the effective time of the first network topology, so that the periodic switching of the network topology can be achieved by periodically switching the routing calculation algorithm, avoiding packet loss caused by using the first routing calculation algorithm outside the effective time of the first network topology.
  • the first network topology constraint includes a link color constraint
  • the link color constraint is used to constrain the color of the links included in the first network topology
  • different colors are used to distinguish different valid times
  • the colors of the links included in the first network topology conform to the link color constraint.
  • the method further determines a second route calculation algorithm according to a third time, the second route calculation algorithm includes second effective time information and a second network topology constraint, the second effective time information indicates the effective time of the second route calculation algorithm, the second effective time information and the second network topology constraint are used to determine the network topology corresponding to the second route calculation algorithm, the third time is before the effective time of the second route calculation algorithm, the effective time of the first route calculation algorithm and the effective time of the second route calculation algorithm are different; based on the second effective time information and the second network topology constraint, the second network topology used in the effective time of the second route calculation algorithm is determined, and the second route calculation algorithm and the second network topology are determined before the effective time of the second route calculation algorithm.
  • the method makes the application of the route calculation method more flexible by defining different route calculation algorithms corresponding to different effective times.
  • the first effective time information also includes a change period of the effective time of the first routing calculation algorithm, and the change period of the effective time of the first routing calculation algorithm is determined based on the first effective time information and the second effective time information.
  • the change period of the effective time of the routing calculation algorithm can be determined according to the effective time information of each routing calculation algorithm, so that the multiple routing calculation algorithms can be used periodically and cyclically.
  • the first routing calculation algorithm may be a flex-algo or a multi-topology algorithm.
  • an intermediate system to intermediate system protocol (ISIS) link state protocol data unit (LSP) message for announcing the first routing calculation algorithm may also be received, the first routing calculation algorithm being carried in a flexible algorithm define (FAD) sub-TLV field of the ISIS LSP message, and the first validity time information being carried in a validity time sub-TLV field of the FAD sub-TLV; or, an open source protocol for announcing the first routing calculation algorithm may be received.
  • ISIS intermediate system to intermediate system protocol
  • LSP link state protocol data unit
  • OSPF open shortest path first
  • LSA link state advertisement
  • BGP border gateway protocol
  • the method provides multiple ways to announce flexible algorithms, and also provides ways to carry the effective time information of flexible algorithms, which provides a guarantee for the implementation of the method.
  • PDU is the abbreviation of protocol data unit
  • TLV is the abbreviation of type, length, value field
  • sub-TLV is the abbreviation of subtype, length, value field.
  • an ISIS LSP message for announcing the first route calculation algorithm may also be received, the first route calculation algorithm being carried in a time-varying multi-topology (multi-topology, MT) information sub-TLV field of the ISIS LSP message, and the first effective time information being carried in an effective time sub-TLV field of the time-varying MT information sub-TLV; or, an OSPF LSA message for announcing the first route calculation algorithm is received, the first route calculation algorithm is carried in a time-varying MT information TLV field of the OSPF LSA message, and the first effective time information is carried in an effective time sub-TLV field of the time-varying MT information TLV; or, a BGP update message for announcing the first route calculation algorithm is received, the first route calculation algorithm is carried in a time-varying MT information TLV field of the BGP update message, and the first effective time information is carried in an effective time
  • the method provides multiple ways to notify the multi-topology algorithm, and also provides ways to carry the effective time information of the multi-topology algorithm, thereby providing a guarantee for the implementation of the method.
  • a device for determining a network topology comprising: a processing module for performing operations other than the operations related to receiving and/or sending in the first aspect or any possible implementation of the first aspect; a transceiver module for performing operations related to receiving and/or sending in the first aspect or any possible implementation of the first aspect.
  • the transceiver module includes a receiving module and/or a sending module.
  • the receiving module is used to perform reception-related operations
  • the sending module is used to perform sending-related operations.
  • a processing module is used to determine a first routing calculation algorithm according to a first time, the first routing calculation algorithm includes first effective time information and a first network topology constraint, the first effective time information includes the effective time of the first routing calculation algorithm, the first effective time information and the first network topology constraint are used to determine the network topology corresponding to the first routing calculation algorithm, and the first time is before the effective time of the first routing calculation algorithm; based on the first effective time information and the first network topology constraint, determine the first network topology used at the effective time of the first routing calculation algorithm, and the first routing calculation algorithm and the first network topology are determined before the effective time of the first routing calculation algorithm.
  • the processing module is further configured to calculate first routing information of the first network topology based on the first routing calculation algorithm at a second time, where the second time is before the effective time of the first routing calculation algorithm.
  • the validity period of the first routing calculation algorithm corresponds to the validity period of the first network topology.
  • the first effective time information further includes a change period of the effective time of the first routing calculation algorithm, and the change period of the effective time of the first routing calculation algorithm corresponds to the change period of the effective time of the first network topology.
  • the first network topology constraint includes a link color constraint, which is used to constrain the colors of links included in the first network topology, different colors are used to distinguish different valid times, and the colors of links included in the first network topology comply with the link color constraint.
  • the processing module is further used to determine a second route calculation algorithm according to a third time
  • the second route calculation algorithm includes second effective time information and a second network topology constraint
  • the second effective time information indicates the effective time of the second route calculation algorithm
  • the second effective time information and the second network topology constraint are used to determine the network topology corresponding to the second route calculation algorithm
  • the third time is before the effective time of the second route calculation algorithm
  • the effective time of the first route calculation algorithm and the effective time of the second route calculation algorithm are different
  • based on the second effective time information and the second network topology constraint determine the second network topology used at the effective time of the second route calculation algorithm, and the second route calculation algorithm and the second network topology are determined before the effective time of the second route calculation algorithm.
  • the first effective time information further includes a change period of the effective time of the first routing calculation algorithm, and the change period of the effective time of the first routing calculation algorithm is determined based on the first effective time information and the second effective time information.
  • the first routing calculation algorithm is a flex-algo or a multi-topology algorithm.
  • the first routing calculation algorithm is flex-algo; the transceiver module is used to receive an ISIS link state data unit LSP message for announcing the first routing calculation algorithm, the first routing calculation algorithm is carried in the FAD sub-TLV field of the ISIS LSP message, and the first valid time information is carried in the valid time sub-TLV field of the FAD sub-TLV.
  • the first routing calculation algorithm is flex-algo; the transceiver module is used to receive an OSPF LSA message for announcing the first routing calculation algorithm, the first routing calculation algorithm is carried in the FAD TLV field of the OSPF LSA message, and the first valid time information is carried in the valid time sub-TLV field of the FAD TLV.
  • the first routing calculation algorithm is flex-algo; the transceiver module is used to receive a BGP update message for announcing the first routing calculation algorithm, the first routing calculation algorithm is carried in the FAD TLV field of the BGP update message, and the first valid time information is carried in the valid time sub-TLV field of the FAD TLV.
  • the first routing calculation algorithm is a multi-topology algorithm; the transceiver module is used to receive an ISIS LSP message for announcing the first routing calculation algorithm, the first routing calculation algorithm is carried in a time-varying MT information sub-TLV field of the ISIS LSP message, and the first valid time information is carried in a valid time sub-TLV field of the time-varying MT information sub-TLV.
  • the first routing calculation algorithm is a multi-topology algorithm
  • the transceiver module is used to receive an open shortest route first protocol OSPF link state announcement LSA message for announcing the first routing calculation algorithm, the first routing calculation algorithm is carried in the time-varying MT information TLV field of the OSPF LSA message, and the first valid time information is carried in the valid time sub-TLV field of the time-varying MT information TLV.
  • the first routing calculation algorithm is a multi-topology algorithm
  • the transceiver module is used to receive A BGP update message notifying a first route calculation algorithm, wherein the first route calculation algorithm is carried in a time-varying MT information TLV field of the BGP update message, and the first effective time information is carried in an effective time sub-TLV field of the time-varying MT information TLV.
  • a network device comprising: a processor, the processor being coupled to a memory, the memory storing at least one program instruction or code, the at least one program instruction or code being loaded and executed by the processor, so that the network device implements the method for determining the network topology as described in the first aspect or any one of the first aspects.
  • the number of the processors is one or more, and the number of the memories is one or more.
  • the memory may be integrated with the processor, or the memory may be provided separately from the processor.
  • the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or can be set on different chips.
  • ROM read-only memory
  • a computer-readable storage medium wherein at least one instruction is stored in the storage medium, and the instruction is loaded and executed by a processor to enable a computer to implement the methods in the above aspects.
  • a computer program (product)
  • the computer program comprises: a computer program code
  • the computer program code when executed by a computer, the computer executes the methods in the above aspects.
  • a chip comprising a processor for calling and executing instructions stored in a memory from the memory, so that a communication device equipped with the chip executes the methods in the above aspects.
  • another chip comprising: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory.
  • the processor is used to execute the methods in the above aspects.
  • FIG1 is a schematic diagram of a change in resource utilization rate of a cell base station provided in an embodiment of the present application
  • FIG2 is a schematic diagram of an implementation environment of a method for determining a network topology provided in an embodiment of the present application
  • FIG3 is a flow chart of a method for determining a network topology provided in an embodiment of the present application.
  • FIG4 is a schematic diagram of the format of a FAD sub-TLV field provided in an embodiment of the present application.
  • FIG5 is a schematic diagram of the format of a FAD TLV field provided in an embodiment of the present application.
  • FIG6 is a schematic diagram of the format of a time-varying MT information sub-TLV field provided in an embodiment of the present application.
  • FIG7 is a schematic diagram of the format of a time-varying MT information TLV field provided in an embodiment of the present application.
  • FIG8 is a schematic diagram of a format of a valid time sub-TLV field provided in an embodiment of the present application.
  • FIG9 is a schematic diagram of the format of another valid time sub-TLV field provided in an embodiment of the present application.
  • FIG10 is a schematic diagram of the format of another valid time sub-TLV field provided in an embodiment of the present application.
  • FIG11 is a schematic diagram of the format of another valid time sub-TLV field provided in an embodiment of the present application.
  • FIG12 is a schematic diagram of a process of switching network topology provided in an embodiment of the present application.
  • FIG13 is a schematic diagram of another process of switching network topology provided in an embodiment of the present application.
  • FIG14 is a schematic diagram of another process of switching network topology provided in an embodiment of the present application.
  • FIG15 is a schematic diagram of the structure of a device for determining a network topology provided in an embodiment of the present application.
  • FIG16 is a schematic diagram of the structure of a network device provided in an embodiment of the present application.
  • FIG17 is a schematic diagram of the structure of another network device provided in an embodiment of the present application.
  • a network whose network topology changes over time is called a time-varying network.
  • a network topology with a large network connection scale can be used to forward messages during a time period with high traffic.
  • a time period with low traffic arrives, some network connections in the network topology are closed and a network topology with a small network connection scale is used.
  • the network topology of the model is used to forward messages to ensure that there is no network congestion during high-traffic time periods and to avoid wasting resources during low-traffic time periods.
  • the change in network topology is caused by the change in network connection status.
  • the network connection status refers to the network connection status that can affect the forwarding path of the message, including but not limited to the link status, network node status or routing status.
  • the resource utilization of the cell base station shows an obvious tidal effect within a day.
  • the resource utilization is proportional to the traffic size.
  • the resource utilization between 0:00 and 7:00 is small, that is, the traffic is small, which can be called a small traffic time period
  • the resource utilization between 7:00-24:00 is large, that is, the traffic is large, which can be called a large traffic time period. Therefore, a network topology with a small network connection scale can be used between 0:00 and 7:00, and a network topology with a large network connection scale can be used between 7:00 and 24:00.
  • two network topologies can be formed, namely, a first network topology under a large traffic time period and a second network topology under a small traffic time period, and switching between the two network topologies according to time during the message forwarding process, thereby forming a time-varying network.
  • the satellite network can be divided into multiple discrete network topologies on the time axis, and the network topology within each time slice can be regarded as fixed.
  • the network topology has regular and predictable changes, thus forming a time-varying network.
  • the network connection will be adaptively closed or opened according to the real-time changes in network traffic. For example, the network device is turned off when it is idle to reduce the energy waste caused by idle network devices. It can be seen that in a network that prioritizes energy consumption, the network topology will also change with the changes in the energy consumption of the network devices, and the changes in the energy consumption of the network devices are also predictable, which also forms a time-varying network.
  • the embodiments of the present application only illustrate time-varying networks using tidal networks, satellite networks, and energy-prioritized networks as examples. For other time-varying networks with predictable changes in network topology, the embodiments of the present application will no longer illustrate them one by one.
  • how to control network traffic to switch to different network topologies in different time periods is an urgent problem to be solved, and the transmission of network traffic in different network topologies is based on routing information. Therefore, how the routing calculation algorithm switches to use different network topologies for routing calculation in different time periods is an urgent problem to be solved.
  • flex-algo can allow network devices to calculate routes based on specific network topology constraints and path calculation constraints, so that different flex-algos can meet the needs of different business scenarios, such as high-bandwidth services or low-latency services, and thus flex-algo can more simply and flexibly implement the network's traffic engineering (TE) capabilities.
  • TE traffic engineering
  • the network topology that changes over time refers to the change of the physical network topology
  • the network topology determined in the physical network topology based on the routing calculation algorithm is the logical network topology.
  • the network device Since the flex-algo in the related art calculates the route at the same time, when the network topology changes, the network device needs to redetermine the network topology corresponding to all flex-algos and perform route calculations based on the changed network topology, which makes the processing overhead of the network device large. In addition, in the process of redetermining the network topology corresponding to all flex-algos and performing route calculations, since the physical network topology has changed, the network traffic is still transmitted in the network topology before the change, which easily leads to packet loss of traffic, thereby affecting the service transmission performance.
  • the flex-algo in the related art only implements network topology constraints and path calculation constraints based on the spatial dimension, so that network traffic with the same traffic characteristics but different arrival times will be guided to use the routing information calculated based on the same flex-algo for forwarding, so that network traffic arriving when the network topology changes needs to wait for the route to be recalculated based on the same flex-algo before switching to the changed network topology for forwarding. Therefore, the method in the related art is less efficient in switching network topology.
  • the embodiment of the present application provides a method for determining network topology, by adding effective time information to the routing calculation algorithm, so that the routing calculation algorithm has an effective time constraint in the time dimension, and then can perform routing calculation based on different routing calculation algorithms according to time. Since different routing calculation algorithms use different network topologies for calculating routing, switching different routing calculation algorithms according to time can achieve flexible switching of network topology.
  • This method can be applied to any network system, for example, to the above-mentioned time-varying network, to achieve flexible switching of network topologies in different time periods according to the time-varying properties of the time-varying network.
  • Figure 2 is an implementation environment diagram of a method for determining a network topology provided in an embodiment of the present application.
  • the implementation environment includes multiple network devices, any network device can be connected to another network device through a link, and the link connection relationship between each network device can be configured according to network requirements.
  • the network device can be a switch or a router, etc., and one network device corresponds to a node in the network. Among them, changes in the state of the link and changes in the state of the node will cause changes in the network topology.
  • the network topology after the change lacks link 1 and link 3 compared to the network topology before the change.
  • the network device is powered off or turned off, the status of the network device is invalid; when the network device is powered on or turned on, the status of the network device is valid.
  • the link is closed or disconnected, the status of the link is invalid; when the link is turned on or connected, the status of the link is valid.
  • the network devices in the implementation environment shown in FIG. 2 may also include more or less, that is, the embodiment of the present application does not limit the number of network devices.
  • the network devices mentioned in the embodiment of the present application in addition to network devices such as switches and routers, may also be a part of the components on the network device, such as a single board or line card on the network device, or a functional module on the network device, or a chip for implementing the method provided in the embodiment of the present application, which is not specifically limited in the embodiment of the present application.
  • the transceiver module used to implement the method may be, for example, an interface circuit of the chip, and the processing module may be a processing circuit with processing functions in the chip.
  • the connection method between network devices includes, but is not limited to, direct connection via Ethernet cable or optical cable.
  • FIG. 3 is a flow chart of a method for determining a network topology provided in an embodiment of the present application.
  • the method for determining a network topology can be applied to the implementation environment shown in FIG. 2 , for example, the method is executed by any network device in the implementation environment shown in FIG. 2 .
  • the method for determining a network topology includes but is not limited to the following steps 301 and 302 .
  • Step 301 determining a first routing calculation algorithm according to a first time, the first routing calculation algorithm including first effective time information and a first network topology constraint, the first effective time information including the effective time of the first routing calculation algorithm, the first effective time information and the first network topology constraint are used to determine the network topology corresponding to the first routing calculation algorithm, and the first time is before the effective time of the first routing calculation algorithm.
  • the first route calculation algorithm in addition to the first network topology constraint, also includes first effective time information, which is used to constrain the effective time of the first route calculation algorithm, so that during the effective time of the first route calculation algorithm, the routing information calculated based on the first route calculation algorithm is used to forward the message. Therefore, the first route calculation algorithm can be determined at a first time before the effective time of the first route calculation algorithm, without having to determine all route calculation algorithms at the same time.
  • the present application embodiment does not limit the content of the first effective time information, and it only needs to constrain the effective time of the first route calculation algorithm.
  • the first effective time information includes the effective time, which is the time when the first route calculation algorithm starts to take effect; or, the first effective time information includes the effective time and the expiration time, which is the time when the first route calculation algorithm starts to fail, and the time period between the effective time and the expiration time is the effective time period from the beginning of the first route calculation algorithm to its failure; or, the first effective time information includes the effective time and the duration period, and the duration period starting from the effective time is the effective time period from the beginning of the first route calculation algorithm to its failure.
  • the effective time of the first routing calculation algorithm corresponds to the effective time of the first network topology. That is, the effective time of the first routing calculation algorithm can be determined based on the effective time of the first network topology.
  • the network topology before and after the network connection state changes is different, that is, the network topology effective at different times is different, that is, any network topology is effective within the corresponding effective time period. Therefore, the effective time of the first routing calculation algorithm corresponds to the effective time of the first network topology, and the switching of the network topology can be achieved by switching the routing calculation algorithm, thereby avoiding packet loss caused by changes in the network topology.
  • the effective time of the first routing calculation algorithm corresponds to the effective time of the first network topology, and the effective time of the first routing calculation algorithm is the same as the effective time of the first network topology.
  • the network connection included in the first network topology becomes effective at the first effective time
  • the effective time of the first network topology is the first effective time
  • the first routing calculation algorithm also becomes effective at the first effective time
  • the first network topology has been determined to be obtained before the first effective time, so that when the first effective time is reached, the network device can directly switch the current network topology to the first network topology, and ensure that the network connection state of the first network topology is valid at the first effective time.
  • the effective time of the first routing calculation algorithm corresponds to the effective time of the first network topology
  • the expiration time of the first routing calculation algorithm corresponds to the expiration time of the first network topology.
  • the effective time of the first routing calculation algorithm corresponds to the effective time of the first network topology
  • the duration period of the first routing calculation algorithm corresponds to the duration period of the first network topology. This makes the effective time information of the routing calculation algorithm correspond to the time information of the change of the network connection state of the network topology.
  • the first effective time information also includes a change period of the effective time of the first routing calculation algorithm, and the change period indicates multiple periodic effective times of the first routing calculation algorithm.
  • the effective time of the first routing calculation algorithm is 10 o'clock
  • the change period of the effective time of the first routing calculation algorithm is one.
  • the validity period of the first route calculation algorithm is 10 o'clock and the expiration period is 22 o'clock
  • the change cycle of the validity period of the first route calculation algorithm is one day, then the first route calculation algorithm will take effect at 10 o'clock every day and will become invalid at 22 o'clock every day.
  • the change period of the effective time of the first routing calculation algorithm corresponds to the change period of the effective time of the first network topology.
  • the first routing calculation algorithm can be periodically effective, which improves the flexibility of the time constraint of the first routing calculation algorithm.
  • the change period of the effective time of the first routing calculation algorithm corresponds to the change period of the effective time of the first network topology, so that the switching of the network topology can be achieved periodically by periodically switching the routing calculation algorithm, avoiding the packet loss caused by using the first routing calculation algorithm outside the effective time of the first network topology.
  • the method can define two routing calculation algorithms at the same time. For example, when it is predicted that the network topology changes at the first target time and the second target time, a first routing calculation algorithm and a second routing calculation algorithm can be defined.
  • the effective time of the first routing calculation algorithm can be the first target time
  • the invalid time can be the second target time
  • the effective time of the second routing calculation algorithm can be the second target time
  • the invalid time can be the third target time.
  • the third target time can be any time after the second target time.
  • the effective time of the first routing calculation algorithm can also be different from the first target time, and the invalid time can also be different from the second target time, that is, the effective time and invalid time of the first routing calculation algorithm can be different from the time when the physical network topology changes.
  • the effective time and invalid time of the first routing calculation algorithm can be flexibly set to different fixed values according to the actual changes in the network topology of the time-varying network.
  • the method further includes: determining a second route calculation algorithm according to a third time, the second route calculation algorithm including second effective time information and a second network topology constraint, the second effective time information indicating the effective time of the second route calculation algorithm, the second effective time information and the second network topology constraint being used to determine the network topology corresponding to the second route calculation algorithm, and the third time being before the effective time of the second route calculation algorithm.
  • the second route calculation algorithm including second effective time information and a second network topology constraint
  • the second effective time information indicating the effective time of the second route calculation algorithm
  • the second effective time information and the second network topology constraint being used to determine the network topology corresponding to the second route calculation algorithm
  • the third time being before the effective time of the second route calculation algorithm.
  • the effective time of the first route calculation algorithm is different from the effective time of the second route calculation algorithm
  • the expiration time of the first route calculation algorithm may be the same as or different from the effective time of the second route calculation algorithm, when the expiration time of the first route calculation algorithm is later than the effective time of the second route calculation algorithm, the effective time period of the first route calculation algorithm overlaps with the effective time period of the second route calculation algorithm, and when the expiration time of the first route calculation algorithm is the same as the effective time of the second route calculation algorithm, the effective time period of the first route calculation algorithm is continuous with the effective time period of the second route calculation algorithm.
  • the third time may be the same as or different from the first time.
  • the first routing calculation algorithm and the second routing calculation algorithm may be determined at the same time. Since the network topology changes in this case do not have obvious periodic changes, if the first effective time information also includes the change period of the effective time of the first routing calculation algorithm, the change period of the effective time of the first routing calculation algorithm may be determined based on the first effective time information and the second effective time information. In the case of defining multiple routing calculation algorithms with different effective times, the change period of the effective time of the routing calculation algorithm may be determined based on the effective time information of each routing calculation algorithm, so that the multiple routing calculation algorithms can be used periodically and cyclically.
  • the change period of the effective time of the first route calculation algorithm is the time period between the effective time in the first effective time information and the expiration time in the second effective time information; or, the change period of the effective time of the first route calculation algorithm is the sum of the effective time period indicated by the first effective time information and the effective time period indicated by the second effective time information.
  • the content of the second effective time information can refer to the content of the first effective time information, which is not repeated here.
  • the second effective time information also includes the change period of the effective time of the second route calculation algorithm, and the change period of the effective time of the second route calculation algorithm can be the same as the change period of the effective time of the first route calculation algorithm.
  • the first route calculation algorithm Before determining the first route calculation algorithm according to the first time, it is necessary to first obtain the first route calculation algorithm so that the first route calculation algorithm can be directly determined from multiple route calculation algorithms at the first time.
  • the first route calculation algorithm can be obtained by defining the first route calculation algorithm according to the change time information of the network connection state, or by receiving a message for notifying the first route calculation algorithm to obtain the first route calculation algorithm.
  • the algorithm type of the first routing calculation algorithm or the second routing calculation algorithm can be any routing calculation algorithm that performs routing calculation based on network topology constraints, such as flex-algo or multi-topology algorithm.
  • the network topology constraint can refer to the constraint condition that the link must satisfy.
  • the first network topology constraint can include a link color constraint, and the link color constraint is used to constrain the color of the links included in the first network topology. Different colors are used to distinguish different effective times. The colors of the links included in the network topology comply with the link color constraints.
  • the link color constraint constrains the colors of the links included in the first network topology in two ways, including but not limited to the following two ways: the first way is to indicate the colors of the links included in the first network topology through the link color constraint, for example, if the link color constraint indicates yellow, the color of the links included in the first network topology is yellow; the second way is to indicate the colors of the links excluded from the first network topology through the link color constraint, for example, if the link color constraint indicates yellow, the colors of the links included in the first network topology do not include yellow.
  • the first network topology corresponding to the specified color can be determined through the link color constraint, and the first network topology is valid during the effective time indicated by the specified color.
  • the multi-topology algorithm since the multi-topology algorithm refers to running multiple independent network topologies within an ISIS autonomous system, different routing information of different network topologies can be calculated based on the shortest path first (SPF) through multiple independent network topologies to achieve mutual shielding between multiple independent network topologies. Therefore, in the case where the first routing calculation algorithm is the multi-topology algorithm, the first network topology constraint can refer to the link identifiers of multiple links, and the links included in the first network topology belong to the links corresponding to the link identifiers in the first network topology constraint.
  • an ISIS LSP message for announcing the first route calculation algorithm may also be received, the first route calculation algorithm is carried in the FAD sub-TLV field of the ISIS LSP message, and the first effective time information is carried in the effective time sub-TLV field of the FAD sub-TLV; or, an OSPF LSA message for announcing the first route calculation algorithm is received, the first route calculation algorithm is carried in the FAD TLV field of the OSPF LSA message, and the first effective time information is carried in the effective time sub-TLV field of the FAD TLV; or, a BGP update message for announcing the first route calculation algorithm is received, the first route calculation algorithm is carried in the FAD TLV field of the BGP update message, and the first effective time information is carried in the effective time sub-TLV field of the FAD TLV.
  • a plurality of ways for announcing flexible algorithms are provided, and ways for carrying the effective time
  • the FAD sub-TLV field carrying the first flexible algorithm may be as shown in FIG4.
  • the FAD sub-TLV field includes a type field, a length field, a flexible algorithm (Flex-Algo) field, a metric type (Metric-Type) field, a calculation type (Calc-Type) field, a priority (Priority) field, a valid time sub-TLV field, and a sub-TLVs field.
  • the format definition of the FAD sub-TLV field can refer to the relevant description in the request for comments (RFC) 9350.
  • the FAD sub-TLV field can be carried in the Router CAPABILITY TLV-242 field of the ISIS LSP message. For detailed description, refer to the relevant description in RFC7981.
  • the type field is used to uniquely identify the FAD sub-TLV, for example, the value of the type field is 26; the length field indicates the total length of the FAD sub-TLV field after removing the type field and the length field, for example, the unit of the length field is bytes; the Flex-Algo field indicates the identification (ID) of the first flexible algorithm, and the value of the Flex-Algo field is a value from 128 to 255; the Metric-Type field indicates the path calculation constraint of the first flexible algorithm, and the path calculation constraint is the metric type used when calculating the route, for example, when the value of the Metric-Type field is 1, it means that the route is calculated based on the minimum unidirectional link delay, and when the value of the Metric-Type field is 2, it means that the route is calculated based on the TE metric; the Calc-Type field indicates the calculation method of the first flexible algorithm, for example, the calculation method of SPF; the Priority field indicates the priority announced by the first flexible algorithm, and the value of
  • the FAD TLV field carrying the first flexible algorithm may be as shown in FIG5.
  • the meaning of each field shown in FIG5 may refer to the relevant introduction of each field in FIG4, which will not be repeated here.
  • the FAD TLV field shown in FIG5 may be carried in the Router Information (RI) LSA field of the OSPF LSA message, and a detailed description may be found in the relevant description in RFC7770; or, the FAD TLV field shown in FIG5 may be carried in the BGP-LS routing attribute corresponding to the Node Network Layer Reachability Information (NLRI) of the BGP update message, and a detailed description may be found in the relevant description in RFC9351.
  • RI Router Information
  • NLRI Node Network Layer Reachability Information
  • an ISIS LSP message for announcing the first route calculation algorithm may also be received, the first route calculation algorithm being carried in a time-varying MT information sub-TLV field of the ISIS LSP message, and the first effective time information being carried in an effective time sub-TLV field of the time-varying MT information sub-TLV; or, an OSPF LSA message for announcing the first route calculation algorithm is received, the first route calculation algorithm being carried in a time-varying MT information TLV field of the OSPF LSA message, and the first effective time information being carried in an effective time sub-TLV field of the time-varying MT information TLV; or, a BGP update message for announcing the first route calculation algorithm is received, the first route calculation algorithm being carried in a time-varying MT information TLV field of the BGP update message, and the first effective time information being carried in an effective time sub-TLV field of the time-varying MT information TLV;
  • the time-varying MT information sub-TLV field carrying the first flexible algorithm may be as shown in FIG6 .
  • the time-varying MT information sub-TLV field includes a type field, a length field, a reserved field, an MT ID field, and a valid time sub-TLV field.
  • the type field is used to uniquely identify the time-varying MT information sub-TLV;
  • the length field indicates the total length of the time-varying MT information sub-TLV field after removing the type field and the length field, for example, the unit of the length field is bytes;
  • the reserved field is a field that has not been allocated;
  • the MT ID field indicates the ID of the first multi-topology algorithm, which is 12 bits in length.
  • the valid time sub-TLV field is used to carry the first valid time information.
  • the time-varying MT information sub-TLV field of the ISIS LSP message may also include multiple multi-topology algorithms such as the second multi-topology algorithm and the third multi-topology algorithm.
  • the time-varying MT information sub-TLV field may carry multiple MT ID fields corresponding to multiple multi-topology algorithms, for example, the MT ID1 field and the MT ID2 field, and each MT ID field includes a corresponding valid time sub-TLV field.
  • the time-varying MT information sub-TLV field may be carried in the Router CAPABILITY TLV-242 field of the ISIS LSP message.
  • a new time-varying MT information TLV field may be defined in the ISIS LSP message to carry the time-varying MT information sub-TLV field.
  • the time-varying MT information TLV field carrying the first flexible algorithm may be as shown in FIG7.
  • the meaning of each field shown in FIG7 may refer to the relevant introduction of each field in FIG6, which will not be repeated here.
  • the time-varying MT information TLV field shown in FIG7 may be carried in the RI LSA field of the OSPF LSA message, and a detailed description may refer to the relevant description in RFC7770.
  • a new LSA may be defined in the OSPF LSA message to carry the time-varying MT information TLV field; or, the time-varying MT information TLV field shown in FIG7 may be carried in the BGP-LS routing attribute corresponding to the Node NLRI of the BGP update message, and a detailed description may refer to the relevant description in RFC9351.
  • a new NLRI type may be defined in the BGP update message to carry the time-varying MT information TLV field, or the time-varying MT information TLV field may be carried in the local node descriptor (Local Node Descriptors) field of the existing Node NLRI.
  • the format diagrams of the valid time sub-TLV field carrying the valid time information are also different.
  • the embodiments of the present application only use the format diagrams of the valid time sub-TLV field shown in Figures 8-11 as examples for illustration.
  • the length of the type field is 1 or 2 bytes, which is used to uniquely identify the structure of the first routing calculation algorithm; the length of the length field is 1 or 2 bytes, which is used to indicate the length of the field structure of the validity time information except the length field and the type field; the length of the enable time field is 4 bytes, which is used to indicate the first effective time of the first routing calculation algorithm; the length of the disable time field is 4 bytes, which is used to indicate the first invalid time of the first routing calculation algorithm.
  • the validity time sub-TLV field shown in FIG9 adds a period field, and the length of the period field is 4 bytes, which is used to indicate the change period of the validity time of the first routing calculation algorithm.
  • the relevant content in FIG8 please refer to the relevant content in FIG8 , which will not be repeated here.
  • the valid time sub-TLV field can carry multiple valid time information through multiple change time units.
  • a change time unit includes a corresponding change time information index (index), a control flag (flags), and a triplet of valid time, expiration time and period. Therefore, the valid time sub-TLV can also include information such as the number of change time units.
  • FIG. 10 adds an initial time field, a number field, and a reserved field.
  • the initial time field is an 8-byte timestamp in seconds.
  • the value of the initial time field is the number of seconds that have passed since January 1, 1970 without considering leap seconds;
  • the length of the number field is 1 byte, which is used to indicate the number of change time information in the field structure of the time constraint;
  • the length of the unit field is 1 byte, which is used to indicate the time unit of the variable time information for subsequent expansion.
  • the meaning of the unit field can be as shown in Table 1. Taking the unit value (value) as 0 as an example, it indicates that the unit of the valid time, invalid time and period in the change time unit is microseconds. The case where the unit value is 9-255 has not been assigned yet.
  • FIG. 11 adds the initial time field, the number field and the reserved field, and compared with FIG. 10, FIG. 11 adds the index field, the flags field and the period field.
  • the index field is the first field of the change time unit, and the index field is the index of the change time unit, which uniquely identifies a change time unit carrying an effective time information;
  • the flags field is a control flag bit, and each bit in the flags field represents a corresponding control operation.
  • the lowest bit of the flags field as a deletion control bit as an example, when the lowest bit of the flags field is 1, it means that the effective time information in the change time unit is deleted.
  • the index field and the flags field operations such as deletion and modification of the effective time information of the first routing calculation algorithm that has been published can be implemented.
  • Step 302 determine a first network topology used during the effective time of a first route calculation algorithm based on first effective time information and a first network topology constraint, wherein the first route calculation algorithm and the first network topology are determined before the effective time of the first route calculation algorithm.
  • the first effective time information and the first network topology constraint are used to determine the network topology corresponding to the first routing calculation algorithm. Therefore, before the effective time of the first routing calculation algorithm, the first network topology used during the effective time of the first routing calculation algorithm can be determined in advance by determining the first effective time information and the first network topology constraint.
  • the first network topology can be generated at the first time, or it can be generated before the first time.
  • the first network topology determined in advance is directly selected at the first time. In short, the first network topology is determined before the effective time of the first routing calculation algorithm.
  • the method for generating the first network topology based on the first effective time information and the first network topology constraint can be to determine the physical network topology that is effective at the effective time of the first routing calculation algorithm based on the first effective time information and the time change information of the network connection state, and then determine the first network topology that satisfies the first network topology constraint in the physical network topology.
  • the difference between the first time and the effective time of the first routing calculation algorithm is not limited in the embodiment of the present application.
  • the method for generating the first network topology based on the first valid time information and the first network topology constraint can be to directly determine the first network topology that meets the link color constraint based on the color attribute included in the link.
  • the link includes a yellow attribute
  • the yellow color indicates the first valid time period, which means that the link is valid in the first valid time period.
  • the network topology composed of links with yellow attributes is the network topology that is valid in the first valid time period.
  • the first network topology corresponding to the specified color can be determined through the link color constraint, and the first network topology is valid during the valid time indicated by the specified color.
  • the second network topology used at the effective time of the second route calculation algorithm can be determined based on the second effective time information and the second network topology constraint, and the second route calculation algorithm and the second network topology are determined before the effective time of the second route calculation algorithm.
  • the first route calculation algorithm takes effect at the effective time of the first route calculation algorithm, and then by determining in advance before the effective time of the first route calculation algorithm the first network topology used at the effective time of the first route calculation algorithm, the route can be directly calculated using the first network topology determined in advance at the effective time of the first route calculation algorithm, thereby improving the efficiency of determining the first network topology, and thereby improving the efficiency of calculating the routing information of the first network topology based on the route calculation algorithm.
  • the method can also calculate the first routing information of the first network topology based on the first routing calculation algorithm at a second time, the second time is before the effective time of the first routing calculation algorithm, the second time is the same as the first time or is at the first time.
  • the difference between the second time and the effective time of the first route calculation algorithm is less than the difference threshold, and the difference threshold can be flexibly adjusted according to the application scenario.
  • the difference threshold can be a smaller value, so that the second time is closer to the effective time of the first route calculation algorithm. Since the first route calculation algorithm calculates the route in the first network topology, the first route information is used to forward the message in the first network topology.
  • the first routing information of the first network topology can be calculated in advance based on the routing calculation algorithm before the effective time of the first routing calculation algorithm, so that the first routing information calculated in advance can be directly used to forward messages during the effective time of the first routing calculation algorithm, and there is no need to calculate the first routing information during the effective time of the first routing calculation algorithm, which improves the efficiency of message forwarding based on the first routing information and avoids message loss in the process of calculating the first routing information.
  • the message after calculating the first routing information of the first network topology based on the first routing calculation algorithm, the message can be forwarded in the first network topology according to the calculated first routing information.
  • the network device determines to forward the network traffic based on the first routing information according to the arrival time of the network traffic within the effective time period of the first routing calculation algorithm, thereby achieving the effect of directing the network traffic to the first network topology for forwarding.
  • Figure 12 is a flowchart of network topology switching for a time-varying network with periodic topology changes.
  • the time-varying network with periodic topology changes can be a tidal network;
  • Figures 13 and 14 are flowcharts of network topology switching for a time-varying network with no obvious periodicity in topology changes.
  • the time-varying network with no obvious periodicity in topology changes can be a satellite network or an energy-prioritized network.
  • Link coloring and notification of link changes. Any network device in the tidal network assigns different color attributes to the links directly connected to any network device according to the changing rules of link opening and closing. Different valid time periods of the link are marked with different colors. This process is called link coloring. For example, a link that is open in both high-traffic time periods and low-traffic time periods is assigned a green attribute, and a link that is only open in low-traffic time periods is assigned a yellow attribute. In Figure 12, the low-traffic time period is (t0-t1), and the high-traffic time period is (t1-t2). The straight line represents the green attribute of the link, and the dotted line represents the yellow attribute of the link.
  • Each network device in the tidal network notifies each other of the coloring attribute information of the links directly connected to each network device. This process is called notifying link changes.
  • each network device notifies each other of other attribute information of the links, such as the interruption and metric value of the links directly connected to each network device.
  • each network device in the tidal network can obtain the attribute information of each link in the tidal network, thereby enabling the network topology that is effective in low-traffic time periods and the network topology that is effective in high-traffic time periods to be prepared in advance.
  • the first flexible algorithm and the second flexible algorithm can be defined on any one or more network devices in the tidal network.
  • the first effective time information included in the first flexible algorithm indicates a low-traffic time period
  • the second effective time information included in the second flexible algorithm indicates a high-traffic time period, that is, the effective time period and change period of the flexible algorithm are the same as the effective time period and change period of the network topology corresponding to the flexible algorithm.
  • the effective time, expiration time and change period of the flexible algorithm can be input externally, for example, they can be sent to the network device through a controller, or obtained through manual configuration.
  • the first network topology constraint included in the first flexible algorithm is a link color constraint, for example, the first network topology constraint indicates that only links with green attributes are used to determine the network topology;
  • the second network topology constraint included in the second flexible algorithm is also a link color constraint, for example, the second network topology constraint indicates that links with green attributes and yellow attributes are used to determine the network topology.
  • the flexible algorithm ID of the defined first flexible algorithm is 128, and the first effective time information of the first flexible algorithm is (t0-t1, T); the flexible algorithm ID of the defined second flexible algorithm is 129, and the second effective time information of the second flexible algorithm is (t1-t2, T), where T is the change period.
  • the first flexible algorithm or the second flexible algorithm may also include other constraints, such as metric type, metric value range and other constraints, and the network topology is determined by other constraints and the first effective time information.
  • the network device used to define flexible algorithms can announce the flexible algorithms of time-varying networks to other network devices, and announce the segment ID locator (SID locator) or Internet protocol (IP) prefix corresponding to the flexible algorithm together with the flexible algorithm.
  • the flexible algorithm is carried in the FAD TLV of the message for announcement.
  • the FAD TLV includes the flexible algorithm ID: 128, valid time information: (t0-t1, T), and the flexible algorithm ID: 129, valid time information is (t1-t2, T).
  • the SID of algorithm (algo): 128 is 10065
  • the SID of algo: 129 is 20065.
  • Each network device in the tidal network can generate a first network topology used during the effective time of the first flexible algorithm according to the state of each link of the tidal network during the effective time period of the first flexible algorithm by executing the method provided in the embodiment of the present application.
  • Topology the first network topology corresponds to the network topology represented by the dotted line in Figure 12;
  • the second network topology used during the effective time of the second flexible algorithm is generated according to the status of each link of the tidal network during the effective time period of the second flexible algorithm, and the second network topology corresponds to the network topology represented by the solid line in Figure 12.
  • notification information of link changes in the first network topology is received outside the effective time period of the first flexible algorithm
  • the notification information is stored until the first flexible algorithm is about to take effect, for example, 5 minutes before the effective time of the first flexible algorithm
  • the network topology is determined and routing calculation is performed based on the latest notification information of link changes, which can reduce unnecessary routing calculations and updates and dispatches of forwarding table entries.
  • the head node device of the Tide Network that receives the first message encapsulates the SID or IP prefix corresponding to different flexible algorithms in the first message according to the arrival time of the first message to obtain the second message.
  • the SID of algo:128 encapsulated in the first message arriving between (t0-t1) is 10065
  • the SID of algo:129 encapsulated in the first message arriving between (t1-t2) is 20065.
  • the intermediate node device that transmits the second message can look up the corresponding forwarding table entry according to the SID in the second message and forward it.
  • any network device of the satellite network can publish the state changes of the directly connected links in the future period to other devices of the satellite network, or can also send the state changes of the network topology in the future period to each network device in the satellite network through management.
  • the predicted state change of link 1 in the future period is to open at time t0 and close at time t1.
  • the first flexible algorithm and the second flexible algorithm can be defined on any network device of the satellite network.
  • the effective time period of the first flexible algorithm corresponds to the current time period (t2-t3)
  • the effective time period of the second flexible algorithm corresponds to the next time period (t3-t4).
  • t2, t3, and t4 can be flexibly set according to the actual changes in the time-varying network, wherein t2 can be the same as t0, and t3 can be the same as t1. This achieves non-loss forwarding between different time periods, and avoids excessive routing table entries.
  • the time period length is set according to the time-varying network scenario.
  • the change period T of the effective time of the first flexible algorithm and the second flexible algorithm is the sum of the two time periods.
  • the implementation methods of 3, 4, 5, and 6 in Figure 13 are consistent with the contents of 3, 4, 5, and 6 in Figure 12, and will not be repeated here.
  • FIG 14 is another way to define a flexible algorithm in a satellite network scenario, that is, to define multiple non-periodic flexible algorithms and continuously update them over time.
  • 2 in Figure 14 defining a flexible algorithm, does not define a change period of the effective time, 1, 3, 4, 5, and 6 in Figure 14 are consistent with those in Figure 13, and are not repeated here, and the processes of 5 and 6 in Figure 14 are not shown.
  • the flexible algorithm for the next time period is redefined based on the process of 7, defining a flexible algorithm, that is, the processes 2-5 need to be re-executed.
  • the flexible algorithm defined in 7 can define a new flexible algorithm ID and a new SID locator or IP prefix, or it can be the same as the flexible algorithm ID and SID locator or IP prefix of the first flexible algorithm after expiration, but the effective time information becomes (t5-t6), and t5 can be the same as t4.
  • the method can obtain the predictable time information of the change of the network connection state or the time information of the change of the periodically changing network connection state in advance, and then can construct multiple network topologies that are valid in different time periods by adding the valid time information in the routing calculation algorithm, so that when the network connection state changes, the network topology valid at that time can be directly used to calculate the route, thereby realizing flexible switching of network topologies in time-varying networks.
  • multiple routing information of multiple network topologies that are valid in different time periods is further constructed, so that when the network connection state changes, the routing information valid at that time is directly used to forward the message, thereby realizing flexible switching of forwarding paths in time-varying networks.
  • Figure 15 is a structural schematic diagram of a device for determining the network topology provided in an embodiment of the present application, and the device is applied to any of the network devices shown in Figure 2 above. Based on the following multiple modules shown in Figure 15, the device for determining the network topology shown in Figure 15 can perform all or part of the operations of the method shown in Figure 3. It should be understood that the device may include more additional modules than the modules shown or omit some of the modules shown therein, and the embodiment of the present application does not limit this. As shown in Figure 15, the device includes:
  • the processing module 1501 is used to perform operations other than the receiving and/or sending related operations performed by the method for determining the network topology shown in FIG. 3. Other operations;
  • the transceiver module 1502 is used to execute the receiving and/or sending related operations performed by the method for determining the network topology shown in FIG. 3 .
  • the transceiver module 1502 includes a receiving module and/or a sending module.
  • the receiving module is used to perform reception-related operations
  • the sending module is used to perform sending-related operations.
  • the processing module 1501 is used to determine a first routing calculation algorithm according to a first time
  • the first routing calculation algorithm includes first effective time information and a first network topology constraint
  • the first effective time information includes the effective time of the first routing calculation algorithm
  • the first effective time information and the first network topology constraint are used to determine the network topology corresponding to the first routing calculation algorithm, and the first time is before the effective time of the first routing calculation algorithm
  • the first network topology used at the effective time of the first routing calculation algorithm and the first routing calculation algorithm and the first network topology are determined before the effective time of the first routing calculation algorithm.
  • the processing module 1501 is further configured to calculate first routing information of the first network topology based on the first routing calculation algorithm at a second time, where the second time is before the effective time of the first routing calculation algorithm.
  • the validity period of the first routing calculation algorithm corresponds to the validity period of the first network topology.
  • the first effective time information further includes a change period of the effective time of the first routing calculation algorithm, and the change period of the effective time of the first routing calculation algorithm corresponds to the change period of the effective time of the first network topology.
  • the first network topology constraint includes a link color constraint, which is used to constrain the colors of links included in the first network topology, different colors are used to distinguish different valid times, and the colors of links included in the first network topology comply with the link color constraint.
  • the processing module 1501 is further used to determine a second route calculation algorithm according to a third time
  • the second route calculation algorithm includes second effective time information and a second network topology constraint
  • the second effective time information indicates the effective time of the second route calculation algorithm
  • the second effective time information and the second network topology constraint are used to determine the network topology corresponding to the second route calculation algorithm
  • the third time is before the effective time of the second route calculation algorithm
  • the effective time of the first route calculation algorithm and the effective time of the second route calculation algorithm are different
  • based on the second effective time information and the second network topology constraint determine the second network topology used at the effective time of the second route calculation algorithm, and the second route calculation algorithm and the second network topology are determined before the effective time of the second route calculation algorithm.
  • the first effective time information further includes a change period of the effective time of the first routing calculation algorithm, and the change period of the effective time of the first routing calculation algorithm is determined based on the first effective time information and the second effective time information.
  • the first routing calculation algorithm is a flex-algo or a multi-topology algorithm.
  • the first routing calculation algorithm is flex-algo; the transceiver module 1502 is used to receive an ISIS link state data unit LSP message for announcing the first routing calculation algorithm, the first routing calculation algorithm is carried in the FAD sub-TLV field of the ISIS LSP message, and the first valid time information is carried in the valid time sub-TLV field of the FAD sub-TLV.
  • the first routing calculation algorithm is flex-algo; the transceiver module 1502 is used to receive an OSPF LSA message for announcing the first routing calculation algorithm, the first routing calculation algorithm is carried in the FAD TLV field of the OSPF LSA message, and the first valid time information is carried in the valid time sub-TLV field of the FAD TLV.
  • the first routing calculation algorithm is flex-algo; the transceiver module 1502 is used to receive a BGP update message for announcing the first routing calculation algorithm, the first routing calculation algorithm is carried in the FAD TLV field of the BGP update message, and the first valid time information is carried in the valid time sub-TLV field of the FAD TLV.
  • the first routing calculation algorithm is a multi-topology algorithm
  • the transceiver module 1502 is used to receive an ISIS LSP message for announcing the first routing calculation algorithm, the first routing calculation algorithm is carried in the time-varying MT information sub-TLV field of the ISIS LSP message, and the first valid time information is carried in the valid time sub-TLV field of the time-varying MT information sub-TLV.
  • the first routing calculation algorithm is a multi-topology algorithm
  • the transceiver module 1502 is used to receive an open shortest route first protocol OSPF link state announcement LSA message for announcing the first routing calculation algorithm, the first routing calculation algorithm is carried in the time-varying MT information TLV field of the OSPF LSA message, and the first valid time information is carried in the valid time sub-TLV field of the time-varying MT information TLV.
  • the first routing calculation algorithm is a multi-topology algorithm
  • the transceiver module 1502 is used to receive a BGP update message for announcing the first routing calculation algorithm, the first routing calculation algorithm is carried in the time-varying MT information TLV field of the BGP update message, and the first valid time information is carried in the valid time sub-TLV field of the time-varying MT information TLV.
  • the device provided in FIG. 15 above only uses the division of the above functional modules as an example to implement its functions.
  • the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
  • the device provided in the above embodiment belongs to the same concept as the method embodiment. The specific implementation process is detailed in the method embodiment, which will not be repeated here.
  • the beneficial effects of the device provided in FIG. 15 can be found in the beneficial effects of the method shown in FIG. 3, which will not be repeated here.
  • FIG. 16 shows a schematic diagram of the structure of a network device 2000 provided by an exemplary embodiment of the present application.
  • the network device 2000 shown in FIG. 16 is used to perform the operations involved in the method for determining the network topology shown in FIG. 3 above.
  • the network device 2000 is, for example, a switch, a router, etc., and the network device 2000 can be implemented by a general bus architecture.
  • the network device 2000 includes at least one processor 2001 , a memory 2003 , and at least one communication interface 2004 .
  • the processor 2001 is, for example, a general-purpose central processing unit (CPU), a digital signal processor (DSP), a network processor (NP), a graphics processing unit (GPU), a neural-network processing units (NPU), a data processing unit (DPU), a microprocessor, or one or more integrated circuits for implementing the solution of the present application.
  • the processor 2001 includes an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof.
  • the PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
  • the processor can implement or execute various logic blocks, modules, and circuits described in conjunction with the disclosure of the embodiments of the present invention.
  • the processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and so on.
  • the network device 2000 further includes a bus.
  • the bus is used to transmit information between the components of the network device 2000.
  • the bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus.
  • PCI peripheral component interconnect
  • EISA extended industry standard architecture
  • the bus may be divided into an address bus, a data bus, a control bus, etc.
  • FIG16 is represented by only one line, but it does not mean that there is only one bus or one type of bus.
  • the memory 2003 is, for example, a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, or a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
  • the memory 2003 is, for example, independent and connected to the processor 2001 through a bus.
  • the memory 2003 can also be integrated with the processor 2001.
  • the communication interface 2004 uses any transceiver-like device to communicate with other devices or communication networks, and the communication network can be Ethernet, radio access network (RAN) or wireless local area network (WLAN), etc.
  • the communication interface 2004 can include a wired communication interface and a wireless communication interface.
  • the communication interface 2004 can be an Ethernet interface, a Fast Ethernet (FE) interface, a Gigabit Ethernet (GE) interface, an Asynchronous Transfer Mode (ATM) interface, a wireless local area network (WLAN) interface, a cellular network communication interface or a combination thereof.
  • the Ethernet interface can be an optical interface, an electrical interface or a combination thereof.
  • the communication interface 2004 can be used for the network device 2000 to communicate with other devices.
  • the processor 2001 may include one or more CPUs, such as CPU0 and CPU1 shown in FIG16 . Each of these processors may be a single-core CPU processor or a multi-core CPU processor.
  • the processor here may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
  • the network device 2000 may include multiple processors, such as the processor 2001 and the processor 2005 shown in FIG16 .
  • processors may be a single-core CPU or a multi-core CPU.
  • the processor here may refer to one or more devices, circuits, and/or processing cores for processing data (such as computer program instructions).
  • the network device 2000 may also include an output device and an input device.
  • Output device and processing The output device communicates with the processor 2001 and can display information in a variety of ways.
  • the output device can be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector.
  • the input device communicates with the processor 2001 and can receive user input in a variety of ways.
  • the input device can be a mouse, a keyboard, a touch screen device, or a sensor device.
  • the memory 2003 is used to store the program code 2010 for executing the solution of the present application
  • the processor 2001 can execute the program code 2010 stored in the memory 2003. That is, the network device 2000 can implement the method for determining the network topology provided by the method embodiment through the processor 2001 and the program code 2010 in the memory 2003.
  • the program code 2010 may include one or more software modules.
  • the processor 2001 itself can also store the program code or instruction for executing the solution of the present application.
  • the network device 2000 of the embodiment of the present application may correspond to any network device in the above-mentioned method embodiments, and the processor 2001 in the network device 2000 reads the instructions in the memory 2003, so that the network device 2000 shown in Figure 16 can execute all or part of the operations performed by the method shown in Figure 3.
  • the processor 2001 is used to determine a first routing calculation algorithm according to a first time
  • the first routing calculation algorithm includes first effective time information and a first network topology constraint
  • the first effective time information includes the effective time of the first routing calculation algorithm
  • the first effective time information and the first network topology constraint are used to determine the network topology corresponding to the first routing calculation algorithm
  • the first time is before the effective time of the first routing calculation algorithm
  • determine the first network topology used at the effective time of the first routing calculation algorithm, and the first routing calculation algorithm and the first network topology are determined before the effective time of the first routing calculation algorithm.
  • the network device 2000 may also correspond to the network topology determination device shown in FIG15 , and each functional module in the network topology determination device is implemented by the software of the network device 2000.
  • the functional modules included in the network topology determination device are generated after the processor 2001 of the network device 2000 reads the program code 2010 stored in the memory 2003.
  • each step of the method for determining the network topology shown in Figure 3 is completed by the hardware integrated logic circuit or software instructions in the processor of the network device 2000.
  • the steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor, or a combination of hardware and software modules in the processor.
  • the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc.
  • the storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.
  • Fig. 17 shows a schematic diagram of the structure of a network device 2100 provided by another exemplary embodiment of the present application, and the network device 2100 shown in Fig. 17 is used to perform all or part of the operations involved in the method for determining the network topology shown in Fig. 3.
  • the network device 2100 is, for example, a switch, a router, etc., and the network device 2100 can be implemented by a general bus architecture.
  • the network device 2100 includes: a main control board 2110 and an interface board 2130 .
  • the main control board is also called the main processing unit (MPU) or route processor card.
  • the main control board 2110 is used to control and manage various components in the network device 2100, including routing calculation, device management, device maintenance, and protocol processing functions.
  • the main control board 2110 includes: a central processing unit 2111 and a memory 2112.
  • the interface board 2130 is also called a line processing unit (LPU), a line card or a service board.
  • the interface board 2130 is used to provide various service interfaces and realize the forwarding of data packets.
  • the service interface includes but is not limited to an Ethernet interface, a POS (Packet over SONET/SDH) interface, etc.
  • the Ethernet interface is, for example, a Flexible Ethernet Clients (FlexE Clients) service interface.
  • the interface board 2130 includes: a central processor 2131, a network processor 2132, a forwarding table entry memory 2134 and a physical interface card (PIC) 2133.
  • PIC physical interface card
  • the central processor 2131 on the interface board 2130 is used to control and manage the interface board 2130 and communicate with the central processor 2111 on the main control board 2110 .
  • the network processor 2132 is used to implement message forwarding processing.
  • the network processor 2132 may be in the form of a forwarding chip.
  • the forwarding chip may be a network processor (NP).
  • the forwarding chip may be implemented by an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA).
  • ASIC application-specific integrated circuit
  • FPGA field programmable gate array
  • the network processor 2132 is used to forward received messages based on the forwarding table stored in the forwarding table entry memory 2134.
  • the message is sent to the CPU (such as the central processing unit 2131) for processing; if the destination address of the message is not the address of the network device 2100, the next hop and the output interface corresponding to the destination address are found in the forwarding table according to the destination address, and the message is forwarded to the output interface corresponding to the destination address.
  • the processing of uplink messages may include: processing of the message input interface, Forwarding table lookup: Downlink message processing may include: forwarding table lookup, etc.
  • the central processor may also perform the functions of the forwarding chip, such as implementing software forwarding based on a general-purpose CPU, so that the interface board does not need a forwarding chip.
  • the physical interface card 2133 is used to implement the physical layer docking function, whereby the original traffic enters the interface board 2130, and the processed message is sent out from the physical interface card 2133.
  • the physical interface card 2133 also called a daughter card, can be installed on the interface board 2130, and is responsible for converting the photoelectric signal into a message and forwarding the message to the network processor 2132 for processing after checking the legitimacy of the message.
  • the central processor 2131 can also perform the functions of the network processor 2132, such as implementing software forwarding based on a general-purpose CPU, so that the network processor 2132 is not required in the physical interface card 2133.
  • the network device 2100 includes multiple interface boards, for example, the network device 2100 further includes an interface board 2140, and the interface board 2140 includes: a central processor 2141, a network processor 2142, a forwarding table entry memory 2144, and a physical interface card 2143.
  • the functions and implementation methods of the components in the interface board 2140 are the same or similar to those of the interface board 2130, and are not described in detail here.
  • the network device 2100 further includes a switching fabric board 2120.
  • the switching fabric board 2120 may also be referred to as a switch fabric unit (SFU).
  • SFU switch fabric unit
  • the switching fabric board 2120 is used to complete data exchange between the interface boards.
  • the interface board 2130 and the interface board 2140 may communicate through the switching fabric board 2120.
  • the main control board 2110 is coupled to the interface board.
  • the main control board 2110, the interface board 2130, the interface board 2140, and the switching network board 2120 are connected to the system backplane through the system bus to achieve intercommunication.
  • an inter-process communication (IPC) channel is established between the main control board 2110 and the interface board 2130 and the interface board 2140, and the main control board 2110 and the interface board 2130 and the interface board 2140 communicate through the IPC channel.
  • IPC inter-process communication
  • the network device 2100 includes a control plane and a forwarding plane.
  • the control plane includes a main control board 2110 and a central processing unit 2111.
  • the forwarding plane includes various components for performing forwarding, such as a forwarding table entry memory 2134, a physical interface card 2133, and a network processor 2132.
  • the control plane performs functions such as a router, generating a forwarding table, processing signaling and protocol messages, and configuring and maintaining the status of the network device.
  • the control plane sends the generated forwarding table to the forwarding plane.
  • the network processor 2132 forwards the message received by the physical interface card 2133 based on the forwarding table sent by the control plane.
  • the forwarding table sent by the control plane can be stored in the forwarding table entry memory 2134. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same network device.
  • main control boards there may be one or more main control boards, and when there are multiple boards, they may include a primary main control board and a backup main control board. There may be one or more interface boards. The stronger the data processing capability of the network device, the more interface boards are provided. There may also be one or more physical interface cards on the interface board. There may be no switching network board, or there may be one or more switching network boards. When there are multiple switching network boards, they can jointly realize load sharing and redundant backup. In a centralized forwarding architecture, network devices may not need switching network boards, and the interface board is responsible for processing the service data of the entire system.
  • network devices may have at least one switching network board, and data exchange between multiple interface boards is realized through the switching network board, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of network devices with distributed architectures are greater than those of network devices with centralized architectures.
  • the network device may have only one board, that is, no switching board, and the functions of the interface board and the main control board are integrated on the board.
  • the central processor on the interface board and the central processor on the main control board can be combined into one central processor on the board to perform the functions of the two.
  • This type of network device has low data exchange and processing capabilities (for example, low-end switches or routers and other network devices).
  • the specific architecture to be adopted depends on the specific networking deployment scenario, and no limitation is made here.
  • the network device 2100 corresponds to the device for determining the network topology shown in Figure 15.
  • the processing module 1501 in the device for determining the network topology shown in Figure 15 is equivalent to the central processor 2111 or the network processor 2132 in the network device 2100, and the transceiver module 1502 is equivalent to the physical interface card 2133 in the network device 2100.
  • the processor may be a CPU, or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • DSP digital signal processors
  • ASIC application specific integrated circuits
  • FPGA field-programmable gate arrays
  • the general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting the advanced RISC machines (ARM) architecture.
  • the memory may include a read-only memory and a random access memory, and provide instructions and data to the processor.
  • the memory may also include a non-volatile random access memory.
  • the memory may also store information about the device type.
  • the memory may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories.
  • the nonvolatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory.
  • the volatile memory may be a random access memory (RAM), which Used as an external cache. By way of example but not limitation, many forms of RAM are available.
  • SRAM static RAM
  • DRAM dynamic random access memory
  • SDRAM synchronous DRAM
  • DDR SDRAM double data rate synchronous dynamic random access memory
  • ESDRAM enhanced synchronous dynamic random access memory
  • SLDRAM synchronous link dynamic random access memory
  • DR RAM direct rambus RAM
  • An embodiment of the present application also provides a computer-readable storage medium, in which at least one instruction is stored.
  • the instruction is loaded and executed by a processor so that a computer implements any of the above methods for determining a network topology.
  • the embodiments of the present application also provide a computer program (product), which, when executed by a computer, can enable a processor or a computer to execute the corresponding steps and/or processes in the above method embodiments.
  • An embodiment of the present application also provides a chip, including a processor, for calling and executing instructions stored in the memory from the memory, so that a communication device equipped with the chip executes any of the above methods for determining a network topology.
  • An embodiment of the present application also provides another chip, including: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory.
  • the processor is used to execute any of the above methods for determining the network topology.
  • a computer program product includes one or more computer instructions.
  • the computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
  • Computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means.
  • the computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. Available media can be magnetic media (e.g., floppy disk, hard disk, tape), optical media (e.g., DVD), or semiconductor media (e.g., solid state disk), etc.
  • the computer program product includes one or more computer program instructions.
  • the method of the embodiment of the present application can be described in the context of a machine executable instruction, and the machine executable instruction is such as included in the program module executed in the device on the real or virtual processor of the target.
  • a program module includes a routine, a program, a library, an object, a class, a component, a data structure, etc., which performs a specific task or realizes a specific abstract data structure.
  • the function of the program module can be merged or divided between the described program modules.
  • the machine executable instruction for the program module can be executed in a local or distributed device. In a distributed device, the program module can be located in both a local and a remote storage medium.
  • the computer program code for realizing the method for the embodiment of the present application can be written in one or more programming languages. These computer program codes can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by a computer or other programmable data processing device, causes the function/operation specified in the flow chart and/or block diagram to be implemented.
  • the program code can be executed completely on a computer, partially on a computer, as an independent software package, partially on a computer and partially on a remote computer or completely on a remote computer or server.
  • computer program codes or related data may be carried by any appropriate carrier to enable a device, apparatus or processor to perform the various processes and operations described above.
  • Examples of carriers include signals, computer readable media, and the like.
  • Examples of signals may include electrical, optical, radio, acoustic or other forms of propagated signals, such as carrier waves, infrared signals, etc.
  • a machine-readable medium may be any tangible medium that contains or stores a program for or related to an instruction execution system, apparatus, or device.
  • a machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • a machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination thereof. More detailed examples of machine-readable storage media include an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical storage device, a magnetic storage device, or any suitable combination thereof.
  • the disclosed systems, devices and methods can be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the module is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, or it can be an electrical, mechanical or other form of connection.
  • modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiments of the present application.
  • each functional module in each embodiment of the present application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or software functional modules.
  • the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method in each embodiment of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
  • first, second, etc. are used to distinguish between identical or similar items with substantially the same effects and functions. It should be understood that there is no logical or temporal dependency between “first”, “second”, and “nth”, nor is the quantity and execution order limited. It should also be understood that although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another.
  • the first effective time information can be referred to as the second effective time information
  • the second effective time information can be referred to as the first effective time information. Both the first effective time information and the second effective time information can be effective time information, and in some cases, can be separate and different effective time information.
  • the size of the serial number of each process does not mean the order of execution.
  • the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
  • determining B based on A does not mean determining B only based on A.
  • B can also be determined based on A and/or other information.
  • references to “one embodiment”, “an embodiment”, or “a possible implementation” throughout the specification mean that specific features, structures, or characteristics related to the embodiment or implementation are included in at least one embodiment of the present application. Therefore, the references to “in one embodiment” or “in an embodiment”, or “a possible implementation” throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present application relates to the technical field of communications, and discloses a network topology determination method and apparatus, a device, and a computer readable storage medium. The method comprises: determining a first route calculation algorithm on the basis of first time, the first route calculation algorithm comprising first valid time information and a first network topology constraint, the first valid time information comprising valid time of the first route calculation algorithm, and the first time being earlier than the valid time of the first route calculation algorithm; and on the basis of the first valid time information and the first network topology constraint, determining a first network topology used at the valid time of the first route calculation algorithm, the first route calculation algorithm and the first network topology being determined before the valid time of the first route calculation algorithm. In the method, the first network topology determined in advance can be directly used at the valid time of the first route calculation algorithm, improving the efficiency of determining the first network topology, thereby improving the efficiency of calculating route information of the first network topology on the basis of the route calculation algorithm.

Description

网络拓扑的确定方法、装置、设备及计算机可读存储介质Method, device, equipment and computer-readable storage medium for determining network topology

本申请要求于2023年06月29日提交的申请号为202310787428.4、发明名称为“一种时变网络路由方法、设备及系统”的中国专利申请的优先权,以及2023年07月24日提交的申请号为202310919266.5、发明名称为“网络拓扑的确定方法、装置、设备及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of Chinese patent application with application number 202310787428.4 filed on June 29, 2023, and invention name “A time-varying network routing method, device and system”, and the priority of Chinese patent application with application number 202310919266.5 filed on July 24, 2023, and invention name “Network topology determination method, device, equipment and computer-readable storage medium”, all contents of which are incorporated by reference into this application.

技术领域Technical Field

本申请涉及通信技术领域,特别涉及网络拓扑的确定方法、装置、设备及计算机可读存储介质。The present application relates to the field of communication technology, and in particular to a method, apparatus, device and computer-readable storage medium for determining a network topology.

背景技术Background Art

随着通信技术的发展,不同业务或场景对网络的需求逐渐多样化,进而灵活算法(flexible algorithm,flex-algo)和多拓扑(multi-topology)算法等基于网络拓扑约束进行路由计算的路由计算算法应运而生。不同的路由计算算法能够根据不同的网络拓扑约束确定不同的网络拓扑,进而基于不同的路由计算算法能够计算不同的网络拓扑的路由信息。因此,在基于任一路由计算算法计算路由之前,需要先确定该任一路由计算算法的网络拓扑。With the development of communication technology, the demands of different services or scenarios for networks have gradually diversified, and thus routing calculation algorithms such as flexible algorithms (flex-algo) and multi-topology algorithms that perform routing calculations based on network topology constraints have emerged. Different routing calculation algorithms can determine different network topologies based on different network topology constraints, and thus can calculate routing information of different network topologies based on different routing calculation algorithms. Therefore, before calculating routes based on any routing calculation algorithm, it is necessary to first determine the network topology of any routing calculation algorithm.

发明内容Summary of the invention

本申请提供了一种网络拓扑的确定方法、装置、设备及计算机可读存储介质,用于在路由计算算法的有效时间之前确定在路由计算算法的有效时间使用的网络拓扑。The present application provides a method, apparatus, device and computer-readable storage medium for determining a network topology, which are used to determine a network topology used at the effective time of a routing calculation algorithm before the effective time of the routing calculation algorithm.

第一方面,提供了一种网络拓扑的确定方法,该方法根据第一时间确定第一路由计算算法,第一路由计算算法包括第一有效时间信息和第一网络拓扑约束,第一有效时间信息包括第一路由计算算法的有效时间,第一有效时间信息和第一网络拓扑约束用于确定第一路由计算算法对应的网络拓扑,第一时间在第一路由计算算法的有效时间之前;基于第一有效时间信息和第一网络拓扑约束确定在第一路由计算算法的有效时间使用的第一网络拓扑,第一路由计算算法以及第一网络拓扑在第一路由计算算法的有效时间之前确定。In a first aspect, a method for determining a network topology is provided. The method determines a first routing calculation algorithm according to a first time, the first routing calculation algorithm includes first effective time information and a first network topology constraint, the first effective time information includes the effective time of the first routing calculation algorithm, the first effective time information and the first network topology constraint are used to determine the network topology corresponding to the first routing calculation algorithm, and the first time is before the effective time of the first routing calculation algorithm; based on the first effective time information and the first network topology constraint, a first network topology used at the effective time of the first routing calculation algorithm is determined, and the first routing calculation algorithm and the first network topology are determined before the effective time of the first routing calculation algorithm.

该方法通过在第一路由计算算法中增加第一有效时间信息,使得第一路由计算算法在第一路由计算算法的有效时间开始生效,进而通过在第一路由计算算法的有效时间之前提前确定在第一路由计算算法的有效时间使用的第一网络拓扑,使得在第一路由计算算法的有效时间可以直接使用提前确定好的第一网络拓扑,提高了确定第一网络拓扑的效率,进而提高了基于第一路由计算算法计算第一网络拓扑的路由信息的效率。The method adds first effective time information to a first routing calculation algorithm so that the first routing calculation algorithm becomes effective at the effective time of the first routing calculation algorithm, and then determines in advance before the effective time of the first routing calculation algorithm a first network topology used at the effective time of the first routing calculation algorithm so that the first network topology determined in advance can be directly used at the effective time of the first routing calculation algorithm, thereby improving the efficiency of determining the first network topology, and further improving the efficiency of calculating routing information of the first network topology based on the first routing calculation algorithm.

在一种可能的实施方式中,在基于第一有效时间信息和第一网络拓扑约束确定在第一路由计算算法的有效时间使用的第一网络拓扑之后,还在第二时间,基于第一路由计算算法计算第一网络拓扑的第一路由信息,第二时间在第一路由计算算法的有效时间之前。其中,第二时间与第一路由计算算法的有效时间之间的差值小于差值阈值,差值阈值可以根据应用场景灵活调整,例如,差值阈值可以为较小值,使得第二时间距离第一路由计算算法的有效时间较近。由于第一路由计算算法是在第一网络拓扑中计算路由的,因此,第一路由信息用于在第一网络拓扑中转发报文。In a possible implementation, after determining the first network topology used at the effective time of the first routing calculation algorithm based on the first effective time information and the first network topology constraint, the first routing information of the first network topology is calculated based on the first routing calculation algorithm at a second time, and the second time is before the effective time of the first routing calculation algorithm. The difference between the second time and the effective time of the first routing calculation algorithm is less than the difference threshold, and the difference threshold can be flexibly adjusted according to the application scenario. For example, the difference threshold can be a smaller value, so that the second time is closer to the effective time of the first routing calculation algorithm. Since the first routing calculation algorithm calculates the route in the first network topology, the first routing information is used to forward the message in the first network topology.

由此,在第一路由计算算法的有效时间之前还可以提前基于路由计算算法计算第一网络拓扑的第一路由信息,使得在第一路由计算算法的有效时间可以直接使用提前计算好的第一路由信息进行报文转发,无需在第一路由计算算法的有效时间现去计算第一路由信息,提高了基于第一路由信息进行报文转发的效率,避免在计算第一路由信息的过程中的报文丢包。Therefore, the first routing information of the first network topology can be calculated in advance based on the routing calculation algorithm before the effective time of the first routing calculation algorithm, so that the first routing information calculated in advance can be directly used to forward messages during the effective time of the first routing calculation algorithm, and there is no need to calculate the first routing information during the effective time of the first routing calculation algorithm, which improves the efficiency of message forwarding based on the first routing information and avoids message loss in the process of calculating the first routing information.

在一种可能的实施方式中,第一路由计算算法的有效时间对应第一网络拓扑的有效时间。也就是说,第一路由计算算法的有效时间可以基于第一网络拓扑的有效时间确定,针对网络连接状态会发生变化的场景而言,网络连接状态发生变化前后的网络拓扑不同,即不同时间段对应不同的网络 拓扑,也即任一网络拓扑在对应的有效时间段内有效,有效时间段则是指有效时间到失效时间之间的时间段。由此,第一路由计算算法的有效时间与第一网络拓扑的有效时间相对应,能够通过切换路由计算算法实现网络拓扑的切换,避免由网络拓扑变化导致的报文丢包。In a possible implementation, the effective time of the first routing calculation algorithm corresponds to the effective time of the first network topology. That is, the effective time of the first routing calculation algorithm can be determined based on the effective time of the first network topology. For scenarios where the network connection state changes, the network topology before and after the network connection state changes is different, that is, different time periods correspond to different networks. Topology, that is, any network topology is valid within the corresponding valid time period, and the valid time period refers to the time period between the valid time and the invalid time. Therefore, the valid time of the first routing calculation algorithm corresponds to the valid time of the first network topology, and the switching of the network topology can be achieved by switching the routing calculation algorithm, thereby avoiding packet loss caused by changes in the network topology.

在一种可能的实施方式中,第一有效时间信息还包括第一路由计算算法的有效时间的变化周期,第一路由计算算法的有效时间的变化周期对应第一网络拓扑的有效时间的变化周期。通过在第一有效时间信息中携带有效时间的变化周期,使得第一路由计算算法能够周期性的生效,提高了第一路由计算算法的时间约束的灵活性。此外,第一路由计算算法的有效时间的变化周期与第一网络拓扑的有效时间的变化周期相对应,使得通过周期性的切换路由计算算法能够实现周期性的网络拓扑的切换,避免在第一网络拓扑的有效时间之外使用第一路由计算算法导致的报文丢包。In a possible implementation, the first effective time information also includes a change period of the effective time of the first routing calculation algorithm, and the change period of the effective time of the first routing calculation algorithm corresponds to the change period of the effective time of the first network topology. By carrying the change period of the effective time in the first effective time information, the first routing calculation algorithm can be periodically effective, which improves the flexibility of the time constraint of the first routing calculation algorithm. In addition, the change period of the effective time of the first routing calculation algorithm corresponds to the change period of the effective time of the first network topology, so that the periodic switching of the network topology can be achieved by periodically switching the routing calculation algorithm, avoiding packet loss caused by using the first routing calculation algorithm outside the effective time of the first network topology.

在一种可能的实施方式中,第一网络拓扑约束包括链路颜色约束,链路颜色约束用于约束第一网络拓扑包括的链路的颜色,不同颜色用于区分不同的有效时间,第一网络拓扑包括的链路的颜色符合链路颜色约束。通过对链路进行不同有效时间的不同染色,使得通过链路颜色约束能够确定出指定颜色对应的第一网络拓扑,该第一网络拓扑在指定颜色指示的有效时间有效。In a possible implementation, the first network topology constraint includes a link color constraint, the link color constraint is used to constrain the color of the links included in the first network topology, different colors are used to distinguish different valid times, and the colors of the links included in the first network topology conform to the link color constraint. By coloring the links differently for different valid times, the first network topology corresponding to the specified color can be determined through the link color constraint, and the first network topology is valid during the valid time indicated by the specified color.

在一种可能的实施方式中,该方法还根据第三时间确定第二路由计算算法,第二路由计算算法包括第二有效时间信息和第二网络拓扑约束,第二有效时间信息指示第二路由计算算法的有效时间,第二有效时间信息和第二网络拓扑约束用于确定第二路由计算算法对应的网络拓扑,第三时间在第二路由计算算法的有效时间之前,第一路由计算算法的有效时间和第二路由计算算法的有效时间不同;基于第二有效时间信息和第二网络拓扑约束确定在第二路由计算算法的有效时间使用的第二网络拓扑,第二路由计算算法以及第二网络拓扑在第二路由计算算法的有效时间之前确定。该方法通过定义不同有效时间对应的不同路由计算算法,使得路由计算方法的应用更灵活。In a possible implementation, the method further determines a second route calculation algorithm according to a third time, the second route calculation algorithm includes second effective time information and a second network topology constraint, the second effective time information indicates the effective time of the second route calculation algorithm, the second effective time information and the second network topology constraint are used to determine the network topology corresponding to the second route calculation algorithm, the third time is before the effective time of the second route calculation algorithm, the effective time of the first route calculation algorithm and the effective time of the second route calculation algorithm are different; based on the second effective time information and the second network topology constraint, the second network topology used in the effective time of the second route calculation algorithm is determined, and the second route calculation algorithm and the second network topology are determined before the effective time of the second route calculation algorithm. The method makes the application of the route calculation method more flexible by defining different route calculation algorithms corresponding to different effective times.

在一种可能的实施方式中,第一有效时间信息还包括第一路由计算算法的有效时间的变化周期,第一路由计算算法的有效时间的变化周期基于第一有效时间信息与第二有效时间信息确定。在定义不同有效时间的多个路由计算算法的情况下,可以根据每一路由计算算法的有效时间信息确定路由计算算法的有效时间的变化周期,进而能够周期性的循环使用该多个路由计算算法。In a possible implementation, the first effective time information also includes a change period of the effective time of the first routing calculation algorithm, and the change period of the effective time of the first routing calculation algorithm is determined based on the first effective time information and the second effective time information. In the case of defining multiple routing calculation algorithms with different effective times, the change period of the effective time of the routing calculation algorithm can be determined according to the effective time information of each routing calculation algorithm, so that the multiple routing calculation algorithms can be used periodically and cyclically.

在一种可能的实施方式中,第一路由计算算法可以为flex-algo或者multi-topology算法。In a possible implementation, the first routing calculation algorithm may be a flex-algo or a multi-topology algorithm.

在第一路由计算算法为flex-algo的情况下,根据第一时间确定第一路由计算算法之前,还可以接收用于通告第一路由计算算法的中间系统到中间系统协议(intermediate system to intermediate system,ISIS)链路状态协议数据单元(link state PDU,LSP)报文,第一路由计算算法携带在ISIS LSP报文的灵活算法定义(flexible algorithm define,FAD)sub-TLV字段中,第一有效时间信息携带在FAD sub-TLV的有效时间sub-TLV字段中;或者,接收用于通告第一路由计算算法的开放式最短路由优先协议(open shortest path first,OSPF)链路状态通告(link state advertisement,LSA)报文,第一路由计算算法携带在OSPF LSA报文的FAD TLV字段中,第一有效时间信息携带在FAD TLV的有效时间子sub-TLV字段中;或者,接收用于通告第一路由计算算法的边界网关协议(border gateway protocol,BGP)更新(update)报文,第一路由计算算法携带在BGP update报文的FAD TLV字段中,第一有效时间信息携带在FAD TLV的有效时间子sub-TLV字段中。In the case where the first routing calculation algorithm is flex-algo, before determining the first routing calculation algorithm according to the first time, an intermediate system to intermediate system protocol (ISIS) link state protocol data unit (LSP) message for announcing the first routing calculation algorithm may also be received, the first routing calculation algorithm being carried in a flexible algorithm define (FAD) sub-TLV field of the ISIS LSP message, and the first validity time information being carried in a validity time sub-TLV field of the FAD sub-TLV; or, an open source protocol for announcing the first routing calculation algorithm may be received. An open shortest path first (OSPF) link state advertisement (LSA) message is received, the first routing calculation algorithm is carried in the FAD TLV field of the OSPF LSA message, and the first valid time information is carried in the valid time sub-TLV field of the FAD TLV; or, a border gateway protocol (BGP) update message is received for announcing the first routing calculation algorithm, the first routing calculation algorithm is carried in the FAD TLV field of the BGP update message, and the first valid time information is carried in the valid time sub-TLV field of the FAD TLV.

该方法提供了多种用于通告灵活算法的方式,还分别提供了携带灵活算法的有效时间信息的方式,为该方法的实施提供了保障。其中,PDU为协议数据单元(protocol data unit)的缩写,TLV为类型(type)、长度(length)、值(value)字段的简称,sub-TLV为子类型(type)、长度(length)、值(value)字段的简称。The method provides multiple ways to announce flexible algorithms, and also provides ways to carry the effective time information of flexible algorithms, which provides a guarantee for the implementation of the method. PDU is the abbreviation of protocol data unit, TLV is the abbreviation of type, length, value field, and sub-TLV is the abbreviation of subtype, length, value field.

在第一路由计算算法为multi-topology算法的情况下,根据第一时间确定第一路由计算算法之前,还可以接收用于通告第一路由计算算法的ISIS LSP报文,第一路由计算算法携带在ISIS LSP报文的时变多拓扑(multi-topology,MT)信息sub-TLV字段中,第一有效时间信息携带在时变MT信息sub-TLV的有效时间sub-TLV字段中;或者,接收用于通告第一路由计算算法的OSPF LSA报文,第一路由计算算法携带在OSPF LSA报文的时变MT信息TLV字段中,第一有效时间信息携带在时变MT信息TLV的有效时间子sub-TLV字段中;或者,接收用于通告第一路由计算算法的BGP update报文,第一路由计算算法携带在BGP update报文的时变MT信息TLV字段中,第一有效时间信息携带在时变MT信息TLV的有效时间子sub-TLV字段中。 In the case where the first route calculation algorithm is a multi-topology algorithm, before determining the first route calculation algorithm according to the first time, an ISIS LSP message for announcing the first route calculation algorithm may also be received, the first route calculation algorithm being carried in a time-varying multi-topology (multi-topology, MT) information sub-TLV field of the ISIS LSP message, and the first effective time information being carried in an effective time sub-TLV field of the time-varying MT information sub-TLV; or, an OSPF LSA message for announcing the first route calculation algorithm is received, the first route calculation algorithm is carried in a time-varying MT information TLV field of the OSPF LSA message, and the first effective time information is carried in an effective time sub-TLV field of the time-varying MT information TLV; or, a BGP update message for announcing the first route calculation algorithm is received, the first route calculation algorithm is carried in a time-varying MT information TLV field of the BGP update message, and the first effective time information is carried in an effective time sub-TLV field of the time-varying MT information TLV.

该方法提供了多种用于通告multi-topology算法的方式,还分别提供了携带multi-topology算法的有效时间信息的方式,为该方法的实施提供了保障。The method provides multiple ways to notify the multi-topology algorithm, and also provides ways to carry the effective time information of the multi-topology algorithm, thereby providing a guarantee for the implementation of the method.

第二方面,提供了一种网络拓扑的确定装置,该装置包括:处理模块,用于执行第一方面或第一方面的任一种可能的实施方式中的接收和/或发送相关的操作之外的其它操作;收发模块,用于执行第一方面或第一方面的任一种可能的实施方式中的接收和/或发送相关的操作。In a second aspect, a device for determining a network topology is provided, the device comprising: a processing module for performing operations other than the operations related to receiving and/or sending in the first aspect or any possible implementation of the first aspect; a transceiver module for performing operations related to receiving and/or sending in the first aspect or any possible implementation of the first aspect.

在一种可能的实施方式中,收发模块包括接收模块和/或发送模块。接收模块用于执行接收相关的操作,发送模块用于执行发送相关的操作。In a possible implementation, the transceiver module includes a receiving module and/or a sending module. The receiving module is used to perform reception-related operations, and the sending module is used to perform sending-related operations.

在一种可能的实施方式中,处理模块,用于根据第一时间确定第一路由计算算法,第一路由计算算法包括第一有效时间信息和第一网络拓扑约束,第一有效时间信息包括第一路由计算算法的有效时间,第一有效时间信息和第一网络拓扑约束用于确定第一路由计算算法对应的网络拓扑,第一时间在第一路由计算算法的有效时间之前;基于第一有效时间信息和第一网络拓扑约束确定在第一路由计算算法的有效时间使用的第一网络拓扑,第一路由计算算法以及第一网络拓扑在第一路由计算算法的有效时间之前确定。In a possible implementation, a processing module is used to determine a first routing calculation algorithm according to a first time, the first routing calculation algorithm includes first effective time information and a first network topology constraint, the first effective time information includes the effective time of the first routing calculation algorithm, the first effective time information and the first network topology constraint are used to determine the network topology corresponding to the first routing calculation algorithm, and the first time is before the effective time of the first routing calculation algorithm; based on the first effective time information and the first network topology constraint, determine the first network topology used at the effective time of the first routing calculation algorithm, and the first routing calculation algorithm and the first network topology are determined before the effective time of the first routing calculation algorithm.

在一种可能的实施方式中,处理模块,还用于在第二时间,基于第一路由计算算法计算第一网络拓扑的第一路由信息,第二时间在第一路由计算算法的有效时间之前。In a possible implementation, the processing module is further configured to calculate first routing information of the first network topology based on the first routing calculation algorithm at a second time, where the second time is before the effective time of the first routing calculation algorithm.

在一种可能的实施方式中,第一路由计算算法的有效时间对应第一网络拓扑的有效时间。In a possible implementation manner, the validity period of the first routing calculation algorithm corresponds to the validity period of the first network topology.

在一种可能的实施方式中,第一有效时间信息还包括第一路由计算算法的有效时间的变化周期,第一路由计算算法的有效时间的变化周期对应第一网络拓扑的有效时间的变化周期。In a possible implementation manner, the first effective time information further includes a change period of the effective time of the first routing calculation algorithm, and the change period of the effective time of the first routing calculation algorithm corresponds to the change period of the effective time of the first network topology.

在一种可能的实施方式中,第一网络拓扑约束包括链路颜色约束,链路颜色约束用于约束第一网络拓扑包括的链路的颜色,不同颜色用于区分不同的有效时间,第一网络拓扑包括的链路的颜色符合链路颜色约束。In a possible implementation, the first network topology constraint includes a link color constraint, which is used to constrain the colors of links included in the first network topology, different colors are used to distinguish different valid times, and the colors of links included in the first network topology comply with the link color constraint.

在一种可能的实施方式中,处理模块,还用于根据第三时间确定第二路由计算算法,第二路由计算算法包括第二有效时间信息和第二网络拓扑约束,第二有效时间信息指示第二路由计算算法的有效时间,第二有效时间信息和第二网络拓扑约束用于确定第二路由计算算法对应的网络拓扑,第三时间在第二路由计算算法的有效时间之前,第一路由计算算法的有效时间和第二路由计算算法的有效时间不同;基于第二有效时间信息和第二网络拓扑约束确定在第二路由计算算法的有效时间使用的第二网络拓扑,第二路由计算算法以及第二网络拓扑在第二路由计算算法的有效时间之前确定。In a possible implementation, the processing module is further used to determine a second route calculation algorithm according to a third time, the second route calculation algorithm includes second effective time information and a second network topology constraint, the second effective time information indicates the effective time of the second route calculation algorithm, the second effective time information and the second network topology constraint are used to determine the network topology corresponding to the second route calculation algorithm, the third time is before the effective time of the second route calculation algorithm, the effective time of the first route calculation algorithm and the effective time of the second route calculation algorithm are different; based on the second effective time information and the second network topology constraint, determine the second network topology used at the effective time of the second route calculation algorithm, and the second route calculation algorithm and the second network topology are determined before the effective time of the second route calculation algorithm.

在一种可能的实施方式中,第一有效时间信息还包括第一路由计算算法的有效时间的变化周期,第一路由计算算法的有效时间的变化周期基于第一有效时间信息与第二有效时间信息确定。In a possible implementation manner, the first effective time information further includes a change period of the effective time of the first routing calculation algorithm, and the change period of the effective time of the first routing calculation algorithm is determined based on the first effective time information and the second effective time information.

在一种可能的实施方式中,第一路由计算算法为flex-algo或者multi-topology算法。In a possible implementation, the first routing calculation algorithm is a flex-algo or a multi-topology algorithm.

在一种可能的实施方式中,第一路由计算算法为flex-algo;收发模块,用于接收用于通告第一路由计算算法的ISIS链路状态数据单元LSP报文,第一路由计算算法携带在ISIS LSP报文的FAD sub-TLV字段中,第一有效时间信息携带在FAD sub-TLV的有效时间sub-TLV字段中。In one possible implementation, the first routing calculation algorithm is flex-algo; the transceiver module is used to receive an ISIS link state data unit LSP message for announcing the first routing calculation algorithm, the first routing calculation algorithm is carried in the FAD sub-TLV field of the ISIS LSP message, and the first valid time information is carried in the valid time sub-TLV field of the FAD sub-TLV.

在一种可能的实施方式中,第一路由计算算法为flex-algo;收发模块,用于接收用于通告第一路由计算算法的OSPF LSA报文,第一路由计算算法携带在OSPF LSA报文的FAD TLV字段中,第一有效时间信息携带在FAD TLV的有效时间子sub-TLV字段中。In one possible implementation, the first routing calculation algorithm is flex-algo; the transceiver module is used to receive an OSPF LSA message for announcing the first routing calculation algorithm, the first routing calculation algorithm is carried in the FAD TLV field of the OSPF LSA message, and the first valid time information is carried in the valid time sub-TLV field of the FAD TLV.

在一种可能的实施方式中,第一路由计算算法为flex-algo;收发模块,用于接收用于通告第一路由计算算法的BGP update报文,第一路由计算算法携带在BGP update报文的FAD TLV字段中,第一有效时间信息携带在FAD TLV的有效时间子sub-TLV字段中。In one possible implementation, the first routing calculation algorithm is flex-algo; the transceiver module is used to receive a BGP update message for announcing the first routing calculation algorithm, the first routing calculation algorithm is carried in the FAD TLV field of the BGP update message, and the first valid time information is carried in the valid time sub-TLV field of the FAD TLV.

在一种可能的实施方式中,第一路由计算算法为multi-topology算法;收发模块,用于接收用于通告第一路由计算算法的ISIS LSP报文,第一路由计算算法携带在ISIS LSP报文的时变MT信息sub-TLV字段中,第一有效时间信息携带在时变MT信息sub-TLV的有效时间sub-TLV字段中。In one possible implementation, the first routing calculation algorithm is a multi-topology algorithm; the transceiver module is used to receive an ISIS LSP message for announcing the first routing calculation algorithm, the first routing calculation algorithm is carried in a time-varying MT information sub-TLV field of the ISIS LSP message, and the first valid time information is carried in a valid time sub-TLV field of the time-varying MT information sub-TLV.

在一种可能的实施方式中,第一路由计算算法为multi-topology算法;收发模块,用于接收用于通告第一路由计算算法的开放式最短路由优先协议OSPF链路状态通告LSA报文,第一路由计算算法携带在OSPF LSA报文的时变MT信息TLV字段中,第一有效时间信息携带在时变MT信息TLV的有效时间子sub-TLV字段中。In one possible implementation, the first routing calculation algorithm is a multi-topology algorithm; the transceiver module is used to receive an open shortest route first protocol OSPF link state announcement LSA message for announcing the first routing calculation algorithm, the first routing calculation algorithm is carried in the time-varying MT information TLV field of the OSPF LSA message, and the first valid time information is carried in the valid time sub-TLV field of the time-varying MT information TLV.

在一种可能的实施方式中,第一路由计算算法为multi-topology算法;收发模块,用于接收用于 通告第一路由计算算法的BGP update报文,第一路由计算算法携带在BGP update报文的时变MT信息TLV字段中,第一有效时间信息携带在时变MT信息TLV的有效时间子sub-TLV字段中。In a possible implementation manner, the first routing calculation algorithm is a multi-topology algorithm; the transceiver module is used to receive A BGP update message notifying a first route calculation algorithm, wherein the first route calculation algorithm is carried in a time-varying MT information TLV field of the BGP update message, and the first effective time information is carried in an effective time sub-TLV field of the time-varying MT information TLV.

第三方面,提供了一种网络设备,该网络设备包括:处理器,所述处理器与存储器耦合,所述存储器中存储有至少一条程序指令或代码,所述至少一条程序指令或代码由所述处理器加载并执行,以使所述网络设备实现如上第一方面或第一方面任一所述的网络拓扑的确定方法。In a third aspect, a network device is provided, comprising: a processor, the processor being coupled to a memory, the memory storing at least one program instruction or code, the at least one program instruction or code being loaded and executed by the processor, so that the network device implements the method for determining the network topology as described in the first aspect or any one of the first aspects.

可选地,所述处理器为一个或多个,所述存储器为一个或多个。Optionally, the number of the processors is one or more, and the number of the memories is one or more.

可选地,所述存储器可以与所述处理器集成在一起,或者所述存储器与处理器分离设置。Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.

在具体实现过程中,存储器可以为非瞬时性(non-transitory)存储器,例如只读存储器(read only memory,ROM),其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请对存储器的类型以及存储器与处理器的设置方式不做限定。In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or can be set on different chips. This application does not limit the type of memory and the setting method of the memory and the processor.

第四方面,提供了一种计算机可读存储介质,所述存储介质中存储有至少一条指令,所述指令由处理器加载并执行,以使计算机实现上述各方面中的方法。In a fourth aspect, a computer-readable storage medium is provided, wherein at least one instruction is stored in the storage medium, and the instruction is loaded and executed by a processor to enable a computer to implement the methods in the above aspects.

第五方面,提供了一种计算机程序(产品),所述计算机程序(产品)包括:计算机程序代码,当所述计算机程序代码被计算机运行时,使得所述计算机执行上述各方面中的方法。In a fifth aspect, a computer program (product) is provided, wherein the computer program (product) comprises: a computer program code, and when the computer program code is executed by a computer, the computer executes the methods in the above aspects.

第六方面,提供了一种芯片,包括处理器,用于从存储器中调用并运行所述存储器中存储的指令,使得安装有所述芯片的通信设备执行上述各方面中的方法。In a sixth aspect, a chip is provided, comprising a processor for calling and executing instructions stored in a memory from the memory, so that a communication device equipped with the chip executes the methods in the above aspects.

第七方面,提供另一种芯片,包括:输入接口、输出接口、处理器和存储器,所述输入接口、输出接口、所述处理器以及所述存储器之间通过内部连接通路相连,所述处理器用于执行所述存储器中的代码,当所述代码被执行时,所述处理器用于执行上述各方面中的方法。In the seventh aspect, another chip is provided, comprising: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the methods in the above aspects.

应当理解的是,本申请的第二方面至第七方面技术方案及对应的可能的实施方式所取得的有益效果,可以参见上述对第一方面及其对应的可能的实施方式的技术效果,此处不再赘述。It should be understood that the beneficial effects achieved by the technical solutions of the second to seventh aspects of the present application and the corresponding possible implementation methods can be referred to the technical effects of the first aspect and its corresponding possible implementation methods mentioned above, and will not be repeated here.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1为本申请实施例提供的一种小区基站的资源利用率的变化示意图;FIG1 is a schematic diagram of a change in resource utilization rate of a cell base station provided in an embodiment of the present application;

图2为本申请实施例提供的一种网络拓扑的确定方法的实施环境示意图;FIG2 is a schematic diagram of an implementation environment of a method for determining a network topology provided in an embodiment of the present application;

图3为本申请实施例提供的一种网络拓扑的确定方法的流程图;FIG3 is a flow chart of a method for determining a network topology provided in an embodiment of the present application;

图4为本申请实施例提供的一种FAD sub-TLV字段的格式示意图;FIG4 is a schematic diagram of the format of a FAD sub-TLV field provided in an embodiment of the present application;

图5为本申请实施例提供的一种FAD TLV字段的格式示意图;FIG5 is a schematic diagram of the format of a FAD TLV field provided in an embodiment of the present application;

图6为本申请实施例提供的一种时变MT信息sub-TLV字段的格式示意图;FIG6 is a schematic diagram of the format of a time-varying MT information sub-TLV field provided in an embodiment of the present application;

图7为本申请实施例提供的一种时变MT信息TLV字段的格式示意图;FIG7 is a schematic diagram of the format of a time-varying MT information TLV field provided in an embodiment of the present application;

图8为本申请实施例提供的一种有效时间sub-TLV字段的格式示意图;FIG8 is a schematic diagram of a format of a valid time sub-TLV field provided in an embodiment of the present application;

图9为本申请实施例提供的另一种有效时间sub-TLV字段的格式示意图;FIG9 is a schematic diagram of the format of another valid time sub-TLV field provided in an embodiment of the present application;

图10为本申请实施例提供的又一种有效时间sub-TLV字段的格式示意图;FIG10 is a schematic diagram of the format of another valid time sub-TLV field provided in an embodiment of the present application;

图11为本申请实施例提供的再一种有效时间sub-TLV字段的格式示意图;FIG11 is a schematic diagram of the format of another valid time sub-TLV field provided in an embodiment of the present application;

图12为本申请实施例提供的一种切换网络拓扑的过程示意图;FIG12 is a schematic diagram of a process of switching network topology provided in an embodiment of the present application;

图13为本申请实施例提供的另一种切换网络拓扑的过程示意图;FIG13 is a schematic diagram of another process of switching network topology provided in an embodiment of the present application;

图14为本申请实施例提供的又一种切换网络拓扑的过程示意图;FIG14 is a schematic diagram of another process of switching network topology provided in an embodiment of the present application;

图15为本申请实施例提供的一种网络拓扑的确定装置的结构示意图;FIG15 is a schematic diagram of the structure of a device for determining a network topology provided in an embodiment of the present application;

图16为本申请实施例提供的一种网络设备的结构示意图;FIG16 is a schematic diagram of the structure of a network device provided in an embodiment of the present application;

图17为本申请实施例提供的另一种网络设备的结构示意图。FIG17 is a schematic diagram of the structure of another network device provided in an embodiment of the present application.

具体实施方式DETAILED DESCRIPTION

为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

在本申请实施例中,将网络拓扑随时间变化的网络称为时变网络。例如,针对网络流量存在潮汐效应的网络,由于不同时间段存在明显的流量差别,因此,可以在流量较大的时间段使用大网络连接规模的网络拓扑进行报文转发,当到达流量较小的时间段时,关闭网络拓扑中的部分网络连接,使用小网络连接规 模的网络拓扑进行报文转发,以保证大流量时间段不会出现网络拥塞,且避免小流量时间段的资源浪费。在该场景下,由网络连接状态变化导致了网络拓扑的变化,网络连接状态是指能够影响报文的转发路径的网络连接状态,网络连接状态包括但不限于链路的状态、网络节点的状态或路由的状态。In the embodiments of the present application, a network whose network topology changes over time is called a time-varying network. For example, for a network with a tidal effect in network traffic, since there is a significant difference in traffic in different time periods, a network topology with a large network connection scale can be used to forward messages during a time period with high traffic. When a time period with low traffic arrives, some network connections in the network topology are closed and a network topology with a small network connection scale is used. The network topology of the model is used to forward messages to ensure that there is no network congestion during high-traffic time periods and to avoid wasting resources during low-traffic time periods. In this scenario, the change in network topology is caused by the change in network connection status. The network connection status refers to the network connection status that can affect the forwarding path of the message, including but not limited to the link status, network node status or routing status.

以移动网络为例,参见图1所示的一天内小区基站的资源利用率的变化示意图,小区内基站的资源利用率在一天之中呈现明显的潮汐效应。其中,资源利用率与流量大小成正比,0:00到7:00之间的资源利用率较小,即流量较小,可以称为小流量时间段,7:00-24:00的资源利用率较大,即流量较大,可以称为大流量时间段。因此,可以在0:00到7:00之间使用小网络连接规模的网络拓扑,在7:00-24:00使用大网络连接规模的网络拓扑。也就是说,在网络流量存在潮汐效应的网络下,以流量变化时间段包括大流量时间段和小流量时间段为例,可以形成大流量时间段下的第一网络拓扑和小流量时间段下的第二网络拓扑这两张网络拓扑,并在报文转发过程中根据时间在两张网络拓扑之间进行切换,由此形成了时变网络。Taking the mobile network as an example, referring to the schematic diagram of the change of resource utilization of the cell base station within a day shown in Figure 1, the resource utilization of the cell base station shows an obvious tidal effect within a day. Among them, the resource utilization is proportional to the traffic size. The resource utilization between 0:00 and 7:00 is small, that is, the traffic is small, which can be called a small traffic time period, and the resource utilization between 7:00-24:00 is large, that is, the traffic is large, which can be called a large traffic time period. Therefore, a network topology with a small network connection scale can be used between 0:00 and 7:00, and a network topology with a large network connection scale can be used between 7:00 and 24:00. That is to say, in a network where there is a tidal effect on network traffic, taking the traffic change time period including a large traffic time period and a small traffic time period as an example, two network topologies can be formed, namely, a first network topology under a large traffic time period and a second network topology under a small traffic time period, and switching between the two network topologies according to time during the message forwarding process, thereby forming a time-varying network.

再例如,在卫星网络中,由于卫星星座运转的周期性和可预测性,卫星网络可以在时间轴上划分为多个离散的网络拓扑,每个时间片内的网络拓扑可以被看作是固定不变的。也就是说,在卫星网络中,网络拓扑具有规则性和可预测性的变化,由此形成了时变网络。又例如,在能耗优先的网络中,由于会根据网络流量的实时变化适应性地关闭或打开网络连接,例如,在网络设备处于空闲状态时关闭网络设备,以降低空闲的网络设备导致的能耗浪费。由此可见,在能耗优先的网络中,网络拓扑也会跟随网络设备的能耗变化发生变化,而网络设备的能耗变化也是可以预测的,同样形成了时变网络。For another example, in a satellite network, due to the periodicity and predictability of the operation of the satellite constellation, the satellite network can be divided into multiple discrete network topologies on the time axis, and the network topology within each time slice can be regarded as fixed. In other words, in a satellite network, the network topology has regular and predictable changes, thus forming a time-varying network. For another example, in a network that prioritizes energy consumption, the network connection will be adaptively closed or opened according to the real-time changes in network traffic. For example, the network device is turned off when it is idle to reduce the energy waste caused by idle network devices. It can be seen that in a network that prioritizes energy consumption, the network topology will also change with the changes in the energy consumption of the network devices, and the changes in the energy consumption of the network devices are also predictable, which also forms a time-varying network.

本申请实施例仅以潮汐网络、卫星网络和能耗优先的网络为例对时变网络进行举例说明,对于其他存在网络拓扑可预测性变化的时变网络,本申请实施例不再一一举例说明。在时变网络的场景中,如何控制网络流量随不同时间段切换使用不同的网络拓扑是亟待解决的问题,而网络流量在不同网络拓扑的传输是基于路由信息的。因此,路由计算算法如何随不同时间段切换使用不同的网络拓扑进行路由计算是亟待解决的问题。The embodiments of the present application only illustrate time-varying networks using tidal networks, satellite networks, and energy-prioritized networks as examples. For other time-varying networks with predictable changes in network topology, the embodiments of the present application will no longer illustrate them one by one. In the scenario of time-varying networks, how to control network traffic to switch to different network topologies in different time periods is an urgent problem to be solved, and the transmission of network traffic in different network topologies is based on routing information. Therefore, how the routing calculation algorithm switches to use different network topologies for routing calculation in different time periods is an urgent problem to be solved.

在相关技术中,以路由计算算法为flex-algo为例,flex-algo可以允许网络设备基于特定的网络拓扑约束和算路约束计算路由,使得通过不同flex-algo能够满足不同业务场景的需求,例如,高带宽业务或者低时延业务,进而flex-algo能够更简单和灵活的实现网络的流量工程(traffic engineering,TE)能力。其中,在基于算路约束进行路由计算之前,需要先基于网络拓扑约束确定网络拓扑,以在确定的网络拓扑中基于算路约束进行路由计算,得到确定的网络拓扑对应的路由信息。其中,随时间变化的网络拓扑是指物理的网络拓扑发生变化,而基于路由计算算法在物理的网络拓扑中确定出的网络拓扑为逻辑的网络拓扑。In the related art, taking the routing calculation algorithm as flex-algo as an example, flex-algo can allow network devices to calculate routes based on specific network topology constraints and path calculation constraints, so that different flex-algos can meet the needs of different business scenarios, such as high-bandwidth services or low-latency services, and thus flex-algo can more simply and flexibly implement the network's traffic engineering (TE) capabilities. Among them, before performing routing calculation based on path calculation constraints, it is necessary to first determine the network topology based on the network topology constraints, so as to perform routing calculation based on the path calculation constraints in the determined network topology, and obtain the routing information corresponding to the determined network topology. Among them, the network topology that changes over time refers to the change of the physical network topology, and the network topology determined in the physical network topology based on the routing calculation algorithm is the logical network topology.

由于相关技术中的flex-algo都是在同一时间计算路由的,使得在网络拓扑发生变化的情况下,网络设备需要根据变化后的网络拓扑重新确定所有flex-algo分别对应的网络拓扑并进行路由计算,使得网络设备的处理开销较大。并且在重新确定所有flex-algo分别对应的网络拓扑并进行路由计算的过程中,由于物理的网络拓扑已经发生变化,而网络流量依旧在变化前的网络拓扑中传输,容易导致流量发生丢包,进而影响业务传输性能。Since the flex-algo in the related art calculates the route at the same time, when the network topology changes, the network device needs to redetermine the network topology corresponding to all flex-algos and perform route calculations based on the changed network topology, which makes the processing overhead of the network device large. In addition, in the process of redetermining the network topology corresponding to all flex-algos and performing route calculations, since the physical network topology has changed, the network traffic is still transmitted in the network topology before the change, which easily leads to packet loss of traffic, thereby affecting the service transmission performance.

也就是说,相关技术中的flex-algo仅基于空间维度实现网络拓扑约束和算路约束,使得流量特征相同但到达时间不同的网络流量,会被引导使用基于同一flex-algo计算得到的路由信息进行转发,使得在网络拓扑发生变化时到达的网络流量,需要等待基于该同一flex-algo重新计算路由后,才能切换使用变化后的网络拓扑进行转发。因此,相关技术中的方法切换网络拓扑的效率较低。That is to say, the flex-algo in the related art only implements network topology constraints and path calculation constraints based on the spatial dimension, so that network traffic with the same traffic characteristics but different arrival times will be guided to use the routing information calculated based on the same flex-algo for forwarding, so that network traffic arriving when the network topology changes needs to wait for the route to be recalculated based on the same flex-algo before switching to the changed network topology for forwarding. Therefore, the method in the related art is less efficient in switching network topology.

本申请实施例提供了一种网络拓扑的确定方法,通过在路由计算算法中增加有效时间信息,使得路由计算算法具有时间维度的有效时间约束,进而能够根据时间基于不同的路由计算算法进行路由计算,由于不同路由计算算法计算路由使用的网络拓扑不同,因此,根据时间切换不同的路由计算算法能够实现网络拓扑的灵活切换。该方法能够应用于任意的网络系统,例如,应用于上述时变网络,以根据时变网络的时变属性实现不同时间段的网络拓扑的灵活切换。The embodiment of the present application provides a method for determining network topology, by adding effective time information to the routing calculation algorithm, so that the routing calculation algorithm has an effective time constraint in the time dimension, and then can perform routing calculation based on different routing calculation algorithms according to time. Since different routing calculation algorithms use different network topologies for calculating routing, switching different routing calculation algorithms according to time can achieve flexible switching of network topology. This method can be applied to any network system, for example, to the above-mentioned time-varying network, to achieve flexible switching of network topologies in different time periods according to the time-varying properties of the time-varying network.

示例性地,参见图2,图2为本申请实施例提供的一种网络拓扑的确定方法的实施环境图。如图2所示,该实施环境包括多个网络设备,任一网络设备可以通过链路(link)与另一网络设备连接,各个网络设备之间的链路连接关系可根据网络需求进行配置。网络设备可以为交换机或者路由器等,一个网络设备对应网络的一个节点(node)。其中,链路的状态变化和节点的状态变化均会导致网络拓扑的变化。例如,若网络设备2的状态由有效变化为无效的情况下,链路1和链路3的状态也由有效变化为无效,则变化后的网络拓扑相比于变化前的网路拓扑,缺少了链路1和链路3。示例性地, 在网络设备下电或关闭的情况下,网络设备的状态为失效;在网络设备上电或打开的情况下,网络设备的状态为有效。在链路关闭或断开的情况下,链路的状态为无效;在链路打开或连接的情况下,链路的状态为有效。Exemplarily, refer to Figure 2, which is an implementation environment diagram of a method for determining a network topology provided in an embodiment of the present application. As shown in Figure 2, the implementation environment includes multiple network devices, any network device can be connected to another network device through a link, and the link connection relationship between each network device can be configured according to network requirements. The network device can be a switch or a router, etc., and one network device corresponds to a node in the network. Among them, changes in the state of the link and changes in the state of the node will cause changes in the network topology. For example, if the state of network device 2 changes from valid to invalid, the states of link 1 and link 3 also change from valid to invalid, then the network topology after the change lacks link 1 and link 3 compared to the network topology before the change. Exemplarily, When the network device is powered off or turned off, the status of the network device is invalid; when the network device is powered on or turned on, the status of the network device is valid. When the link is closed or disconnected, the status of the link is invalid; when the link is turned on or connected, the status of the link is valid.

在本申请实施例中,图2所示的实施环境中的网络设备还可以包括更多或更少,也即本申请实施例不对网络设备的数量进行限定。其中,本申请实施例中提及的网络设备,除了可以是交换机、路由器等网络设备之外,也可以是网络设备上的一部分组件,例如是网络设备上的单板、线卡,也可以是网络设备上的一个功能模块,还可以是用于实现本申请实施例提供的方法的芯片,本申请实施例不做具体限定。当网络设备是芯片时,用于实现该方法的收发模块例如可以是芯片的接口电路,处理模块可以是芯片中具有处理功能的处理电路。网络设备之间的连接方式包括但不限于通过以太网线或光缆直接连接。In an embodiment of the present application, the network devices in the implementation environment shown in FIG. 2 may also include more or less, that is, the embodiment of the present application does not limit the number of network devices. Among them, the network devices mentioned in the embodiment of the present application, in addition to network devices such as switches and routers, may also be a part of the components on the network device, such as a single board or line card on the network device, or a functional module on the network device, or a chip for implementing the method provided in the embodiment of the present application, which is not specifically limited in the embodiment of the present application. When the network device is a chip, the transceiver module used to implement the method may be, for example, an interface circuit of the chip, and the processing module may be a processing circuit with processing functions in the chip. The connection method between network devices includes, but is not limited to, direct connection via Ethernet cable or optical cable.

参见图3,图3为本申请实施例提供的一种网络拓扑的确定方法的流程图。该网络拓扑的确定方法可以应用于图2所示的实施环境中,例如,由图2所示的实施环境中的任一网络设备执行该方法。如图3所示,该网络拓扑的确定方法包括但不限于如下步骤301和步骤302。Referring to FIG. 3 , FIG. 3 is a flow chart of a method for determining a network topology provided in an embodiment of the present application. The method for determining a network topology can be applied to the implementation environment shown in FIG. 2 , for example, the method is executed by any network device in the implementation environment shown in FIG. 2 . As shown in FIG. 3 , the method for determining a network topology includes but is not limited to the following steps 301 and 302 .

步骤301,根据第一时间确定第一路由计算算法,第一路由计算算法包括第一有效时间信息和第一网络拓扑约束,第一有效时间信息包括第一路由计算算法的有效时间,第一有效时间信息和第一网络拓扑约束用于确定第一路由计算算法对应的网络拓扑,第一时间在第一路由计算算法的有效时间之前。Step 301, determining a first routing calculation algorithm according to a first time, the first routing calculation algorithm including first effective time information and a first network topology constraint, the first effective time information including the effective time of the first routing calculation algorithm, the first effective time information and the first network topology constraint are used to determine the network topology corresponding to the first routing calculation algorithm, and the first time is before the effective time of the first routing calculation algorithm.

在本申请实施例中,第一路由计算算法除了包括第一网络拓扑约束之外,还包括第一有效时间信息,第一有效时间信息用于约束第一路由计算算法有效的时间,使得在第一路由计算算法有效的时间,使用基于第一路由计算算法计算的路由信息转发报文。进而能够在第一路由计算算法的有效时间之前的第一时间再确定第一路由计算算法,无需同一时间确定所有路由计算算法。In the embodiment of the present application, in addition to the first network topology constraint, the first route calculation algorithm also includes first effective time information, which is used to constrain the effective time of the first route calculation algorithm, so that during the effective time of the first route calculation algorithm, the routing information calculated based on the first route calculation algorithm is used to forward the message. Therefore, the first route calculation algorithm can be determined at a first time before the effective time of the first route calculation algorithm, without having to determine all route calculation algorithms at the same time.

可选地,对于第一有效时间信息的内容本申请实施例不作限定,能够对第一路由计算算法起到有效时间的约束即可。例如,第一有效时间信息包括有效时间,有效时间即为第一路由计算算法开始生效的时间;或者,第一有效时间信息包括有效时间和失效时间,失效时间即为第一路由计算算法开始失效的时间,有效时间和失效时间之间的时间段即为第一路由计算算法从开始生效到失效之间的有效时间段;或者,第一有效时间信息包括有效时间和持续时间段,从有效时间开始的持续时间段即为第一路由计算算法从开始生效到失效之间的有效时间段。Optionally, the present application embodiment does not limit the content of the first effective time information, and it only needs to constrain the effective time of the first route calculation algorithm. For example, the first effective time information includes the effective time, which is the time when the first route calculation algorithm starts to take effect; or, the first effective time information includes the effective time and the expiration time, which is the time when the first route calculation algorithm starts to fail, and the time period between the effective time and the expiration time is the effective time period from the beginning of the first route calculation algorithm to its failure; or, the first effective time information includes the effective time and the duration period, and the duration period starting from the effective time is the effective time period from the beginning of the first route calculation algorithm to its failure.

在一种可能的实施方式中,在第一有效时间信息包括有效时间的情况下,第一路由计算算法的有效时间对应第一网络拓扑的有效时间。也就是说,第一路由计算算法的有效时间可以基于第一网络拓扑的有效时间确定,针对网络连接状态会发生变化的场景而言,网络连接状态发生变化前后的网络拓扑不同,即不同时间有效的网络拓扑不同,也即任一网络拓扑在对应的有效时间段内有效。由此,第一路由计算算法的有效时间与第一网络拓扑的有效时间相对应,能够通过切换路由计算算法实现网络拓扑的切换,避免由网络拓扑变化导致的报文丢包。In a possible implementation, when the first effective time information includes an effective time, the effective time of the first routing calculation algorithm corresponds to the effective time of the first network topology. That is, the effective time of the first routing calculation algorithm can be determined based on the effective time of the first network topology. For the scenario where the network connection state changes, the network topology before and after the network connection state changes is different, that is, the network topology effective at different times is different, that is, any network topology is effective within the corresponding effective time period. Therefore, the effective time of the first routing calculation algorithm corresponds to the effective time of the first network topology, and the switching of the network topology can be achieved by switching the routing calculation algorithm, thereby avoiding packet loss caused by changes in the network topology.

其中,第一路由计算算法的有效时间与第一网络拓扑的有效时间相对应可以为,第一路由计算算法的有效时间与第一网络拓扑的有效时间相同。示例性地,如果第一网络拓扑包括的网络连接在第一有效时间开始生效,则第一网络拓扑的有效时间即为第一有效时间,而第一路由计算算法同样在第一有效时间开始生效,且在第一有效时间之前已经确定得到了该第一网络拓扑,由此,在到达第一有效时间的情况下,网络设备可以直接将目前的网络拓扑切换到第一网络拓扑,且保证第一网络拓扑的网络连接状态在第一有效时间有效。The effective time of the first routing calculation algorithm corresponds to the effective time of the first network topology, and the effective time of the first routing calculation algorithm is the same as the effective time of the first network topology. Exemplarily, if the network connection included in the first network topology becomes effective at the first effective time, the effective time of the first network topology is the first effective time, and the first routing calculation algorithm also becomes effective at the first effective time, and the first network topology has been determined to be obtained before the first effective time, so that when the first effective time is reached, the network device can directly switch the current network topology to the first network topology, and ensure that the network connection state of the first network topology is valid at the first effective time.

同样的,在第一有效时间信息包括有效时间和失效时间的情况下,第一路由计算算法的有效时间对应第一网络拓扑的有效时间,且第一路由计算算法的失效时间对应第一网络拓扑的失效时间。在第一有效时间信息包括有效时间和持续时间段的情况下,第一路由计算算法的有效时间对应第一网络拓扑的有效时间,且第一路由计算算法的持续时间段对应第一网络拓扑的持续时间段。使得路由计算算法的有效时间信息与网络拓扑的网络连接状态的变化时间信息相对应。Similarly, when the first effective time information includes the effective time and the expiration time, the effective time of the first routing calculation algorithm corresponds to the effective time of the first network topology, and the expiration time of the first routing calculation algorithm corresponds to the expiration time of the first network topology. When the first effective time information includes the effective time and the duration period, the effective time of the first routing calculation algorithm corresponds to the effective time of the first network topology, and the duration period of the first routing calculation algorithm corresponds to the duration period of the first network topology. This makes the effective time information of the routing calculation algorithm correspond to the time information of the change of the network connection state of the network topology.

在一种可能的实施方式中,针对网络拓扑周期性变化的时变网络,第一有效时间信息还包括第一路由计算算法的有效时间的变化周期,通过变化周期指示第一路由计算算法的多个周期性的有效时间。例如,第一路由计算算法的有效时间为10点,第一路由计算算法的有效时间的变化周期为一 天,则第一路由计算算法在每天的10点开始生效。再例如,第一路由计算算法的有效时间为10点、失效时间为22点,第一路由计算算法的有效时间的变化周期为一天,则第一路由计算算法在每天的10点开始生效,到每天的22点开始失效。In a possible implementation, for a time-varying network with periodic changes in network topology, the first effective time information also includes a change period of the effective time of the first routing calculation algorithm, and the change period indicates multiple periodic effective times of the first routing calculation algorithm. For example, the effective time of the first routing calculation algorithm is 10 o'clock, and the change period of the effective time of the first routing calculation algorithm is one. For example, if the validity period of the first route calculation algorithm is 10 o'clock and the expiration period is 22 o'clock, and the change cycle of the validity period of the first route calculation algorithm is one day, then the first route calculation algorithm will take effect at 10 o'clock every day and will become invalid at 22 o'clock every day.

在本申请实施例中,第一路由计算算法的有效时间的变化周期对应第一网络拓扑的有效时间的变化周期。通过在第一有效时间信息中携带有效时间的变化周期,使得第一路由计算算法能够周期性的生效,提高了第一路由计算算法的时间约束的灵活性。此外,第一路由计算算法的有效时间的变化周期与第一网络拓扑的有效时间的变化周期相对应,使得通过周期性的切换路由计算算法能够实现周期性的网络拓扑的切换,避免在第一网络拓扑的有效时间之外使用第一路由计算算法导致的报文丢包。In an embodiment of the present application, the change period of the effective time of the first routing calculation algorithm corresponds to the change period of the effective time of the first network topology. By carrying the change period of the effective time in the first effective time information, the first routing calculation algorithm can be periodically effective, which improves the flexibility of the time constraint of the first routing calculation algorithm. In addition, the change period of the effective time of the first routing calculation algorithm corresponds to the change period of the effective time of the first network topology, so that the switching of the network topology can be achieved periodically by periodically switching the routing calculation algorithm, avoiding the packet loss caused by using the first routing calculation algorithm outside the effective time of the first network topology.

而针对网络拓扑无明显周期性变化但是可预测变化的时变网络,该方法可以同时定义两个路由计算算法,例如,在预测到网络拓扑在第一目标时间和第二目标时间发生变化的情况下,可以定义第一路由计算算法和第二路由计算算法,第一路由计算算法的有效时间可以为第一目标时间、失效时间可以为第二目标时间,第二路由计算算法的有效时间可以为第二目标时间、失效时间可以为第三目标时间,第三目标时间可以为第二目标时间之后的任一时间。或者,第一路由计算算法的有效时间也可以与第一目标时间不同、失效时间也可以与第二目标时间不同,也即第一路由计算算法的有效时间和失效时间可以与物理的网络拓扑变化的时间不同,例如,第一路由计算算法的有效时间和失效时间可以根据时变网络的网络拓扑的实际变化情况灵活设置为不同的固定数值。For a time-varying network whose network topology has no obvious periodic changes but predictable changes, the method can define two routing calculation algorithms at the same time. For example, when it is predicted that the network topology changes at the first target time and the second target time, a first routing calculation algorithm and a second routing calculation algorithm can be defined. The effective time of the first routing calculation algorithm can be the first target time, and the invalid time can be the second target time. The effective time of the second routing calculation algorithm can be the second target time, and the invalid time can be the third target time. The third target time can be any time after the second target time. Alternatively, the effective time of the first routing calculation algorithm can also be different from the first target time, and the invalid time can also be different from the second target time, that is, the effective time and invalid time of the first routing calculation algorithm can be different from the time when the physical network topology changes. For example, the effective time and invalid time of the first routing calculation algorithm can be flexibly set to different fixed values according to the actual changes in the network topology of the time-varying network.

在一种可能的实施方式中,该方法还包括:根据第三时间确定第二路由计算算法,第二路由计算算法包括第二有效时间信息和第二网络拓扑约束,第二有效时间信息指示第二路由计算算法的有效时间,第二有效时间信息和第二网络拓扑约束用于确定第二路由计算算法对应的网络拓扑,第三时间在第二路由计算算法的有效时间之前。由此,可以定义不同有效时间对应的不同路由计算算法,使得路由计算方法的应用更灵活。In a possible implementation, the method further includes: determining a second route calculation algorithm according to a third time, the second route calculation algorithm including second effective time information and a second network topology constraint, the second effective time information indicating the effective time of the second route calculation algorithm, the second effective time information and the second network topology constraint being used to determine the network topology corresponding to the second route calculation algorithm, and the third time being before the effective time of the second route calculation algorithm. Thus, different route calculation algorithms corresponding to different effective times can be defined, making the application of the route calculation method more flexible.

其中,第一路由计算算法的有效时间和第二路由计算算法的有效时间不同,第一路由计算算法的失效时间可以与第二路由计算算法的有效时间相同或不同,在第一路由计算算法的失效时间晚于第二路由计算算法的有效时间的情况下,第一路由计算算法的有效时间段与第二路由计算算法的有效时间段存在重叠,在第一路由计算算法的失效时间与第二路由计算算法的有效时间相同的情况下,第一路由计算算法的有效时间段与第二路由计算算法的有效时间段连续。The effective time of the first route calculation algorithm is different from the effective time of the second route calculation algorithm, the expiration time of the first route calculation algorithm may be the same as or different from the effective time of the second route calculation algorithm, when the expiration time of the first route calculation algorithm is later than the effective time of the second route calculation algorithm, the effective time period of the first route calculation algorithm overlaps with the effective time period of the second route calculation algorithm, and when the expiration time of the first route calculation algorithm is the same as the effective time of the second route calculation algorithm, the effective time period of the first route calculation algorithm is continuous with the effective time period of the second route calculation algorithm.

在本申请实施例中,第三时间与第一时间可以相同或也可以不同,在第三时间与第一时间相同的情况下,可以在同一时间同时确定第一路由计算算法和第二路由计算算法。由于在该情况下网络拓扑变化无明显周期性变化,则如果第一有效时间信息还包括第一路由计算算法的有效时间的变化周期,第一路由计算算法的有效时间的变化周期可以基于第一有效时间信息与第二有效时间信息确定。在定义不同有效时间的多个路由计算算法的情况下,可以根据每一路由计算算法的有效时间信息确定路由计算算法的有效时间的变化周期,进而能够周期性的循环使用该多个路由计算算法。In an embodiment of the present application, the third time may be the same as or different from the first time. When the third time is the same as the first time, the first routing calculation algorithm and the second routing calculation algorithm may be determined at the same time. Since the network topology changes in this case do not have obvious periodic changes, if the first effective time information also includes the change period of the effective time of the first routing calculation algorithm, the change period of the effective time of the first routing calculation algorithm may be determined based on the first effective time information and the second effective time information. In the case of defining multiple routing calculation algorithms with different effective times, the change period of the effective time of the routing calculation algorithm may be determined based on the effective time information of each routing calculation algorithm, so that the multiple routing calculation algorithms can be used periodically and cyclically.

例如,第一路由计算算法的有效时间的变化周期为第一有效时间信息中的有效时间与第二有效时间信息中的失效时间之间的时间段;或者,第一路由计算算法的有效时间的变化周期为第一有效时间信息指示的有效时间段与第二有效时间信息指示的有效时间段的和。可选地,第二有效时间信息的内容可以参见第一有效时间信息的内容,此处不再赘述。示例性地,第二有效时间信息还包括第二路由计算算法的有效时间的变化周期,该第二路由计算算法的有效时间的变化周期可以与第一路由计算算法的有效时间的变化周期相同。For example, the change period of the effective time of the first route calculation algorithm is the time period between the effective time in the first effective time information and the expiration time in the second effective time information; or, the change period of the effective time of the first route calculation algorithm is the sum of the effective time period indicated by the first effective time information and the effective time period indicated by the second effective time information. Optionally, the content of the second effective time information can refer to the content of the first effective time information, which is not repeated here. Exemplarily, the second effective time information also includes the change period of the effective time of the second route calculation algorithm, and the change period of the effective time of the second route calculation algorithm can be the same as the change period of the effective time of the first route calculation algorithm.

在根据第一时间确定第一路由计算算法之前,需要先获取第一路由计算算法,以在第一时间可以直接在多个路由计算算法中确定出第一路由计算算法。可选地,获取第一路由计算算法的方式可以为,根据网络连接状态的变化时间信息定义第一路由计算算法,或者,可以接收用于通告该第一路由计算算法的报文,以获取得到第一路由计算算法。Before determining the first route calculation algorithm according to the first time, it is necessary to first obtain the first route calculation algorithm so that the first route calculation algorithm can be directly determined from multiple route calculation algorithms at the first time. Optionally, the first route calculation algorithm can be obtained by defining the first route calculation algorithm according to the change time information of the network connection state, or by receiving a message for notifying the first route calculation algorithm to obtain the first route calculation algorithm.

在一种可能的实施方式中,第一路由计算算法或第二路由计算算法的算法类型可以任意一种基于网络拓扑约束进行路由计算的路由计算算法,例如,flex-algo或者multi-topology算法。针对flex-algo,网络拓扑约束可以是指链路需满足的约束条件,例如,第一网络拓扑约束可以包括链路颜色约束,链路颜色约束用于约束第一网络拓扑包括的链路的颜色,不同颜色用于区分不同的有效时间,第一 网络拓扑包括的链路的颜色符合链路颜色约束。In a possible implementation, the algorithm type of the first routing calculation algorithm or the second routing calculation algorithm can be any routing calculation algorithm that performs routing calculation based on network topology constraints, such as flex-algo or multi-topology algorithm. For flex-algo, the network topology constraint can refer to the constraint condition that the link must satisfy. For example, the first network topology constraint can include a link color constraint, and the link color constraint is used to constrain the color of the links included in the first network topology. Different colors are used to distinguish different effective times. The colors of the links included in the network topology comply with the link color constraints.

其中,链路颜色约束对第一网络拓扑包括的链路的颜色进行约束的方式包括但不限于如下两种,第一种是通过链路颜色约束指示第一网络拓扑包括的链路的颜色,例如,链路颜色约束指示黄色,则第一网络拓扑包括的链路的颜色为黄色;第二种是通过链路颜色约束指示第一网络拓扑排除的链路的颜色,例如,链路颜色约束指示黄色,则第一网络拓扑包括的链路的颜色不包括黄色。通过对链路进行不同有效时间的不同染色,使得通过链路颜色约束能够确定出指定颜色对应的第一网络拓扑,该第一网络拓扑在指定颜色指示的有效时间有效。The link color constraint constrains the colors of the links included in the first network topology in two ways, including but not limited to the following two ways: the first way is to indicate the colors of the links included in the first network topology through the link color constraint, for example, if the link color constraint indicates yellow, the color of the links included in the first network topology is yellow; the second way is to indicate the colors of the links excluded from the first network topology through the link color constraint, for example, if the link color constraint indicates yellow, the colors of the links included in the first network topology do not include yellow. By coloring the links differently for different effective times, the first network topology corresponding to the specified color can be determined through the link color constraint, and the first network topology is valid during the effective time indicated by the specified color.

而针对multi-topology算法,由于multi-topology算法是指在一个ISIS自治系统内运行多个独立的网络拓扑,通过多个独立的网络拓扑可以分别基于最短路径优先(shortest path first,SPF)计算不同网络拓扑的不同路由信息,实现多个独立的网络拓扑之间的相互屏蔽。因此,在第一路由计算算法为multi-topology算法的情况下,第一网络拓扑约束可以是指多个链路的链路标识,则第一网络拓扑包括的链路属于该第一网络拓扑约束中的链路标识对应的链路。As for the multi-topology algorithm, since the multi-topology algorithm refers to running multiple independent network topologies within an ISIS autonomous system, different routing information of different network topologies can be calculated based on the shortest path first (SPF) through multiple independent network topologies to achieve mutual shielding between multiple independent network topologies. Therefore, in the case where the first routing calculation algorithm is the multi-topology algorithm, the first network topology constraint can refer to the link identifiers of multiple links, and the links included in the first network topology belong to the links corresponding to the link identifiers in the first network topology constraint.

在第一路由计算算法为flex-algo的情况下,根据第一时间确定第一路由计算算法之前,还可以接收用于通告第一路由计算算法的ISIS LSP报文,第一路由计算算法携带在ISIS LSP报文的FAD sub-TLV字段中,第一有效时间信息携带在FAD sub-TLV的有效时间sub-TLV字段中;或者,接收用于通告第一路由计算算法的OSPF LSA报文,第一路由计算算法携带在OSPF LSA报文的FAD TLV字段中,第一有效时间信息携带在FAD TLV的有效时间子sub-TLV字段中;或者,接收用于通告第一路由计算算法的BGP update报文,第一路由计算算法携带在BGP update报文的FAD TLV字段中,第一有效时间信息携带在FAD TLV的有效时间子sub-TLV字段中。由此,提供了多种用于通告灵活算法的方式,还分别提供了携带灵活算法的有效时间信息的方式,为该方法的实施提供了保障。In the case where the first route calculation algorithm is flex-algo, before determining the first route calculation algorithm according to the first time, an ISIS LSP message for announcing the first route calculation algorithm may also be received, the first route calculation algorithm is carried in the FAD sub-TLV field of the ISIS LSP message, and the first effective time information is carried in the effective time sub-TLV field of the FAD sub-TLV; or, an OSPF LSA message for announcing the first route calculation algorithm is received, the first route calculation algorithm is carried in the FAD TLV field of the OSPF LSA message, and the first effective time information is carried in the effective time sub-TLV field of the FAD TLV; or, a BGP update message for announcing the first route calculation algorithm is received, the first route calculation algorithm is carried in the FAD TLV field of the BGP update message, and the first effective time information is carried in the effective time sub-TLV field of the FAD TLV. Thus, a plurality of ways for announcing flexible algorithms are provided, and ways for carrying the effective time information of flexible algorithms are also provided, respectively, which provides a guarantee for the implementation of the method.

示例性地,携带第一灵活算法的FAD sub-TLV字段可以如图4所示。如图4所示,FAD sub-TLV字段包括类型(type)字段、长度(length)字段、灵活算法(Flex-Algo)字段、度量类型(Metric-Type)字段、计算类型(Calc-Type)字段、优先级(Priority)字段、有效时间sub-TLV字段以及sub-TLVs字段。该FAD sub-TLV字段的格式定义可以参见信息征求意见(request for comments,RFC)9350中的相关描述。可选地,FAD sub-TLV字段可以携带在ISIS LSP报文的路由能力(Router CAPABILITY)TLV-242字段中,详细介绍可参见RFC7981中的相关描述。Exemplarily, the FAD sub-TLV field carrying the first flexible algorithm may be as shown in FIG4. As shown in FIG4, the FAD sub-TLV field includes a type field, a length field, a flexible algorithm (Flex-Algo) field, a metric type (Metric-Type) field, a calculation type (Calc-Type) field, a priority (Priority) field, a valid time sub-TLV field, and a sub-TLVs field. The format definition of the FAD sub-TLV field can refer to the relevant description in the request for comments (RFC) 9350. Optionally, the FAD sub-TLV field can be carried in the Router CAPABILITY TLV-242 field of the ISIS LSP message. For detailed description, refer to the relevant description in RFC7981.

其中,type字段用于唯一标识FAD sub-TLV,例如,type字段的值为26;length字段指示FAD sub-TLV字段的去除type字段和length字段后的总长度,例如,length字段的单位为字节;Flex-Algo字段指示第一灵活算法的标识(identification,ID),Flex-Algo字段的值为一个128到255的数值;Metric-Type字段指示第一灵活算法的算路约束,算路约束则是计算路由时使用的度量类型,例如,在Metric-Type字段的值为1时,表示基于最小单向链路时延计算路由,在Metric-Type字段的值为2时,表示基于TE度量计算路由;Calc-Type字段指示第一灵活算法的计算方式,例如,SPF的计算方式;Priority字段指示第一灵活算法通告的优先级,Priority字段的值为一个0到255的数值;有效时间sub-TLV字段用于携带第一有效时间信息;sub-TLVs字段为可变长度,用于携带第一灵活算法的其他约束条件。Among them, the type field is used to uniquely identify the FAD sub-TLV, for example, the value of the type field is 26; the length field indicates the total length of the FAD sub-TLV field after removing the type field and the length field, for example, the unit of the length field is bytes; the Flex-Algo field indicates the identification (ID) of the first flexible algorithm, and the value of the Flex-Algo field is a value from 128 to 255; the Metric-Type field indicates the path calculation constraint of the first flexible algorithm, and the path calculation constraint is the metric type used when calculating the route, for example, when the value of the Metric-Type field is 1, it means that the route is calculated based on the minimum unidirectional link delay, and when the value of the Metric-Type field is 2, it means that the route is calculated based on the TE metric; the Calc-Type field indicates the calculation method of the first flexible algorithm, for example, the calculation method of SPF; the Priority field indicates the priority announced by the first flexible algorithm, and the value of the Priority field is a value from 0 to 255; the valid time sub-TLV field is used to carry the first valid time information; the sub-TLVs field is a variable length and is used to carry other constraints of the first flexible algorithm.

示例性地,携带第一灵活算法的FAD TLV字段可以如图5所示。图5所示的各个字段的含义可参见图4中各个字段的相关介绍,此处不再赘述。可选地,如图5所示的FAD TLV字段可以携带在OSPF LSA报文的路由信息(Router Information,RI)LSA字段中,详细介绍可参见RFC7770中的相关描述;或者,如图5所示的FAD TLV字段可以携带在BGP update报文的节点(Node)网络层可达信息(network layer reachability Information,NLRI)对应的BGP-LS路由属性中,详细介绍可参见RFC9351中的相关描述。Exemplarily, the FAD TLV field carrying the first flexible algorithm may be as shown in FIG5. The meaning of each field shown in FIG5 may refer to the relevant introduction of each field in FIG4, which will not be repeated here. Optionally, the FAD TLV field shown in FIG5 may be carried in the Router Information (RI) LSA field of the OSPF LSA message, and a detailed description may be found in the relevant description in RFC7770; or, the FAD TLV field shown in FIG5 may be carried in the BGP-LS routing attribute corresponding to the Node Network Layer Reachability Information (NLRI) of the BGP update message, and a detailed description may be found in the relevant description in RFC9351.

在第一路由计算算法为multi-topology算法的情况下,根据第一时间确定第一路由计算算法之前,还可以接收用于通告第一路由计算算法的ISIS LSP报文,第一路由计算算法携带在ISIS LSP报文的时变MT信息sub-TLV字段中,第一有效时间信息携带在时变MT信息sub-TLV的有效时间sub-TLV字段中;或者,接收用于通告第一路由计算算法的OSPF LSA报文,第一路由计算算法携带在OSPF LSA报文的时变MT信息TLV字段中,第一有效时间信息携带在时变MT信息TLV的有效时间子sub-TLV字段中;或者,接收用于通告第一路由计算算法的BGP update报文,第一路由计算算法携带在BGP update报文的时变MT信息TLV字段中,第一有效时间信息携带在时变MT信息TLV的有效时间子sub-TLV字 段中。提供了多种用于通告multi-topology算法的方式,还分别提供了携带multi-topology算法的有效时间信息的方式,为该方法的实施提供了保障。In the case where the first route calculation algorithm is a multi-topology algorithm, before determining the first route calculation algorithm according to the first time, an ISIS LSP message for announcing the first route calculation algorithm may also be received, the first route calculation algorithm being carried in a time-varying MT information sub-TLV field of the ISIS LSP message, and the first effective time information being carried in an effective time sub-TLV field of the time-varying MT information sub-TLV; or, an OSPF LSA message for announcing the first route calculation algorithm is received, the first route calculation algorithm being carried in a time-varying MT information TLV field of the OSPF LSA message, and the first effective time information being carried in an effective time sub-TLV field of the time-varying MT information TLV; or, a BGP update message for announcing the first route calculation algorithm is received, the first route calculation algorithm being carried in a time-varying MT information TLV field of the BGP update message, and the first effective time information being carried in an effective time sub-TLV field of the time-varying MT information TLV. A plurality of methods for notifying the multi-topology algorithm are provided, and methods for carrying the effective time information of the multi-topology algorithm are provided, which provide a guarantee for the implementation of the method.

示例性地,携带第一灵活算法的时变MT信息sub-TLV字段可以如图6所示。其中,时变MT信息sub-TLV字段包括type字段、length字段、保留(reserved)字段、MT ID字段以及有效时间sub-TLV字段。其中,type字段用于唯一标识时变MT信息sub-TLV;length字段指示时变MT信息sub-TLV字段的去除type字段和length字段后的总长度,例如,length字段的单位为字节;reserved字段为还未分配的字段;MT ID字段指示第一多拓扑算法的ID,长度为12比特,详细介绍可参见RFC5120中的相关描述;有效时间sub-TLV字段用于携带第一有效时间信息。Exemplarily, the time-varying MT information sub-TLV field carrying the first flexible algorithm may be as shown in FIG6 . The time-varying MT information sub-TLV field includes a type field, a length field, a reserved field, an MT ID field, and a valid time sub-TLV field. The type field is used to uniquely identify the time-varying MT information sub-TLV; the length field indicates the total length of the time-varying MT information sub-TLV field after removing the type field and the length field, for example, the unit of the length field is bytes; the reserved field is a field that has not been allocated; the MT ID field indicates the ID of the first multi-topology algorithm, which is 12 bits in length. For detailed description, please refer to the relevant description in RFC5120; the valid time sub-TLV field is used to carry the first valid time information.

可选地,ISIS LSP报文的时变MT信息sub-TLV字段中除了包括第一多拓扑算法之外,还可以包括第二多拓扑算法、第三多拓扑算法等多个多拓扑算法。在该情况下,如图6所示,时变MT信息sub-TLV字段可以携带多个多拓扑算法分别对应的多个MT ID字段,例如,MT ID1字段和MT ID2字段,每个MT ID字段包括对应的有效时间sub-TLV字段。可选地,时变MT信息sub-TLV字段可以携带在ISIS LSP报文的Router CAPABILITY TLV-242字段中,详细介绍可参见RFC7981中的相关描述,此外,还可以在ISIS LSP报文中定义新的时变MT信息TLV字段来携带时变MT信息sub-TLV字段。Optionally, in addition to the first multi-topology algorithm, the time-varying MT information sub-TLV field of the ISIS LSP message may also include multiple multi-topology algorithms such as the second multi-topology algorithm and the third multi-topology algorithm. In this case, as shown in FIG6 , the time-varying MT information sub-TLV field may carry multiple MT ID fields corresponding to multiple multi-topology algorithms, for example, the MT ID1 field and the MT ID2 field, and each MT ID field includes a corresponding valid time sub-TLV field. Optionally, the time-varying MT information sub-TLV field may be carried in the Router CAPABILITY TLV-242 field of the ISIS LSP message. For a detailed description, refer to the relevant description in RFC7981. In addition, a new time-varying MT information TLV field may be defined in the ISIS LSP message to carry the time-varying MT information sub-TLV field.

示例性地,携带第一灵活算法的时变MT信息TLV字段可以如图7所示。图7所示的各个字段的含义可参见图6中各个字段的相关介绍,此处不再赘述。可选地,如图7所示的时变MT信息TLV字段可以携带在OSPF LSA报文的RI LSA字段中,详细介绍可参见RFC7770中的相关描述,此外,还可以在OSPF LSA报文定义新的LSA来携带时变MT信息TLV字段;或者,如图7所示的时变MT信息TLV字段可以携带在BGP update报文的Node NLRI对应的BGP-LS路由属性中,详细介绍可参见RFC9351中的相关描述,此外,还可以在BGP update报文中定义新的NLRI type来携带时变MT信息TLV字段,或者在已有的Node NLRI的本地节点描述符(Local Node Descriptors)字段中携带时变MT信息TLV字段。Exemplarily, the time-varying MT information TLV field carrying the first flexible algorithm may be as shown in FIG7. The meaning of each field shown in FIG7 may refer to the relevant introduction of each field in FIG6, which will not be repeated here. Optionally, the time-varying MT information TLV field shown in FIG7 may be carried in the RI LSA field of the OSPF LSA message, and a detailed description may refer to the relevant description in RFC7770. In addition, a new LSA may be defined in the OSPF LSA message to carry the time-varying MT information TLV field; or, the time-varying MT information TLV field shown in FIG7 may be carried in the BGP-LS routing attribute corresponding to the Node NLRI of the BGP update message, and a detailed description may refer to the relevant description in RFC9351. In addition, a new NLRI type may be defined in the BGP update message to carry the time-varying MT information TLV field, or the time-varying MT information TLV field may be carried in the local node descriptor (Local Node Descriptors) field of the existing Node NLRI.

由于本申请实施例提供的有效时间信息可以包括不同的内容,携带有效时间信息的有效时间sub-TLV字段的格式示意图也不同。可选地,本申请实施例仅以图8-11所示的有效时间sub-TLV字段的格式示意图为例进行说明。Since the valid time information provided by the embodiments of the present application may include different contents, the format diagrams of the valid time sub-TLV field carrying the valid time information are also different. Optionally, the embodiments of the present application only use the format diagrams of the valid time sub-TLV field shown in Figures 8-11 as examples for illustration.

在图8所示的有效时间sub-TLV字段中,类型(type)字段的长度为1或2个字节,用于唯一标识该第一路由计算算法的结构;长度(length)字段的长度为1或2个字节,用于指示有效时间信息的字段结构中除length字段和type字段外的长度;有效时间(enable time)字段的长度为4个字节,用于指示第一路由计算算法的第一次生效时间;失效时间(disable time)字段的长度为4个字节,用于指示第一路由计算算法的第一次失效时间。相比于图8,图9所示的有效时间sub-TLV字段增加了周期(period)字段,period字段的长度为4个字节,用于指示第一路由计算算法的有效时间的变化周期,其他字段的介绍参见图8中的相关内容,此处不再赘述。In the validity time sub-TLV field shown in FIG8 , the length of the type field is 1 or 2 bytes, which is used to uniquely identify the structure of the first routing calculation algorithm; the length of the length field is 1 or 2 bytes, which is used to indicate the length of the field structure of the validity time information except the length field and the type field; the length of the enable time field is 4 bytes, which is used to indicate the first effective time of the first routing calculation algorithm; the length of the disable time field is 4 bytes, which is used to indicate the first invalid time of the first routing calculation algorithm. Compared with FIG8 , the validity time sub-TLV field shown in FIG9 adds a period field, and the length of the period field is 4 bytes, which is used to indicate the change period of the validity time of the first routing calculation algorithm. For the introduction of other fields, please refer to the relevant content in FIG8 , which will not be repeated here.

在本申请实施例中,有效时间sub-TLV字段中可以通过多个变化时间单元承载多个有效时间信息,例如,一个变化时间单元包括对应的变化时间信息索引(index)、控制标志位(flags)以及有效时间、失效时间和周期三元组,因此,有效时间sub-TLV中还可以包括变化时间单元的数量等信息。In an embodiment of the present application, the valid time sub-TLV field can carry multiple valid time information through multiple change time units. For example, a change time unit includes a corresponding change time information index (index), a control flag (flags), and a triplet of valid time, expiration time and period. Therefore, the valid time sub-TLV can also include information such as the number of change time units.

示例性地,参见图10所示的有效时间sub-TLV字段,相比于图8,图10增加了初始时间(initial time)字段、数量(number)字段和reserved字段。其中,initial time字段为8字节的时间戳,单位为秒,例如,initial time字段的数值是从1970年1月1日开始所经过的不考虑闰秒的秒数;number字段的长度为1个字节,用于指示该时间约束条件的字段结构中的变化时间信息的数量;unit字段的长度为1个字节,用于指示变数时间信息的时间单位,用于后续扩展。示例性地,unit字段的含义可以如表1所示,以unit值(value)为0为例,指示变化时间单元中的有效时间、失效时间和周期的单位为微秒。unit value为9-255的情况还未分配。Exemplarily, referring to the valid time sub-TLV field shown in FIG. 10, compared with FIG. 8, FIG. 10 adds an initial time field, a number field, and a reserved field. Among them, the initial time field is an 8-byte timestamp in seconds. For example, the value of the initial time field is the number of seconds that have passed since January 1, 1970 without considering leap seconds; the length of the number field is 1 byte, which is used to indicate the number of change time information in the field structure of the time constraint; the length of the unit field is 1 byte, which is used to indicate the time unit of the variable time information for subsequent expansion. Exemplarily, the meaning of the unit field can be as shown in Table 1. Taking the unit value (value) as 0 as an example, it indicates that the unit of the valid time, invalid time and period in the change time unit is microseconds. The case where the unit value is 9-255 has not been assigned yet.

表1

Table 1

参见图11所示的有效时间sub-TLV字段,相比于图9,图11增加了initial time字段、number字段和reserved字段,相比于图10,图11增加了索引(index)字段、标志(flags)字段和周期(period)字段。其中,对于有效时间sub-TLV中的每个变化时间单元,index字段为变化时间单元的第一个字段,该index字段为变化时间单元的索引,唯一标识承载一个有效时间信息的一个变化时间单元;flags字段为控制标志位,flags字段中的每一个位表示对应的控制操作,以flags字段的最低位作为删除控制位为例,当flags字段的最低位为1时,表示对该变化时间单元中的有效时间信息进行删除。通过index字段和flags字段可以实现对已发布的第一路由计算算法的有效时间信息的删除和修改等操作。Referring to the effective time sub-TLV field shown in FIG. 11, compared with FIG. 9, FIG. 11 adds the initial time field, the number field and the reserved field, and compared with FIG. 10, FIG. 11 adds the index field, the flags field and the period field. Among them, for each change time unit in the effective time sub-TLV, the index field is the first field of the change time unit, and the index field is the index of the change time unit, which uniquely identifies a change time unit carrying an effective time information; the flags field is a control flag bit, and each bit in the flags field represents a corresponding control operation. Taking the lowest bit of the flags field as a deletion control bit as an example, when the lowest bit of the flags field is 1, it means that the effective time information in the change time unit is deleted. Through the index field and the flags field, operations such as deletion and modification of the effective time information of the first routing calculation algorithm that has been published can be implemented.

步骤302,基于第一有效时间信息和第一网络拓扑约束确定在第一路由计算算法的有效时间使用的第一网络拓扑,第一路由计算算法以及第一网络拓扑在第一路由计算算法的有效时间之前确定。Step 302: determine a first network topology used during the effective time of a first route calculation algorithm based on first effective time information and a first network topology constraint, wherein the first route calculation algorithm and the first network topology are determined before the effective time of the first route calculation algorithm.

在本申请实施例中,第一有效时间信息和第一网络拓扑约束是用于确定第一路由计算算法对应的网络拓扑的,因此,在第一路由计算算法的有效时间之前,在确定第一有效时间信息和第一网络拓扑约束的情况下,即可提前确定得到在第一路由计算算法的有效时间使用的第一网络拓扑。其中,第一网络拓扑可以是在第一时间生成的,也可以是在第一时间之前生成好的,在第一时间直接确定将提前确定好的第一网络拓扑选择出来,总之,第一网络拓扑是在第一路由计算算法的有效时间之前确定的。In the embodiment of the present application, the first effective time information and the first network topology constraint are used to determine the network topology corresponding to the first routing calculation algorithm. Therefore, before the effective time of the first routing calculation algorithm, the first network topology used during the effective time of the first routing calculation algorithm can be determined in advance by determining the first effective time information and the first network topology constraint. The first network topology can be generated at the first time, or it can be generated before the first time. The first network topology determined in advance is directly selected at the first time. In short, the first network topology is determined before the effective time of the first routing calculation algorithm.

可选地,在第一网络拓扑在第一时间生成的情况下,基于第一有效时间信息和第一网络拓扑约束生成第一网络拓扑的方式可以为,基于第一有效时间信息以及网络连接状态的时间变化信息确定在第一路由计算算法的有效时间有效的物理网络拓扑,然后在物理网络拓扑中确定满足第一网络拓扑约束的第一网络拓扑。其中,第一时间与第一路由计算算法的有效时间之间的差值本申请实施例不做限定,第一时间与第一路由计算算法的有效时间之间的差值越小,在第一时间生成的第一网络拓扑与实际的物理的网络拓扑的情况更贴近,避免第一时间到第一路由计算算法的有效时间之间发生物理的网络拓扑的变化。Optionally, when the first network topology is generated at the first time, the method for generating the first network topology based on the first effective time information and the first network topology constraint can be to determine the physical network topology that is effective at the effective time of the first routing calculation algorithm based on the first effective time information and the time change information of the network connection state, and then determine the first network topology that satisfies the first network topology constraint in the physical network topology. The difference between the first time and the effective time of the first routing calculation algorithm is not limited in the embodiment of the present application. The smaller the difference between the first time and the effective time of the first routing calculation algorithm, the closer the first network topology generated at the first time is to the actual physical network topology, thereby avoiding changes in the physical network topology between the first time and the effective time of the first routing calculation algorithm.

在第一网络拓扑约束包括链路颜色约束的情况下,由于不同颜色用于区分不同的有效时间,因此,基于第一有效时间信息和第一网络拓扑约束生成第一网络拓扑的方式可以为,直接根据链路包括的颜色属性,确定出符合链路颜色约束的第一网络拓扑。例如,链路包括黄色属性,黄色指示第一有效时间段,代表该链路在第一有效时间段有效,则由黄色属性的链路组成的网络拓扑即为在第一有效时间段有效的网络拓扑。也就是说,通过对链路进行不同有效时间的不同染色,使得通过链路颜色约束能够确定出指定颜色对应的第一网络拓扑,该第一网络拓扑在指定颜色指示的有效时间有效。In the case where the first network topology constraint includes a link color constraint, since different colors are used to distinguish different valid times, the method for generating the first network topology based on the first valid time information and the first network topology constraint can be to directly determine the first network topology that meets the link color constraint based on the color attribute included in the link. For example, the link includes a yellow attribute, and the yellow color indicates the first valid time period, which means that the link is valid in the first valid time period. Then the network topology composed of links with yellow attributes is the network topology that is valid in the first valid time period. In other words, by coloring the links differently for different valid times, the first network topology corresponding to the specified color can be determined through the link color constraint, and the first network topology is valid during the valid time indicated by the specified color.

与第一路由计算算法类似,在还确定第二路由计算算法的情况下,可以基于第二有效时间信息和第二网络拓扑约束确定在第二路由计算算法的有效时间使用的第二网络拓扑,第二路由计算算法以及第二网络拓扑在第二路由计算算法的有效时间之前确定。Similar to the first route calculation algorithm, when the second route calculation algorithm is also determined, the second network topology used at the effective time of the second route calculation algorithm can be determined based on the second effective time information and the second network topology constraint, and the second route calculation algorithm and the second network topology are determined before the effective time of the second route calculation algorithm.

综上,通过在第一路由计算算法中增加第一有效时间信息,使得第一路由计算算法在第一路由计算算法的有效时间开始生效,进而通过在第一路由计算算法的有效时间之前提前确定在第一路由计算算法的有效时间使用的第一网络拓扑,使得在第一路由计算算法的有效时间可以直接使用提前确定好的第一网络拓扑计算路由,提高了确定第一网络拓扑的效率,进而提高了基于路由计算算法计算第一网络拓扑的路由信息的效率。In summary, by adding the first effective time information to the first route calculation algorithm, the first route calculation algorithm takes effect at the effective time of the first route calculation algorithm, and then by determining in advance before the effective time of the first route calculation algorithm the first network topology used at the effective time of the first route calculation algorithm, the route can be directly calculated using the first network topology determined in advance at the effective time of the first route calculation algorithm, thereby improving the efficiency of determining the first network topology, and thereby improving the efficiency of calculating the routing information of the first network topology based on the route calculation algorithm.

在本申请实施例中,在基于第一有效时间信息和第一网络拓扑约束确定在第一有效时间使用的第一网络拓扑之后,该方法还可以在第二时间,基于第一路由计算算法计算第一网络拓扑的第一路由信息,第二时间在第一路由计算算法的有效时间之前,第二时间与第一时间相同或者在第一时间 之后。其中,第二时间与第一路由计算算法的有效时间之间的差值小于差值阈值,差值阈值可以根据应用场景灵活调整,例如,差值阈值可以为较小值,使得第二时间距离第一路由计算算法的有效时间较近。由于第一路由计算算法是在第一网络拓扑中计算路由的,因此,第一路由信息用于在第一网络拓扑中转发报文。In the embodiment of the present application, after determining the first network topology used at the first effective time based on the first effective time information and the first network topology constraint, the method can also calculate the first routing information of the first network topology based on the first routing calculation algorithm at a second time, the second time is before the effective time of the first routing calculation algorithm, the second time is the same as the first time or is at the first time. After that. The difference between the second time and the effective time of the first route calculation algorithm is less than the difference threshold, and the difference threshold can be flexibly adjusted according to the application scenario. For example, the difference threshold can be a smaller value, so that the second time is closer to the effective time of the first route calculation algorithm. Since the first route calculation algorithm calculates the route in the first network topology, the first route information is used to forward the message in the first network topology.

由此,在第一路由计算算法的有效时间之前还可以提前基于路由计算算法计算第一网络拓扑的第一路由信息,使得在第一路由计算算法的有效时间可以直接使用提前计算好的第一路由信息进行报文转发,无需在第一路由计算算法的有效时间现去计算第一路由信息,提高了基于第一路由信息进行报文转发的效率,避免在现去计算第一路由信息的过程中的报文丢包。Therefore, the first routing information of the first network topology can be calculated in advance based on the routing calculation algorithm before the effective time of the first routing calculation algorithm, so that the first routing information calculated in advance can be directly used to forward messages during the effective time of the first routing calculation algorithm, and there is no need to calculate the first routing information during the effective time of the first routing calculation algorithm, which improves the efficiency of message forwarding based on the first routing information and avoids message loss in the process of calculating the first routing information.

在本申请实施例中,在基于第一路由计算算法计算第一网络拓扑的第一路由信息之后,即可根据计算得到的第一路由信息在第一网络拓扑中转发报文。示例性地,网络设备根据网络流量到达的时间在第一路由计算算法的有效时间段内,确定基于第一路由信息转发该网络流量,进而实现了将网络流量引到第一网络拓扑进行转发的效果。In the embodiment of the present application, after calculating the first routing information of the first network topology based on the first routing calculation algorithm, the message can be forwarded in the first network topology according to the calculated first routing information. Exemplarily, the network device determines to forward the network traffic based on the first routing information according to the arrival time of the network traffic within the effective time period of the first routing calculation algorithm, thereby achieving the effect of directing the network traffic to the first network topology for forwarding.

下面,分别基于不同的时变网络对本申请实施例提供的方法进行举例说明。其中,图12为针对拓扑变化具有周期性的时变网络进行网路拓扑切换的流程图,例如,拓扑变化具有周期性的时变网络可以为潮汐网络;图13和图14为针对拓扑变化不具有明显周期性的时变网络进行网路拓扑切换的流程图,例如,拓扑变化不具有明显周期性的时变网络可以为卫星网络或者能耗优先的网络。Below, the method provided by the embodiment of the present application is illustrated based on different time-varying networks. Among them, Figure 12 is a flowchart of network topology switching for a time-varying network with periodic topology changes. For example, the time-varying network with periodic topology changes can be a tidal network; Figures 13 and 14 are flowcharts of network topology switching for a time-varying network with no obvious periodicity in topology changes. For example, the time-varying network with no obvious periodicity in topology changes can be a satellite network or an energy-prioritized network.

参见图12,以潮汐网络和灵活算法为例,针对潮汐网络的大流量时间段和下流量时间段,可以定义第一灵活算法和第二灵活算法这两个灵活算法,然后通过如下1-6的步骤实现网络拓扑的切换。Referring to Figure 12, taking the tidal network and flexible algorithm as an example, for the high-flow time period and low-flow time period of the tidal network, two flexible algorithms, the first flexible algorithm and the second flexible algorithm, can be defined, and then the network topology switching can be achieved through the following steps 1-6.

1、链路染色,并通告链路变化。潮汐网络中的任一网络设备根据链路的打开和关闭的变化规律,为任一网络设备直连的链路赋予不同的颜色属性,通过不同颜色标记链路的不同有效时间段,该过程称为链路染色。例如,在大流量时间段和小流量时段均打开的链路赋予绿色属性,仅在小流量时间段打开的链路赋予黄色属性。在图12中,小流量时间段为(t0-t1),大流量时间段为(t1-t2),用直线代表链路的绿色属性,用虚线代表链路的黄色属性。1. Link coloring and notification of link changes. Any network device in the tidal network assigns different color attributes to the links directly connected to any network device according to the changing rules of link opening and closing. Different valid time periods of the link are marked with different colors. This process is called link coloring. For example, a link that is open in both high-traffic time periods and low-traffic time periods is assigned a green attribute, and a link that is only open in low-traffic time periods is assigned a yellow attribute. In Figure 12, the low-traffic time period is (t0-t1), and the high-traffic time period is (t1-t2). The straight line represents the green attribute of the link, and the dotted line represents the yellow attribute of the link.

潮汐网络中的各个网络设备之间互相通告各个网络设备直连的链路的染色属性信息,该过程为通告链路变化。其中,各个网络设备之间互相通告各个网络设备直连的链路的染色属性信息之外,各个网络设备之间互相通告各个网络设备直连的链路的中断、metric值等链路的其它属性信息。进而,潮汐网络中的各个网络设备能够获取到潮汐网络中的各个链路的属性信息,由此,可以提前小流量时间段有效的网络拓扑以及大流量时间段有效的网络拓扑。Each network device in the tidal network notifies each other of the coloring attribute information of the links directly connected to each network device. This process is called notifying link changes. In addition to notifying each other of the coloring attribute information of the links directly connected to each network device, each network device notifies each other of other attribute information of the links, such as the interruption and metric value of the links directly connected to each network device. Furthermore, each network device in the tidal network can obtain the attribute information of each link in the tidal network, thereby enabling the network topology that is effective in low-traffic time periods and the network topology that is effective in high-traffic time periods to be prepared in advance.

2、定义灵活算法。可以由潮汐网络中的任一个或任多个网络设备上定义第一灵活算法和第二灵活算法,第一灵活算法包括的第一有效时间信息指示小流量时间段,第二灵活算法包括的第二有效时间信息指示大流量时间段,即灵活算法的有效时间段和变化周期与灵活算法对应的网络拓扑的有效时间段和变化周期相同。可选地,灵活算法的有效时间、失效时间和变化周期均可以由外部输入,例如,可以通过控制器向网络设备下发,或者通过人工配置获取。2. Define flexible algorithms. The first flexible algorithm and the second flexible algorithm can be defined on any one or more network devices in the tidal network. The first effective time information included in the first flexible algorithm indicates a low-traffic time period, and the second effective time information included in the second flexible algorithm indicates a high-traffic time period, that is, the effective time period and change period of the flexible algorithm are the same as the effective time period and change period of the network topology corresponding to the flexible algorithm. Optionally, the effective time, expiration time and change period of the flexible algorithm can be input externally, for example, they can be sent to the network device through a controller, or obtained through manual configuration.

可选地,第一灵活算法包括的第一网络拓扑约束为链路颜色约束,例如,第一网络拓扑约束指示仅使用绿色属性的链路确定网络拓扑;第二灵活算法包括的第二网络拓扑约束也为链路颜色约束,例如,第二网络拓扑约束指示使用绿色属性和黄色属性的链路确定网络拓扑。在图12中,定义的第一灵活算法的灵活算法ID为128,第一灵活算法的第一有效时间信息为(t0-t1,T);定义的第二灵活算法的灵活算法ID为129,第二灵活算法的第二有效时间信息为(t1-t2,T),其中,T为变化周期。在本申请实施例中,第一灵活算法或第二灵活算法还可以包括其他约束条件,例如,metric类型、metric的取值范围等约束条件,通过其它约束条件和第一有效时间信息共同确定网络拓扑。Optionally, the first network topology constraint included in the first flexible algorithm is a link color constraint, for example, the first network topology constraint indicates that only links with green attributes are used to determine the network topology; the second network topology constraint included in the second flexible algorithm is also a link color constraint, for example, the second network topology constraint indicates that links with green attributes and yellow attributes are used to determine the network topology. In Figure 12, the flexible algorithm ID of the defined first flexible algorithm is 128, and the first effective time information of the first flexible algorithm is (t0-t1, T); the flexible algorithm ID of the defined second flexible algorithm is 129, and the second effective time information of the second flexible algorithm is (t1-t2, T), where T is the change period. In an embodiment of the present application, the first flexible algorithm or the second flexible algorithm may also include other constraints, such as metric type, metric value range and other constraints, and the network topology is determined by other constraints and the first effective time information.

3、通告灵活算法。用于定义灵活算法的网络设备可以向其它网络设备通告时变网络的灵活算法,并与灵活算法一起通告灵活算法对应的段标识定位器(segment ID locator,SID locator)或者互联网协议(internet protocol,IP)前缀。可选地,灵活算法携带在报文的FAD TLV中进行通告,在图12中,FAD TLV中包括灵活算法ID:128、有效时间信息:(t0-t1,T),灵活算法ID:129、有效时间信息为(t1-t2,T)。其中,算法(algo):128的SID为10065,algo:129的SID为20065。3. Announcement of flexible algorithms. The network device used to define flexible algorithms can announce the flexible algorithms of time-varying networks to other network devices, and announce the segment ID locator (SID locator) or Internet protocol (IP) prefix corresponding to the flexible algorithm together with the flexible algorithm. Optionally, the flexible algorithm is carried in the FAD TLV of the message for announcement. In Figure 12, the FAD TLV includes the flexible algorithm ID: 128, valid time information: (t0-t1, T), and the flexible algorithm ID: 129, valid time information is (t1-t2, T). Among them, the SID of algorithm (algo): 128 is 10065, and the SID of algo: 129 is 20065.

4、生成逻辑拓扑。潮汐网络中的各个网络设备通过执行本申请实施例提供的方法,可以根据潮汐网络的各个链路的在第一灵活算法的有效时间段内的状态生成在第一灵活算法的有效时间使用的第一网络 拓扑,第一网络拓扑对应图12中的虚线表示的网络拓扑;根据潮汐网络的各个链路的在第二灵活算法的有效时间段内的状态生成在第二灵活算法的有效时间使用的第二网络拓扑,第二网络拓扑对应图12中的实线表示的网络拓扑。4. Generate a logical topology. Each network device in the tidal network can generate a first network topology used during the effective time of the first flexible algorithm according to the state of each link of the tidal network during the effective time period of the first flexible algorithm by executing the method provided in the embodiment of the present application. Topology, the first network topology corresponds to the network topology represented by the dotted line in Figure 12; the second network topology used during the effective time of the second flexible algorithm is generated according to the status of each link of the tidal network during the effective time period of the second flexible algorithm, and the second network topology corresponds to the network topology represented by the solid line in Figure 12.

5、计算路由信息,在第一灵活算法的有效时间或者在第一灵活算法的有效时间之前,在第一灵活算法对应的第一网络拓扑下,基于第一灵活算法的算路约束进行路由计算,获取第一路由信息;在第二灵活算法的有效时间或者在第二灵活算法的有效时间之前,在第二灵活算法对应的第二网络拓扑下,基于第二灵活算法的算路约束进行路由计算,获取第二路由信息。可选地,在第一灵活算法的有效时间段之外接收到第一网络拓扑中的链路发生变化的通告信息,将该通告信息存储起来,直到该第一灵活算法将要生效时,例如在第一灵活算法的有效时间的前5分钟,根据最新的通告链路变化的通告信息确定网络拓扑并进行路由计算,可以减少不必要的路由计算和转发表项的更新下发。5. Calculate routing information. During or before the effective time of the first flexible algorithm, in the first network topology corresponding to the first flexible algorithm, perform routing calculation based on the routing constraints of the first flexible algorithm to obtain first routing information; during or before the effective time of the second flexible algorithm, in the second network topology corresponding to the second flexible algorithm, perform routing calculation based on the routing constraints of the second flexible algorithm to obtain second routing information. Optionally, when notification information of link changes in the first network topology is received outside the effective time period of the first flexible algorithm, the notification information is stored until the first flexible algorithm is about to take effect, for example, 5 minutes before the effective time of the first flexible algorithm, the network topology is determined and routing calculation is performed based on the latest notification information of link changes, which can reduce unnecessary routing calculations and updates and dispatches of forwarding table entries.

6、选择SID封装转发。以第一报文为例,潮汐网络接收第一报文的头节点设备根据第一报文的到达时间在第一报文中封装不同的灵活算法对应的SID或IP前缀,得到第二报文。例如,在(t0-t1)之间到达的第一报文中封装algo:128的SID为10065,在(t1-t2)之间到达的第一报文中封装algo:129的SID为20065。进而,传输第二报文的中间节点设备能够根据第二报文中的SID查找对应的转发表项进行转发。6. Select SID encapsulation and forwarding. Taking the first message as an example, the head node device of the Tide Network that receives the first message encapsulates the SID or IP prefix corresponding to different flexible algorithms in the first message according to the arrival time of the first message to obtain the second message. For example, the SID of algo:128 encapsulated in the first message arriving between (t0-t1) is 10065, and the SID of algo:129 encapsulated in the first message arriving between (t1-t2) is 20065. Furthermore, the intermediate node device that transmits the second message can look up the corresponding forwarding table entry according to the SID in the second message and forward it.

参见图13,以卫星网络和灵活算法为例,由于卫星网络的网络拓扑不具有明显周期性变化,但是卫星网络的网络拓扑是可预测的。因此,在图13所示的1、通告链路变化中,在可预测链路变化场景下,卫星网络的任一网络设备可以向卫星网络的其它设备发布直连的链路在未来一段时间内的状态变化情况,或者,也可以通过管理面向卫星网络中的各个网络设备下发未来一段时间内的网络拓扑的状态变化情况。例如,链路1在未来一段时间内预测的状态变化情况是在t0时间打开,在t1时间关闭。Referring to FIG13 , taking the satellite network and the flexible algorithm as an example, since the network topology of the satellite network does not have obvious periodic changes, but the network topology of the satellite network is predictable. Therefore, in 1. Notification of link changes shown in FIG13 , in the predictable link change scenario, any network device of the satellite network can publish the state changes of the directly connected links in the future period to other devices of the satellite network, or can also send the state changes of the network topology in the future period to each network device in the satellite network through management. For example, the predicted state change of link 1 in the future period is to open at time t0 and close at time t1.

对于图13所示的2、定义灵活算法中,可以在卫星网络的任一网络设备上定义第一灵活算法和第二灵活算法这两个灵活算法,第一灵活算法的有效时间段对应当前的时间段(t2-t3),第二灵活算法的有效时间段对应下一个时间段(t3-t4),t2、t3、t4可以根据时变网络的实际变化情况进行灵活设置,其中,t2可以与t0相同,t3可以与t1相同。由此实现不同时间段之间的不丢包转发,并且避免过大的路由表项,时间段长度根据时变网络场景进行设置。可选地,在图13所示的场景下第一灵活算法和第二灵活算法的有效时间的变化周期T为两个时间段之和。此外,图13中的3、4、5和6的实施方式与图12中的3、4、5和6的内容一致,此处不再赘述。For 2 shown in Figure 13, in the definition of flexible algorithms, the first flexible algorithm and the second flexible algorithm can be defined on any network device of the satellite network. The effective time period of the first flexible algorithm corresponds to the current time period (t2-t3), and the effective time period of the second flexible algorithm corresponds to the next time period (t3-t4). t2, t3, and t4 can be flexibly set according to the actual changes in the time-varying network, wherein t2 can be the same as t0, and t3 can be the same as t1. This achieves non-loss forwarding between different time periods, and avoids excessive routing table entries. The time period length is set according to the time-varying network scenario. Optionally, in the scenario shown in Figure 13, the change period T of the effective time of the first flexible algorithm and the second flexible algorithm is the sum of the two time periods. In addition, the implementation methods of 3, 4, 5, and 6 in Figure 13 are consistent with the contents of 3, 4, 5, and 6 in Figure 12, and will not be repeated here.

参见图14,图14为卫星网络场景下的另一种定义灵活算法的方式,即定义多个非周期性的灵活算法并随着时间持续更新。其中,图14中的2、定义灵活算法,没有定义有效时间的变化周期,图14中的1、3、4、5、6与图13中的一致,此处不再赘述,图14中5、6的过程未示出。相较于图13,图14中在到达或者快到达第一灵活算法的失效时间的情况下,基于7、定义灵活算法的过程重新定义下一个时间段的灵活算法,也即需要重新执行2-5的过程。可选地,在7中定义的灵活算法可以定义新的灵活算法ID以及新的SID locator或IP前缀,也可以与失效之后的第一灵活算法的灵活算法ID以及SID locator或IP前缀相同,但是有效时间信息变为(t5-t6),t5可以与t4相同。See Figure 14, which is another way to define a flexible algorithm in a satellite network scenario, that is, to define multiple non-periodic flexible algorithms and continuously update them over time. Among them, 2 in Figure 14, defining a flexible algorithm, does not define a change period of the effective time, 1, 3, 4, 5, and 6 in Figure 14 are consistent with those in Figure 13, and are not repeated here, and the processes of 5 and 6 in Figure 14 are not shown. Compared with Figure 13, in Figure 14, when the expiration time of the first flexible algorithm is reached or is about to be reached, the flexible algorithm for the next time period is redefined based on the process of 7, defining a flexible algorithm, that is, the processes 2-5 need to be re-executed. Optionally, the flexible algorithm defined in 7 can define a new flexible algorithm ID and a new SID locator or IP prefix, or it can be the same as the flexible algorithm ID and SID locator or IP prefix of the first flexible algorithm after expiration, but the effective time information becomes (t5-t6), and t5 can be the same as t4.

综上,该方法能够提前获取到可预测的网络连接状态的变化时间信息或者周期性变化的网络连接状态的变化时间信息,进而能够通过在路由计算算法中增加有效时间信息的方式,构建分别在不同时间段内有效的多张网络拓扑,使得在网络连接状态发生变化的时间,可以直接使用在该时间有效的网络拓扑计算路由,实现了时变网络下灵活的网络拓扑的切换。或者,在构建分别在不同时间段内有效的多张网络拓扑的基础上,进一步构建分别在不同时间段内有效的多张网络拓扑的多个路由信息,使得在网络连接状态发生变化的时间,直接使用在该时间有效的直接使用在该时间有效的路由信息进行报文转发,实现了时变网络下灵活的转发路径的切换。In summary, the method can obtain the predictable time information of the change of the network connection state or the time information of the change of the periodically changing network connection state in advance, and then can construct multiple network topologies that are valid in different time periods by adding the valid time information in the routing calculation algorithm, so that when the network connection state changes, the network topology valid at that time can be directly used to calculate the route, thereby realizing flexible switching of network topologies in time-varying networks. Alternatively, on the basis of constructing multiple network topologies that are valid in different time periods, multiple routing information of multiple network topologies that are valid in different time periods is further constructed, so that when the network connection state changes, the routing information valid at that time is directly used to forward the message, thereby realizing flexible switching of forwarding paths in time-varying networks.

以上介绍了本申请实施例的网络拓扑的确定方法,与上述方法对应,本申请实施例还提供了网络拓扑的确定装置。图15是本申请实施例提供的一种网络拓扑的确定装置的结构示意图,该装置应用于上述图2所示的任一网络设备。基于图15所示的如下多个模块,该图15所示的网络拓扑的确定装置能够执行图3所示的方法的全部或部分操作。应理解到,该装置可以包括比所示模块更多的附加模块或者省略其中所示的一部分模块,本申请实施例对此并不进行限制。如图15所示,该装置包括:The above introduces the method for determining the network topology of the embodiment of the present application. Corresponding to the above method, the embodiment of the present application also provides a device for determining the network topology. Figure 15 is a structural schematic diagram of a device for determining the network topology provided in an embodiment of the present application, and the device is applied to any of the network devices shown in Figure 2 above. Based on the following multiple modules shown in Figure 15, the device for determining the network topology shown in Figure 15 can perform all or part of the operations of the method shown in Figure 3. It should be understood that the device may include more additional modules than the modules shown or omit some of the modules shown therein, and the embodiment of the present application does not limit this. As shown in Figure 15, the device includes:

处理模块1501,用于执行图3所示的网络拓扑的确定方法所执行的接收和/或发送相关的操作之外的 其它操作;The processing module 1501 is used to perform operations other than the receiving and/or sending related operations performed by the method for determining the network topology shown in FIG. 3. Other operations;

收发模块1502,用于执行图3所示的网络拓扑的确定方法所执行的接收和/或发送相关的操作。The transceiver module 1502 is used to execute the receiving and/or sending related operations performed by the method for determining the network topology shown in FIG. 3 .

在一种可能的实施方式中,收发模块1502包括接收模块和/或发送模块。接收模块用于执行接收相关的操作,发送模块用于执行发送相关的操作。In a possible implementation, the transceiver module 1502 includes a receiving module and/or a sending module. The receiving module is used to perform reception-related operations, and the sending module is used to perform sending-related operations.

在一种可能的实施方式中,处理模块1501,用于根据第一时间确定第一路由计算算法,第一路由计算算法包括第一有效时间信息和第一网络拓扑约束,第一有效时间信息包括第一路由计算算法的有效时间,第一有效时间信息和第一网络拓扑约束用于确定第一路由计算算法对应的网络拓扑,第一时间在第一路由计算算法的有效时间之前;基于第一有效时间信息和第一网络拓扑约束确定在第一路由计算算法的有效时间使用的第一网络拓扑,第一路由计算算法以及第一网络拓扑在第一路由计算算法的有效时间之前确定。In a possible implementation, the processing module 1501 is used to determine a first routing calculation algorithm according to a first time, the first routing calculation algorithm includes first effective time information and a first network topology constraint, the first effective time information includes the effective time of the first routing calculation algorithm, the first effective time information and the first network topology constraint are used to determine the network topology corresponding to the first routing calculation algorithm, and the first time is before the effective time of the first routing calculation algorithm; based on the first effective time information and the first network topology constraint, determine the first network topology used at the effective time of the first routing calculation algorithm, and the first routing calculation algorithm and the first network topology are determined before the effective time of the first routing calculation algorithm.

在一种可能的实施方式中,处理模块1501,还用于在第二时间,基于第一路由计算算法计算第一网络拓扑的第一路由信息,第二时间在第一路由计算算法的有效时间之前。In a possible implementation, the processing module 1501 is further configured to calculate first routing information of the first network topology based on the first routing calculation algorithm at a second time, where the second time is before the effective time of the first routing calculation algorithm.

在一种可能的实施方式中,第一路由计算算法的有效时间对应第一网络拓扑的有效时间。In a possible implementation manner, the validity period of the first routing calculation algorithm corresponds to the validity period of the first network topology.

在一种可能的实施方式中,第一有效时间信息还包括第一路由计算算法的有效时间的变化周期,第一路由计算算法的有效时间的变化周期对应第一网络拓扑的有效时间的变化周期。In a possible implementation manner, the first effective time information further includes a change period of the effective time of the first routing calculation algorithm, and the change period of the effective time of the first routing calculation algorithm corresponds to the change period of the effective time of the first network topology.

在一种可能的实施方式中,第一网络拓扑约束包括链路颜色约束,链路颜色约束用于约束第一网络拓扑包括的链路的颜色,不同颜色用于区分不同的有效时间,第一网络拓扑包括的链路的颜色符合链路颜色约束。In a possible implementation, the first network topology constraint includes a link color constraint, which is used to constrain the colors of links included in the first network topology, different colors are used to distinguish different valid times, and the colors of links included in the first network topology comply with the link color constraint.

在一种可能的实施方式中,处理模块1501,还用于根据第三时间确定第二路由计算算法,第二路由计算算法包括第二有效时间信息和第二网络拓扑约束,第二有效时间信息指示第二路由计算算法的有效时间,第二有效时间信息和第二网络拓扑约束用于确定第二路由计算算法对应的网络拓扑,第三时间在第二路由计算算法的有效时间之前,第一路由计算算法的有效时间和第二路由计算算法的有效时间不同;基于第二有效时间信息和第二网络拓扑约束确定在第二路由计算算法的有效时间使用的第二网络拓扑,第二路由计算算法以及第二网络拓扑在第二路由计算算法的有效时间之前确定。In a possible implementation, the processing module 1501 is further used to determine a second route calculation algorithm according to a third time, the second route calculation algorithm includes second effective time information and a second network topology constraint, the second effective time information indicates the effective time of the second route calculation algorithm, the second effective time information and the second network topology constraint are used to determine the network topology corresponding to the second route calculation algorithm, the third time is before the effective time of the second route calculation algorithm, the effective time of the first route calculation algorithm and the effective time of the second route calculation algorithm are different; based on the second effective time information and the second network topology constraint, determine the second network topology used at the effective time of the second route calculation algorithm, and the second route calculation algorithm and the second network topology are determined before the effective time of the second route calculation algorithm.

在一种可能的实施方式中,第一有效时间信息还包括第一路由计算算法的有效时间的变化周期,第一路由计算算法的有效时间的变化周期基于第一有效时间信息与第二有效时间信息确定。In a possible implementation manner, the first effective time information further includes a change period of the effective time of the first routing calculation algorithm, and the change period of the effective time of the first routing calculation algorithm is determined based on the first effective time information and the second effective time information.

在一种可能的实施方式中,第一路由计算算法为flex-algo或者multi-topology算法。In a possible implementation, the first routing calculation algorithm is a flex-algo or a multi-topology algorithm.

在一种可能的实施方式中,第一路由计算算法为flex-algo;收发模块1502,用于接收用于通告第一路由计算算法的ISIS链路状态数据单元LSP报文,第一路由计算算法携带在ISIS LSP报文的FAD sub-TLV字段中,第一有效时间信息携带在FAD sub-TLV的有效时间sub-TLV字段中。In one possible implementation, the first routing calculation algorithm is flex-algo; the transceiver module 1502 is used to receive an ISIS link state data unit LSP message for announcing the first routing calculation algorithm, the first routing calculation algorithm is carried in the FAD sub-TLV field of the ISIS LSP message, and the first valid time information is carried in the valid time sub-TLV field of the FAD sub-TLV.

在一种可能的实施方式中,第一路由计算算法为flex-algo;收发模块1502,用于接收用于通告第一路由计算算法的OSPF LSA报文,第一路由计算算法携带在OSPF LSA报文的FAD TLV字段中,第一有效时间信息携带在FAD TLV的有效时间子sub-TLV字段中。In one possible implementation, the first routing calculation algorithm is flex-algo; the transceiver module 1502 is used to receive an OSPF LSA message for announcing the first routing calculation algorithm, the first routing calculation algorithm is carried in the FAD TLV field of the OSPF LSA message, and the first valid time information is carried in the valid time sub-TLV field of the FAD TLV.

在一种可能的实施方式中,第一路由计算算法为flex-algo;收发模块1502,用于接收用于通告第一路由计算算法的BGP update报文,第一路由计算算法携带在BGP update报文的FAD TLV字段中,第一有效时间信息携带在FAD TLV的有效时间子sub-TLV字段中。In one possible implementation, the first routing calculation algorithm is flex-algo; the transceiver module 1502 is used to receive a BGP update message for announcing the first routing calculation algorithm, the first routing calculation algorithm is carried in the FAD TLV field of the BGP update message, and the first valid time information is carried in the valid time sub-TLV field of the FAD TLV.

在一种可能的实施方式中,第一路由计算算法为multi-topology算法;收发模块1502,用于接收用于通告第一路由计算算法的ISIS LSP报文,第一路由计算算法携带在ISIS LSP报文的时变MT信息sub-TLV字段中,第一有效时间信息携带在时变MT信息sub-TLV的有效时间sub-TLV字段中。In one possible implementation, the first routing calculation algorithm is a multi-topology algorithm; the transceiver module 1502 is used to receive an ISIS LSP message for announcing the first routing calculation algorithm, the first routing calculation algorithm is carried in the time-varying MT information sub-TLV field of the ISIS LSP message, and the first valid time information is carried in the valid time sub-TLV field of the time-varying MT information sub-TLV.

在一种可能的实施方式中,第一路由计算算法为multi-topology算法;收发模块1502,用于接收用于通告第一路由计算算法的开放式最短路由优先协议OSPF链路状态通告LSA报文,第一路由计算算法携带在OSPF LSA报文的时变MT信息TLV字段中,第一有效时间信息携带在时变MT信息TLV的有效时间子sub-TLV字段中。In one possible implementation, the first routing calculation algorithm is a multi-topology algorithm; the transceiver module 1502 is used to receive an open shortest route first protocol OSPF link state announcement LSA message for announcing the first routing calculation algorithm, the first routing calculation algorithm is carried in the time-varying MT information TLV field of the OSPF LSA message, and the first valid time information is carried in the valid time sub-TLV field of the time-varying MT information TLV.

在一种可能的实施方式中,第一路由计算算法为multi-topology算法;收发模块1502,用于接收用于通告第一路由计算算法的BGP update报文,第一路由计算算法携带在BGP update报文的时变MT信息TLV字段中,第一有效时间信息携带在时变MT信息TLV的有效时间子sub-TLV字段中。 In one possible implementation, the first routing calculation algorithm is a multi-topology algorithm; the transceiver module 1502 is used to receive a BGP update message for announcing the first routing calculation algorithm, the first routing calculation algorithm is carried in the time-varying MT information TLV field of the BGP update message, and the first valid time information is carried in the valid time sub-TLV field of the time-varying MT information TLV.

应理解的是,上述图15提供的装置在实现其功能时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的装置与方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。图15提供的装置的有益效果可参见图3所示的方法的有益效果,此处不再赘述It should be understood that the device provided in FIG. 15 above only uses the division of the above functional modules as an example to implement its functions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the device provided in the above embodiment belongs to the same concept as the method embodiment. The specific implementation process is detailed in the method embodiment, which will not be repeated here. The beneficial effects of the device provided in FIG. 15 can be found in the beneficial effects of the method shown in FIG. 3, which will not be repeated here.

参见图16,图16示出了本申请一个示例性实施例提供的网络设备2000的结构示意图。图16所示的网络设备2000用于执行上述图3所示的网络拓扑的确定方法所涉及的操作。该网络设备2000例如是交换机、路由器等,该网络设备2000可以由一般性的总线体系结构来实现。Referring to FIG. 16 , FIG. 16 shows a schematic diagram of the structure of a network device 2000 provided by an exemplary embodiment of the present application. The network device 2000 shown in FIG. 16 is used to perform the operations involved in the method for determining the network topology shown in FIG. 3 above. The network device 2000 is, for example, a switch, a router, etc., and the network device 2000 can be implemented by a general bus architecture.

如图16所示,网络设备2000包括至少一个处理器2001、存储器2003以及至少一个通信接口2004。As shown in FIG. 16 , the network device 2000 includes at least one processor 2001 , a memory 2003 , and at least one communication interface 2004 .

处理器2001例如是通用中央处理器(central processing unit,CPU)、数字信号处理器(digital signal processor,DSP)、网络处理器(network processer,NP)、图形处理器(Graphics Processing Unit,GPU)、神经网络处理器(neural-network processing units,NPU)、数据处理单元(Data Processing Unit,DPU)、微处理器或者一个或多个用于实现本申请方案的集成电路。例如,处理器2001包括专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。PLD例如是复杂可编程逻辑器件(complex programmable logic device,CPLD)、现场可编程逻辑门阵列(field-programmable gate array,FPGA)、通用阵列逻辑(generic array logic,GAL)或其任意组合。其可以实现或执行结合本发明实施例公开内容所描述的各种逻辑方框、模块和电路。处理器也可以是实现计算功能的组合,例如包括一个或多个微处理器组合,DSP和微处理器的组合等等。The processor 2001 is, for example, a general-purpose central processing unit (CPU), a digital signal processor (DSP), a network processor (NP), a graphics processing unit (GPU), a neural-network processing units (NPU), a data processing unit (DPU), a microprocessor, or one or more integrated circuits for implementing the solution of the present application. For example, the processor 2001 includes an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. The PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. It can implement or execute various logic blocks, modules, and circuits described in conjunction with the disclosure of the embodiments of the present invention. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and so on.

可选的,网络设备2000还包括总线。总线用于在网络设备2000的各组件之间传送信息。总线可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图16中仅用一条线表示,但并不表示仅有一根总线或一种类型的总线。Optionally, the network device 2000 further includes a bus. The bus is used to transmit information between the components of the network device 2000. The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, FIG16 is represented by only one line, but it does not mean that there is only one bus or one type of bus.

存储器2003例如是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其它类型的静态存储设备,又如是随机存取存储器(random access memory,RAM)或者可存储信息和指令的其它类型的动态存储设备,又如是电可擦可编程只读存储器(electrically erasable programmable read-only Memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其它光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其它磁存储设备,或者是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质,但不限于此。存储器2003例如是独立存在,并通过总线与处理器2001相连接。存储器2003也可以和处理器2001集成在一起。The memory 2003 is, for example, a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, or a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 2003 is, for example, independent and connected to the processor 2001 through a bus. The memory 2003 can also be integrated with the processor 2001.

通信接口2004使用任何收发器一类的装置,用于与其它设备或通信网络通信,通信网络可以为以太网、无线接入网(radio access network,RAN)或无线局域网(wireless local area networks,WLAN)等。通信接口2004可以包括有线通信接口,还可以包括无线通信接口。具体的,通信接口2004可以为以太(Ethernet)接口、快速以太(Fast Ethernet,FE)接口、千兆以太(Gigabit Ethernet,GE)接口,异步传输模式(Asynchronous Transfer Mode,ATM)接口,无线局域网(wireless local area networks,WLAN)接口,蜂窝网络通信接口或其组合。以太网接口可以是光接口,电接口或其组合。在本申请实施例中,通信接口2004可以用于网络设备2000与其他设备进行通信。The communication interface 2004 uses any transceiver-like device to communicate with other devices or communication networks, and the communication network can be Ethernet, radio access network (RAN) or wireless local area network (WLAN), etc. The communication interface 2004 can include a wired communication interface and a wireless communication interface. Specifically, the communication interface 2004 can be an Ethernet interface, a Fast Ethernet (FE) interface, a Gigabit Ethernet (GE) interface, an Asynchronous Transfer Mode (ATM) interface, a wireless local area network (WLAN) interface, a cellular network communication interface or a combination thereof. The Ethernet interface can be an optical interface, an electrical interface or a combination thereof. In an embodiment of the present application, the communication interface 2004 can be used for the network device 2000 to communicate with other devices.

在具体实现中,作为一种实施例,处理器2001可以包括一个或多个CPU,如图16中所示的CPU0和CPU1。这些处理器中的每一个可以是一个单核(single-core CPU)处理器,也可以是一个多核(multi-core CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。In a specific implementation, as an embodiment, the processor 2001 may include one or more CPUs, such as CPU0 and CPU1 shown in FIG16 . Each of these processors may be a single-core CPU processor or a multi-core CPU processor. The processor here may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).

在具体实现中,作为一种实施例,网络设备2000可以包括多个处理器,如图16中所示的处理器2001和处理器2005。这些处理器中的每一个可以是一个单核处理器(single-core CPU),也可以是一个多核处理器(multi-core CPU)。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(如计算机程序指令)的处理核。In a specific implementation, as an embodiment, the network device 2000 may include multiple processors, such as the processor 2001 and the processor 2005 shown in FIG16 . Each of these processors may be a single-core CPU or a multi-core CPU. The processor here may refer to one or more devices, circuits, and/or processing cores for processing data (such as computer program instructions).

在具体实现中,作为一种实施例,网络设备2000还可以包括输出设备和输入设备。输出设备和处理 器2001通信,可以以多种方式来显示信息。例如,输出设备可以是液晶显示器(liquid crystal display,LCD)、发光二级管(light emitting diode,LED)显示设备、阴极射线管(cathode ray tube,CRT)显示设备或投影仪(projector)等。输入设备和处理器2001通信,可以以多种方式接收用户的输入。例如,输入设备可以是鼠标、键盘、触摸屏设备或传感设备等。In a specific implementation, as an embodiment, the network device 2000 may also include an output device and an input device. Output device and processing The output device communicates with the processor 2001 and can display information in a variety of ways. For example, the output device can be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. The input device communicates with the processor 2001 and can receive user input in a variety of ways. For example, the input device can be a mouse, a keyboard, a touch screen device, or a sensor device.

在一些实施例中,存储器2003用于存储执行本申请方案的程序代码2010,处理器2001可以执行存储器2003中存储的程序代码2010。也即是,网络设备2000可以通过处理器2001以及存储器2003中的程序代码2010,来实现方法实施例提供的网络拓扑的确定方法。程序代码2010中可以包括一个或多个软件模块。可选地,处理器2001自身也可以存储执行本申请方案的程序代码或指令。In some embodiments, the memory 2003 is used to store the program code 2010 for executing the solution of the present application, and the processor 2001 can execute the program code 2010 stored in the memory 2003. That is, the network device 2000 can implement the method for determining the network topology provided by the method embodiment through the processor 2001 and the program code 2010 in the memory 2003. The program code 2010 may include one or more software modules. Optionally, the processor 2001 itself can also store the program code or instruction for executing the solution of the present application.

在具体实施例中,本申请实施例的网络设备2000可对应于上述各个方法实施例中的任一网络设备,网络设备2000中的处理器2001读取存储器2003中的指令,使图16所示的网络设备2000能够执行图3所示的方法所执行的全部或部分操作。In a specific embodiment, the network device 2000 of the embodiment of the present application may correspond to any network device in the above-mentioned method embodiments, and the processor 2001 in the network device 2000 reads the instructions in the memory 2003, so that the network device 2000 shown in Figure 16 can execute all or part of the operations performed by the method shown in Figure 3.

具体的,处理器2001用于根据第一时间确定第一路由计算算法,第一路由计算算法包括第一有效时间信息和第一网络拓扑约束,第一有效时间信息包括第一路由计算算法的有效时间,第一有效时间信息和第一网络拓扑约束用于确定第一路由计算算法对应的网络拓扑,第一时间在第一路由计算算法的有效时间之前;基于第一有效时间信息和第一网络拓扑约束确定在第一路由计算算法的有效时间使用的第一网络拓扑,第一路由计算算法以及第一网络拓扑在第一路由计算算法的有效时间之前确定。Specifically, the processor 2001 is used to determine a first routing calculation algorithm according to a first time, the first routing calculation algorithm includes first effective time information and a first network topology constraint, the first effective time information includes the effective time of the first routing calculation algorithm, the first effective time information and the first network topology constraint are used to determine the network topology corresponding to the first routing calculation algorithm, and the first time is before the effective time of the first routing calculation algorithm; based on the first effective time information and the first network topology constraint, determine the first network topology used at the effective time of the first routing calculation algorithm, and the first routing calculation algorithm and the first network topology are determined before the effective time of the first routing calculation algorithm.

其他可选的实施方式,为了简洁,在此不再赘述。For the sake of brevity, other optional implementations are not described here in detail.

网络设备2000还可以对应于上述图15所示的网络拓扑的确定装置,网络拓扑的确定装置中的每个功能模块采用网络设备2000的软件实现。换句话说,网络拓扑的确定装置包括的功能模块为网络设备2000的处理器2001读取存储器2003中存储的程序代码2010后生成的。The network device 2000 may also correspond to the network topology determination device shown in FIG15 , and each functional module in the network topology determination device is implemented by the software of the network device 2000. In other words, the functional modules included in the network topology determination device are generated after the processor 2001 of the network device 2000 reads the program code 2010 stored in the memory 2003.

其中,图3所示的网络拓扑的确定方法的各步骤通过网络设备2000的处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤,为避免重复,这里不再详细描述。Among them, each step of the method for determining the network topology shown in Figure 3 is completed by the hardware integrated logic circuit or software instructions in the processor of the network device 2000. The steps of the method disclosed in conjunction with the embodiment of the present application can be directly embodied as a hardware processor, or a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it is not described in detail here.

参见图17,图17示出了本申请另一个示例性实施例提供的网络设备2100的结构示意图,图17所示的网络设备2100用于执行上述图3所示的网络拓扑的确定方法所涉及的全部或部分操作。该网络设备2100例如是交换机、路由器等,该网络设备2100可以由一般性的总线体系结构来实现。Referring to Fig. 17, Fig. 17 shows a schematic diagram of the structure of a network device 2100 provided by another exemplary embodiment of the present application, and the network device 2100 shown in Fig. 17 is used to perform all or part of the operations involved in the method for determining the network topology shown in Fig. 3. The network device 2100 is, for example, a switch, a router, etc., and the network device 2100 can be implemented by a general bus architecture.

如图17所示,网络设备2100包括:主控板2110和接口板2130。As shown in FIG. 17 , the network device 2100 includes: a main control board 2110 and an interface board 2130 .

主控板也称为主处理单元(main processing unit,MPU)或路由处理卡(route processor card),主控板2110用于对网络设备2100中各个组件的控制和管理,包括路由计算、设备管理、设备维护、协议处理功能。主控板2110包括:中央处理器2111和存储器2112。The main control board is also called the main processing unit (MPU) or route processor card. The main control board 2110 is used to control and manage various components in the network device 2100, including routing calculation, device management, device maintenance, and protocol processing functions. The main control board 2110 includes: a central processing unit 2111 and a memory 2112.

接口板2130也称为线路接口单元(line processing unit,LPU)、线卡(line card)或业务板。接口板2130用于提供各种业务接口并实现数据包的转发。业务接口包括而不限于以太网接口、POS(Packet over SONET/SDH)接口等,以太网接口例如是灵活以太网业务接口(Flexible Ethernet Clients,FlexE Clients)。接口板2130包括:中央处理器2131、网络处理器2132、转发表项存储器2134和物理接口卡(physical interface card,PIC)2133。The interface board 2130 is also called a line processing unit (LPU), a line card or a service board. The interface board 2130 is used to provide various service interfaces and realize the forwarding of data packets. The service interface includes but is not limited to an Ethernet interface, a POS (Packet over SONET/SDH) interface, etc. The Ethernet interface is, for example, a Flexible Ethernet Clients (FlexE Clients) service interface. The interface board 2130 includes: a central processor 2131, a network processor 2132, a forwarding table entry memory 2134 and a physical interface card (PIC) 2133.

接口板2130上的中央处理器2131用于对接口板2130进行控制管理并与主控板2110上的中央处理器2111进行通信。The central processor 2131 on the interface board 2130 is used to control and manage the interface board 2130 and communicate with the central processor 2111 on the main control board 2110 .

网络处理器2132用于实现报文的转发处理。网络处理器2132的形态可以是转发芯片。转发芯片可以是网络处理器(network processor,NP)。在一些实施例中,转发芯片可以通过专用集成电路(application-specific integrated circuit,ASIC)或现场可编程门阵列(field programmable gate array,FPGA)实现。具体而言,网络处理器2132用于基于转发表项存储器2134保存的转发表转发接收到的报文,如果报文的目的地址为网络设备2100的地址,则将该报文上送至CPU(如中央处理器2131)处理;如果报文的目的地址不是网络设备2100的地址,则根据该目的地址从转发表中查找到该目的地址对应的下一跳和出接口,将该报文转发到该目的地址对应的出接口。其中,上行报文的处理可以包括:报文入接口的处理, 转发表查找;下行报文的处理可以包括:转发表查找等等。在一些实施例中,中央处理器也可执行转发芯片的功能,比如基于通用CPU实现软件转发,从而接口板中不需要转发芯片。The network processor 2132 is used to implement message forwarding processing. The network processor 2132 may be in the form of a forwarding chip. The forwarding chip may be a network processor (NP). In some embodiments, the forwarding chip may be implemented by an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA). Specifically, the network processor 2132 is used to forward received messages based on the forwarding table stored in the forwarding table entry memory 2134. If the destination address of the message is the address of the network device 2100, the message is sent to the CPU (such as the central processing unit 2131) for processing; if the destination address of the message is not the address of the network device 2100, the next hop and the output interface corresponding to the destination address are found in the forwarding table according to the destination address, and the message is forwarded to the output interface corresponding to the destination address. Among them, the processing of uplink messages may include: processing of the message input interface, Forwarding table lookup: Downlink message processing may include: forwarding table lookup, etc. In some embodiments, the central processor may also perform the functions of the forwarding chip, such as implementing software forwarding based on a general-purpose CPU, so that the interface board does not need a forwarding chip.

物理接口卡2133用于实现物理层的对接功能,原始的流量由此进入接口板2130,以及处理后的报文从该物理接口卡2133发出。物理接口卡2133也称为子卡,可安装在接口板2130上,负责将光电信号转换为报文并对报文进行合法性检查后转发给网络处理器2132处理。在一些实施例中,中央处理器2131也可执行网络处理器2132的功能,比如基于通用CPU实现软件转发,从而物理接口卡2133中不需要网络处理器2132。The physical interface card 2133 is used to implement the physical layer docking function, whereby the original traffic enters the interface board 2130, and the processed message is sent out from the physical interface card 2133. The physical interface card 2133, also called a daughter card, can be installed on the interface board 2130, and is responsible for converting the photoelectric signal into a message and forwarding the message to the network processor 2132 for processing after checking the legitimacy of the message. In some embodiments, the central processor 2131 can also perform the functions of the network processor 2132, such as implementing software forwarding based on a general-purpose CPU, so that the network processor 2132 is not required in the physical interface card 2133.

可选地,网络设备2100包括多个接口板,例如网络设备2100还包括接口板2140,接口板2140包括:中央处理器2141、网络处理器2142、转发表项存储器2144和物理接口卡2143。接口板2140中各部件的功能和实现方式与接口板2130相同或相似,在此不再赘述。Optionally, the network device 2100 includes multiple interface boards, for example, the network device 2100 further includes an interface board 2140, and the interface board 2140 includes: a central processor 2141, a network processor 2142, a forwarding table entry memory 2144, and a physical interface card 2143. The functions and implementation methods of the components in the interface board 2140 are the same or similar to those of the interface board 2130, and are not described in detail here.

可选地,网络设备2100还包括交换网板2120。交换网板2120也可以称为交换网板单元(switch fabric unit,SFU)。在网络设备2100有多个接口板的情况下,交换网板2120用于完成各接口板之间的数据交换。例如,接口板2130和接口板2140之间可以通过交换网板2120通信。Optionally, the network device 2100 further includes a switching fabric board 2120. The switching fabric board 2120 may also be referred to as a switch fabric unit (SFU). When the network device 2100 has multiple interface boards, the switching fabric board 2120 is used to complete data exchange between the interface boards. For example, the interface board 2130 and the interface board 2140 may communicate through the switching fabric board 2120.

主控板2110和接口板耦合。例如。主控板2110、接口板2130和接口板2140,以及交换网板2120之间通过系统总线与系统背板相连实现互通。在一种可能的实现方式中,主控板2110和接口板2130及接口板2140之间建立进程间通信协议(inter-process communication,IPC)通道,主控板2110和接口板2130及接口板2140之间通过IPC通道进行通信。The main control board 2110 is coupled to the interface board. For example, the main control board 2110, the interface board 2130, the interface board 2140, and the switching network board 2120 are connected to the system backplane through the system bus to achieve intercommunication. In a possible implementation, an inter-process communication (IPC) channel is established between the main control board 2110 and the interface board 2130 and the interface board 2140, and the main control board 2110 and the interface board 2130 and the interface board 2140 communicate through the IPC channel.

在逻辑上,网络设备2100包括控制面和转发面,控制面包括主控板2110和中央处理器2111,转发面包括执行转发的各个组件,比如转发表项存储器2134、物理接口卡2133和网络处理器2132。控制面执行路由器、生成转发表、处理信令和协议报文、配置与维护网络设备的状态等功能,控制面将生成的转发表下发给转发面,在转发面,网络处理器2132基于控制面下发的转发表对物理接口卡2133收到的报文查表转发。控制面下发的转发表可以保存在转发表项存储器2134中。在有些实施例中,控制面和转发面可以完全分离,不在同一网络设备上。Logically, the network device 2100 includes a control plane and a forwarding plane. The control plane includes a main control board 2110 and a central processing unit 2111. The forwarding plane includes various components for performing forwarding, such as a forwarding table entry memory 2134, a physical interface card 2133, and a network processor 2132. The control plane performs functions such as a router, generating a forwarding table, processing signaling and protocol messages, and configuring and maintaining the status of the network device. The control plane sends the generated forwarding table to the forwarding plane. On the forwarding plane, the network processor 2132 forwards the message received by the physical interface card 2133 based on the forwarding table sent by the control plane. The forwarding table sent by the control plane can be stored in the forwarding table entry memory 2134. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same network device.

值得说明的是,主控板可能有一块或多块,有多块的时候可以包括主用主控板和备用主控板。接口板可能有一块或多块,网络设备的数据处理能力越强,提供的接口板越多。接口板上的物理接口卡也可以有一块或多块。交换网板可能没有,也可能有一块或多块,有多块的时候可以共同实现负荷分担冗余备份。在集中式转发架构下,网络设备可以不需要交换网板,接口板承担整个系统的业务数据的处理功能。在分布式转发架构下,网络设备可以有至少一块交换网板,通过交换网板实现多块接口板之间的数据交换,提供大容量的数据交换和处理能力。所以,分布式架构的网络设备的数据接入和处理能力要大于集中式架构的网络设备。可选地,网络设备的形态也可以是只有一块板卡,即没有交换网板,接口板和主控板的功能集成在该一块板卡上,此时接口板上的中央处理器和主控板上的中央处理器在该一块板卡上可以合并为一个中央处理器,执行两者叠加后的功能,这种形态网络设备的数据交换和处理能力较低(例如,低端交换机或路由器等网络设备)。具体采用哪种架构,取决于具体的组网部署场景,此处不做任何限定。It is worth noting that there may be one or more main control boards, and when there are multiple boards, they may include a primary main control board and a backup main control board. There may be one or more interface boards. The stronger the data processing capability of the network device, the more interface boards are provided. There may also be one or more physical interface cards on the interface board. There may be no switching network board, or there may be one or more switching network boards. When there are multiple switching network boards, they can jointly realize load sharing and redundant backup. In a centralized forwarding architecture, network devices may not need switching network boards, and the interface board is responsible for processing the service data of the entire system. In a distributed forwarding architecture, network devices may have at least one switching network board, and data exchange between multiple interface boards is realized through the switching network board, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of network devices with distributed architectures are greater than those of network devices with centralized architectures. Optionally, the network device may have only one board, that is, no switching board, and the functions of the interface board and the main control board are integrated on the board. In this case, the central processor on the interface board and the central processor on the main control board can be combined into one central processor on the board to perform the functions of the two. This type of network device has low data exchange and processing capabilities (for example, low-end switches or routers and other network devices). The specific architecture to be adopted depends on the specific networking deployment scenario, and no limitation is made here.

在具体实施例中,网络设备2100对应于上述图15所示的网络拓扑的确定装置。在一些实施例中,图15所示的网络拓扑的确定装置中的处理模块1501相当于网络设备2100中的中央处理器2111或网络处理器2132,收发模块1502相当于网络设备2100中的物理接口卡2133。In a specific embodiment, the network device 2100 corresponds to the device for determining the network topology shown in Figure 15. In some embodiments, the processing module 1501 in the device for determining the network topology shown in Figure 15 is equivalent to the central processor 2111 or the network processor 2132 in the network device 2100, and the transceiver module 1502 is equivalent to the physical interface card 2133 in the network device 2100.

应理解的是,上述处理器可以是CPU,还可以是其他通用处理器、数字信号处理器(digital signal processing,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现场可编程门阵列(field-programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者是任何常规的处理器等。值得说明的是,处理器可以是支持进阶精简指令集机器(advanced RISC machines,ARM)架构的处理器。It should be understood that the processor may be a CPU, or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting the advanced RISC machines (ARM) architecture.

进一步地,在一种可选的实施例中,上述存储器可以包括只读存储器和随机存取存储器,并向处理器提供指令和数据。存储器还可以包括非易失性随机存取存储器。例如,存储器还可以存储设备类型的信息。Further, in an optional embodiment, the memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. The memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.

该存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其 用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用。例如,静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic random access memory,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。The memory may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Among them, the nonvolatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which Used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).

本申请实施例还提供了一种计算机可读存储介质,存储介质中存储有至少一条指令,指令由处理器加载并执行,以使计算机实现如上任一的网络拓扑的确定方法。An embodiment of the present application also provides a computer-readable storage medium, in which at least one instruction is stored. The instruction is loaded and executed by a processor so that a computer implements any of the above methods for determining a network topology.

本申请实施例还提供了一种计算机程序(产品),当计算机程序被计算机执行时,可以使得处理器或计算机执行上述方法实施例中对应的各个步骤和/或流程。The embodiments of the present application also provide a computer program (product), which, when executed by a computer, can enable a processor or a computer to execute the corresponding steps and/or processes in the above method embodiments.

本申请实施例还提供了一种芯片,包括处理器,用于从存储器中调用并运行存储器中存储的指令,使得安装有芯片的通信设备执行如上任一的网络拓扑的确定方法。An embodiment of the present application also provides a chip, including a processor, for calling and executing instructions stored in the memory from the memory, so that a communication device equipped with the chip executes any of the above methods for determining a network topology.

本申请实施例还提供另一种芯片,包括:输入接口、输出接口、处理器和存储器,输入接口、输出接口、处理器以及存储器之间通过内部连接通路相连,处理器用于执行存储器中的代码,当代码被执行时,处理器用于执行如上任一的网络拓扑的确定方法。An embodiment of the present application also provides another chip, including: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the processor is used to execute any of the above methods for determining the network topology.

在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如,固态硬盘(solid state disk))等。In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. Available media can be magnetic media (e.g., floppy disk, hard disk, tape), optical media (e.g., DVD), or semiconductor media (e.g., solid state disk), etc.

本领域普通技术人员可以意识到,结合本文中所公开的实施例中描述的各方法步骤和模块,能够以软件、硬件、固件或者其任意组合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各实施例的步骤及组成。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。本领域普通技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art will appreciate that, in conjunction with the various method steps and modules described in the embodiments disclosed herein, they can be implemented in software, hardware, firmware, or any combination thereof. In order to clearly illustrate the interchangeability of hardware and software, the steps and components of each embodiment have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those of ordinary skill in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,该程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。该计算机程序产品包括一个或多个计算机程序指令。作为示例,本申请实施例的方法可以在机器可执行指令的上下文中被描述,机器可执行指令诸如包括在目标的真实或者虚拟处理器上的器件中执行的程序模块中。一般而言,程序模块包括例程、程序、库、对象、类、组件、数据结构等,其执行特定的任务或者实现特定的抽象数据结构。在各实施例中,程序模块的功能可以在所描述的程序模块之间合并或者分割。用于程序模块的机器可执行指令可以在本地或者分布式设备内执行。在分布式设备中,程序模块可以位于本地和远程存储介质二者中。When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer program instructions. As an example, the method of the embodiment of the present application can be described in the context of a machine executable instruction, and the machine executable instruction is such as included in the program module executed in the device on the real or virtual processor of the target. Generally speaking, a program module includes a routine, a program, a library, an object, a class, a component, a data structure, etc., which performs a specific task or realizes a specific abstract data structure. In various embodiments, the function of the program module can be merged or divided between the described program modules. The machine executable instruction for the program module can be executed in a local or distributed device. In a distributed device, the program module can be located in both a local and a remote storage medium.

用于实现本申请实施例的方法的计算机程序代码可以用一种或多种编程语言编写。这些计算机程序代码可以提供给通用计算机、专用计算机或其他可编程的数据处理装置的处理器,使得程序代码在被计算机或其他可编程的数据处理装置执行的时候,引起在流程图和/或框图中规定的功能/操作被实施。程序代码可以完全在计算机上、部分在计算机上、作为独立的软件包、部分在计算机上且部分在远程计算机上或完全在远程计算机或服务器上执行。The computer program code for realizing the method for the embodiment of the present application can be written in one or more programming languages. These computer program codes can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by a computer or other programmable data processing device, causes the function/operation specified in the flow chart and/or block diagram to be implemented. The program code can be executed completely on a computer, partially on a computer, as an independent software package, partially on a computer and partially on a remote computer or completely on a remote computer or server.

在本申请实施例的上下文中,计算机程序代码或者相关数据可以由任意适当载体承载,以使得设备、装置或者处理器能够执行上文描述的各种处理和操作。载体的示例包括信号、计算机可读介质等等。In the context of the embodiments of the present application, computer program codes or related data may be carried by any appropriate carrier to enable a device, apparatus or processor to perform the various processes and operations described above. Examples of carriers include signals, computer readable media, and the like.

信号的示例可以包括电、光、无线电、声音或其它形式的传播信号,诸如载波、红外信号等。 Examples of signals may include electrical, optical, radio, acoustic or other forms of propagated signals, such as carrier waves, infrared signals, etc.

机器可读介质可以是包含或存储用于或有关于指令执行系统、装置或设备的程序的任何有形介质。机器可读介质可以是机器可读信号介质或机器可读存储介质。机器可读介质可以包括但不限于电子的、磁的、光学的、电磁的、红外的或半导体系统、装置或设备,或其任意合适的组合。机器可读存储介质的更详细示例包括带有一根或多根导线的电气连接、便携式计算机磁盘、硬盘、随机存储存取器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或闪存)、光存储设备、磁存储设备,或其任意合适的组合。A machine-readable medium may be any tangible medium that contains or stores a program for or related to an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination thereof. More detailed examples of machine-readable storage media include an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical storage device, a magnetic storage device, or any suitable combination thereof.

所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的系统、设备和模块的具体工作过程,可以参见前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

在本申请所提供的几个实施例中,应该理解到,所揭露的系统、设备和方法,可以通过其它的方式实现。例如,以上所描述的设备实施例仅仅是示意性的,例如,该模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、设备或模块的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the module is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, or it can be an electrical, mechanical or other form of connection.

该作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本申请实施例方案的目的。The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiments of the present application.

另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以是两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。In addition, each functional module in each embodiment of the present application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.

该集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例中方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

本申请中术语“第一”“第二”等字样用于对作用和功能基本相同的相同项或相似项进行区分,应理解,“第一”、“第二”、“第n”之间不具有逻辑或时序上的依赖关系,也不对数量和执行顺序进行限定。还应理解,尽管以下描述使用术语第一、第二等来描述各种元素,但这些元素不应受术语的限制。这些术语只是用于将一元素与另一元素区别分开。例如,在不脱离各种示例的范围的情况下,第一有效时间信息可以被称为第二有效时间信息,并且类似地,第二有效时间信息可以被称为第一有效时间信息。第一有效时间信息和第二有效时间信息都可以是有效时间信息,并且在某些情况下,可以是单独且不同的有效时间信息。In this application, the terms "first", "second", etc. are used to distinguish between identical or similar items with substantially the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is the quantity and execution order limited. It should also be understood that although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another. For example, without departing from the scope of various examples, the first effective time information can be referred to as the second effective time information, and similarly, the second effective time information can be referred to as the first effective time information. Both the first effective time information and the second effective time information can be effective time information, and in some cases, can be separate and different effective time information.

还应理解,在本申请的各个实施例中,各个过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should also be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

本申请中术语“至少一个”的含义是指一个或多个,本申请中术语“多个”的含义是指两个或两个以上,例如,多个第二报文是指两个或两个以上的第二报文。本文中术语“系统”和“网络”经常可互换使用。The term "at least one" in this application means one or more, and the term "multiple" in this application means two or more, for example, multiple second messages means two or more second messages. The terms "system" and "network" are often used interchangeably herein.

应理解,在本文中对各种所述示例的描述中所使用的术语只是为了描述特定示例,而并非旨在进行限制。如在对各种所述示例的描述和所附权利要求书中所使用的那样,单数形式“一个(“a”,“an”)”和“该”旨在也包括复数形式,除非上下文另外明确地指示。It should be understood that the terms used in the description of the various examples herein are only for describing specific examples and are not intended to be limiting. As used in the description of the various examples and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.

还应理解,本文中所使用的术语“和/或”是指并且涵盖相关联的所列出的项目中的一个或多个项目的任何和全部可能的组合。术语“和/或”,是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本申请中的字符“/”,一般表示前后关联对象是一种“或”的关系。It should also be understood that the term "and/or" used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items. The term "and/or" is a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and/or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character "/" in this application generally indicates that the associated objects before and after are in an "or" relationship.

还应理解,术语“包括”(也称“includes”、“including”、“comprises”和/或“comprising”)当在本说明书中使用时指定存在所陈述的特征、整数、步骤、操作、元素、和/或部件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元素、部件、和/或其分组。It should also be understood that the term “comprise” (also known as “includes,” “including,” “comprises” and/or “comprising”) when used in this specification specifies the presence of stated features, integers, steps, operations, elements, and/or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.

还应理解,术语“若”和“如果”可被解释为意指“当...时”(“when”或“upon”)或“响应于确定”或“响应于 检测到”。类似地,根据上下文,短语“若确定...”或“若检测到[所陈述的条件或事件]”可被解释为意指“在确定...时”或“响应于确定...”或“在检测到[所陈述的条件或事件]时”或“响应于检测到[所陈述的条件或事件]”。It should also be understood that the terms "if" and "if" can be interpreted to mean "when" or "upon" or "in response to a determination ... detected". Similarly, the phrase "if it is determined that..." or "if [stated condition or event] is detected" may be interpreted to mean "upon determining that..." or "in response to determining that..." or "upon detecting [stated condition or event]" or "in response to detecting [stated condition or event]", depending on the context.

应理解,根据A确定B并不意味着仅仅根据A确定B,还可以根据A和/或其它信息确定B。It should be understood that determining B based on A does not mean determining B only based on A. B can also be determined based on A and/or other information.

还应理解,说明书通篇中提到的“一个实施例”、“一实施例”、“一种可能的实现方式”意味着与实施例或实现方式有关的特定特征、结构或特性包括在本申请的至少一个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”、“一种可能的实现方式”未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。It should also be understood that the references to "one embodiment", "an embodiment", or "a possible implementation" throughout the specification mean that specific features, structures, or characteristics related to the embodiment or implementation are included in at least one embodiment of the present application. Therefore, the references to "in one embodiment" or "in an embodiment", or "a possible implementation" throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

以上描述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。 The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present application should be included in the protection scope of the present application.

Claims (18)

一种网络拓扑的确定方法,其特征在于,所述方法包括:A method for determining a network topology, characterized in that the method comprises: 根据第一时间确定第一路由计算算法,所述第一路由计算算法包括第一有效时间信息和第一网络拓扑约束,所述第一有效时间信息包括所述第一路由计算算法的有效时间,所述第一有效时间信息和所述第一网络拓扑约束用于确定所述第一路由计算算法对应的网络拓扑,所述第一时间在所述第一路由计算算法的有效时间之前;Determine a first route calculation algorithm according to a first time, the first route calculation algorithm includes first effective time information and a first network topology constraint, the first effective time information includes the effective time of the first route calculation algorithm, the first effective time information and the first network topology constraint are used to determine the network topology corresponding to the first route calculation algorithm, and the first time is before the effective time of the first route calculation algorithm; 基于所述第一有效时间信息和所述第一网络拓扑约束确定在所述第一路由计算算法的有效时间使用的第一网络拓扑,所述第一路由计算算法以及所述第一网络拓扑在所述第一路由计算算法的有效时间之前确定。A first network topology used during the validity period of the first route calculation algorithm is determined based on the first validity period information and the first network topology constraint, wherein the first route calculation algorithm and the first network topology are determined before the validity period of the first route calculation algorithm. 根据权利要求1所述的方法,其特征在于,所述基于所述第一有效时间信息和所述第一网络拓扑约束确定在所述第一路由计算算法的有效时间使用的第一网络拓扑之后,还包括:The method according to claim 1, characterized in that after determining the first network topology used during the effective time of the first routing calculation algorithm based on the first effective time information and the first network topology constraint, it also includes: 在第二时间,基于所述第一路由计算算法计算所述第一网络拓扑的第一路由信息,所述第二时间在所述第一路由计算算法的有效时间之前。At a second time, first routing information of the first network topology is calculated based on the first routing calculation algorithm, and the second time is before the effective time of the first routing calculation algorithm. 根据权利要求1或2所述的方法,其特征在于,所述第一路由计算算法的有效时间对应所述第一网络拓扑的有效时间。The method according to claim 1 or 2 is characterized in that the effective time of the first routing calculation algorithm corresponds to the effective time of the first network topology. 根据权利要求1-3任一所述的方法,其特征在于,所述第一有效时间信息还包括所述第一路由计算算法的有效时间的变化周期,所述第一路由计算算法的有效时间的变化周期对应所述第一网络拓扑的有效时间的变化周期。The method according to any one of claims 1-3 is characterized in that the first effective time information also includes a change period of the effective time of the first routing calculation algorithm, and the change period of the effective time of the first routing calculation algorithm corresponds to the change period of the effective time of the first network topology. 根据权利要求1-4任一所述的方法,其特征在于,所述第一网络拓扑约束包括链路颜色约束,所述链路颜色约束用于约束所述第一网络拓扑包括的链路的颜色,不同颜色用于区分不同的有效时间,所述第一网络拓扑包括的链路的颜色符合所述链路颜色约束。According to the method described in any one of claims 1-4, it is characterized in that the first network topology constraint includes a link color constraint, and the link color constraint is used to constrain the color of the links included in the first network topology, different colors are used to distinguish different valid times, and the color of the links included in the first network topology complies with the link color constraint. 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:The method according to claim 1 or 2, characterized in that the method further comprises: 根据第三时间确定第二路由计算算法,所述第二路由计算算法包括第二有效时间信息和第二网络拓扑约束,所述第二有效时间信息指示所述第二路由计算算法的有效时间,所述第二有效时间信息和所述第二网络拓扑约束用于确定所述第二路由计算算法对应的网络拓扑,所述第三时间在所述第二路由计算算法的有效时间之前,所述第一路由计算算法的有效时间和所述第二路由计算算法的有效时间不同;Determine a second route calculation algorithm according to a third time, the second route calculation algorithm includes second effective time information and a second network topology constraint, the second effective time information indicates the effective time of the second route calculation algorithm, the second effective time information and the second network topology constraint are used to determine the network topology corresponding to the second route calculation algorithm, the third time is before the effective time of the second route calculation algorithm, and the effective time of the first route calculation algorithm is different from the effective time of the second route calculation algorithm; 基于所述第二有效时间信息和所述第二网络拓扑约束确定在所述第二路由计算算法的有效时间使用的第二网络拓扑,所述第二路由计算算法以及所述第二网络拓扑在所述第二路由计算算法的有效时间之前确定。A second network topology used at the effective time of the second route calculation algorithm is determined based on the second effective time information and the second network topology constraint, the second route calculation algorithm and the second network topology being determined before the effective time of the second route calculation algorithm. 根据权利要求6所述的方法,其特征在于,所述第一有效时间信息还包括所述第一路由计算算法的有效时间的变化周期,所述第一路由计算算法的有效时间的变化周期基于所述第一有效时间信息与所述第二有效时间信息确定。The method according to claim 6 is characterized in that the first effective time information also includes a change period of the effective time of the first routing calculation algorithm, and the change period of the effective time of the first routing calculation algorithm is determined based on the first effective time information and the second effective time information. 根据权利要求1-7任一所述的方法,其特征在于,所述第一路由计算算法为灵活算法flex-algo或者多拓扑multi-topology算法。The method according to any one of claims 1-7 is characterized in that the first routing calculation algorithm is a flexible algorithm flex-algo or a multi-topology algorithm. 根据权利要求1-8任一所述的方法,其特征在于,所述第一路由计算算法为灵活算法flex-algo;所述根据第一时间确定第一路由计算算法之前,还包括:The method according to any one of claims 1 to 8, characterized in that the first route calculation algorithm is a flexible algorithm flex-algo; before determining the first route calculation algorithm according to the first time, the method further comprises: 接收用于通告所述第一路由计算算法的中间系统到中间系统协议ISIS链路状态数据单元LSP报文,所 述第一路由计算算法携带在所述ISIS LSP报文的灵活算法定义FAD子类型、长度、值sub-TLV字段中,所述第一有效时间信息携带在所述FAD sub-TLV的有效时间sub-TLV字段中。Receive an Intermediate System to Intermediate System Protocol ISIS Link State Data Unit LSP message for announcing the first routing calculation algorithm, The first route calculation algorithm is carried in the flexible algorithm definition FAD subtype, length, value sub-TLV field of the ISIS LSP message, and the first effective time information is carried in the effective time sub-TLV field of the FAD sub-TLV. 根据权利要求1-8任一所述的方法,其特征在于,所述第一路由计算算法为灵活算法flex-algo;所述根据第一时间确定第一路由计算算法之前,还包括:The method according to any one of claims 1 to 8, characterized in that the first route calculation algorithm is a flexible algorithm flex-algo; before determining the first route calculation algorithm according to the first time, the method further comprises: 接收用于通告所述第一路由计算算法的开放式最短路由优先协议OSPF链路状态通告LSA报文,所述第一路由计算算法携带在所述OSPF LSA报文的灵活算法定义类型、长度、值FAD TLV字段中,所述第一有效时间信息携带在所述FAD TLV的有效时间子sub-TLV字段中。An Open Shortest Route First protocol (OSPF) link state advertisement (LSA) message is received for announcing the first routing calculation algorithm, wherein the first routing calculation algorithm is carried in a flexible algorithm definition type, length, and value FAD TLV field of the OSPF LSA message, and the first valid time information is carried in a valid time sub-TLV field of the FAD TLV. 根据权利要求1-8任一所述的方法,其特征在于,所述第一路由计算算法为灵活算法flex-algo;所述根据第一时间确定第一路由计算算法之前,还包括:The method according to any one of claims 1 to 8, characterized in that the first route calculation algorithm is a flexible algorithm flex-algo; before determining the first route calculation algorithm according to the first time, the method further comprises: 接收用于通告所述第一路由计算算法的边界网关协议BGP更新update报文,所述第一路由计算算法携带在所述BGP update报文的灵活算法定义类型、长度、值FAD TLV字段中,所述第一有效时间信息携带在所述FAD TLV的有效时间子sub-TLV字段中。A Border Gateway Protocol (BGP) update message is received for announcing the first routing calculation algorithm, wherein the first routing calculation algorithm is carried in a flexible algorithm definition type, length, and value FAD TLV field of the BGP update message, and the first valid time information is carried in a valid time sub-TLV field of the FAD TLV. 根据权利要求1-8任一所述的方法,其特征在于,所述第一路由计算算法为多拓扑multi-topology算法;所述根据第一时间确定第一路由计算算法之前,还包括:The method according to any one of claims 1 to 8, characterized in that the first route calculation algorithm is a multi-topology algorithm; before determining the first route calculation algorithm according to the first time, the method further comprises: 接收用于通告所述第一路由计算算法的中间系统到中间系统协议ISIS链路状态数据单元LSP报文,所述第一路由计算算法携带在所述ISIS LSP报文的时变多拓扑MT信息子类型、长度、值sub-TLV字段中,所述第一有效时间信息携带在所述时变MT信息sub-TLV的有效时间sub-TLV字段中。An Intermediate System to Intermediate System Protocol ISIS Link State Data Unit LSP message is received for announcing the first routing calculation algorithm, wherein the first routing calculation algorithm is carried in the time-varying multi-topology MT information subtype, length, and value sub-TLV fields of the ISIS LSP message, and the first valid time information is carried in the valid time sub-TLV field of the time-varying MT information sub-TLV. 根据权利要求1-8任一所述的方法,其特征在于,所述第一路由计算算法为多拓扑multi-topology算法;所述根据第一时间确定第一路由计算算法之前,还包括:The method according to any one of claims 1 to 8, characterized in that the first route calculation algorithm is a multi-topology algorithm; before determining the first route calculation algorithm according to the first time, the method further comprises: 接收用于通告所述第一路由计算算法的开放式最短路由优先协议OSPF链路状态通告LSA报文,所述第一路由计算算法携带在所述OSPF LSA报文的时变多拓扑MT信息类型、长度、值TLV字段中,所述第一有效时间信息携带在所述时变MT信息TLV的有效时间子sub-TLV字段中。An Open Shortest Route First protocol (OSPF) link state advertisement (LSA) message is received for announcing the first routing calculation algorithm, wherein the first routing calculation algorithm is carried in the time-varying multi-topology MT information type, length, and value TLV fields of the OSPF LSA message, and the first valid time information is carried in the valid time sub-TLV field of the time-varying MT information TLV. 根据权利要求1-8任一所述的方法,其特征在于,所述第一路由计算算法为多拓扑multi-topology算法;所述根据第一时间确定第一路由计算算法之前,还包括:The method according to any one of claims 1 to 8, characterized in that the first route calculation algorithm is a multi-topology algorithm; before determining the first route calculation algorithm according to the first time, the method further comprises: 接收用于通告所述第一路由计算算法的边界网关协议BGP更新update报文,所述第一路由计算算法携带在所述BGP update报文的时变多拓扑MT信息类型、长度、值TLV字段中,所述第一有效时间信息携带在所述时变MT信息TLV的有效时间子sub-TLV字段中。A Border Gateway Protocol (BGP) update message is received for announcing the first routing calculation algorithm, wherein the first routing calculation algorithm is carried in the time-varying multi-topology MT information type, length, and value TLV fields of the BGP update message, and the first valid time information is carried in the valid time sub-TLV field of the time-varying MT information TLV. 一种网络拓扑的确定装置,其特征在于,所述装置包括:A device for determining a network topology, characterized in that the device comprises: 处理模块,用于执行权利要求1-14中任一项所述的网络拓扑的确定方法中的接收和/或发送相关的操作之外的其它操作;A processing module, used to perform other operations other than the operations related to receiving and/or sending in the method for determining the network topology according to any one of claims 1 to 14; 收发模块,用于执行权利要求1-14中任一项所述的网络拓扑的确定方法中的接收和/或发送相关的操作。A transceiver module, used to perform reception and/or transmission related operations in the method for determining the network topology according to any one of claims 1 to 14. 一种网络设备,其特征在于,所述网络设备包括:处理器,所述处理器与存储器耦合,所述存储器中存储有至少一条程序指令或代码,所述至少一条程序指令或代码由所述处理器加载并执行,以使所述网络设备实现权利要求1-14中任一所述的网络拓扑的确定方法。A network device, characterized in that the network device includes: a processor, the processor is coupled to a memory, the memory stores at least one program instruction or code, and the at least one program instruction or code is loaded and executed by the processor so that the network device implements the method for determining the network topology described in any one of claims 1-14. 一种计算机可读存储介质,其特征在于,所述计算机存储介质中存储有至少一条指令,所述至少一条指令由处理器加载并执行,以使计算机实现如权利要求1-14中任一所述的网络拓扑的确定方法。A computer-readable storage medium, characterized in that at least one instruction is stored in the computer storage medium, and the at least one instruction is loaded and executed by a processor to enable the computer to implement the method for determining the network topology as described in any one of claims 1-14. 一种计算机程序产品,其特征在于,所述计算机程序产品包括:计算机程序代码,所述计算机程序代码由计算机加载并执行,以使所述计算机实现权利要求1-14中任一所述的网络拓扑的确定方法。 A computer program product, characterized in that the computer program product comprises: computer program code, wherein the computer program code is loaded and executed by a computer so that the computer implements the method for determining the network topology described in any one of claims 1-14.
PCT/CN2024/098656 2023-06-29 2024-06-12 Network topology determination method and apparatus, device, and computer readable storage medium Pending WO2025001840A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202310787428 2023-06-29
CN202310787428.4 2023-06-29
CN202310919266.5A CN119232630A (en) 2023-06-29 2023-07-24 Method, device, equipment and computer readable storage medium for determining network topology
CN202310919266.5 2023-07-24

Publications (1)

Publication Number Publication Date
WO2025001840A1 true WO2025001840A1 (en) 2025-01-02

Family

ID=93937562

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2024/098656 Pending WO2025001840A1 (en) 2023-06-29 2024-06-12 Network topology determination method and apparatus, device, and computer readable storage medium

Country Status (1)

Country Link
WO (1) WO2025001840A1 (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109951335A (en) * 2019-03-24 2019-06-28 西安电子科技大学 A Joint Guaranteed Routing Method for Satellite Network Delay and Rate Based on Time Aggregation Graph
CN111884931A (en) * 2020-07-03 2020-11-03 北京交通大学 Centralized routing method and system applied to satellite network
CN112491713A (en) * 2019-09-11 2021-03-12 华为技术有限公司 A data transmission control method and device
CN113315569A (en) * 2021-05-25 2021-08-27 西安交通大学 Satellite reliability routing method and system with weighted link survival time
CN114866454A (en) * 2021-02-04 2022-08-05 诺基亚通信公司 Service differentiation based on constrained network topology slices
CN115001971A (en) * 2022-04-14 2022-09-02 西安交通大学 Virtual network mapping method for improving community discovery under heaven-earth integrated information network
WO2022227690A1 (en) * 2021-04-28 2022-11-03 中兴通讯股份有限公司 Message sending method and apparatus, message receiving method and apparatus, and storage medium
WO2023098703A1 (en) * 2021-11-30 2023-06-08 中兴通讯股份有限公司 Path notification method, topology algorithm combination generation method, path calculation method, data transmission method, electronic device, and computer-readable storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109951335A (en) * 2019-03-24 2019-06-28 西安电子科技大学 A Joint Guaranteed Routing Method for Satellite Network Delay and Rate Based on Time Aggregation Graph
CN112491713A (en) * 2019-09-11 2021-03-12 华为技术有限公司 A data transmission control method and device
CN111884931A (en) * 2020-07-03 2020-11-03 北京交通大学 Centralized routing method and system applied to satellite network
CN114866454A (en) * 2021-02-04 2022-08-05 诺基亚通信公司 Service differentiation based on constrained network topology slices
WO2022227690A1 (en) * 2021-04-28 2022-11-03 中兴通讯股份有限公司 Message sending method and apparatus, message receiving method and apparatus, and storage medium
CN113315569A (en) * 2021-05-25 2021-08-27 西安交通大学 Satellite reliability routing method and system with weighted link survival time
WO2023098703A1 (en) * 2021-11-30 2023-06-08 中兴通讯股份有限公司 Path notification method, topology algorithm combination generation method, path calculation method, data transmission method, electronic device, and computer-readable storage medium
CN115001971A (en) * 2022-04-14 2022-09-02 西安交通大学 Virtual network mapping method for improving community discovery under heaven-earth integrated information network

Similar Documents

Publication Publication Date Title
CN113691448B (en) SRv6 method for forwarding message in service chain, SFF and SF device
CN107547393B (en) Method and network device for calculating forwarding path
WO2021043181A1 (en) Data transmission method and device
US20230269164A1 (en) Method and apparatus for sending route calculation information, device, and storage medium
WO2022057431A1 (en) Network simulation method and apparatus, device, and computer readable storage medium
WO2021004156A1 (en) Packet forwarding method, device, and computer-readable storage medium
WO2022111372A1 (en) Message transmission method and apparatus, device, and computer-readable storage medium
WO2024113830A1 (en) Data transmission method, apparatus, device and system, and storage medium
WO2024125098A1 (en) Data transmission method and apparatus, and device and computer-readable storage medium
WO2022222750A1 (en) Packet forwarding method and apparatus, network device, and storage medium
CN114401228A (en) End-to-end wide area crossing deterministic transmission network architecture and method
WO2024109045A1 (en) Routing updating method and apparatus, device, and storage medium
CN113079090A (en) Traffic transmission method, node and system
CN107979544A (en) A kind of retransmission method of IP packet, equipment and system
CN114650566A (en) Edge computing network architecture for providing deterministic quality of service
CN114650255B (en) Message processing method and network equipment
WO2022188530A1 (en) Route processing method and network device
WO2025001840A1 (en) Network topology determination method and apparatus, device, and computer readable storage medium
WO2022042386A1 (en) Method for controlling message sending, network device and system
WO2025077578A1 (en) Message transmission method and apparatus, device and computer-readable storage medium
US20230370366A1 (en) Packet Transmission Method, Transmission Control Method, Apparatus, and System
EP4009604A1 (en) Traffic balancing method, network device and electronic device
EP3471351B1 (en) Method and device for acquiring path information about data packet
WO2022042403A1 (en) Method for generating routing information, method for sending location information, method for forwarding message, and device
CN119232630A (en) Method, device, equipment and computer readable storage medium for determining network topology

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 24830486

Country of ref document: EP

Kind code of ref document: A1