Network message path planning method, device, medium and computer program product

By using the shortest path priority algorithm to plan the main path and backup path in the network topology, the problem of low computing efficiency and high complexity of the backup path in Ti-LFA has achieved a more efficient calculation process.

CN118869574BActive Publication Date: 2025-01-24INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411347915.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2025-01-24
Estimated Expiration
2044-09-26

AI Technical Summary

Technical Problem

The local protection method of TI-LFA has low computational efficiency and high computational complexity.

Method used

By obtaining the network topology map, the shortest path priority algorithm is used to plan the main path and backup path to reduce the computing complexity and improve the calculation efficiency.

Benefits of technology

The calculation efficiency of improving the backup path, reducing the complexity of calculation, and reducing the number of execution of the shortest path priority algorithm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118869574B_ABST
    Figure CN118869574B_ABST
Patent Text Reader

Abstract

The present application discloses a network message path planning method, device, medium and computer program product, which relates to the field of communication technology. The method comprises: obtaining a network topology map, determining a starting node and a destination node in the network topology map; using the shortest path first algorithm to plan a main path from the starting node to the destination node based on the network topology map; determining a protection node in the main path, deleting the protection node and the path through which the protection node passes from the network topology map, and obtaining a node protection network topology map; using the shortest path first algorithm to plan a first backup path from the starting node to the destination node based on the node protection network topology map; wherein, when the protection node is in a normal state, the network message is transmitted from the starting node to the destination node through the main path, and when the protection node is in a faulty state, the network message is transmitted from the starting node to the destination node through the first backup path. The present application improves the calculation efficiency of the backup path and reduces the calculation complexity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and more specifically, to a network message path planning method, device, medium and computer program product. Background Art

[0002] The core idea of ​​SR (Segment Routing) technology is to cut the message forwarding path into different segments and insert segment information into the message at the starting point of the path. The intermediate nodes only need to forward according to the segment information carried in the message. SRv6 (Segment Routing v6, segment routing based on IPv6 forwarding plane) is a protocol designed based on the source routing concept to forward data packets on the network. FRR (Fast Reroute) aims to provide backup protection for these important nodes or links when the links or nodes in the network fail, realize fast rerouting, reduce the impact of link or node failure on traffic, and enable rapid recovery of traffic. TI-LFA (Topology-Independent Loop-free Alternate) is a commonly used FRR local protection technology for SRv6. It mainly uses the source routing mechanism of SR, so that the source node can specify an explicit path without passing through the faulty link. TI-LFA uses an algorithm for calculating PQ nodes. The basic principle is to find an intermediate node that will not pass through the faulty node, that is, the PQ node. However, the local protection mode of TI-LFA has low computational efficiency and high computational complexity for the backup path.

[0003] Therefore, how to improve the calculation efficiency of the backup path and reduce the calculation complexity is a technical problem that those skilled in the art need to solve. Summary of the invention

[0004] The purpose of the present application is to provide a network message path planning method, device, medium and computer program product, which improves the calculation efficiency of the backup path and reduces the calculation complexity.

[0005] To achieve the above objectives, the present application provides a network message path planning method, comprising:

[0006] Obtain a network topology map, and determine a start node and a destination node in the network topology map;

[0007] Planning a main path from the starting node to the destination node based on the network topology graph using the shortest path first algorithm;

[0008] Determine a protection node in the main path, delete the protection node and the path through which the protection node passes from the network topology map, and obtain a node protection network topology map;

[0009] Planning a first backup path from the starting node to the destination node based on the node protection network topology graph using the shortest path first algorithm;

[0010] When the protection node is in a normal state, the network message is transmitted from the starting node to the destination node through the main path; when the protection node is in a faulty state, the network message is transmitted from the starting node to the destination node through the first backup path.

[0011] Wherein, planning the main path from the starting node to the destination node based on the network topology graph using the shortest path first algorithm includes:

[0012] Determine the starting node as the current node;

[0013] Traversing all neighbor nodes of the current node in the network topology graph, and determining candidate branches from the current node to the traversed current neighbor nodes;

[0014] Determine whether the candidate branch exists in the path list;

[0015] If the candidate branch exists in the path list, continue to traverse the next neighbor node;

[0016] If the candidate branch does not exist in the path list, determining whether there are other branches from the current node to the current neighbor node in the branch list;

[0017] If there are other branches from the current node to the current neighbor node in the branch list, determining whether the metric value of the candidate branch is less than the metric value of the other branches;

[0018] If the metric value of the candidate branch is less than the metric value of the other branch, then updating the other branch in the branch list to the candidate branch;

[0019] If there are no other branches from the current node to the current neighbor node in the branch list, adding the candidate branch to the branch list;

[0020] Move the target branch with the smallest metric value in the branch list to the path list, determine the last node of the target branch as the current node, and re-enter the step of sequentially traversing all neighbor nodes of the current node in the network topology graph;

[0021] Determine whether the branch list is empty; if so, determine the main path from the starting node to the destination node according to the path list; if not, re-enter the step of moving the target branch with the smallest metric value in the branch list to the path list.

[0022] Wherein, determining the protection node in the primary path includes:

[0023] The next node of the starting node in the main path is determined as a protection node.

[0024] Wherein, after planning the first backup path from the starting node to the destination node based on the node protection network topology map using the shortest path first algorithm, it also includes:

[0025] A first node identifier list corresponding to the first backup path is generated according to the node identifiers of all nodes that the first backup path passes through.

[0026] After generating the first node identifier list corresponding to the first backup path according to the node identifiers of all nodes passed by the first backup path, the method further includes:

