WO2018103738A1 - Route establishment method and device - Google Patents

Route establishment method and device Download PDF

Info

Publication number
WO2018103738A1
WO2018103738A1 PCT/CN2017/115272 CN2017115272W WO2018103738A1 WO 2018103738 A1 WO2018103738 A1 WO 2018103738A1 CN 2017115272 W CN2017115272 W CN 2017115272W WO 2018103738 A1 WO2018103738 A1 WO 2018103738A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
path
shortest path
determining
shortest
Prior art date
Application number
PCT/CN2017/115272
Other languages
French (fr)
Chinese (zh)
Inventor
肖红运
李兴明
许晓健
陈碧红
何桓
于洪宾
Original Assignee
中兴通讯股份有限公司
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
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2018103738A1 publication Critical patent/WO2018103738A1/en

Links

Images

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/12Shortest path evaluation
    • 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 disclosure relates to, but is not limited to, the field of communication technologies, and in particular, to a route establishment method and apparatus.
  • the route establishment method can adopt the K-optimal path algorithm, first calculate a shortest path as a working route, and then calculate the shortest path separated from the working route as a protection route.
  • the middle side of the "Japanese font” may be used as the partial path of the work route.
  • the protection route no matter how the path is selected, It will be separated from the working route.
  • the working route needs to be recalculated, and the protection route is calculated according to the recalculated working route until the separated working route and the protection route are calculated.
  • the process of determining the working route and protecting the route is complicated and time consuming, and it is easy to cause the route establishment failure due to the timeout.
  • the present disclosure provides a route establishment method and apparatus, which can avoid the process of determining a working route and protecting a route from being complicated and time consuming.
  • the present disclosure provides a route establishment method, including: determining, in a network topology, a shortest ring link including a source node and a destination node; and determining, in the shortest ring link, from the source node to the destination node And establishing a working route of the source node and the destination node according to one path, and establishing a protection route of the source node and the destination node according to another path.
  • the determining the shortest ring link including the source node and the destination node comprises: determining a first shortest path from the source node to the destination node; disabling the first in the network topology a shortest path; determining a second shortest path from the source node to the destination node according to a network topology after the first shortest path is disabled; deleting the first shortest path and the second shortest path
  • the determining the first shortest path from the source node to the destination node comprises: determining all paths from the source node to the destination node; according to a plurality of nodes in the network topology in advance The initial weight of each node link in the link determines the sum of the weights of the node links through which each path passes, and the path corresponding to the sum of the weights is used as the first shortest path.
  • the establishing a working route of the source node and the destination node according to one of the paths, and establishing a protection route of the source node and the destination node according to another path including: Determining, in advance, an initial weight set for each node link of the plurality of node links in the network topology, determining a sum of weights of the node links through which the one path passes, and determining a node through which the other path passes The sum of the weights of the links; the working route of the source node and the destination node is established according to the path corresponding to the sum of the smaller weights, according to the sum of the larger weights The path of the path is established, and the protection route of the source node and the destination node is established.
  • the determining the shortest ring link including the source node and the destination node includes determining a shortest ring link including the source node and the destination node using a preset Dijkstra algorithm.
  • the present disclosure also provides a route establishing apparatus, including: a determining module, configured to: determine, in a network topology, a shortest ring link including a source node and a destination node; and a determining module, configured to: in the shortest ring link Determining two paths from the source node to the destination node; establishing a module, configured to: establish a working route of the source node and the destination node according to one path, and establish the source according to another path The protection route of the node and the destination node.
  • the determining module is configured to: determine a first shortest path from a source node to a destination node; disable the first shortest path in the network topology; a network topology after the shortest path, determining a second shortest path from the source node to the destination node; deleting, in the first shortest path and the second shortest path, the first shortest path and the The node link through which the second shortest path passes together forms the shortest ring link.
  • the determining module is further configured to: determine all paths from the source node to the destination node; according to a preset for each node link in a plurality of node links in a network topology
  • the initial weight value determines the sum of the weights of the node links through which each of the paths passes, and the path corresponding to the sum of the weights is the first shortest path.
  • the determining module is further configured to: according to an initial weight set in advance for each of the plurality of node links in the network topology, and the source node to each node a shortest path distance, modifying a weight of each of the plurality of node links in the network topology; determining, from the source node to the destination node, in a network topology after the first shortest path is disabled All the paths; determining, according to the modified weights of each of the plurality of node links, the sum of the weights of the node links through which the path passes, and the sum of the weights The corresponding path is used as the second shortest path.
  • the establishing module is configured to: determine, according to an initial weight set in advance for each node link of the plurality of node links in the network topology, the node through which one of the paths passes The sum of the weights of the links, and the sum of the weights of the node links through which the other path passes; establishing the work of the source node and the destination node according to the path corresponding to the sum of the smaller weights Routing, establishing the source node and the destination according to a path corresponding to a sum of larger weights The protected route of the node.
  • the determining module is configured to determine a shortest ring link including a source node and a destination node by using a preset Dijkstra algorithm.
  • Embodiments of the present disclosure also provide a computer readable storage medium storing computer executable instructions that, when executed, implement the routing establishment method described above.
  • the present disclosure determines the shortest ring link including the source node and the destination node through which the working and protection routes are determined. Since the ring link is a ring, the final determined work route and protection route are separate two independent routes, and it is because the ring link is the shortest ring link including the source node and the destination node. Therefore, the determined work route and protection route are the optimal work route and protection route.
  • the disclosure reduces the complexity of determining the working route and the protection route, shortens the time-consuming determination, and can efficiently find the working route and the protection route thereof, and the result is the most preferable way, and thus can be a path-finding problem in actual engineering. Provide efficient, convenient and quality solutions.
  • FIG. 1 is a flowchart of a route establishment method according to a first embodiment of the present disclosure
  • FIG. 2 is a flow chart showing the steps of determining a shortest ring link in accordance with a second embodiment of the present disclosure
  • FIG. 3 is a flowchart of a route establishment method according to a third embodiment of the present disclosure.
  • 4-1 is a schematic diagram of a network topology according to a third embodiment of the present disclosure.
  • 4-2 is a schematic diagram of a shortest path P1 according to a third embodiment of the present disclosure.
  • 4-3 is a schematic diagram of a shortest path spanning tree according to a third embodiment of the present disclosure.
  • 4-4 is a schematic diagram of a network topology in which the shortest path P1 is disabled according to the third embodiment of the present disclosure
  • FIGS. 4-5 are schematic diagrams of network topologies for modifying node link weights according to a third embodiment of the present disclosure
  • 4-6 are schematic views of a shortest path P2 according to a third embodiment of the present disclosure.
  • FIGS. 4-7 are schematic diagrams of a node link through which a shortest path P1 and a shortest path P2 pass together according to a third embodiment of the present disclosure
  • FIGS. 4-8 are schematic diagrams of a shortest loop link in accordance with a third embodiment of the present disclosure.
  • FIG. 5 is a schematic diagram of a network topology according to a fourth embodiment of the present disclosure.
  • FIG. 6 is a schematic diagram of a shortest path P1 according to a fourth embodiment of the present disclosure.
  • FIG. 7 is a schematic diagram of a network topology for modifying a node link weight according to a fourth embodiment of the present disclosure.
  • FIG. 8 is a schematic diagram of a shortest path P2 according to a fourth embodiment of the present disclosure.
  • FIG. 9 is a schematic diagram of a node link through which a shortest path P1 and a shortest path P2 pass together according to a fourth embodiment of the present disclosure
  • FIG. 10 is a schematic diagram of a shortest ring link in accordance with a fourth embodiment of the present disclosure.
  • FIG. 11 is a schematic diagram of a work route and a protection route according to a fourth embodiment of the present disclosure.
  • FIG. 12 is a structural diagram of a route establishing apparatus according to a fifth embodiment of the present disclosure.
  • the first embodiment of the present disclosure provides a route establishment method.
  • FIG. 1 which is a flowchart of a route establishment method according to the first embodiment of the present disclosure, referring to FIG. 1 , the route establishment method may include:
  • Step S110 in the network topology, determine the shortest ring link including the source node and the destination node.
  • Step S120 in the shortest ring link, determine two paths from the source node to the destination node.
  • Step S130 Establish a working route of the source node and the destination node according to one path, and establish a protection route of the source node and the destination node according to another path.
  • a plurality of nodes and a plurality of node links for connecting two nodes may be included in the network topology.
  • a source node and a destination node are specified among the plurality of nodes.
  • the shortest ring link containing the source node and the destination node, ie the shortest ring link, is determined in the network topology.
  • the shortest ring link including the source node and the destination node may be determined using a preset algorithm.
  • the preset algorithm can be, for example, the Dijkstra algorithm.
  • An optimal working route and a protection route can be determined based on the shortest ring link.
  • the path with the source node as the starting point and the destination node as the ending point can be determined. Since the shortest ring link is a ring, the path that meets the requirements can be two, one of the paths. As a working route, another path acts as a protection route.
  • the working route and the protection route of the source node and the destination node can be determined only by determining the shortest ring link including the source node and the destination node, and the determining process is simple and time-consuming, thereby improving route establishment efficiency. Reduces the risk of route setup failures.
  • the final determined work route and the protection route are two separate routes.
  • the work route if the intermediate node or the link between the source node and the destination node is If the path fails, you can enable the protection route instead of the work route.
  • the shortest ring link is the shortest ring path containing the source node and the destination node, so the final determined work route and protection route are the optimal work route and protection route.
  • the steps of determining the shortest ring link are described below.
  • 2 is a flow chart showing the steps of determining the shortest ring link according to the second embodiment of the present disclosure.
  • the step of determining the shortest ring link of the second embodiment of the present disclosure may include:
  • Step S210 Determine a first shortest path from the source node to the destination node based on the current network topology.
  • the first shortest path may refer to the shortest path between the source node and the destination node in the current network topology.
  • the initial weight set for each node link of the multiple node links in the network topology may be pre-defined, for example, the initial weight of each node link is set to 1.
  • determining all paths from the source node to the destination node determining the weight of the node link through which each path passes according to an initial weight set in advance for each node link of the plurality of node links in the network topology
  • the sum, and the path corresponding to the sum of the weights is taken as the first shortest path.
  • the node links are directional, such as a bidirectional link and a unidirectional link; the unidirectional link may include: an uplink, a downlink.
  • the weight corresponding to the direction may be set for the node link. For example, when the initial weight is set, for the node link between the node A and the node B, the weights in the two directions may be the same, such as link A ⁇ Both B and link B ⁇ A have a weight of 1. Can follow the direction of the path, Obtain the weights corresponding to the link of each node through which the path passes, and add the obtained weights to determine the sum of the weights corresponding to the path.
  • the initial weight corresponding to the two directions of the node link may be 1, and when determining the sum of the weights corresponding to the paths between any two nodes, the first node to the last in the path may be determined.
  • the hop count of a node which is the sum of the weights.
  • Step S220 disabling the first shortest path in the network topology.
  • the network topology it may be determined that the first shortest path passes through each of the plurality of node links, and the direction of each of the node links is disabled according to the direction of the first shortest path.
  • Step S230 determining a second shortest path from the source node to the destination node according to the network topology after the first shortest path is disabled.
  • the second shortest path may refer to the shortest path between the source node and the destination node in the network topology after the first shortest path is disabled.
  • a new network topology can be formed.
  • the original network topology and the new network topology do not change on the node, but the link changes; it can be based on the pre-existing network topology.
  • the initial weight of each node link setting in the node link, and the shortest path distance from the source node to each node in the new network topology, modifying each node chain in the multiple node links in the new network topology The weight of the road; when determining the second shortest path, all paths from the source node to the destination node may be determined in the new network topology; may be based on the weight of each node link in the modified plurality of node links And determining the sum of the weights of the node links through which each path (each path from the source node to the destination node in the new network topology) passes, and the path corresponding to the sum of the weights as the second shortest path.
  • Step S240 in the first shortest path and the second shortest path, delete the node link through which the first shortest path and the second shortest path pass together to form a shortest ring link.
  • the previously disabled first shortest path can be re-enabled, so that the first shortest path and the second shortest path will exist in the network topology at the same time, and the first shortest path and the second shortest path are found together.
  • Passing node link after deleting the commonly passed node link in the first shortest path and the second shortest path, the remaining shortest link of the first shortest path and the second shortest path will form a ring link, and the The ring link is the shortest ring that contains the source node and the destination node. Link.
  • two paths with the source node as the starting point and the destination node as the end point may be determined according to the plurality of node links in the network topology.
  • the initial weight of each node link setting determining the sum of the weights of the node links through which one path passes, and the sum of the weights of the node links through which the other path passes; according to the sum of the smaller weights
  • the corresponding path establishes a working route between the source node and the destination node; and establishes a protection route of the source node and the destination node according to the path corresponding to the sum of the larger weights.
  • the determination process of this embodiment has a large degree of optimization in time complexity and space complexity.
  • the two paths finally selected by the embodiment are completely separated, and the protection path does not depend on the working path, and works.
  • the cost (weight) of the path and the protection path is minimal.
  • FIG. 3 is a flowchart of a route establishment method according to a third embodiment of the present disclosure.
  • 4 (including FIGS. 4-1 to 4-8) is a schematic diagram of a route establishment method according to a third embodiment of the present disclosure. Referring to FIG. 3 and FIG. 4, the route establishment method of the third embodiment of the present disclosure may include the following steps:
  • Step S310 setting initial weights for each of the plurality of node links in the network topology, and determining the shortest path P1 of the source node to the destination node by using the Dijkstra algorithm.
  • nodes A to J can be included, node A is the source node, and node J is the destination node.
  • each node link is a bidirectional link, and the initial weight corresponding to each direction is 1.
  • the shortest path P1 refers to the path in which the sum of the initial weights of the links through each node is the smallest.
  • the shortest path P1 is the first shortest path described above.
  • the path between the source node A and the destination node J includes: A ⁇ F ⁇ G ⁇ H ⁇ I ⁇ J (the sum of the weights is 5), A ⁇ F ⁇ G ⁇ H ⁇ I ⁇ D ⁇ E ⁇ J (sum of weights is 7), A ⁇ F ⁇ G ⁇ H ⁇ B ⁇ C ⁇ D ⁇ E ⁇ J (sum of weights is 8), A ⁇ B ⁇ H ⁇ I ⁇ J (weight And 4), A ⁇ B ⁇ C ⁇ D ⁇ I ⁇ J (the sum of weights is 5), A ⁇ B ⁇ C ⁇ D ⁇ E ⁇ J (the sum of weights is 5);
  • the short path P1 is A ⁇ B ⁇ H ⁇ I ⁇ J, and the path A ⁇ B ⁇ H ⁇ I ⁇ J is the path with the smallest sum of weights in each path between the node A and the node J.
  • Step S320 using the Dijksta algorithm, determining the shortest path distance of each node from the source node to the network topology, and forming a shortest path spanning tree.
  • the Dijkstra algorithm is used to determine the shortest path from the source node to the designated node, in which the hop count from the source node to the designated node is the shortest path distance.
  • the shortest path distance from node A to node B is 1, the shortest path distance from node A to node C is 2, the shortest path distance from node A to node D is 3, and node A to node E
  • the shortest path distance is 4, the shortest path distance from node A to node F is 1, the shortest path distance from node A to node G is 2, the shortest path distance from node A to node H is 2, and the shortest path from node A to node I
  • the distance is 3, and the shortest path distance from node A to node J is 4.
  • node A is the starting point
  • the node with the shortest path distance of 1 is node B and node F
  • the node with the shortest path distance of 2 is node C
  • the node with the shortest path distance is 3.
  • the node with the shortest path distance of 4 is node E and node J.
  • the shortest path spanning tree formed according to the determined result is shown in Fig. 4-3, and the number in Fig. 4-3 indicates the shortest path distance.
  • Step S330 disabling the shortest path P1 of the source node to the destination node in the network topology.
  • each node link through which the shortest path P1 passes can be disabled in the network topology, that is, the path A ⁇ B ⁇ H ⁇ I ⁇ J is disabled, but it is worth noting that in the network topology, The path A ⁇ B ⁇ H ⁇ I ⁇ J may not be disabled, so in Figure 4-4, the link between ABHIJs may be a single arrow.
  • Step S340 in the network topology in which the shortest path P1 is disabled, the initial weight of each node link in the plurality of node links is modified.
  • u is the starting point of the link
  • v is the end point of the link
  • s is the source node
  • w'(u,v) is the modified weight of the link u ⁇ v
  • w(u,v) is the link u ⁇ initial weight of v
  • d(s, v) is the shortest path distance from the source node to the end of the link
  • d(s, u) is the shortest path distance from the source node to the start of the link.
  • the initial weight of link H ⁇ B is 1, the shortest path distance from node A to node B is 1, and the shortest path distance from node A to node H is 2, then the chain
  • the initial weight of the link I ⁇ H is 1, the shortest path distance from the node A to the node H is 2, and the shortest path distance from the node A to the node I is 3, then
  • the weights in Figure 4-5 are the new weights for the weights modified according to the method given in this step.
  • Step S350 after the shortest path P1 is disabled in the network topology, the shortest path P2 of the source node to the destination node is determined again by using the Dijkstra algorithm.
  • the Dijkstra algorithm can be used to determine that the shortest path P2 between the source node A and the destination node J is A ⁇ F ⁇ G ⁇ H ⁇ B ⁇ C ⁇ D ⁇ E ⁇ J, as shown by the thick arrow in Figure 4-6. .
  • the shortest path P2 may be the second shortest path described above.
  • step S360 in the shortest path P1 and the shortest path P2, the node link through which the shortest path P1 and the shortest path P2 pass together is deleted.
  • the shortest path P1 and the shortest path P2 are simultaneously shown in FIG. 4-7.
  • the node link through which the shortest path P1 and the shortest path P2 pass together is B-H, that is, link B ⁇ H and link H ⁇ B.
  • Figure 4-8 shows the shortest ring link obtained after deleting link B ⁇ H and link H ⁇ B.
  • Step S370 determining the work according to the remaining node links in the shortest path P1 and the shortest path P2. Route and protect routes.
  • the remaining node links in the shortest path P1 and the shortest path P2 may constitute the shortest ring link ABCDEFGHIJ, and the shortest ring link may include two paths: A ⁇ B ⁇ C ⁇ D ⁇ E ⁇ J, A ⁇ F ⁇ G ⁇ H ⁇ I ⁇ J.
  • the sum of the weights of the node links in each path may be determined according to the initial weight set for each node link, and the path with the smallest sum of weights is used as the working route, and the sum of the weights is the second smallest path. As a protection route. If the weights of the two paths are the same, one path can be randomly selected as the working path, and the other is used as the protection path; or the path with the best link quality is selected as the working path, and the other is used as the protection path.
  • the sum of the weights of the path A ⁇ B ⁇ C ⁇ D ⁇ E ⁇ J is 5, and the sum of the weights of the path A ⁇ F ⁇ G ⁇ H ⁇ I ⁇ J is also 5, and the path A ⁇ B ⁇ C is determined.
  • ⁇ D ⁇ E ⁇ J and path A ⁇ F ⁇ G ⁇ H ⁇ I ⁇ J packet loss rate the link with a small packet loss rate is used as the working link, and the other link is used as the protection path.
  • Step S380 establishing a route according to the determined result of the working route and the protection route.
  • a network topology is established (for example, a network topology may be established according to a physical topology), and nodes 1 to 21 may be included in the network topology, the designated node 12 may be a source node, and the node 9 may be a sink node. (destination node), and you can set the initial weight of each node link to 1.
  • the preset Dijkstra algorithm can be called to determine that the shortest path P1 from node 12 to node 9 is node 12 ⁇ node 10 ⁇ node 11 ⁇ node 9.
  • the node link through which the shortest path P1 passes can be disabled, of course, only in the direction of the shortest path P1, forming a new network topology, and determining the weight of each node link in the new network topology.
  • the number on the node link in FIG. 7 is the weight of the link of the node, and the process of determining the weight can refer to the third embodiment described above.
  • the preset Dijkstra algorithm can be called according to the new network topology, and the shortest path P2 from the node 12 to the node 9 is determined to be the node 12 ⁇ the node 14 ⁇ the node 11 ⁇ the node 10 ⁇ Node 7 ⁇ Node 9.
  • the shortest path P1 can be enabled, and the shortest path P1 and the shortest path P2 can be put together.
  • the node link in which the shortest path P1 and the shortest path P2 coincide is removed (node 10) - Node 11), the remaining node links in the shortest path P1 and the shortest path P2 form the shortest ring link.
  • the shortest ring link may include: node 12 - node 14 - node 11 - node 9 - node 7 - node 10.
  • the node links other than the shortest ring link can be disabled, the preset Dijkstra algorithm is called, and the shortest path from the node 12 to the node 9 is determined by using the initial weight of each node link.
  • the work route disables each link of the node corresponding to the work route, and calls the preset Dijkstra algorithm again to determine the shortest path from the node 12 to the node 9 as the protection route. Once determined, enable all node links in the network topology.
  • the two paths from the node 12 to the node 9 are node 12 ⁇ node 10 ⁇ node 7 ⁇ node 9, respectively, and node 12 ⁇ node 14 ⁇ node 11 ⁇ node 9, the weight of the two paths The sum is 3, so the path with the best link quality is selected as the working route, and the other is the protection route.
  • a fifth embodiment of the present disclosure provides a route establishing apparatus. As shown in FIG. 12, it is a structural diagram of a route establishing apparatus according to a fifth embodiment of the present disclosure.
  • the device can include:
  • the determining module 1210 is configured to: determine, in the network topology, a shortest ring link including the source node and the destination node, and in the shortest ring link, determine two paths from the source node to the destination node .
  • the establishing module 1220 is configured to: establish a working route of the source node and the destination node according to one path, and establish a protection route of the source node and the destination node according to another path.
  • the determining module 1210 is configured to: determine a first shortest path from the source node to the destination node; disable the first shortest path in the network topology; according to the network topology after the first shortest path is disabled Determining a second shortest path from the source node to the destination node; In the first shortest path and the second shortest path, the node link through which the first shortest path and the second shortest path pass together is deleted to form a shortest ring link.
  • the determining module 1210 is further configured to: determine all paths from the source node to the destination node; determine according to an initial weight set in advance for each node link of the multiple node links in the network topology. The sum of the weights of the node links through which each of the paths passes, and the path corresponding to the sum of the weights as the first shortest path.
  • the determining module 1210 is further configured to modify according to an initial weight set in advance for each node link of the plurality of node links in the network topology, and a shortest path distance from the source node to each node. a weight of each of the plurality of node links in the network topology; in the network topology after the first shortest path is disabled, determining all paths from the source node to the destination node; The weight of each of the plurality of node links in the subsequent plurality of node links, determining the sum of the weights of the node links through which each of the paths passes, and using the path corresponding to the sum of the weights as the second The shortest path.
  • the establishing module 1220 is configured to: determine, according to an initial weight set in advance for each node link of the multiple node links in the network topology, a weight of the node link through which the one path passes And determining a sum of weights of the node links through which the another path passes; establishing a working route of the source node and the destination node according to the path corresponding to the sum of the smaller weights, according to a larger A path corresponding to the sum of the weights establishes a protection route of the source node and the destination node.
  • the determining module 1210 is configured to: determine, by using a preset Dijkstra algorithm, a shortest ring link including the source node and the destination node.
  • Embodiments of the present disclosure also provide a computer readable storage medium storing computer executable instructions that, when executed, implement the routing establishment method described above.
  • computer storage medium includes volatile and nonvolatile, implemented in any method or technology for storing information, such as computer readable instructions, data structures, program modules or other data. Sex, removable and non-removable media.
  • Computer storage media include, but are not limited to, Random Access Memory (RAM), Read-Only Memory (ROM), and Electrically Erasable Programmable Read-only Memory (EEPROM). Flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cassette, magnetic tape, disk storage or other magnetic storage device, or Any other medium used to store the desired information and that can be accessed by the computer.
  • communication media typically includes computer readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave or other transport mechanism, and can include any information delivery media. .
  • the present disclosure determines the shortest ring link including the source node and the destination node through which the working and protection routes are determined. Since the ring link is a ring, the final determined work route and protection route are separate two independent routes, and it is because the ring link is the shortest ring link including the source node and the destination node. Therefore, the determined work route and protection route are the optimal work route and protection route.
  • the disclosure reduces the complexity of determining the working route and the protection route, shortens the time-consuming determination, and can efficiently find the working route and the protection route thereof, and the result is the most preferable way, and thus can be a path-finding problem in actual engineering. Provide efficient, convenient and quality solutions.