[0027] In the process of transmitting the network message from the starting node to the destination node through the first backup path, the first node identification list is added to the segment routing header of the network message.

[0028] Among them, it also includes:

[0029] In the process of transmitting a network message from the starting node to the destination node through the first backup path, when the network message reaches the intermediate node, the node identifier of the next node of the intermediate node is determined according to the first node identifier list, and the node identifier of the next node of the intermediate node is added to the segment routing header of the network message.

[0030] Among them, it also includes:

[0031] Determine a protection link in the primary path, and delete the protection link from the network topology map to obtain a link protection network topology map;

[0032] Planning a second backup path from the starting node to the destination node based on the link protection network topology graph using a shortest path first algorithm;

[0033] When the protection link is in a normal state, the network message is transmitted from the starting node to the destination node through the primary path; when the protection link is in a faulty state, the network message is transmitted from the starting node to the destination node through the second backup path.

[0034] Wherein, determining a protection link in the primary path includes:

[0035] A protection link is determined according to the link through which the protection node passes.

[0036] The step of determining the protection link according to the link through which the protection node passes includes:

[0037] If the protection node is the next node of the start node in the primary path, the link between the start node and the protection node is determined as a protection link.

[0038] Wherein, after planning the second backup path from the starting node to the destination node based on the link protection network topology graph using the shortest path first algorithm, it also includes:

[0039] A second node identifier list corresponding to the second backup path is generated according to the node identifiers of all nodes that the second backup path passes through.

[0040] After generating the second node identifier list corresponding to the second backup path according to the node identifiers of all nodes passed by the second backup path, the method further includes:

[0041] In the process of transmitting the network message from the starting node to the destination node through the second backup path, the second node identification list is added to the segment routing header of the network message.

[0042] Among them, it also includes:

[0043] In the process of transmitting a network message from the starting node to the destination node through the second backup path, when the network message reaches the intermediate node, the node identifier of the next node of the intermediate node is determined according to the second node identifier list, and the node identifier of the next node of the intermediate node is added to the segment routing header of the network message.

[0044] To achieve the above objectives, the present application provides a network message path planning device, comprising:

[0045] An acquisition module, used to acquire a network topology map, and determine a start node and a destination node in the network topology map;

[0046] A first planning module is used to plan a main path from the starting node to the destination node based on the network topology graph using a shortest path first algorithm;

[0047] A first determination module is used to determine a protection node in the main path, delete the protection node and the path through which the protection node passes from the network topology map, and obtain a node protection network topology map;

[0048] A second planning module is used to plan a first backup path from the starting node to the destination node based on the node protection network topology map using a shortest path first algorithm;

[0049] When the protection node is in a normal state, the network message is transmitted from the starting node to the destination node through the main path; when the protection node is in a faulty state, the network message is transmitted from the starting node to the destination node through the first backup path.

[0050] To achieve the above objectives, the present application provides an electronic device, including:

[0051] Memory for storing computer programs;

[0052] A processor is used to implement the steps of the above-mentioned network message path planning method when executing the computer program.

[0053] To achieve the above objectives, the present application provides a non-volatile storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned network message path planning method are implemented.

[0054] To achieve the above objectives, the present application provides a computer program product, including a computer program, which implements the steps of the above-mentioned network message path planning method when executed by a processor.

[0055] It can be seen from the above scheme that a network message path planning method provided by the present application includes: obtaining a network topology map, determining a starting node and a destination node in the network topology map; using a shortest path first algorithm to plan a main path from the starting node to the destination node based on the network topology map; determining a protection node in the main path, deleting the protection node and the path through which the protection node passes from the network topology map, and obtaining a node protection network topology map; using a shortest path first algorithm to plan a first backup path from the starting node to the destination node based on the node protection network topology map; wherein, when the protection node is in a normal state, the network message is transmitted from the starting node to the destination node through the main path, and when the protection node is in a faulty state, the network message is transmitted from the starting node to the destination node through the first backup path.

[0056] The network message path planning method provided by the present application only needs to execute the shortest path priority algorithm once for a protection node to calculate the first backup path corresponding to the protection node. Compared with the local protection method for calculating the PQ node, the number of executions of the shortest path priority algorithm is reduced, the calculation efficiency is improved, and the calculation complexity is reduced. The present application also discloses a network message path planning device, an electronic device, a non-volatile storage medium, and a computer program product, which can also achieve the above technical effects.

[0057] It should be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. The drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following specific implementation methods, they are used to explain the present disclosure, but do not constitute a limitation to the present disclosure. In the drawings:

[0059] Figure 1 It is a flow chart of a method for network message path planning according to an exemplary embodiment;

[0060] Figure 2 It is a flow chart of another network message path planning method according to an exemplary embodiment;

[0061] Figure 3 A schematic diagram of a network topology diagram in an application embodiment provided by the present application;

[0062] Figure 4 A schematic diagram of a node protection network topology diagram in an application embodiment provided by the present application;

[0063] Figure 5 A schematic diagram of a link protection network topology diagram in an application embodiment provided by the present application;

[0064] Figure 6 A schematic diagram of adding a node identification list to a network message in an application embodiment provided by the present application;

[0065] Figure 7 It is a structural diagram of a network message path planning device according to an exemplary embodiment;

[0066] Figure 8The figure is a structural diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0067] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application. In addition, in the embodiments of the present application, "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0068] The core idea of ​​SR (Segment Routing) technology is to divide the message forwarding path into different segments and insert segment information into the message at the starting point of the path. The intermediate nodes only need to forward the message according to the segment information carried in the message.

[0069] SRv6 (Segment Routing v6, segment routing based on IPv6 forwarding plane) is a protocol designed based on the source routing concept to forward data packets on the network. The key to SR technology is to assign a SID as an identifier to each node in the network or each path between nodes, and specify the SID set (Segment List) of the nodes and paths that the message needs to pass through at the starting node to guide the forwarding of the message. SRv6 makes full use of the easy extensibility of IPv6 and implements the SR function through a new extension header type SRH (Segment Routing Header). The SRH extension header is used to specify the forwarding path information of the message, including the number of intermediate nodes (Segments Left, SL) and the segment list (Segment List). The segment list is a list of SIDs of all nodes that the message will pass through during transmission, and the number of intermediate nodes refers to the number of nodes passed through.

[0070] SRv6 has two working modes: SRv6 BE (Segment Routing IPv6 Best Effort) and SRv6 TEpolicy (Segment Routing IPv6 Traffic Engineering Policy). SRv6 BE calculates the optimal SRv6 path based on the IGP shortest path algorithm and uses only one service SID to guide the forwarding of packets in the link. It is a best-effort working mode. It does not have traffic engineering capabilities and is generally used to carry ordinary VPN services and quickly open services. SRv6 TE Policy uses the source routing mechanism of Segment Routing to guide packets to traverse the network by encapsulating an ordered instruction list (path information) in the head node. SRv6 TE Policy is used to implement traffic engineering, improve network quality, and meet the end-to-end requirements of services. It is combined with SDN to better fit the general trend of service-driven networks and is also the main working mode of SRv6.

[0071] FRR (Fast Reroute) aims to provide backup protection for these important nodes or links when links or nodes in the network fail, achieve fast rerouting, reduce the impact of link or node failure on traffic, and enable rapid recovery of traffic. TI-LFA (Topology-Independent Loop-free Alternate) is a commonly used FRR local protection technology in SRv6. It mainly utilizes the source routing mechanism of SR, so that the source node can specify an explicit path that does not pass through the faulty link. TI-LFA uses an algorithm for calculating PQ nodes. The basic principle is to find an intermediate node that does not pass through the faulty node, that is, a PQ node. The method is as follows:

[0072] P space: The shortest path node set that takes the source node as the root and calculates to other nodes without passing through a faulty link or faulty node. The source node uses the shortest path to visit the P node without passing through a faulty link or faulty node. The set of P nodes that meet this condition is called P space.

[0073] Expand the P space: Take the next hop directly connected as the root and calculate the shortest path node set to other nodes without passing through the faulty link or faulty node.

[0074] Q space: The set of nodes with the shortest path from other nodes to the destination node that does not pass through a faulty link or a faulty node is calculated. The shortest path from a Q node to the destination node does not pass through a faulty link, and the set of Q nodes that meet this condition is called Q space.

[0075] PQ node: The PQ node of the source node to the protection link or protection node is the intersection of the members of the P space (or extended P space) and the Q space. The meaning of the PQ node is the shortest path from the source node to the PQ node, and the shortest path from the PQ node to the destination node.

[0076] If there is a PQ node, when the message reaches the S node (the previous node of the faulty node or the faulty link), you only need to add the PQ node to the SID list in the SRH header of the message to ensure that when a link or node failure occurs, the message can be forwarded to the destination address through the backup path smoothly. If there is no PQ node, the S node calculates the backup path after the topology converges, and then calculates the Repair SegmentList between the farthest P node and the nearest Q node based on this calculation result. When the message reaches the S node, you only need to add the calculated Repair Segment List to the SID list in the SRH header of the message to ensure that when a link or node failure occurs, the message can be forwarded to the destination address through the backup path smoothly.

[0077] It can be seen that for node protection, at least (N+2) complete SPF (Shortest Path First Algorithm) calculations are performed, 1 for the main path, 1 for the P space, N-1 for the extended P space, and 1 for the Q space. N is the number of directly connected neighbor nodes, and N is at least 2. For link protection, N+1 SPF calculations are added. In addition, the concepts and principles of the P space, extended P space, and Q space are complex, and the SPF algorithm needs to be modified in a relatively complex way.

[0078] Therefore, in this application, the SPF algorithm is executed once to calculate the main path, and for node protection, the SPF algorithm is executed again to calculate the first backup path, and for link protection, the SPF algorithm is executed again to calculate the second backup path, which has high computational efficiency. And only simple modifications need to be made to the original SPF algorithm, that is, to modify the network topology diagram, and the computational complexity is low.

[0079] The embodiment of the present application discloses a network message path planning method, which improves the calculation efficiency of the backup path and reduces the calculation complexity.

[0080] See also Figure 1 , according to a flowchart of a network message path planning method shown in an exemplary embodiment, such as Figure 1 As shown, including:

[0081] S101: Acquire a network topology map, and determine a start node and a destination node in the network topology map;

[0082] In the specific implementation, a network topology diagram representing the network structure is obtained, which includes all nodes in the network (such as routers, switches, etc.) and the connection relationship between them. The nodes with connection relationship must also reflect the cost in the network topology, which is used to describe the metric value of the path from one node to another. The metric value can be based on various factors, such as distance, bandwidth, delay, load, reliability, etc. Determine the starting node (the source point of data transmission) and the destination node (the end point of data transmission) in the network topology diagram.

[0083] S102: Planning a main path from the starting node to the destination node based on the network topology graph using a shortest path first algorithm;

[0084] In the specific implementation, the Shortest Path First Algorithm (SRF) calculates the optimal path from the start node to the destination node based on the network topology graph, that is, the main path with the smallest metric value.