Landscapes

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

Abstract

A route establishment method, comprising: in a network topology, determining a shortest ring link which comprises a source node and a destination node; in the shortest ring link, determining two paths from the source node to the destination node; establishing a working route for the source node and the destination node according to one of the paths, and establishing a protection route for the source node and the destination node according to the other path.

Description

一种路由建立方法和装置Method and device for establishing route 技术领域Technical field
本公开涉及但不限于通信技术领域,尤其是一种路由建立方法和装置。The present disclosure relates to, but is not limited to, the field of communication technologies, and in particular, to a route establishment method and apparatus.
背景技术Background technique
随着大规模多媒体网络的发展,以及多媒体流和视讯会议等新业务的出现,对网络提出了更高的要求,不仅需要网络满足业务的服务质量(QoS)要求,还要在网络连接出现故障时保持业务持续不间断地进行,如果在源节点和目的节点只有一条通信路径,则在链路故障时不能满足快速恢复业务的要求。要达到上述要求,可以在源节点和目的节点之间提供一对链路分离的路径,其中一条路径为工作路由,另一条路径为工作路由的保护路由。With the development of large-scale multimedia networks and the emergence of new services such as multimedia streaming and video conferencing, higher requirements are placed on the network, which not only requires the network to meet the quality of service (QoS) requirements of the service, but also fails in the network connection. When the service is kept uninterrupted, if there is only one communication path between the source node and the destination node, the fast recovery service cannot be met when the link fails. To achieve the above requirements, a pair of link-separated paths can be provided between the source node and the destination node, one of which is a working route and the other is a protected route of the working route.
发明内容Summary of the invention
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics detailed in this document. This Summary is not intended to limit the scope of the claims.
路由建立方法可以采用K优路径算法,先计算一条最短路径作为工作路由,然后再计算与该工作路由分离的最短路径作为保护路由。例如:对于“日字形”组网场景,在进行工作路由计算时,可能会使用“日字形”中间一横这个边作为工作路由的部分路径,在计算保护路由时,由于无论怎么选取路径都不会和工作路由分离,这时需要重新计算工作路由,再根据重新计算的工作路由计算保护路由,直到计算出分离的工作路由和保护路由为止。对于较为复杂的组网场景来说,可能需要通过K优路径算法计算几千、几万、甚至几亿次才能得到分离的工作路由和保护路由。The route establishment method can adopt the K-optimal path algorithm, first calculate a shortest path as a working route, and then calculate the shortest path separated from the working route as a protection route. For example, for the "Japanese-shaped" networking scenario, when performing work route calculation, the middle side of the "Japanese font" may be used as the partial path of the work route. When calculating the protection route, no matter how the path is selected, It will be separated from the working route. At this time, the working route needs to be recalculated, and the protection route is calculated according to the recalculated working route until the separated working route and the protection route are calculated. For a more complex networking scenario, it may be necessary to calculate thousands, tens of thousands, or even hundreds of millions of times through the K-optimal path algorithm to obtain separate working routes and protection routes.
确定工作路由和保护路由的过程复杂且耗时,容易因为超时导致路由建立失败。The process of determining the working route and protecting the route is complicated and time consuming, and it is easy to cause the route establishment failure due to the timeout.
本公开提供一种路由建立方法和装置,能够避免确定工作路由和保护路由的过程复杂且耗时。 The present disclosure provides a route establishment method and apparatus, which can avoid the process of determining a working route and protecting a route from being complicated and time consuming.
本公开提供了一种路由建立方法,包括:在网络拓扑中,确定包含源节点和目的节点的最短环形链路;在所述最短环形链路中,确定从所述源节点到所述目的节点的两条路径;根据其中一条路径建立所述源节点和所述目的节点的工作路由,根据另一条路径建立所述源节点和所述目的节点的保护路由。The present disclosure provides a route establishment method, including: determining, in a network topology, a shortest ring link including a source node and a destination node; and determining, in the shortest ring link, from the source node to the destination node And establishing a working route of the source node and the destination node according to one path, and establishing a protection route of the source node and the destination node according to another path.
在一种示例性实施方式中,所述确定包含源节点和目的节点的最短环形链路,包括:确定从源节点到目的节点的第一最短路径;在所述网络拓扑中禁用所述第一最短路径;根据禁用所述第一最短路径之后的网络拓扑,确定从所述源节点到所述目的节点的第二最短路径;在所述第一最短路径和所述第二最短路径中,删除所述第一最短路径和所述第二最短路径共同经过的节点链路,形成最短环形链路。In an exemplary embodiment, the determining the shortest ring link including the source node and the destination node comprises: determining a first shortest path from the source node to the destination node; disabling the first in the network topology a shortest path; determining a second shortest path from the source node to the destination node according to a network topology after the first shortest path is disabled; deleting the first shortest path and the second shortest path The node link through which the first shortest path and the second shortest path pass together form a shortest ring link.
在一种示例性实施方式中,所述确定从源节点到目的节点的第一最短路径,包括:确定从所述源节点到所述目的节点的所有路径;根据预先为网络拓扑中多条节点链路中每条节点链路设置的初始权值,确定每条所述路径经过的节点链路的权值之和,并将权值之和最小值对应的路径作为第一最短路径。In an exemplary embodiment, the determining the first shortest path from the source node to the destination node comprises: determining all paths from the source node to the destination node; according to a plurality of nodes in the network topology in advance The initial weight of each node link in the link determines the sum of the weights of the node links through which each path passes, and the path corresponding to the sum of the weights is used as the first shortest path.
在一种示例性实施方式中,所述根据禁用所述第一最短路径之后的网络拓扑,确定从所述源节点到所述目的节点的第二最短路径,包括:根据预先为网络拓扑中的多条节点链路中每条节点链路设置的初始权值,以及所述源节点到每个节点的最短路径距离,修改网络拓扑中的多条节点链路中每条节点链路的权值;在禁用所述第一最短路径之后的网络拓扑中,确定从所述源节点到所述目的节点的所有路径;根据修改后的所述多条节点链路中每条节点链路的权值,确定每条所述路径经过的节点链路的权值之和,并将权值之和最小值对应的路径作为第二最短路径。In an exemplary embodiment, the determining, according to the network topology after the first shortest path is disabled, determining a second shortest path from the source node to the destination node, including: according to a pre-network topology The initial weight of each node link in the multiple node links, and the shortest path distance from the source node to each node, modifying the weight of each node link in the multiple node links in the network topology Determining, from the network topology after the first shortest path, all paths from the source node to the destination node; according to the modified weight of each node link in the plurality of node links And determining a sum of weights of the node links through which each of the paths passes, and using the path corresponding to the sum of the weights as the second shortest path.
在一种示例性实施方式中,所述根据其中一条路径建立所述源节点和所述目的节点的工作路由,根据另一条路径建立所述源节点和所述目的节点的保护路由,包括:根据预先为网络拓扑中的多条节点链路中每条节点链路设置的初始权值,确定所述其中一条路径经过的节点链路的权值之和,以及确定所述另一条路径经过的节点链路的权值之和;根据较小的权值之和对应的路径,建立所述源节点和所述目的节点的工作路由,根据较大的权值之和对 应的路径,建立所述源节点和所述目的节点的保护路由。In an exemplary embodiment, the establishing a working route of the source node and the destination node according to one of the paths, and establishing a protection route of the source node and the destination node according to another path, including: Determining, in advance, an initial weight set for each node link of the plurality of node links in the network topology, determining a sum of weights of the node links through which the one path passes, and determining a node through which the other path passes The sum of the weights of the links; the working route of the source node and the destination node is established according to the path corresponding to the sum of the smaller weights, according to the sum of the larger weights The path of the path is established, and the protection route of the source node and the destination node is established.
在一种示例性实施方式中,所述确定包含源节点和目的节点的最短环形链路,包括:利用预设的Dijkstra算法,确定包含源节点和目的节点的最短环形链路。In an exemplary embodiment, the determining the shortest ring link including the source node and the destination node includes determining a shortest ring link including the source node and the destination node using a preset Dijkstra algorithm.
本公开还提供了一种路由建立装置,包括:确定模块,设置为:在网络拓扑中,确定包含源节点和目的节点的最短环形链路;确定模块,设置为:在所述最短环形链路中,确定从所述源节点到所述目的节点的两条路径;建立模块,设置为:根据其中一条路径建立所述源节点和所述目的节点的工作路由,根据另一条路径建立所述源节点和所述目的节点的保护路由。The present disclosure also provides a route establishing apparatus, including: a determining module, configured to: determine, in a network topology, a shortest ring link including a source node and a destination node; and a determining module, configured to: in the shortest ring link Determining two paths from the source node to the destination node; establishing a module, configured to: establish a working route of the source node and the destination node according to one path, and establish the source according to another path The protection route of the node and the destination node.
在一种示例性实施方式中,所述确定模块是设置为:确定从源节点到目的节点的第一最短路径;在所述网络拓扑中禁用所述第一最短路径;根据禁用所述第一最短路径之后的网络拓扑,确定从所述源节点到所述目的节点的第二最短路径;在所述第一最短路径和所述第二最短路径中,删除所述第一最短路径和所述第二最短路径共同经过的节点链路,形成最短环形链路。In an exemplary embodiment, the determining module is configured to: determine a first shortest path from a source node to a destination node; disable the first shortest path in the network topology; a network topology after the shortest path, determining a second shortest path from the source node to the destination node; deleting, in the first shortest path and the second shortest path, the first shortest path and the The node link through which the second shortest path passes together forms the shortest ring link.
在一种示例性实施方式中,所述确定模块还设置为:确定从所述源节点到所述目的节点的所有路径;根据预先为网络拓扑中多条节点链路中每条节点链路设置的初始权值,确定每条所述路径经过的节点链路的权值之和,并将权值之和最小值对应的路径作为第一最短路径。In an exemplary embodiment, the determining module is further configured to: determine all paths from the source node to the destination node; according to a preset for each node link in a plurality of node links in a network topology The initial weight value determines the sum of the weights of the node links through which each of the paths passes, and the path corresponding to the sum of the weights is the first shortest path.
在一种示例性实施方式中,所述确定模块还设置为:根据预先为网络拓扑中的多条节点链路中每条节点链路设置的初始权值,以及所述源节点到每个节点的最短路径距离,修改网络拓扑中的多条节点链路中每条节点链路的权值;在禁用所述第一最短路径之后的网络拓扑中,确定从所述源节点到所述目的节点的所有路径;根据修改后的所述多条节点链路中每条节点链路的权值,确定每条所述路径经过的节点链路的权值之和,并将权值之和最小值对应的路径作为第二最短路径。In an exemplary embodiment, the determining module is further configured to: according to an initial weight set in advance for each of the plurality of node links in the network topology, and the source node to each node a shortest path distance, modifying a weight of each of the plurality of node links in the network topology; determining, from the source node to the destination node, in a network topology after the first shortest path is disabled All the paths; determining, according to the modified weights of each of the plurality of node links, the sum of the weights of the node links through which the path passes, and the sum of the weights The corresponding path is used as the second shortest path.
在一种示例性实施方式中,所述建立模块是设置为:根据预先为网络拓扑中的多条节点链路中每条节点链路设置的初始权值,确定所述其中一条路径经过的节点链路的权值之和,以及确定所述另一条路径经过的节点链路的权值之和;根据较小的权值之和对应的路径,建立所述源节点和所述目的节点的工作路由,根据较大的权值之和对应的路径,建立所述源节点和所述目 的节点的保护路由。In an exemplary embodiment, the establishing module is configured to: determine, according to an initial weight set in advance for each node link of the plurality of node links in the network topology, the node through which one of the paths passes The sum of the weights of the links, and the sum of the weights of the node links through which the other path passes; establishing the work of the source node and the destination node according to the path corresponding to the sum of the smaller weights Routing, establishing the source node and the destination according to a path corresponding to a sum of larger weights The protected route of the node.
在一种示例性实施方式中,所述确定模块,是设置为:利用预设的Dijkstra算法,确定包含源节点和目的节点的最短环形链路。In an exemplary embodiment, the determining module is configured to determine a shortest ring link including a source node and a destination node by using a preset Dijkstra algorithm.
本公开实施例还提供了一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被执行时实现上述路由建立方法。Embodiments of the present disclosure also provide a computer readable storage medium storing computer executable instructions that, when executed, implement the routing establishment method described above.
本公开有益效果如下:The beneficial effects of the disclosure are as follows:
本公开确定包含源节点和目的节点的最短的环形链路,通过该环形链路确定工作路由和保护路由。因为该环形链路为一个环形,所以最终确定的工作路由和保护路由是分离的两条互相不依赖的路由,也正是因为该环形链路为包含源节点和目的节点的最短的环形链路,所以确定的工作路由和保护路由是最优的工作路由和保护路由。通过本公开降低了确定工作路由和保护路由的复杂度,缩短了确定耗时,可以高效地找到工作路由及其保护路由,同时结果为最优选路,进而可以在实际工程中,为寻路问题提供高效、便捷、优质的解决方案。The present disclosure determines the shortest ring link including the source node and the destination node through which the working and protection routes are determined. Since the ring link is a ring, the final determined work route and protection route are separate two independent routes, and it is because the ring link is the shortest ring link including the source node and the destination node. Therefore, the determined work route and protection route are the optimal work route and protection route. The disclosure reduces the complexity of determining the working route and the protection route, shortens the time-consuming determination, and can efficiently find the working route and the protection route thereof, and the result is the most preferable way, and thus can be a path-finding problem in actual engineering. Provide efficient, convenient and quality solutions.
在阅读并理解了附图和详细描述后,可以明白其他方面。Other aspects will be apparent upon reading and understanding the drawings and detailed description.
附图概述BRIEF abstract
图1是根据本公开第一实施例的路由建立方法的流程图;1 is a flowchart of a route establishment method according to a first embodiment of the present disclosure;
图2是根据本公开第二实施例的确定最短环形链路的步骤流程图;2 is a flow chart showing the steps of determining a shortest ring link in accordance with a second embodiment of the present disclosure;
图3是根据本公开第三实施例的路由建立方法的流程图;3 is a flowchart of a route establishment method according to a third embodiment of the present disclosure;
图4-1是根据本公开第三实施例的网络拓扑示意图;4-1 is a schematic diagram of a network topology according to a third embodiment of the present disclosure;
图4-2是根据本公开第三实施例的最短路径P1的示意图;4-2 is a schematic diagram of a shortest path P1 according to a third embodiment of the present disclosure;
图4-3是根据本公开第三实施例的最短路径生成树示意图;4-3 is a schematic diagram of a shortest path spanning tree according to a third embodiment of the present disclosure;
图4-4是根据本公开第三实施例的禁用最短路径P1的网络拓扑示意图;4-4 is a schematic diagram of a network topology in which the shortest path P1 is disabled according to the third embodiment of the present disclosure;
图4-5是根据本公开第三实施例的修改节点链路权值的网络拓扑示意图;4-5 are schematic diagrams of network topologies for modifying node link weights according to a third embodiment of the present disclosure;
图4-6是根据本公开第三实施例的最短路径P2的示意图;4-6 are schematic views of a shortest path P2 according to a third embodiment of the present disclosure;
图4-7是根据本公开第三实施例的最短路径P1和最短路径P2共同经过的节点链路的示意图; 4-7 are schematic diagrams of a node link through which a shortest path P1 and a shortest path P2 pass together according to a third embodiment of the present disclosure;
图4-8是根据本公开第三实施例的最短环形链路的示意图;4-8 are schematic diagrams of a shortest loop link in accordance with a third embodiment of the present disclosure;
图5是根据本公开第四实施例的网络拓扑的示意图;FIG. 5 is a schematic diagram of a network topology according to a fourth embodiment of the present disclosure; FIG.
图6是根据本公开第四实施例的最短路径P1的示意图;FIG. 6 is a schematic diagram of a shortest path P1 according to a fourth embodiment of the present disclosure; FIG.
图7是根据本公开第四实施例的修改节点链路权值的网络拓扑示意图;7 is a schematic diagram of a network topology for modifying a node link weight according to a fourth embodiment of the present disclosure;
图8是根据本公开第四实施例的最短路径P2的示意图;FIG. 8 is a schematic diagram of a shortest path P2 according to a fourth embodiment of the present disclosure; FIG.
图9是根据本公开第四实施例的最短路径P1和最短路径P2共同经过的节点链路的示意图;9 is a schematic diagram of a node link through which a shortest path P1 and a shortest path P2 pass together according to a fourth embodiment of the present disclosure;
图10是根据本公开第四实施例的最短环形链路的示意图;10 is a schematic diagram of a shortest ring link in accordance with a fourth embodiment of the present disclosure;
图11是根据本公开第四实施例的工作路由和保护路由的示意图;11 is a schematic diagram of a work route and a protection route according to a fourth embodiment of the present disclosure;
图12是根据本公开第五实施例的路由建立装置的结构图。FIG. 12 is a structural diagram of a route establishing apparatus according to a fifth embodiment of the present disclosure.
本公开的较佳实施方式Preferred embodiment of the present disclosure
下面结合附图对本公开的实施方式进行描述。Embodiments of the present disclosure will be described below with reference to the accompanying drawings.
本公开第一实施例提供一种路由建立方法,如图1所述,为根据本公开第一实施例的路由建立方法的流程图,参见图1,该路由建立方法可以包括:The first embodiment of the present disclosure provides a route establishment method. As shown in FIG. 1 , which is a flowchart of a route establishment method according to the first embodiment of the present disclosure, referring to FIG. 1 , the route establishment method may include:
步骤S110,在网络拓扑中,确定包含源节点和目的节点的最短环形链路。Step S110, in the network topology, determine the shortest ring link including the source node and the destination node.
步骤S120,在该最短环形链路中,确定从源节点到目的节点的两条路径。Step S120, in the shortest ring link, determine two paths from the source node to the destination node.
步骤S130,根据其中一条路径建立源节点和目的节点的工作路由,根据另一条路径建立源节点和目的节点的保护路由。Step S130: Establish a working route of the source node and the destination node according to one path, and establish a protection route of the source node and the destination node according to another path.
在网络拓扑中可以包括多个节点以及多条用于连接两个节点的节点链路。A plurality of nodes and a plurality of node links for connecting two nodes may be included in the network topology.
可选地,在这多个节点中指定源节点和目的节点。在网络拓扑中确定出包含源节点和目的节点的最短的环形链路,即最短环形链路。可选地,可以利用预设的算法,确定包含源节点和目的节点的最短环形链路。该预设算法例如可以是:Dijkstra(迪克斯特拉)算法。Optionally, a source node and a destination node are specified among the plurality of nodes. The shortest ring link containing the source node and the destination node, ie the shortest ring link, is determined in the network topology. Alternatively, the shortest ring link including the source node and the destination node may be determined using a preset algorithm. The preset algorithm can be, for example, the Dijkstra algorithm.
可以基于该最短环形链路确定最优的工作路由和保护路由。在最短环形链路中,可以确定以源节点作为起点,以目的节点作为终点的路径,因为最短环形链路为一个环形,那么符合要求的路径可以为两条,将其中一条路径 作为工作路由,另一条路径作为保护路由。An optimal working route and a protection route can be determined based on the shortest ring link. In the shortest ring link, the path with the source node as the starting point and the destination node as the ending point can be determined. Since the shortest ring link is a ring, the path that meets the requirements can be two, one of the paths. As a working route, another path acts as a protection route.
在本实施例中,只需确定出包含源节点和目的节点的最短环形链路即可确定源节点和目的节点的工作路由和保护路由,确定过程简便且不耗时,提升了路由建立效率,降低了路由建立失败的风险。In this embodiment, the working route and the protection route of the source node and the destination node can be determined only by determining the shortest ring link including the source node and the destination node, and the determining process is simple and time-consuming, thereby improving route establishment efficiency. Reduces the risk of route setup failures.
在本实施例中,因为最短环形链路为一个环形,所以最终确定的工作路由和保护路由是分离的两条路由,在工作路由中,如果源节点和目的节点之间的中间节点或是链路出现故障,则可以启用保护路由来替代工作路由。也正是因为最短环形链路是包含源节点和目的节点的最短的环形路径,所以最终确定的工作路由和保护路由是最优的工作路由和保护路由。In this embodiment, since the shortest ring link is a ring, the final determined work route and the protection route are two separate routes. In the work route, if the intermediate node or the link between the source node and the destination node is If the path fails, you can enable the protection route instead of the work route. It is also because the shortest ring link is the shortest ring path containing the source node and the destination node, so the final determined work route and protection route are the optimal work route and protection route.
为了使本公开确定最短环形链路的过程更加清楚,下面对确定最短环形链路的步骤进行描述。图2为根据本公开第二实施例的确定最短环形链路的步骤流程图,参见图2,本公开第二实施例的确定最短环形链路的步骤可以包括:In order to make the process of determining the shortest ring link clearer in the present disclosure, the steps of determining the shortest ring link are described below. 2 is a flow chart showing the steps of determining the shortest ring link according to the second embodiment of the present disclosure. Referring to FIG. 2, the step of determining the shortest ring link of the second embodiment of the present disclosure may include:
步骤S210,基于当前网络拓扑,确定从源节点到目的节点的第一最短路径。Step S210: Determine a first shortest path from the source node to the destination node based on the current network topology.
第一最短路径可以是指当前网络拓扑中源节点和目的节点之间的最短路径。The first shortest path may refer to the shortest path between the source node and the destination node in the current network topology.
可以预先为网络拓扑中的多条节点链路中每条节点链路设置的初始权值,例如:设置每条节点链路的初始权值为1。The initial weight set for each node link of the multiple node links in the network topology may be pre-defined, for example, the initial weight of each node link is set to 1.
可选地,确定从源节点到目的节点的所有路径;根据预先为网络拓扑中多条节点链路中每条节点链路设置的初始权值,确定每条路径经过的节点链路的权值之和,并将权值之和最小值(最小权值之和)对应的路径作为第一最短路径。Optionally, determining all paths from the source node to the destination node; determining the weight of the node link through which each path passes according to an initial weight set in advance for each node link of the plurality of node links in the network topology The sum, and the path corresponding to the sum of the weights (the sum of the minimum weights) is taken as the first shortest path.
节点链路具有方向性,例如:双向链路和单向链路;单向链路可以包括:上行链路、下行链路。可以为节点链路设置与方向对应的权值,例如:在设置初始权值时,针对节点A和节点B之间的节点链路,可以使两个方向的权值相同,如链路A→B和链路B→A的权值都为1。可以按照路径的方向, 获取该路径经过的每条节点链路在该方向上对应的权值,将获取的权值相加,进而确定出该路径对应的权值之和。The node links are directional, such as a bidirectional link and a unidirectional link; the unidirectional link may include: an uplink, a downlink. The weight corresponding to the direction may be set for the node link. For example, when the initial weight is set, for the node link between the node A and the node B, the weights in the two directions may be the same, such as link A→ Both B and link B→A have a weight of 1. Can follow the direction of the path, Obtain the weights corresponding to the link of each node through which the path passes, and add the obtained weights to determine the sum of the weights corresponding to the path.
在本实施例中,节点链路两个方向对应的初始权值可以为1,在确定任意两节点之间的路径对应的权值之和时,可以确定该路径中从第一个节点到最后一个节点的跳数,该跳数即是权值之和。In this embodiment, the initial weight corresponding to the two directions of the node link may be 1, and when determining the sum of the weights corresponding to the paths between any two nodes, the first node to the last in the path may be determined. The hop count of a node, which is the sum of the weights.
步骤S220,在网络拓扑中禁用第一最短路径。Step S220, disabling the first shortest path in the network topology.
在网络拓扑中,可以确定第一最短路径经过多条节点链路中每条节点链路,按照第一最短路径的方向,将每条节点链路的该方向禁用。In the network topology, it may be determined that the first shortest path passes through each of the plurality of node links, and the direction of each of the node links is disabled according to the direction of the first shortest path.
步骤S230,根据禁用第一最短路径之后的网络拓扑,确定从源节点到目的节点的第二最短路径。Step S230, determining a second shortest path from the source node to the destination node according to the network topology after the first shortest path is disabled.
第二最短路径可以是指禁用第一最短路径后的网络拓扑中,源节点和目的节点之间的最短路径。The second shortest path may refer to the shortest path between the source node and the destination node in the network topology after the first shortest path is disabled.
在网络拓扑中禁用第一最短路径之后,可以形成新的网络拓扑,原来的网络拓扑和新的网络拓扑在节点上不会发生变化,只是链路发生改变;可以根据预先为网络拓扑中的多条节点链路中每条节点链路设置的初始权值,以及源节点到新的网络拓扑中每个节点的最短路径距离,修改新的网络拓扑中的多条节点链路中每条节点链路的权值;在确定第二最短路径时,可以在新的网络拓扑中,确定从源节点到目的节点所有路径;可以根据修改后的多条节点链路中每条节点链路的权值,确定每条路径(新的网络拓扑中从源节点到目的节点的每条路径)经过的节点链路的权值之和,并将权值之和最小值对应的路径作为第二最短路径。After the first shortest path is disabled in the network topology, a new network topology can be formed. The original network topology and the new network topology do not change on the node, but the link changes; it can be based on the pre-existing network topology. The initial weight of each node link setting in the node link, and the shortest path distance from the source node to each node in the new network topology, modifying each node chain in the multiple node links in the new network topology The weight of the road; when determining the second shortest path, all paths from the source node to the destination node may be determined in the new network topology; may be based on the weight of each node link in the modified plurality of node links And determining the sum of the weights of the node links through which each path (each path from the source node to the destination node in the new network topology) passes, and the path corresponding to the sum of the weights as the second shortest path.
步骤S240,在第一最短路径和第二最短路径中,删除第一最短路径和第二最短路径共同经过的节点链路,形成最短环形链路。Step S240, in the first shortest path and the second shortest path, delete the node link through which the first shortest path and the second shortest path pass together to form a shortest ring link.
在新的网络拓扑中,可以将之前禁用的第一最短路径重新启用,这样第一最短路径和第二最短路径将会同时存在于网络拓扑中,找出第一最短路径和第二最短路径共同经过的节点链路;在第一最短路径和第二最短路径中删除共同经过的节点链路之后,第一最短路径和第二最短路径的剩余节点链路将会形成一个环形链路,将该环形链路即是包含源节点和目的节点的最短环 形链路。In the new network topology, the previously disabled first shortest path can be re-enabled, so that the first shortest path and the second shortest path will exist in the network topology at the same time, and the first shortest path and the second shortest path are found together. Passing node link; after deleting the commonly passed node link in the first shortest path and the second shortest path, the remaining shortest link of the first shortest path and the second shortest path will form a ring link, and the The ring link is the shortest ring that contains the source node and the destination node. Link.
基于本实施例确定出的最短环形链路,在最短环形链路中,可以确定以源节点为起点,以目的节点为终点的两条路径,根据预先为网络拓扑中的多条节点链路中每条节点链路设置的初始权值,确定其中一条路径经过的节点链路的权值之和,以及确定另一条路径经过的节点链路的权值之和;根据较小的权值之和对应的路径,建立源节点和目的节点的工作路由;根据较大的权值之和对应的路径,建立源节点和目的节点的保护路由。Based on the shortest ring link determined in this embodiment, in the shortest ring link, two paths with the source node as the starting point and the destination node as the end point may be determined according to the plurality of node links in the network topology. The initial weight of each node link setting, determining the sum of the weights of the node links through which one path passes, and the sum of the weights of the node links through which the other path passes; according to the sum of the smaller weights The corresponding path establishes a working route between the source node and the destination node; and establishes a protection route of the source node and the destination node according to the path corresponding to the sum of the larger weights.
本实施例的确定过程在时间复杂度和空间复杂度上,都有很大程度的优化,通过本实施例最终选出的两条路径是完全分离的,保护路径不用依赖于工作路径,且工作路径和保护路径的的代价(权值)是最小的。The determination process of this embodiment has a large degree of optimization in time complexity and space complexity. The two paths finally selected by the embodiment are completely separated, and the protection path does not depend on the working path, and works. The cost (weight) of the path and the protection path is minimal.
图3是根据本公开第三实施例的路由建立方法的流程图。图4(包括图4-1~图4-8)是根据本公开第三实施例的路由建立方法的示意图。参照图3和图4,本公开第三实施例的路由建立方法可以包括如下步骤:FIG. 3 is a flowchart of a route establishment method according to a third embodiment of the present disclosure. 4 (including FIGS. 4-1 to 4-8) is a schematic diagram of a route establishment method according to a third embodiment of the present disclosure. Referring to FIG. 3 and FIG. 4, the route establishment method of the third embodiment of the present disclosure may include the following steps:
步骤S310,为网络拓扑中的多条节点链路中每条节点链路设置初始权值,并利用Dijkstra算法,确定源节点到目的节点的最短路径P1。Step S310, setting initial weights for each of the plurality of node links in the network topology, and determining the shortest path P1 of the source node to the destination node by using the Dijkstra algorithm.
如图4-1所示,在网络拓扑中,可以包括节点A~节点J,节点A为源节点,节点J为目的节点。在网络拓扑中,可以设置每条节点链路的初始权值都为1,图4-1中的数字表示权值。可选地,每条节点链路都为双向链路,每个方向对应的初始权值都为1。As shown in Figure 4-1, in the network topology, nodes A to J can be included, node A is the source node, and node J is the destination node. In the network topology, you can set the initial weight of each node link to be 1, and the number in Figure 4-1 represents the weight. Optionally, each node link is a bidirectional link, and the initial weight corresponding to each direction is 1.
在从源节点到目的节点的每条路径中,最短路径P1是指所经每条节点链路的初始权值之和最小的路径。该最短路径P1为上述的第一最短路径。Among each path from the source node to the destination node, the shortest path P1 refers to the path in which the sum of the initial weights of the links through each node is the smallest. The shortest path P1 is the first shortest path described above.
利用Dijkstra算法,可以确定出源节点A到目的节点J之间的最短路径P1为A→B→H→I→J,如图4-2中的粗箭头所示。可选地,源节点A到目的节点J之间的路径包括:A→F→G→H→I→J(权值之和为5)、A→F→G→H→I→D→E→J(权值之和为7)、A→F→G→H→B→C→D→E→J(权值之和为8)、A→B→H→I→J(权值之和为4)、A→B→C→D→I→J(权值之和为5)、A→B→C→D→E→J(权值之和为5);经比较可知,最 短路径P1为A→B→H→I→J,路径A→B→H→I→J是节点A到节点J之间每条路径中权值之和最小的路径。Using the Dijkstra algorithm, it can be determined that the shortest path P1 between the source node A and the destination node J is A→B→H→I→J, as indicated by the thick arrow in FIG. 4-2. Optionally, the path between the source node A and the destination node J includes: A→F→G→H→I→J (the sum of the weights is 5), A→F→G→H→I→D→E →J (sum of weights is 7), A→F→G→H→B→C→D→E→J (sum of weights is 8), A→B→H→I→J (weight And 4), A→B→C→D→I→J (the sum of weights is 5), A→B→C→D→E→J (the sum of weights is 5); The short path P1 is A→B→H→I→J, and the path A→B→H→I→J is the path with the smallest sum of weights in each path between the node A and the node J.
步骤S320,利用Dijksta算法,确定源节点到网络拓扑中每个节点的最短路径距离,并形成最短路径生成树。Step S320, using the Dijksta algorithm, determining the shortest path distance of each node from the source node to the network topology, and forming a shortest path spanning tree.
可选地,利用Dijkstra算法,确定从源节点到指定节点的最短路径,在该最短路径中,从源节点到指定节点的跳数为最短路径距离。Optionally, the Dijkstra algorithm is used to determine the shortest path from the source node to the designated node, in which the hop count from the source node to the designated node is the shortest path distance.
经确定,在网络拓扑中,节点A到节点B的最短路径距离为1,节点A到节点C的最短路径距离为2,节点A到节点D的最短路径距离为3,节点A到节点E的最短路径距离为4,节点A到节点F的最短路径距离为1,节点A到节点G的最短路径距离为2,节点A到节点H的最短路径距离为2,节点A到节点I的最短路径距离为3,节点A到节点J的最短路径距离为4。It is determined that in the network topology, the shortest path distance from node A to node B is 1, the shortest path distance from node A to node C is 2, the shortest path distance from node A to node D is 3, and node A to node E The shortest path distance is 4, the shortest path distance from node A to node F is 1, the shortest path distance from node A to node G is 2, the shortest path distance from node A to node H is 2, and the shortest path from node A to node I The distance is 3, and the shortest path distance from node A to node J is 4.
根据确定结果可知,以节点A为起始点,最短路径距离为1的节点为节点B和节点F,最短路径距离为2的节点为节点C、节点G和节点H,最短路径距离为3的节点为节点D和节点I,最短路径距离为4的节点为节点E和节点J。根据确定结果形成的最短路径生成树如图4-3所示,图4-3中的数字表示最短路径距离。According to the determination result, it is known that node A is the starting point, the node with the shortest path distance of 1 is node B and node F, and the node with the shortest path distance of 2 is node C, node G and node H, and the node with the shortest path distance is 3. For node D and node I, the node with the shortest path distance of 4 is node E and node J. The shortest path spanning tree formed according to the determined result is shown in Fig. 4-3, and the number in Fig. 4-3 indicates the shortest path distance.
步骤S330,在网络拓扑中禁用源节点到目的节点的最短路径P1。Step S330, disabling the shortest path P1 of the source node to the destination node in the network topology.
因为链路具有方向性,在网络拓扑中可以禁用最短路径P1所经的每条节点链路,即禁用路径A→B→H→I→J,但是,值得注意的是,在网络拓扑中,可以不禁用路径A←B←H←I←J,因此,在图4-4中,A-B-H-I-J之间的链路可以为单箭头。Since the link has directionality, each node link through which the shortest path P1 passes can be disabled in the network topology, that is, the path A→B→H→I→J is disabled, but it is worth noting that in the network topology, The path A←B←H←I←J may not be disabled, so in Figure 4-4, the link between ABHIJs may be a single arrow.
步骤S340,在禁用最短路径P1的网络拓扑中,修改多条节点链路中每条节点链路的初始权值。Step S340, in the network topology in which the shortest path P1 is disabled, the initial weight of each node link in the plurality of node links is modified.
可以利用公式w'(u,v)=w(u,v)-d(s,v)+d(s,u),修改最初为网络拓扑中多条链路中每条链路设置的初始权值。You can use the formula w'(u,v)=w(u,v)-d(s,v)+d(s,u) to modify the initial settings for each link in multiple links in the network topology. Weight.
其中,u表示链路的起点,v表示链路的终点,s表示源节点,w'(u,v)为链路u→v修改后的权值,w(u,v)为链路u→v的初始权值,d(s,v)为源节点到链路终点的最短路径距离,d(s,u)为源节点到链路起点的最短路径距离。 Where u is the starting point of the link, v is the end point of the link, s is the source node, w'(u,v) is the modified weight of the link u→v, and w(u,v) is the link u → initial weight of v, d(s, v) is the shortest path distance from the source node to the end of the link, and d(s, u) is the shortest path distance from the source node to the start of the link.
例如:确定链路H→B的权值,链路H→B的初始权值为1,节点A到节点B的最短路径距离为1,节点A到节点H的最短路径距离为2,那么链路H→B的权值w'(H,B)=w(H,B)-d(A,B)+d(A,H)=1-1+2=2。For example, to determine the weight of link H→B, the initial weight of link H→B is 1, the shortest path distance from node A to node B is 1, and the shortest path distance from node A to node H is 2, then the chain The weight of the path H→B is w'(H,B)=w(H,B)-d(A,B)+d(A,H)=1-1+2=2.
又如,确定链路I→H的权值,链路I→H的初始权值为1,节点A到节点H的最短路径距离为2,节点A到节点I的最短路径距离为3,那么链路I→H的权值w'(I,H)=w(I,H)-d(A,H)+d(A,I)=1-2+3=2。For another example, determining the weight of the link I→H, the initial weight of the link I→H is 1, the shortest path distance from the node A to the node H is 2, and the shortest path distance from the node A to the node I is 3, then The weight of the link I→H is w'(I,H)=w(I,H)-d(A,H)+d(A,I)=1-2+3=2.
再如:确定链路B→C的权值,链路B→C的初始权值为1,节点A到节点C的最短路径距离为2,节点A到节点B点最短路径距离为1,那么链路B→C的权值w'(B,C)=w(B,C)-d(A,C)+d(A,B)=1-2+1=0。确定链路C→B的权值,链路C→B的初始权值为1,节点A到节点C的最短路径距离为2,节点A到节点B点最短路径距离为1,那么链路C→B的权值w'(C,B)=w(C,B)-d(A,B)+d(A,C)=1-1+2=2。For another example: determine the weight of link B→C, the initial weight of link B→C is 1, the shortest path distance from node A to node C is 2, and the shortest path distance from node A to node B is 1, then The weight of link B→C is w'(B,C)=w(B,C)-d(A,C)+d(A,B)=1-2+1=0. Determine the weight of link C→B, the initial weight of link C→B is 1, the shortest path distance from node A to node C is 2, and the shortest path distance from node A to node B is 1, then link C →B weight w'(C,B)=w(C,B)-d(A,B)+d(A,C)=1-1+2=2.
如图4-5所示,为根据本步骤给出的方法修改的权值,图4-5中的数字为新的权值。As shown in Figure 4-5, the weights in Figure 4-5 are the new weights for the weights modified according to the method given in this step.
步骤S350,在网络拓扑中禁用最短路径P1之后,利用Dijkstra算法,再次确定源节点到目的节点的最短路径P2。Step S350, after the shortest path P1 is disabled in the network topology, the shortest path P2 of the source node to the destination node is determined again by using the Dijkstra algorithm.
可以利用Dijkstra算法,确定出源节点A到目的节点J之间的最短路径P2为A→F→G→H→B→C→D→E→J,如图4-6中的粗箭头所示。The Dijkstra algorithm can be used to determine that the shortest path P2 between the source node A and the destination node J is A→F→G→H→B→C→D→E→J, as shown by the thick arrow in Figure 4-6. .
该最短路径P2即可以是上述的第二最短路径。The shortest path P2 may be the second shortest path described above.
步骤S360,在最短路径P1和最短路径P2中,删除最短路径P1和最短路径P2共同经过的节点链路。In step S360, in the shortest path P1 and the shortest path P2, the node link through which the shortest path P1 and the shortest path P2 pass together is deleted.
在网络拓扑中启用最短路径P1可以得到图4-1所示的最初的网络拓扑。Enabling the shortest path P1 in the network topology results in the initial network topology shown in Figure 4-1.
最短路径P1和最短路径P2同时显示在图4-7中,经比较可知,最短路径P1和最短路径P2共同经过的节点链路为B-H,即链路B→H和链路H→B。The shortest path P1 and the shortest path P2 are simultaneously shown in FIG. 4-7. By comparison, the node link through which the shortest path P1 and the shortest path P2 pass together is B-H, that is, link B→H and link H→B.
在最短路径P1(A→B→H→I→J)中删除链路B→H,在最短路径P2(A→F→G→H→B→C→D→E→J)中删除链路H→B,图4-8为删除链路B→H和链路H→B后获得最短环形链路。Delete link B→H in the shortest path P1 (A→B→H→I→J), and delete the link in the shortest path P2 (A→F→G→H→B→C→D→E→J) H→B, Figure 4-8 shows the shortest ring link obtained after deleting link B→H and link H→B.
步骤S370,根据最短路径P1和最短路径P2中的剩余节点链路,确定工 作路由和保护路由。Step S370, determining the work according to the remaining node links in the shortest path P1 and the shortest path P2. Route and protect routes.
最短路径P1和最短路径P2中的剩余节点链路可以组成最短环形链路A-B-C-D-E-F-G-H-I-J,该最短环形链路可以包括两条路径,分别为:A→B→C→D→E→J、A→F→G→H→I→J。可以根据为每条节点链路设置的初始权值,确定每条路径中节点链路的权值之和,将权值之和最小的路径作为工作路由,将权值之和第二小的路径作为保护路由。如果两条路径的权值相同,则可以随机选择一条路径作为工作路径,另一条作为保护路径;或者选择链路质量最好的路径作为工作路径,另一条作为保护路径。The remaining node links in the shortest path P1 and the shortest path P2 may constitute the shortest ring link ABCDEFGHIJ, and the shortest ring link may include two paths: A→B→C→D→E→J, A→F →G→H→I→J. The sum of the weights of the node links in each path may be determined according to the initial weight set for each node link, and the path with the smallest sum of weights is used as the working route, and the sum of the weights is the second smallest path. As a protection route. If the weights of the two paths are the same, one path can be randomly selected as the working path, and the other is used as the protection path; or the path with the best link quality is selected as the working path, and the other is used as the protection path.
例如:路径A→B→C→D→E→J的权值之和为5,路径A→F→G→H→I→J的权值之和同样为5,确定路径A→B→C→D→E→J和路径A→F→G→H→I→J的丢包率,将丢包率小的链路作为工作链路,另一条链路作为保护路径。For example, the sum of the weights of the path A→B→C→D→E→J is 5, and the sum of the weights of the path A→F→G→H→I→J is also 5, and the path A→B→C is determined. →D→E→J and path A→F→G→H→I→J packet loss rate, the link with a small packet loss rate is used as the working link, and the other link is used as the protection path.
步骤S380,根据确定出的工作路由和保护路由的结果,建立路由。Step S380, establishing a route according to the determined result of the working route and the protection route.
下面根据图5~图11给出一个可选的第四实施例,来对本公开的路由建立过程进行描述。An optional fourth embodiment will be described below with reference to FIGS. 5-11 to describe the route establishment process of the present disclosure.
如图5所示,建立网络拓扑(例如,可以按照物理拓扑结构,建立网络拓扑),在该网络拓扑中可以包括节点1~节点21,指定节点12可以为源节点,节点9可以为宿节点(目的节点),并可以设置每条节点链路的初始权值为1。As shown in FIG. 5, a network topology is established (for example, a network topology may be established according to a physical topology), and nodes 1 to 21 may be included in the network topology, the designated node 12 may be a source node, and the node 9 may be a sink node. (destination node), and you can set the initial weight of each node link to 1.
如图6所示,可以调用预设的Dijkstra算法,确定从节点12到节点9的最短路径P1为节点12→节点10→节点11→节点9。As shown in FIG. 6, the preset Dijkstra algorithm can be called to determine that the shortest path P1 from node 12 to node 9 is node 12 → node 10 → node 11 → node 9.
如图7所示,可以将最短路径P1经过的节点链路禁用,当然只在最短路径P1方向上禁用,形成新的网络拓扑,并确定新的网络拓扑中每条节点链路的权值。图7中的节点链路上的数字为该节点链路的权值,权值的确定过程可以参考上述的第三实施例。As shown in FIG. 7, the node link through which the shortest path P1 passes can be disabled, of course, only in the direction of the shortest path P1, forming a new network topology, and determining the weight of each node link in the new network topology. The number on the node link in FIG. 7 is the weight of the link of the node, and the process of determining the weight can refer to the third embodiment described above.
根据图8所示,可以根据新的网络拓扑,调用预设的Dijkstra算法,确定从节点12到节点9的最短路径P2为节点12→节点14→节点11→节点10→ 节点7→节点9。According to FIG. 8, the preset Dijkstra algorithm can be called according to the new network topology, and the shortest path P2 from the node 12 to the node 9 is determined to be the node 12→the node 14→the node 11→the node 10→ Node 7 → Node 9.
根据图9所示,可以启用最短路径P1,将最短路径P1和最短路径P2放在一起,在最短路径P1和最短路径P2中,去掉最短路径P1和最短路径P2重合的节点链路(节点10-节点11),最短路径P1和最短路径P2中剩余的节点链路形成最短环形链路。According to FIG. 9, the shortest path P1 can be enabled, and the shortest path P1 and the shortest path P2 can be put together. In the shortest path P1 and the shortest path P2, the node link in which the shortest path P1 and the shortest path P2 coincide is removed (node 10) - Node 11), the remaining node links in the shortest path P1 and the shortest path P2 form the shortest ring link.
根据图10所示,最短环形链路可以包括:节点12-节点14-节点11-节点9-节点7-节点10。According to FIG. 10, the shortest ring link may include: node 12 - node 14 - node 11 - node 9 - node 7 - node 10.
根据图11所示,可以禁用除了最短环形链路之外的其他节点链路,调用预设的Dijkstra算法,利用每条节点链路的初始权值,确定从节点12到节点9的最短路径作为工作路由,将工作路由对应的每条节点链路均禁用,再次调用预设的Dijkstra算法,确定从节点12到节点9的最短路径作为保护路由。确定完毕,启用网络拓扑中的所有节点链路。According to FIG. 11, the node links other than the shortest ring link can be disabled, the preset Dijkstra algorithm is called, and the shortest path from the node 12 to the node 9 is determined by using the initial weight of each node link. The work route disables each link of the node corresponding to the work route, and calls the preset Dijkstra algorithm again to determine the shortest path from the node 12 to the node 9 as the protection route. Once determined, enable all node links in the network topology.
在本实施例中,从节点12到节点9的两条路径分别为节点12→节点10→节点7→节点9,以及节点12→节点14→节点11→节点9,两条路径的权值之和都为3,因此选择链路质量最好的路径作为工作路由,另一条为保护路由。In this embodiment, the two paths from the node 12 to the node 9 are node 12 → node 10 → node 7 → node 9, respectively, and node 12 → node 14 → node 11 → node 9, the weight of the two paths The sum is 3, so the path with the best link quality is selected as the working route, and the other is the protection route.
本公开第五实施例提供一种路由建立装置。如图12所示,为根据本公开第五实施例的路由建立装置的结构图。A fifth embodiment of the present disclosure provides a route establishing apparatus. As shown in FIG. 12, it is a structural diagram of a route establishing apparatus according to a fifth embodiment of the present disclosure.
该装置可以包括:The device can include:
确定模块1210,设置为:在网络拓扑中,确定包含源节点和目的节点的最短环形链路,并且在所述最短环形链路中,确定从所述源节点到所述目的节点的两条路径。The determining module 1210 is configured to: determine, in the network topology, a shortest ring link including the source node and the destination node, and in the shortest ring link, determine two paths from the source node to the destination node .
建立模块1220,设置为:根据其中一条路径建立所述源节点和所述目的节点的工作路由,根据另一条路径建立所述源节点和所述目的节点的保护路由。The establishing module 1220 is configured to: establish a working route of the source node and the destination node according to one path, and establish a protection route of the source node and the destination node according to another path.
可选地,确定模块1210是设置为:确定从源节点到目的节点的第一最短路径;在所述网络拓扑中禁用所述第一最短路径;根据禁用所述第一最短路径之后的网络拓扑,确定从所述源节点到所述目的节点的第二最短路径;在 所述第一最短路径和所述第二最短路径中,删除所述第一最短路径和所述第二最短路径共同经过的节点链路,形成最短环形链路。Optionally, the determining module 1210 is configured to: determine a first shortest path from the source node to the destination node; disable the first shortest path in the network topology; according to the network topology after the first shortest path is disabled Determining a second shortest path from the source node to the destination node; In the first shortest path and the second shortest path, the node link through which the first shortest path and the second shortest path pass together is deleted to form a shortest ring link.
可选地,确定模块1210还设置为:确定从所述源节点到所述目的节点的所有路径;根据预先为网络拓扑中多条节点链路中每条节点链路设置的初始权值,确定每条所述路径经过的节点链路的权值之和,并将权值之和最小值对应的路径作为第一最短路径。Optionally, the determining module 1210 is further configured to: determine all paths from the source node to the destination node; determine according to an initial weight set in advance for each node link of the multiple node links in the network topology. The sum of the weights of the node links through which each of the paths passes, and the path corresponding to the sum of the weights as the first shortest path.
可选地,确定模块1210还设置为:根据预先为网络拓扑中的多条节点链路中每条节点链路设置的初始权值,以及所述源节点到每个节点的最短路径距离,修改网络拓扑中的多条节点链路中每条节点链路的权值;在禁用所述第一最短路径之后的网络拓扑中,确定从所述源节点到所述目的节点的所有路径;根据修改后的所述多条节点链路中每条节点链路的权值,确定每条所述路径经过的节点链路的权值之和,并将权值之和最小值对应的路径作为第二最短路径。Optionally, the determining module 1210 is further configured to modify according to an initial weight set in advance for each node link of the plurality of node links in the network topology, and a shortest path distance from the source node to each node. a weight of each of the plurality of node links in the network topology; in the network topology after the first shortest path is disabled, determining all paths from the source node to the destination node; The weight of each of the plurality of node links in the subsequent plurality of node links, determining the sum of the weights of the node links through which each of the paths passes, and using the path corresponding to the sum of the weights as the second The shortest path.
可选地,建立模块1220是设置为:根据预先为网络拓扑中的多条节点链路中每条节点链路设置的初始权值,确定所述其中一条路径经过的节点链路的权值之和,以及确定所述另一条路径经过的节点链路的权值之和;根据较小的权值之和对应的路径,建立所述源节点和所述目的节点的工作路由,根据较大的权值之和对应的路径,建立所述源节点和所述目的节点的保护路由。Optionally, the establishing module 1220 is configured to: determine, according to an initial weight set in advance for each node link of the multiple node links in the network topology, a weight of the node link through which the one path passes And determining a sum of weights of the node links through which the another path passes; establishing a working route of the source node and the destination node according to the path corresponding to the sum of the smaller weights, according to a larger A path corresponding to the sum of the weights establishes a protection route of the source node and the destination node.
可选地,确定模块1210,是设置为:利用预设的Dijkstra算法,确定包含源节点和目的节点的最短环形链路。Optionally, the determining module 1210 is configured to: determine, by using a preset Dijkstra algorithm, a shortest ring link including the source node and the destination node.
本实施例所述的装置的功能已经在图1~图11所示的方法实施例中进行了描述,故本实施例的描述中未详尽之处,可以参见前述实施例中的相关说明,在此不做赘述。The functions of the device in this embodiment have been described in the method embodiments shown in FIG. 1 to FIG. 11. Therefore, in the description of the present embodiment, reference may be made to the related description in the foregoing embodiment. This will not be repeated.
本公开实施例还提供了一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被执行时实现上述路由建立方法。Embodiments of the present disclosure also provide a computer readable storage medium storing computer executable instructions that, when executed, implement the routing establishment method described above.
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或 者一个功能或步骤可以由若干物理组件合作执行。某些组件或所有组件可以被实施为由处理器,如数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于随机存取存储器(RAM,Random Access Memory)、只读存储器(ROM,Read-Only Memory)、电可擦除只读存储器(EEPROM,Electrically Erasable Programmable Read-only Memory)、闪存或其他存储器技术、光盘只读存储器(CD-ROM,Compact Disc Read-Only Memory)、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。Those of ordinary skill in the art will appreciate that all or some of the steps, systems, and functional blocks/units of the methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or A function or step can be performed cooperatively by several physical components. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer readable medium, which may include computer storage media (or non-transitory media) and communication media (or transitory media). As is well known to those of ordinary skill in the art, the term computer storage medium includes volatile and nonvolatile, implemented in any method or technology for storing information, such as computer readable instructions, data structures, program modules or other data. Sex, removable and non-removable media. Computer storage media include, but are not limited to, Random Access Memory (RAM), Read-Only Memory (ROM), and Electrically Erasable Programmable Read-only Memory (EEPROM). Flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cassette, magnetic tape, disk storage or other magnetic storage device, or Any other medium used to store the desired information and that can be accessed by the computer. Moreover, it is well known to those skilled in the art that communication media typically includes computer readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave or other transport mechanism, and can include any information delivery media. .
本领域的普通技术人员可以理解,可以对本公开的技术方案进行修改或者等同替换,而不脱离本公开技术方案的精神和范围,均应涵盖在本公开的权利要求范围当中。A person skilled in the art can understand that the technical solutions of the present disclosure may be modified or equivalent, without departing from the spirit and scope of the present disclosure, and should be included in the scope of the claims of the present disclosure.
工业实用性Industrial applicability
本公开确定包含源节点和目的节点的最短的环形链路,通过该环形链路确定工作路由和保护路由。因为该环形链路为一个环形,所以最终确定的工作路由和保护路由是分离的两条互相不依赖的路由,也正是因为该环形链路为包含源节点和目的节点的最短的环形链路,所以确定的工作路由和保护路由是最优的工作路由和保护路由。通过本公开降低了确定工作路由和保护路由的复杂度,缩短了确定耗时,可以高效地找到工作路由及其保护路由,同时结果为最优选路,进而可以在实际工程中,为寻路问题提供高效、便捷、优质的解决方案。 The present disclosure determines the shortest ring link including the source node and the destination node through which the working and protection routes are determined. Since the ring link is a ring, the final determined work route and protection route are separate two independent routes, and it is because the ring link is the shortest ring link including the source node and the destination node. Therefore, the determined work route and protection route are the optimal work route and protection route. The disclosure reduces the complexity of determining the working route and the protection route, shortens the time-consuming determination, and can efficiently find the working route and the protection route thereof, and the result is the most preferable way, and thus can be a path-finding problem in actual engineering. Provide efficient, convenient and quality solutions.