[0085] As a feasible implementation method, the main path from the starting node to the destination node is planned based on the network topology map using the shortest path first algorithm, including: determining the starting node as the current node; traversing all neighbor nodes of the current node in the network topology map to determine the candidate branch from the current node to the traversed current neighbor node; judging whether the candidate branch exists in the path list; if the candidate branch exists in the path list, continuing to traverse the next neighbor node; if the candidate branch does not exist in the path list, judging whether there are other branches from the current node to the current neighbor node in the branch list; if there are other branches from the current node to the current neighbor node in the branch list, judging whether the metric value of the candidate branch is less than that of the other branches Metric value; if the metric value of the candidate branch is less than the metric value of the other branches, update the other branches in the branch list to the candidate branch; if there are no other branches from the current node to the current neighbor node in the branch list, add the candidate branch to the branch list; move the target branch with the smallest metric value in the branch list to the path list, and determine the last node of the target branch as the current node, and re-enter the step of traversing all neighbor nodes of the current node in the network topology graph in sequence; determine whether the branch list is empty; if so, determine the main path from the starting node to the destination node according to the path list; if not, re-enter the step of moving the target branch with the smallest metric value in the branch list to the path list.

[0086] In the specific implementation, starting from the starting node, the network topology graph is gradually explored to find the optimal path to the destination node. The current node is set as the starting node, and all neighbor nodes of the current node are traversed to determine the candidate branch for each neighbor node, that is, the path from the current node to the neighbor node. Check whether the candidate branch is already in the path list. If so, continue to traverse the next neighbor node. If the candidate branch is not in the path list, check whether there are other branches from the current node to the neighbor node in the branch list. If there are other branches in the branch list, compare the metric value of the candidate branch with the metric value of the existing branch. If the metric value of the candidate branch is smaller, replace the existing branch with it. If there is no branch from the current node to the neighbor node in the branch list, add the candidate branch to the branch list. Move the branch with the smallest metric value in the branch list to the path list, update the current node to the last node of the branch, and then repeat the traversal process. If the branch list is empty, it means that the optimal path has been found, and the main path from the starting node to the destination node is determined according to the path list. If the branch list is not empty, continue to select the branch with the smallest metric value from the branch list, update the path list, and repeat the traversal process.

[0087] S103: determining a protection node in the main path, deleting the protection node and the path through which the protection node passes from the network topology map, and obtaining a node protection network topology map;

[0088] In this step, a protection node is selected in the main path. This embodiment does not limit the method of selecting the protection node, and the node with the largest load can be selected according to the load of the node, so as to improve the reliability of the route. As a feasible implementation method, determining the protection node in the main path includes: determining the next node of the starting node in the main path as the protection node.

[0089] Then, the protection node and the path through which the protection node passes are deleted from the network topology map to obtain a node protection network topology map.

[0090] S104: planning a first backup path from the starting node to the destination node based on the node protection network topology graph using a shortest path first algorithm;

[0091] In this step, the shortest path first algorithm is executed for the node protection network topology map, and the optimal path from the starting node to the destination node is determined in the node protection network topology map, that is, the first backup path with the smallest metric value. The specific execution of the shortest path first algorithm can refer to the description of step S102, which will not be repeated here. The only difference is that the network topology map used is different.

[0092] When the protection node is in a normal state, the network message is transmitted from the starting node to the destination node through the main path. When the protection node is in a faulty state, the network message is transmitted from the starting node to the destination node through the first backup path. It can be seen that when the protection node fails, the network message can be quickly switched to the optimal first backup path, which can effectively reduce the impact of packet loss caused by the failure.

[0093] As a preferred implementation, after planning the first backup path from the starting node to the destination node based on the node protection network topology map using the shortest path first algorithm, it also includes: generating a first node identification list corresponding to the first backup path based on the node identifications of all nodes passed by the first backup path. In a specific implementation, the node identifications of the nodes are added to the first node identification list in sequence according to the order of the nodes passed by the first backup path, and based on the first node identification list, the network message can be forwarded through the first backup path.

[0094] As a feasible implementation method, after generating the first node identifier list corresponding to the first backup path based on the node identifiers of all nodes passed by the first backup path, it also includes: in the process of transmitting the network message from the starting node to the destination node through the first backup path, adding the first node identifier list to the segment routing header of the network message.

[0095] In order to avoid the risk of blocked paths after the protection node fails, measures must be taken to ensure the accessibility from the source node to the destination node. In the specific implementation, if the protection node fails, the network message is forwarded through the first backup path. At this time, the first node identifier list in the segment routing header of the network message is used to describe the first backup path. After determining that the protection node fails, the network message can be smoothly forwarded to the destination node through the first backup path.

[0096] As a feasible implementation mode, it also includes: in the process of transmitting the network message from the starting node to the destination node through the first backup path, when the network message reaches the intermediate node, the node identifier of the next node of the intermediate node is determined according to the first node identifier list, and the node identifier of the next node of the intermediate node is added to the segment routing header of the network message.

[0097] In a specific implementation, in addition to adding a first node identifier list for describing the full path of the first backup path in the segment routing header, when the node passes through each intermediate node, the node identifier of the next node in the first backup path can also be added to the segment routing header to indicate the next hop routing of the network message.

[0098] The network message path planning method provided in the embodiment of the present application only needs to execute the shortest path first algorithm once for a protection node to calculate the first backup path corresponding to the protection node. Compared with the local protection method for calculating the PQ node, the number of executions of the shortest path first algorithm is reduced, the calculation efficiency is improved, and the calculation complexity is reduced.

[0099] The embodiment of the present application discloses a network message path planning method. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution. Specifically:

[0100] See also Figure 2 , a flowchart of another network message path planning method according to an exemplary embodiment is shown, such as Figure 2 As shown, including:

[0101] S201: Acquire a network topology map, and determine a start node and a destination node in the network topology map;

[0102] S202: Plan a main path from the starting node to the destination node based on the network topology graph using a shortest path first algorithm;

[0103] S203: determining a protection node in the main path, deleting the protection node and the path through which the protection node passes from the network topology map, and obtaining a node protection network topology map;

[0104] S204: planning a first backup path from the starting node to the destination node based on the node protection network topology graph using a shortest path first algorithm;

[0105] S205: determining a protection link in the primary path, and deleting the protection link from the network topology map to obtain a link protection network topology map;

[0106] In this step, a protection link is selected in the primary path. This embodiment does not limit the method of selecting the protection link, and the link with the largest metric value can be selected according to the link metric value as the protection link to improve the reliability of the route.

[0107] As a feasible implementation, determining the protection link in the main path includes: determining the protection link according to the link passed by the protection node. In a specific implementation, the link between the protection node and the previous node can be used as the protection link, or the link between the protection node and the next node can be used as the protection link.

[0108] As a feasible implementation, the protection link is determined according to the link passed by the protection node, including: if the protection node is the next node of the starting node in the main path, the link between the starting node and the protection node is determined as the protection link.

[0109] Then, the protection link is deleted from the network topology map to obtain a link protection network topology map.

[0110] S206: Planning a second backup path from the starting node to the destination node based on the link protection network topology graph using a shortest path first algorithm;

[0111] In this step, the shortest path first algorithm is executed for the link protection network topology map to determine the optimal path from the start node to the destination node in the link protection network topology map, that is, the second backup path with the smallest metric value.

[0112] When the protection link is in a normal state, the network message is transmitted from the starting node to the destination node through the main path. When the protection link is in a faulty state, the network message is transmitted from the starting node to the destination node through the second backup path. It can be seen that when the protection link fails, the network message can be quickly switched to the optimal second backup path, which can effectively reduce the impact of packet loss caused by the failure.

[0113] As a preferred implementation, after planning the second backup path from the starting node to the destination node based on the link protection network topology map using the shortest path first algorithm, it also includes: generating a second node identification list corresponding to the second backup path based on the node identifications of all nodes passed by the second backup path. In a specific implementation, the node identifications of the nodes are added to the second node identification list in sequence according to the order of the nodes passed by the second backup path, and based on the second node identification list, the network message can be forwarded through the second backup path.

[0114] As a feasible implementation method, after generating the second node identifier list corresponding to the second backup path based on the node identifiers of all nodes passed by the second backup path, it also includes: in the process of transmitting the network message from the starting node to the destination node through the second backup path, adding the second node identifier list to the segment routing header of the network message.

[0115] In order to avoid the risk of a blocked path after a protection link failure, measures must be taken to ensure the reachability from the source node to the destination node. In a specific implementation, if the protection link fails, the network message is forwarded through the first backup path. At this time, the second node identifier list in the segment routing header of the network message is used to describe the second backup path. After determining that the protection link fails, the network message can be smoothly forwarded to the destination node through the second backup path.

[0116] As a feasible implementation mode, it also includes: in the process of transmitting the network message from the starting node to the destination node through the second backup path, when the network message reaches the intermediate node, the node identifier of the next node of the intermediate node is determined according to the second node identifier list, and the node identifier of the next node of the intermediate node is added to the segment routing header of the network message.

[0117] In a specific implementation, in addition to adding a second node identifier list for describing the full path of the second backup path in the segment routing header, when the node passes through each intermediate node, the node identifier of the next node in the second backup path can also be added to the segment routing header to indicate the next hop routing of the network message.

[0118] It can be seen that this embodiment realizes node protection and link protection. If there is only one protection node and one protection link, the path planning process of the entire network message only needs to execute the shortest path first algorithm three times, once to calculate the main path, once to calculate the first backup path for node protection, and once to calculate the second backup path for link protection, so as to realize local protection. Compared with the local protection method of calculating the PQ node, the calculation efficiency is improved and the calculation complexity is reduced.

[0119] The following describes an application embodiment provided by the present application. The complete network topology diagram is as follows: Figure 3 As shown in the figure, the SPF algorithm is executed once to calculate the primary path. The specific process is as follows:

[0120] Step 1: Select the starting node PE1 as the current node.

[0121] Step 2: Traverse all directly connected neighbor nodes of the current node. If the branch corresponding to the starting node and the current directly connected neighbor node is:

[0122] New branch: add the branch to the branch list and record the cost of the branch and the next hop of the starting node;

[0123] If it is not a new branch, the cost is compared. If the cost is smaller, the cost of the branch flow table is updated.

[0124] Branches that already exist in the cost list: Ignored.

[0125] Step 3: Remove the branch with the smallest cost in the branch flow table from the branch list, add it to the cost list, and select the node of the branch to repeat step 2.

[0126] Step 4: If the branch list is not empty, repeat step 3; otherwise the algorithm ends.

[0127] After the algorithm is finished, the cost list is the shortest path tree. According to the cost list, the shortest path from the starting node PE1 to the destination node PE2, that is, the main path, can be determined. Figure 3 The primary path shown is: PE1—P4—P3—PE2.

[0128] If P4 is selected as the protection node, P4 and its related links are deleted from the network topology diagram to obtain the node protection network topology diagram, as shown in Figure 4 As shown, the SPF algorithm is executed once to calculate the first backup path. The specific process is as follows:

[0129] Step 1: Select the starting node PE1 as the current node.