Claims (13)

  1. 一种路由建立方法,包括:A route establishment method includes:
    在网络拓扑中,确定包含源节点和目的节点的最短环形链路;In the network topology, determine the shortest ring link including the source node and the destination node;
    在所述最短环形链路中,确定从所述源节点到所述目的节点的两条路径;Determining, in the shortest ring link, two paths from the source node to the destination node;
    根据其中一条路径建立所述源节点和所述目的节点的工作路由,根据另一条路径建立所述源节点和所述目的节点的保护路由。Establishing a working route of the source node and the destination node according to one path, and establishing a protection route of the source node and the destination node according to another path.
  2. 如权利要求1所述的方法,其中,所述确定包含源节点和目的节点的最短环形链路,包括:The method of claim 1 wherein said determining a shortest ring link comprising a source node and a destination node comprises:
    确定从源节点到目的节点的第一最短路径;Determining a first shortest path from the source node to the destination node;
    在所述网络拓扑中禁用所述第一最短路径;Disabling the first shortest path in the network topology;
    根据禁用所述第一最短路径之后的网络拓扑,确定从所述源节点到所述目的节点的第二最短路径;Determining a second shortest path from the source node to the destination node according to a network topology after the first shortest path is disabled;
    在所述第一最短路径和所述第二最短路径中,删除所述第一最短路径和所述第二最短路径共同经过的节点链路,形成最短环形链路。In the first shortest path and the second shortest path, the node link through which the first shortest path and the second shortest path pass together is deleted to form a shortest ring link.
  3. 如权利要求2所述的方法,其中,所述确定从源节点到目的节点的第一最短路径,包括:The method of claim 2 wherein said determining a first shortest path from a source node to a destination node comprises:
    确定从所述源节点到所述目的节点的所有路径;Determining all paths from the source node to the destination node;
    根据预先为网络拓扑中多条节点链路中每条节点链路设置的初始权值,确定每条所述路径经过的节点链路的权值之和,并将权值之和最小值对应的路径作为第一最短路径。Determining, according to an initial weight set in advance for each node link of the plurality of node links in the network topology, a sum of weights of the node links through which each of the paths passes, and corresponding to the sum of the weights The path is the first shortest path.
  4. 如权利要求3所述的方法,其中,所述根据禁用所述第一最短路径之后的网络拓扑,确定从所述源节点到所述目的节点的第二最短路径,包括:The method of claim 3, wherein the determining a second shortest path from the source node to the destination node according to a network topology after disabling the first shortest path comprises:
    根据预先为网络拓扑中的多条节点链路中每条节点链路设置的初始权值,以及所述源节点到每个节点的最短路径距离,修改网络拓扑中的多条节点链路中每条节点链路的权值;Modifying each of the plurality of node links in the network topology according to an initial weight set in advance for each of the plurality of node links in the network topology, and a shortest path distance from the source node to each node The weight of the link of the node;
    在禁用所述第一最短路径之后的网络拓扑中,确定从所述源节点到所述目的节点的所有路径; Determining all paths from the source node to the destination node in a network topology after disabling the first shortest path;
    根据修改后的所述多条节点链路中每条节点链路的权值,确定每条所述路径经过的节点链路的权值之和,并将权值之和最小值对应的路径作为第二最短路径。Determining, according to the weight of each of the plurality of node links in the modified plurality of node links, a sum of weights of the node links through which each of the paths passes, and using a path corresponding to the sum of the weights as a minimum value The second shortest path.
  5. 如权利要求1所述的方法,其中,所述根据其中一条路径建立所述源节点和所述目的节点的工作路由,根据另一条路径建立所述源节点和所述目的节点的保护路由,包括:The method of claim 1, wherein the establishing a working route of the source node and the destination node according to one of the paths, establishing a protection route of the source node and the destination node according to another path, including :
    根据预先为网络拓扑中的多条节点链路中每条节点链路设置的初始权值,确定所述其中一条路径经过的节点链路的权值之和,以及确定所述另一条路径经过的节点链路的权值之和;Determining, according to an initial weight set in advance for each node link of the plurality of node links in the network topology, a sum of weights of the node links through which the one path passes, and determining that the other path passes The sum of the weights of the node links;
    根据较小的权值之和对应的路径,建立所述源节点和所述目的节点的工作路由,根据较大的权值之和对应的路径,建立所述源节点和所述目的节点的保护路由。Establishing, according to the path corresponding to the sum of the smaller weights, the working route of the source node and the destination node, and establishing the protection of the source node and the destination node according to the path corresponding to the sum of the larger weights routing.
  6. 如权利要求1至5中任一项所述的方法,其中,所述确定包含源节点和目的节点的最短环形链路,包括:The method of any of claims 1 to 5, wherein the determining the shortest ring link comprising the source node and the destination node comprises:
    利用预设的Dijkstra算法,确定包含源节点和目的节点的最短环形链路。The shortest ring link containing the source node and the destination node is determined using the preset Dijkstra algorithm.
  7. 一种路由建立装置,包括:A route establishing device includes:
    确定模块,设置为:在网络拓扑中,确定包含源节点和目的节点的最短环形链路;并且,在所述最短环形链路中,确定从所述源节点到所述目的节点的两条路径;Determining a module, configured to: determine, in a network topology, a shortest ring link including a source node and a destination node; and, in the shortest ring link, determine two paths from the source node to the destination node ;
    建立模块,设置为:根据其中一条路径建立所述源节点和所述目的节点的工作路由,根据另一条路径建立所述源节点和所述目的节点的保护路由。And establishing a module, configured to: establish a working route of the source node and the destination node according to one path, and establish a protection route of the source node and the destination node according to another path.
  8. 如权利要求7所述的装置,其中,所述确定模块是设置为:The apparatus of claim 7 wherein said determining module is configured to:
    确定从源节点到目的节点的第一最短路径;Determining a first shortest path from the source node to the destination node;
    在所述网络拓扑中禁用所述第一最短路径;Disabling the first shortest path in the network topology;
    根据禁用所述第一最短路径之后的网络拓扑,确定从所述源节点到所述目的节点的第二最短路径;Determining a second shortest path from the source node to the destination node according to a network topology after the first shortest path is disabled;
    在所述第一最短路径和所述第二最短路径中,删除所述第一最短路径和 所述第二最短路径共同经过的节点链路,形成最短环形链路。Deleting the first shortest path and the first shortest path and the second shortest path The node links through which the second shortest path passes together form a shortest ring link.
  9. 如权利要求8所述的装置,所述确定模块还设置为:The apparatus of claim 8 wherein said determining module is further configured to:
    确定从所述源节点到所述目的节点的所有路径;Determining all paths from the source node to the destination node;
    根据预先为网络拓扑中多条节点链路中每条节点链路设置的初始权值,确定每条所述路径经过的节点链路的权值之和,并将权值之和最小值对应的路径作为第一最短路径。Determining, according to an initial weight set in advance for each node link of the plurality of node links in the network topology, a sum of weights of the node links through which each of the paths passes, and corresponding to the sum of the weights The path is the first shortest path.
  10. 如权利要求9所述的装置,所述确定模块还设置为:The apparatus of claim 9, the determining module further configured to:
    根据预先为网络拓扑中的多条节点链路中每条节点链路设置的初始权值,以及所述源节点到每个节点的最短路径距离,修改网络拓扑中的多条节点链路中每条节点链路的权值;Modifying each of the plurality of node links in the network topology according to an initial weight set in advance for each of the plurality of node links in the network topology, and a shortest path distance from the source node to each node The weight of the link of the node;
    在禁用所述第一最短路径之后的网络拓扑中,确定从所述源节点到所述目的节点的所有路径;Determining all paths from the source node to the destination node in a network topology after disabling the first shortest path;
    根据修改后的所述多条节点链路中每条节点链路的权值,确定每条所述路径经过的节点链路的权值之和,并将权值之和最小值对应的路径作为第二最短路径。Determining, according to the weight of each of the plurality of node links in the modified plurality of node links, a sum of weights of the node links through which each of the paths passes, and using a path corresponding to the sum of the weights as a minimum value The second shortest path.
  11. 如权利要求7所述的装置,其中,所述建立模块是设置为:The apparatus of claim 7 wherein said establishing module is configured to:
    根据预先为网络拓扑中的多条节点链路中每条节点链路设置的初始权值,确定所述其中一条路径经过的节点链路的权值之和,以及确定所述另一条路径经过的节点链路的权值之和;Determining, according to an initial weight set in advance for each node link of the plurality of node links in the network topology, a sum of weights of the node links through which the one path passes, and determining that the other path passes The sum of the weights of the node links;
    根据较小的权值之和对应的路径,建立所述源节点和所述目的节点的工作路由,根据较大的权值之和对应的路径,建立所述源节点和所述目的节点的保护路由。Establishing, according to the path corresponding to the sum of the smaller weights, the working route of the source node and the destination node, and establishing the protection of the source node and the destination node according to the path corresponding to the sum of the larger weights routing.
  12. 如权利要求7至11中任一项所述的装置,其中,所述确定模块,是设置为:利用预设的Dijkstra算法,确定包含源节点和目的节点的最短环形链路。The apparatus according to any one of claims 7 to 11, wherein the determining module is configured to determine a shortest ring link including a source node and a destination node by using a preset Dijkstra algorithm.
  13. 一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被执行时实现如权利要求1至6中任一权利要求所述的路由建立方法。 A computer readable storage medium storing computer executable instructions that, when executed, implement the route establishment method of any one of claims 1 to 6.
PCT/CN2017/115272 2016-12-08 2017-12-08 Route establishment method and device WO2018103738A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611118980.0 2016-12-08
CN201611118980.0A CN108183856B (en) 2016-12-08 2016-12-08 Route establishing method and device

Publications (1)

Publication Number Publication Date
WO2018103738A1 true WO2018103738A1 (en) 2018-06-14

Family

ID=62490745

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/115272 WO2018103738A1 (en) 2016-12-08 2017-12-08 Route establishment method and device

Country Status (2)

Country Link
CN (1) CN108183856B (en)
WO (1) WO2018103738A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114039869A (en) * 2021-11-09 2022-02-11 广东稳峰电力科技有限公司 Establishment method of secondary equipment node model, communication management method and device
WO2024066627A1 (en) * 2022-09-29 2024-04-04 中兴通讯股份有限公司 Routing link planning method and apparatus for data multiplexing

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109218213B (en) * 2018-09-25 2022-09-16 中国银联股份有限公司 Flow regulation and control method and device
CN109361596B (en) * 2018-10-26 2021-07-06 新华三技术有限公司合肥分公司 Route calculation method and device and electronic equipment
CN110620723B (en) * 2019-07-01 2022-08-30 南京邮电大学 Stateless unicast protection method based on routing facet relay node
CN110535763B (en) * 2019-07-10 2021-12-14 中移(杭州)信息技术有限公司 Route backup method, device, server and readable storage medium
CN114125982B (en) * 2021-11-10 2023-12-01 浙江大学 Ring directional routing method for unmanned system self-organizing network and storage medium
CN116566886B (en) * 2023-07-11 2023-09-26 南京邮电大学 Stateless unicast protection routing method based on biplane

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1825820A (en) * 2005-02-22 2006-08-30 华为技术有限公司 Method of path selecting in intelligent optical network
CN102447686A (en) * 2010-10-15 2012-05-09 薛鹰 Routing protocol of AODV (Ad hoc On-Demand Distance Vector Routing) application
CN103260211A (en) * 2013-04-27 2013-08-21 北京交通大学 Improved AOMDV routing method
CN104320334A (en) * 2014-11-03 2015-01-28 电子科技大学 Centralized routing algorithm in wireless Mesh network
US20150036507A1 (en) * 2012-02-10 2015-02-05 Cisco Technology, Inc. Recursive load balancing in a loop-free routing topology using routing arcs

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7869348B2 (en) * 2006-04-10 2011-01-11 Polytechnic Institute Of New York University Determining rerouting information for single-link failure recovery in an Internet protocol network
CN101184342B (en) * 2007-12-19 2010-12-29 中兴通讯股份有限公司 Method of establishing service on optical multiplex layer
CN101360053A (en) * 2008-09-08 2009-02-04 华南理工大学 Route interference impact metering method based on information entropy
CN101645850B (en) * 2009-09-25 2013-01-30 杭州华三通信技术有限公司 Forwarding route determining method and equipment
JP5644609B2 (en) * 2011-03-18 2014-12-24 富士通株式会社 Wiring design support apparatus, wiring design support method, and program
US8654652B2 (en) * 2011-05-30 2014-02-18 Hewlett-Packard Development Company, L.P. System for managing the size of a hardware routing table
US9253077B2 (en) * 2012-11-30 2016-02-02 International Business Machines Corporation Parallel top-K simple shortest paths discovery
CN103873363B (en) * 2014-03-24 2017-04-05 华北电力大学(保定) A kind of double route collocation method of power optical fiber communication network service
CN105227461B (en) * 2014-06-26 2020-03-10 中兴通讯股份有限公司 Method for acquiring cross-domain separation path and path calculation unit
CN104917820B (en) * 2015-05-04 2018-07-24 宁波三星智能电气有限公司 A kind of data transmission method based on the wireless interconnected interworking technology of micropower

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1825820A (en) * 2005-02-22 2006-08-30 华为技术有限公司 Method of path selecting in intelligent optical network
CN102447686A (en) * 2010-10-15 2012-05-09 薛鹰 Routing protocol of AODV (Ad hoc On-Demand Distance Vector Routing) application
US20150036507A1 (en) * 2012-02-10 2015-02-05 Cisco Technology, Inc. Recursive load balancing in a loop-free routing topology using routing arcs
CN103260211A (en) * 2013-04-27 2013-08-21 北京交通大学 Improved AOMDV routing method
CN104320334A (en) * 2014-11-03 2015-01-28 电子科技大学 Centralized routing algorithm in wireless Mesh network

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114039869A (en) * 2021-11-09 2022-02-11 广东稳峰电力科技有限公司 Establishment method of secondary equipment node model, communication management method and device
WO2024066627A1 (en) * 2022-09-29 2024-04-04 中兴通讯股份有限公司 Routing link planning method and apparatus for data multiplexing