[0130] Step 2: Traverse all directly connected neighbor nodes of the current node (skip P4). If the branch corresponding to the starting node and the current directly connected neighbor node is:

[0131] New branch: add the branch to the branch list and record the cost of the branch and the next hop of the starting node;

[0132] If it is not a new branch, the cost is compared. If the cost is smaller, the cost of the branch flow table is updated.

[0133] Branches that already exist in the cost list: Ignored.

[0134] Step 3: Remove the branch with the smallest cost in the branch flow table from the branch list, add it to the cost list, and select the node of the branch to repeat step 2.

[0135] Step 4: If the branch list is not empty, repeat step 3; otherwise the algorithm ends.

[0136] After the algorithm is finished, the cost list is the shortest path tree. According to the cost list, the shortest path from the starting node PE1 to the destination node PE2, that is, the main path, can be determined. Figure 4 The first backup path shown is: PE1—P1—P2—P3—PE2.

[0137] If PE1-P4 is selected as the protection link, PE1-P4 is deleted from the network topology diagram to obtain the link protection network topology diagram, such as Figure 5 As shown, the SPF algorithm is executed once to calculate the second backup path. The specific process is as follows:

[0138] Step 1: Select the starting node PE1 as the current node.

[0139] Step 2: Traverse all directly connected neighbor nodes of the current node (skip P4). If the branch corresponding to the starting node and the current directly connected neighbor node is:

[0140] New branch: add the branch to the branch list and record the cost of the branch and the next hop of the starting node;

[0141] If it is not a new branch, the cost is compared. If the cost is smaller, the cost of the branch flow table is updated.

[0142] Branches that already exist in the cost list: Ignored.

[0143] Step 3: Remove the branch with the smallest cost in the branch flow table from the branch list, add it to the cost list, and select the node of the branch to repeat step 2.

[0144] Step 4: If the branch list is not empty, repeat step 3; otherwise the algorithm ends.

[0145] After the algorithm is finished, the cost list is the shortest path tree. According to the cost list, the shortest path from the starting node PE1 to the destination node PE2, that is, the main path, can be determined. Figure 5 The second backup path shown is: PE1—P1—P4—P3—PE2.

[0146] The algorithm proposed in this embodiment is that before a failure occurs, the main path after the failure occurs and the IGP completes convergence can be calculated in advance as the FRR backup path before the failure occurs. The FRR backup path only works before the IGP completes convergence. After the IGP completes convergence, forwarding can be performed according to the normally calculated path. Using the path after the IGP completes convergence in theory to guide the forwarding of the message before the IGP completes convergence may have the risk of path blockage, and measures must be taken to ensure the reachability from the source node to the destination node at this time.

[0147] Therefore, in this embodiment, when the primary path after the failure occurs and IGP completes convergence is calculated in advance as the FRR backup path before the failure occurs, the Repair Segment List (node ​​identifier list) of the entire path is added to the backup path to ensure that when a link or node failure occurs, the message can be smoothly forwarded to the destination address along the backup path. Figure 6 , the node ID of PE1 is 1::, the node ID of P1 is 2::1, the node ID of P2 is 3::1, the node ID of P3 is 4::1, and the node ID of PE2 is 5::. The network message adds the node ID list of the first backup path {5::, 4::1, 3::1, 2::1} at PE1, where DA indicates the next hop node ID and SL is the number of intermediate nodes required to reach the destination node.

[0148] It can be seen that in this embodiment, the SPF algorithm is executed once to calculate the main path, and for node protection, the SPF algorithm is executed again to calculate the first backup path, and for link protection, the SPF algorithm is executed again to calculate the second backup path, which has high calculation efficiency. In addition, only a simple modification of the original SPF algorithm is required, that is, modifying the network topology diagram, and the calculation complexity is low.

[0149] A network message path planning device provided in an embodiment of the present application is introduced below. The network message path planning device described below and the network message path planning method described above can be referenced to each other.

[0150] See also Figure 7 , according to a structural diagram of a network message path planning device shown in an exemplary embodiment, such as Figure 7 As shown, including:

[0151] An acquisition module 701 is used to acquire a network topology map, and determine a start node and a destination node in the network topology map;

[0152] A first planning module 702 is used to plan a main path from the starting node to the destination node based on the network topology graph using a shortest path first algorithm;

[0153] A first determination module 703 is used to determine a protection node in the main path, delete the protection node and the path through which the protection node passes from the network topology map, and obtain a node protection network topology map;

[0154] A second planning module 704 is used to plan a first backup path from the starting node to the destination node based on the node protection network topology map by using a shortest path first algorithm;

[0155] When the protection node is in a normal state, the network message is transmitted from the starting node to the destination node through the main path; when the protection node is in a faulty state, the network message is transmitted from the starting node to the destination node through the first backup path.

[0156] The network message path planning device provided in the present application only needs to execute the shortest path first algorithm once for a protection node to calculate the first backup path corresponding to the protection node. Compared with the local protection method for calculating the PQ node, the number of executions of the shortest path first algorithm is reduced, the calculation efficiency is improved, and the calculation complexity is reduced.

[0157] On the basis of the above embodiment, as a preferred implementation mode, the first planning module 702 is specifically used to: determine the starting node as the current node; traverse all neighbor nodes of the current node in the network topology diagram, and determine the candidate branch from the current node to the traversed current neighbor node; determine whether the candidate branch exists in the path list; if the candidate branch exists in the path list, continue to traverse the next neighbor node; if the candidate branch does not exist in the path list, determine whether there are other branches from the current node to the current neighbor node in the branch list; if there are other branches from the current node to the current neighbor node in the branch list, determine whether the metric value of the candidate branch is less than the metric value of the other branches; if the candidate branch does not exist in the path list, determine whether there are other branches from the current node to the current neighbor node in the branch list; if the candidate branch exists in the branch list, determine whether the metric value of the candidate branch is less than the metric value of the other branches; if the candidate branch If the metric value of the selected branch is less than the metric values ​​of the other branches, the other branches in the branch list are updated to the candidate branches; if there are no other branches from the current node to the current neighbor node in the branch list, the candidate branch is added to the branch list; the target branch with the smallest metric value in the branch list is moved to the path list, and the last node of the target branch is determined as the current node, and the step of traversing all neighbor nodes of the current node in the network topology diagram is re-entered in sequence; it is determined whether the branch list is empty; if so, the main path from the starting node to the destination node is determined according to the path list; if not, the step of moving the target branch with the smallest metric value in the branch list to the path list is re-entered.

[0158] Based on the above embodiment, as a preferred implementation mode, the first determining module 703 is specifically used to: determine the next node of the starting node in the main path as a protection node.

[0159] Based on the above embodiment, as a preferred implementation, it also includes:

[0160] The first generating module is configured to generate a first node identifier list corresponding to the first backup path according to the node identifiers of all nodes passed by the first backup path.

[0161] Based on the above embodiment, as a preferred implementation, it also includes:

[0162] The first adding module is used to add the first node identification list to the segment routing header of the network message during the process of transmitting the network message from the starting node to the destination node through the first backup path.

[0163] Based on the above embodiment, as a preferred implementation, it also includes:

[0164] The second adding module is used to determine the node identifier of the next node of the intermediate node according to the first node identifier list when the network message arrives at the intermediate node during the process of transmitting the network message from the starting node to the destination node through the first backup path, and add the node identifier of the next node of the intermediate node to the segment routing header of the network message.

[0165] Based on the above embodiment, as a preferred implementation, it also includes:

[0166] A second determination module is used to determine a protection link in the primary path, and delete the protection link from the network topology map to obtain a link protection network topology map;

[0167] A third planning module is used to plan a second backup path from the starting node to the destination node based on the link protection network topology map using a shortest path first algorithm;

[0168] When the protection link is in a normal state, the network message is transmitted from the starting node to the destination node through the primary path; when the protection link is in a faulty state, the network message is transmitted from the starting node to the destination node through the second backup path.

[0169] Based on the above embodiment, as a preferred implementation mode, the second determining module is specifically used to: determine the protection link according to the link passed by the protection node.

[0170] Based on the above embodiment, as a preferred implementation mode, the second determination module is specifically used for: if the protection node is the next node of the starting node in the main path, determining the link between the starting node and the protection node as a protection link.

[0171] Based on the above embodiment, as a preferred implementation, it also includes:

[0172] The second generating module is used to generate a second node identifier list corresponding to the second backup path according to the node identifiers of all nodes passed by the second backup path.

[0173] Based on the above embodiment, as a preferred implementation, it also includes:

[0174] A third adding module is configured to add the second node identification list to the segment routing header of the network message when the network message is transmitted from the starting node to the destination node via the second backup path.

[0175] Based on the above embodiment, as a preferred implementation, it also includes:

[0176] The fourth adding module is used to determine the node identifier of the next node of the intermediate node according to the second node identifier list when the network message arrives at the intermediate node during the process of transmitting the network message from the starting node to the destination node through the second backup path, and add the node identifier of the next node of the intermediate node to the segment routing header of the network message.

[0177] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0178] Based on the hardware implementation of the above program module, and in order to implement the method of the embodiment of the present application, the embodiment of the present application also provides an electronic device, Figure 8 FIG. 1 is a structural diagram of an electronic device according to an exemplary embodiment. Figure 8 As shown, the electronic equipment includes:

[0179] Communication interface 1, capable of exchanging information with other devices such as network devices;

[0180] The processor 2 is connected to the communication interface 1 to implement information exchange with other devices, and is used to execute the network message path planning method provided by one or more technical solutions when running a computer program. The computer program is stored in the memory 3.

[0181] Of course, in actual application, the various components in the electronic device are coupled together through the bus system 4. It can be understood that the bus system 4 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 4 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, Figure 8 Various buses are labeled as bus system 4.

[0182] The memory 3 in the embodiment of the present application is used to store various types of data to support the operation of the electronic device. Examples of such data include: any computer program used to operate on the electronic device.

[0183] It can be understood that the memory 3 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM, SyncLink Dynamic Random Access Memory), and direct RAMbus random access memory (DRRAM, Direct Rambus Random Access Memory).The memory 3 described in the embodiments of the present application is intended to include but is not limited to these and any other suitable types of memories.

[0184] The method disclosed in the above embodiment of the present application can be applied to the processor 2, or implemented by the processor 2. The processor 2 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 2 or the instruction in the form of software. The above processor 2 may be a general-purpose processor, a DSP, or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 2 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in the memory 3, and the processor 2 reads the program in the memory 3 and completes the steps of the above method in combination with its hardware.

[0185] When the processor 2 executes the program, the corresponding processes in the various methods of the embodiments of the present application are implemented, which will not be repeated here for the sake of brevity.

[0186] In an exemplary embodiment, the embodiment of the present application further provides a non-volatile storage medium storing a computer program, which can be executed by the processor 2 to complete the steps of the aforementioned method.

[0187] In an exemplary embodiment, the present application also provides a computer program product, including a computer program, which is executed by the processor 2 to complete the steps of the aforementioned method.