Also Published As

Publication number Publication date
CN108183856B (en) 2021-10-15
CN108183856A (en) 2018-06-19

Similar Documents

Publication Publication Date Title
WO2018103738A1 (en) Route establishment method and device
WO2018103737A1 (en) Method and device for establishing route
US10135716B2 (en) Latency optimized segment routing tunnels
US9602387B2 (en) Network topology optimization
US8144626B2 (en) Determining disjoint paths with an optimized number of regenerators
US7990877B2 (en) Method and apparatus for dynamically runtime adjustable path computation
US10404576B2 (en) Constrained shortest path determination in a network
US8467315B2 (en) Method and apparatus for implementing K-shortest paths algorithm in the case of existing multiple edges between adjacent nodes
JP2013510459A (en) Separate path computation algorithm
WO2016070670A1 (en) Method and device for calculating cross-domain path
CN110971521B (en) Routing path calculation method, system, device and computer readable storage medium
WO2016078332A1 (en) Point to multiple point multicast traffic engineering tunnel system and path selection method and apparatus therefor
CN105227461B (en) Method for acquiring cross-domain separation path and path calculation unit
CN101909004A (en) Multi-domain optical network routing method based on edge ROADM (Reconfigurable Optical Add-Drop Multiplexer) ring structure
CN108667751B (en) Method and device for announcing time delay information
WO2016078363A1 (en) Methods and apparatuses for sending and receiving tunnel constraint information
WO2016058299A1 (en) Path computation method, tunnel establishment method, pcc, pce, path computation system and storage medium
JP2007243480A (en) Device and method for path accommodation calculation, and program
WO2016177136A1 (en) Method and device for implementing link state advertisement processing
CN108429688B (en) Single-node fault route protection method based on segment route
WO2018219298A1 (en) Method and device for processing failure of path computation requested by path computation client (pcc)
JP4128944B2 (en) Multicast transfer route setting method, multicast transfer route calculation device, program, and recording medium
US10992573B2 (en) Multi-layer LSP control method and apparatus
CN103023780A (en) Method and device for routing computation
WO2016095610A1 (en) Method and system for restoring optical layer service

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: 17878172

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17878172

Country of ref document: EP

Kind code of ref document: A1