[0188] A person of ordinary skill in the art can understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to computer program instructions, and the aforementioned computer program can be stored in a non-volatile storage medium. When the computer program is executed, it executes the steps of the above-mentioned method embodiment. Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a non-volatile storage medium. Based on this understanding, the technical solution of the embodiment of the present application can be essentially or partly embodied in the form of a software product, which is stored in a non-volatile storage medium and includes a number of instructions for an electronic device (which can be a personal computer, a server, a network device, etc.) to execute all or part of the methods described in each embodiment of the present application.

[0189] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.

Claims

1. A network message path planning method, characterized in that: include: Obtain a network topology map, and determine a starting node and a destination node in the network topology map; Planning a main path from the starting node to the destination node based on the network topology graph using the shortest path first algorithm; Determine a protection node in the main path, delete the protection node and the path through which the protection node passes from the network topology map, and obtain a node protection network topology map; Planning a first backup path from the starting node to the destination node based on the node protection network topology graph using the shortest path first algorithm; Determine a protection link in the primary path, and delete the protection link from the network topology map to obtain a link protection network topology map; Planning a second backup path from the starting node to the destination node based on the link protection network topology graph using a shortest path first algorithm; Wherein, when the protection node is in a normal state, the network message is transmitted from the starting node to the destination node through the primary path; when the protection node is in a faulty state, the network message is transmitted from the starting node to the destination node through the first backup path; when the protection link is in a faulty state, the network message is transmitted from the starting node to the destination node through the second backup path; Wherein, determining the protection node in the primary path includes: Determine the node with the largest load in the main path as a protection node; Wherein, determining a protection link in the primary path includes: The link with the largest metric value in the primary path is determined as the protection link.

2. The network message path planning method according to claim 1, characterized in that: Planning a main path from the starting node to the destination node based on the network topology graph using the shortest path first algorithm includes: Determine the starting node as the current node; Traversing all neighbor nodes of the current node in the network topology graph, and determining candidate branches from the current node to the traversed current neighbor nodes; Determine whether the candidate branch exists in the path list; If the candidate branch exists in the path list, continue to traverse the next neighbor node; If the candidate branch does not exist in the path list, determining whether there are other branches from the current node to the current neighbor node in the branch list; If there are other branches from the current node to the current neighbor node in the branch list, determining whether the metric value of the candidate branch is less than the metric value of the other branches; If the metric value of the candidate branch is less than the metric value of the other branch, then updating the other branch in the branch list to the candidate branch; If there are no other branches from the current node to the current neighbor node in the branch list, adding the candidate branch to the branch list; Move the target branch with the smallest metric value in the branch list to the path list, determine the last node of the target branch as the current node, and re-enter the step of sequentially traversing all neighbor nodes of the current node in the network topology graph; Determine whether the branch list is empty; if so, determine the main path from the starting node to the destination node according to the path list; if not, re-enter the step of moving the target branch with the smallest metric value in the branch list to the path list.

3. The network message path planning method according to claim 1, characterized in that: Determining a protection node in the primary path includes: The next node of the starting node in the main path is determined as a protection node.

4. The network message path planning method according to claim 1, characterized in that: After planning a first backup path from the starting node to the destination node based on the node protection network topology graph using the shortest path first algorithm, the method further includes: A first node identifier list corresponding to the first backup path is generated according to the node identifiers of all nodes that the first backup path passes through.

5. The network message path planning method according to claim 4, characterized in that: After generating a first node identifier list corresponding to the first backup path according to the node identifiers of all nodes passed by the first backup path, the method further includes: In the process of transmitting the network message from the starting node to the destination node through the first backup path, the first node identification list is added to the segment routing header of the network message.

6. The network message path planning method according to claim 5, characterized in that: Also includes: In the process of transmitting a network message from the starting node to the destination node through the first backup path, when the network message reaches the intermediate node, the node identifier of the next node of the intermediate node is determined according to the first node identifier list, and the node identifier of the next node of the intermediate node is added to the segment routing header of the network message.

7. The network message path planning method according to claim 1, characterized in that: Determining a protection link in the primary path includes: A protection link is determined according to the link through which the protection node passes.

8. The network message path planning method according to claim 7, characterized in that: Determining a protection link according to the link through which the protection node passes includes: If the protection node is the next node of the start node in the primary path, the link between the start node and the protection node is determined as a protection link.

9. The network message path planning method according to claim 1, characterized in that: After planning a second backup path from the starting node to the destination node based on the link protection network topology graph using the shortest path first algorithm, the method further includes: A second node identifier list corresponding to the second backup path is generated according to the node identifiers of all nodes that the second backup path passes through.

10. The network message path planning method according to claim 9, characterized in that: After generating a second node identifier list corresponding to the second backup path according to the node identifiers of all nodes passed by the second backup path, the method further includes: In the process of transmitting the network message from the starting node to the destination node through the second backup path, the second node identification list is added to the segment routing header of the network message.

11. The network message path planning method according to claim 10, characterized in that: Also includes: In the process of transmitting a network message from the starting node to the destination node through the second backup path, when the network message reaches the intermediate node, the node identifier of the next node of the intermediate node is determined according to the second node identifier list, and the node identifier of the next node of the intermediate node is added to the segment routing header of the network message.

12. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, used to implement the steps of the network message path planning method as described in any one of claims 1 to 11 when executing the computer program.

13. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a computer program, which, when executed, implements the steps of the network message path planning method according to any one of claims 1 to 11.

14. A computer program product, characterized in that It comprises a computer program, which, when executed, implements the steps of the network message path planning method as claimed in any one of claims 1 to 11.

Citation Information

Patent Citations

  • Routing backup method and device, server and readable storage medium

    CN110535763A