Routing path updating method, electronic equipment and computer program product
By constructing and evaluating alternative routing paths based on neighbor nodes, the problem of low recovery efficiency of the main route path quality is solved, and fast and intelligent routing path selection is achieved, which improves the stability and efficiency of network communication.
Patent Information
- Application Number
- CN202510601947.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2025-08-15
AI Technical Summary
The existing routing protocols are inefficient in handling abnormal quality of the main routing path in the communication network, and cannot respond quickly to changes in link quality, resulting in interruption of network communication or reduced data transmission efficiency.
When detecting the quality abnormality of the main route path, by constructing alternative routing paths of multiple neighbor nodes based on the destination node, evaluating the quality of each path, and selecting the alternative routing path with the best path quality as the target route path to ensure the stability and efficiency of data transmission.
It realizes the rapid and intelligent selection of alternative paths when the main route path is of abnormal quality, improves the efficiency of routing path quality recovery and maintains efficient and stable network communication.
Smart Images

Figure CN120499085A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network communication technology, and in particular to a routing path updating method, electronic equipment, and computer program product. Background Art
[0002] In modern communications networks, data transmission reliability and efficiency are key considerations in network design and operation. Each data packet in the network must use a routing protocol to determine the most efficient path from its source node to its destination. However, network environments are dynamic, and the quality of network links can be affected by a variety of factors, such as network congestion, device failures, and electromagnetic interference. These factors can reduce link bandwidth, increase latency, and increase packet loss, thereby impacting the overall performance of the primary routing path. Traditional routing protocols, such as the Routing Information Protocol (RIP), Open Shortest Path First (OSPF), and Border Gateway Protocol (BGP), typically employ static rerouting strategies or dynamic adjustment mechanisms based on distance vectors to address link quality changes. However, these mechanisms have limitations when handling rapid link quality changes or networks with large numbers of nodes. For example, RIP's long update cycle prevents it from responding quickly to link changes. While OSPF converges quickly, it may not fully utilize all available link quality information when calculating the new optimal path. BGP, primarily designed for inter-AS routing, is slow to respond to large-scale intra-network link quality changes. However, the path quality-aware fast rerouting methods in related technologies often only focus on the direct replacement of the main routing path, ignoring the processing of other routing paths that may be affected in the network. This may lead to local communication interruption or reduced data transmission efficiency in networks with many nodes and complex links.
[0003] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention
[0004] Embodiments of the present invention provide a routing path updating method, electronic device, and computer program product to at least solve the technical problem of low recovery efficiency due to abnormal quality of a main routing path in a communication network.
[0005] According to one aspect of an embodiment of the present invention, a method for updating a routing path is provided, comprising: upon detecting that the quality of a main routing path between a source node and a destination node in a communication network is abnormal, determining a plurality of alternative routing paths between the source node and the destination node based on a plurality of neighboring nodes of the destination node, wherein the plurality of neighboring nodes are nodes not on the main routing path; the alternative routing paths include routing paths between corresponding neighboring nodes and the source node, and links between the corresponding neighboring nodes and the destination node; determining the path qualities respectively corresponding to the plurality of alternative routing paths; and determining a target routing path between the source node and the destination node from the plurality of alternative routing paths based on the path qualities respectively corresponding to the plurality of alternative routing paths.
[0006] According to another aspect of an embodiment of the present invention, a non-volatile storage medium is provided, wherein the non-volatile storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executed by any one of the routing path updating methods.
[0007] According to another aspect of an embodiment of the present invention, an electronic device is also provided, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any one of the routing path updating methods.
[0008] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the steps of any one of the methods for updating a routing path are implemented.
[0009] In an embodiment of the present invention, when a quality abnormality of a main routing path between a source node and a destination node in a communication network is detected, multiple alternative routing paths between the source node and the destination node are determined based on multiple neighbor nodes of the destination node, wherein the multiple neighbor nodes are nodes not on the main routing path; the alternative routing paths include routing paths between corresponding neighbor nodes and the source node, and links between the corresponding neighbor nodes and the destination node; the path qualities corresponding to the multiple alternative routing paths are determined; and based on the path qualities corresponding to the multiple alternative routing paths, a target routing path between the source node and the destination node is determined from the multiple alternative routing paths, thereby achieving the purpose of forming multiple alternative routing paths by utilizing neighbor nodes of the destination node that are not occupied by the main routing path, and accurately screening routing paths according to the quality of each alternative path, thereby achieving the technical effect of optimizing routing path selection and improving the efficiency of recovering from abnormal routing path quality, thereby solving the technical problem of low efficiency of recovering from abnormal main routing path quality in the communication network. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0011] Figure 1 is a flow chart of a method for updating a routing path according to an embodiment of the present invention;
[0012] Figure 2 is an optional global optimal path calculation schematic diagram according to an embodiment of the present invention;
[0013] Figure 3 is an optional schematic diagram of a topology to be converged according to an embodiment of the present invention;
[0014] Figure 4 is a schematic diagram of an optional alternative routing path identifier according to an embodiment of the present invention;
[0015] Figure 5 is a schematic diagram of an optional link update message structure according to an embodiment of the present invention;
[0016] Figure 6 is a schematic diagram of an optional link state synchronization / update according to an embodiment of the present invention;
[0017] Figure 7 This is an optional flowchart of fast routing convergence based on path quality perception according to an embodiment of the present invention;
[0018] Figure 8is an optional global optimal path calculation flow chart according to an embodiment of the present invention;
[0019] Figure 9 is an optional link synchronization flow chart according to an embodiment of the present invention;
[0020] Figure 10 is an optional link update flow chart according to an embodiment of the present invention;
[0021] Figure 11 2 is a schematic diagram of a routing path updating device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0022] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0023] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0024] First, to facilitate understanding of the embodiments of the present invention, some of the terms or nouns involved in the present invention are explained below:
[0025] A routing path is a combination of a series of intermediate nodes and links between a source node (or device) and a destination node (or device) that a data packet passes through in order to reach its destination.
[0026] Link: A physical or logical communication path between two network nodes (such as two routers, or a router and a computer).
[0027] According to an embodiment of the present invention, a method embodiment for updating a routing path is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0028] Figure 1 is a flow chart of a method for updating a routing path according to an embodiment of the present invention. Figure 1 As shown, the method includes the following steps:
[0029] Step S102: upon detecting that the quality of a primary routing path between a source node and a destination node in a communication network is abnormal, determining multiple alternative routing paths between the source node and the destination node based on multiple neighboring nodes of the destination node, wherein the multiple neighboring nodes are nodes not on the primary routing path; the alternative routing paths include routing paths between corresponding neighboring nodes and the source node, and links between corresponding neighboring nodes and the destination node;
[0030] Optionally, the communication network includes multiple nodes, each of which may represent a network device in the communication network, such as a router. A source node is any node in the communication network that detects path quality degradation and needs to trigger rerouting. A destination node is the target address or network that the source node attempts to reach through the network, i.e., the node to which the data packet or traffic is intended to be delivered.
[0031] Steps S102 to S106 may be performed by a router. In a network, a router is the primary device responsible for packet forwarding and routing decisions. Upon detecting abnormal quality of the primary routing path to a destination node, the router can construct multiple alternative routing paths based on the destination node's multiple neighboring nodes. By excluding these neighboring nodes from the primary routing path, the router can avoid using links known to be faulty or underperforming.
[0032] Optionally, the path quality in this embodiment may be measured based on multiple link metrics of the corresponding path, or may be measured based on a comprehensive metric value calculated based on multiple link metrics of the corresponding path.
[0033] In an optional embodiment, when it is detected that the quality of the main routing path between the source node and the destination node in the communication network is abnormal, before determining multiple alternative routing paths between the source node and the destination node based on multiple neighboring nodes of the destination node, the method also includes: obtaining link measurement indicators corresponding to multiple links included in the main routing path, wherein the link measurement indicators include at least two of the following indicators: bandwidth, delay information, packet loss rate, number of hops, reliability, and load information of the corresponding link; based on the link measurement indicators corresponding to the multiple links, determining whether the quality of the main routing path is abnormal.
[0034] Optionally, before detecting a potential primary routing quality problem, all link metrics on the primary routing path are collected. The link metrics may include, but are not limited to, key performance parameters such as link bandwidth, latency, packet loss rate, hop count, reliability, and load information, which can reflect the current state of the link and its data transmission capacity. For example, Figure 2 This is a schematic diagram of an optional global optimal path calculation according to an embodiment of the present invention. Assuming the primary routing path from source node S to destination node D is S->A->D, the network device will obtain link metrics such as bandwidth, latency, and packet loss rate for the S->A and A->D links. After collecting all link metrics, the quality of the entire primary routing path can be evaluated based on specific anomaly determination rules to determine whether it is abnormal. This can be achieved, but is not limited to, by comparing link metrics with preset thresholds or metric ranges. If the metric of any link exceeds the normal range, or the comprehensive metric value of the entire routing path (such as the sum of bandwidth, cumulative latency, and weighted average of link metrics such as packet loss rate) falls below a predetermined performance standard, the primary routing path is considered to have abnormal quality. For example, if the bandwidth of link S->A drops below the normal threshold, or the latency of link A->D exceeds a preset range, the entire path S->A->D may be judged to have abnormal quality. Once the primary routing path quality is determined to be abnormal, the alternative routing path construction phase begins. Using the destination node's neighbor node information, multiple alternative routing paths from the source node to the destination node are constructed as possible alternatives.
[0035] Through this approach, the path quality of the primary routing path is meticulously monitored and evaluated before the backup routing mechanism is initiated, ensuring that rerouting is triggered only when path quality issues actually occur. This improves network intelligence, avoids unnecessary resource consumption and network disruptions, and ensures that the network can react quickly to actual link failures or performance degradation, maintaining data transmission stability and efficiency by building high-quality backup routing paths. By monitoring and analyzing link metrics, the health of the primary routing path can be more accurately determined, leading to more reasonable and timely rerouting decisions.
[0036] In an optional embodiment, based on the link measurement indicators corresponding to the multiple links, determining whether the path quality is abnormal includes: determining the weight value of each link measurement indicator; determining the link measurement values corresponding to the multiple links based on the weight value of each link measurement indicator; determining the weight values corresponding to the multiple links; obtaining the comprehensive measurement value of the main routing path based on the link measurement values corresponding to the multiple links and the weight values corresponding to the multiple links; determining that the quality of the main routing path is abnormal when the link measurement value of any link among the multiple links is greater than a preset first threshold, or the comprehensive measurement value is greater than a preset second threshold; determining that the quality of the main routing path is not abnormal when the link measurement values of the multiple links are all less than or equal to the preset first threshold, and the comprehensive measurement value is less than or equal to the preset second threshold.
[0037] Optionally, when the link measurement indicators include the bandwidth, delay information, packet loss rate, number of hops, reliability, and load information of the corresponding link, determine the first weight value corresponding to the bandwidth, the second weight value corresponding to the delay information, the third weight value corresponding to the packet loss rate, the fourth weight value corresponding to the number of hops, the fifth weight value corresponding to the reliability, and the sixth weight value corresponding to the load information; based on the link measurement indicators corresponding to the multiple links, the first weight value, the second weight value, the third weight value, the fourth weight value, the fifth weight value, and the sixth weight value, determine the link measurement values corresponding to the multiple links respectively.
[0038] Optionally, weights are determined for link metrics such as bandwidth, latency, packet loss rate, hop count, reliability, and load information. These weights can reflect the relative importance of different performance metrics to the overall quality of the path. For example, if bandwidth is more critical than latency for a particular network application, bandwidth may be assigned a higher initial weight. Weights are typically set based on the performance objectives of the network design and application requirements. For each link on the primary routing path, a link metric is calculated based on its metrics (bandwidth, latency, packet loss rate, etc.) and the corresponding weights. The link metric can be a direct product of the metric and the weight, or a composite metric involving more complex algorithms, such as a weighted average. For example, if a link has a bandwidth of 100 megabits per second (Mbps), a latency of 50ms, and a packet loss rate of 0.1%, and their weights are 0.6, 0.3, and 0.1, respectively, the link metric can be calculated as (100Mbps * 0.6) + (50ms * 0.3) + (0.1% * 0.1). The weight of each link can be dynamically adjusted based on, but not limited to, the link's topological location, link type, or the real-time state of the network. For example, links closer to the source or destination node can be assigned higher weights because they have a more direct impact on the path's end-to-end performance. The link metrics of all links on the primary routing path, along with their weights, are combined to calculate the path metric of the primary routing path. The path metric can be determined by, but is not limited to, taking the weighted sum of all link metrics.
[0039] Further, it is checked whether the link metric value of each link is greater than the preset first threshold value, and whether the path metric value is greater than the preset second threshold value. If the link metric value of any link exceeds the first threshold value, or the path metric value exceeds the second threshold value, then the main routing path is judged to have abnormal quality, and it is necessary to trigger the subsequent alternative routing path construction and rerouting process. On the contrary, if the link metric values of all links do not exceed the first threshold value, and the path metric value does not exceed the second threshold value, the quality of the main routing path is confirmed to be normal, and there is no need to start the rerouting mechanism. Through the above method, it can be made possible to more accurately judge when the rerouting process needs to be started, avoid unnecessary resource consumption, and ensure timely response when link performance degrades, maintaining the stability and service quality of network communications.
[0040] In an optional embodiment, when it is detected that the quality of the main routing path between the source node and the destination node in the communication network is abnormal, multiple alternative routing paths between the source node and the destination node are determined based on multiple neighboring nodes of the destination node, including: when it is detected that the quality of the main routing path between the source node and the destination node in the communication network is abnormal, detecting whether there is a backup routing path between the source node and the destination node; when it is detected that there is no backup routing path, determining multiple alternative routing paths based on multiple neighboring nodes; or when it is detected that there is a backup routing path and the quality of the backup routing path is abnormal, determining multiple alternative routing paths based on multiple neighboring nodes.
[0041] Optionally, when the source node detects that the quality of the primary routing path between the source node and the destination node is abnormal, it first checks whether there is a preset backup routing path. The backup routing path serves as a backup for the primary path. When the router senses that the quality of the primary path has deteriorated, if there is a backup routing path, the backup routing path will be switched to the primary routing path to cope with possible link failures or performance degradation. Figure 2 As shown in the figure, let the source node be S and the destination node be D. Destination node D has four neighboring nodes: nodes A, B, C, and E. If the quality of a path from node S to A deteriorates or even breaks, the quality of the routes from node S to nodes A, D, and E will also deteriorate or even break. If there is a backup routing path from node S to node D, and the backup routing path is S->M->B->D, then the path S->M->B->D will be switched to as the new primary routing path.
[0042] Optionally, the main routing path and the backup routing path can be routes containing main and backup paths generated according to the shortest path algorithm, and there are no common links and nodes in the main and backup paths. If there is a backup routing path, further check whether the quality of this backup routing path is abnormal. In some cases, even if the quality of the main path deteriorates, the backup routing path may also encounter similar problems, such as link congestion caused by the same network event. After confirming that there is no backup routing path (or the backup routing path also has quality problems), multiple alternative routing paths are constructed based on multiple neighbor nodes of the destination node. These neighbor nodes are nodes that are directly connected to the destination node but are not included in the main routing path or paths known to have quality problems, so as to avoid using links with known faults or poor performance. By utilizing the information of neighbor nodes, network devices can intelligently bypass problem links and select paths with better performance, thereby improving communication quality and user experience.
[0043] It should be noted that the backup routing path is a predetermined routing path that is activated when the primary routing path has quality abnormalities. That is, if the backup routing path does not have quality abnormalities when the primary routing path has quality abnormalities, the backup routing path is automatically switched and activated. The alternative routing path is a path that passes through the neighboring nodes of the destination node and supports rerouting between the source node and the destination node (also known as a candidate rerouting path). The alternative routing path includes the routing path between the neighboring node and the source node, as well as the link between the corresponding neighboring node and the destination node.
[0044] In an optional embodiment, the method further includes: when it is detected that the quality of the main routing path between the source node and the destination node in the communication network is abnormal, sending path quality change information of the main routing path to a neighboring node of the source node.
[0045] Optionally, if there is no backup routing path, the topology table is marked as a deteriorated path, and the changed routing information and path quality information (such as path metric value) are sent to the neighbor nodes of the destination node in an updated manner to inform the neighbor nodes of the destination node of the current path quality. Based on the neighbor nodes of the destination node that are not on the main path, the global optimal path calculation method is initiated for the deteriorated path to perform rerouting.
[0046] Optionally, when the router senses that the quality of the original routing path (i.e., the main path) has deteriorated, the topology table of the deteriorated path is added to the topology table to be converged to start the network's self-healing mechanism to deal with the deterioration of the main routing path quality. The topology table to be converged has the same structure as the topology table of the deteriorated path, mainly including but not limited to fields such as link metric indicators, destination address, link metric value, path metric value, and comprehensive metric value. The topology table of the path deterioration is used to send routing information and path quality change information to the neighboring nodes of the source node, and the topology table to be converged is used to calculate the new optimal path. For example, Figure 3 is an optional topology representation diagram to be converged according to an embodiment of the present invention, such as Figure 3As shown in the figure, the destination node represents the node or network that the current node reaches. For example, the source node's network address is 192.168.2.1, and the destination node's network address is 10.0.3.0. The comprehensive metric is calculated based on link metrics such as bandwidth, delay, hop count, reliability, and load along the path, following the principle of hop-by-hop increments, for example, 10125. Link metrics include bandwidth, delay, hop count, reliability, and load information. For example, bandwidth is 1000 Mbps, delay is 100 ms, and hop count is 10. Reliability represents the trustworthiness of the route, expressed as a numerical value (larger values indicate greater trustworthiness). Load is 200, with a range of [0, 255]. The path quality indicator represents the degree of path deterioration, expressed as a numerical value (larger values indicate worse quality). The link metric table includes the link metric values and link metrics from the destination node to neighboring nodes, storing the correspondence between the addresses of multiple neighboring nodes and link metrics and metrics. Link metrics include bandwidth, delay, hop count, reliability, and load information.
[0047] Optional, still as Figure 2 As shown in the figure, assume the source node is S and the destination node is D. Destination node D has four neighboring nodes: A, B, C, and E. If the path quality from node S to node A deteriorates, causing the path metrics from node S to nodes A, D, and E to change, node S will send the metrics to nodes A, D, and E to nodes M and N, triggering nodes M and N to recalculate the path metrics to nodes A, D, and E. At the same time, it is detected that there are no backup paths from node S to nodes A, B, and E. Therefore, node S needs to calculate routes and evaluate the path quality to nodes A, D, and E, and add the evaluation results to the pending topology table. Destination node D has four neighboring nodes: A, B, C, and E. If node S has paths to nodes B and C, the alternative routing paths through neighboring nodes B and C are S->B->D and S->C->D, respectively.
[0048] In an optional embodiment, multiple alternative routing paths between a source node and a destination node are determined based on multiple neighbor nodes of the destination node, including: for any neighbor node among the multiple neighbor nodes, when there are multiple routing paths between any neighbor node and the source node, determining the path qualities corresponding to the multiple routing paths respectively; determining the alternative routing path corresponding to any neighbor node based on the routing path with the highest path quality among the multiple routing paths; and obtaining multiple alternative routing paths by adopting a method of obtaining the alternative routing path corresponding to any neighbor node.
[0049] Optionally, when the source node constructs alternative routing paths based on multiple neighboring nodes of the destination node, it may find that there are multiple available routing paths between any neighboring node. In this case, the source node will further evaluate the quality of each routing path. The path quality can be characterized by a comprehensive metric value obtained by comprehensively measuring the above link metrics. For example, Figure 2 As shown in the figure, taking node S as the source node and node D as the destination node, if there are two possible paths between source node S and neighbor node A of destination node D, S->M->A and S->N->A, the source node will calculate the link metrics for each of these two paths, as well as the composite metric value derived from these metrics. After evaluating the quality of multiple routing paths to any neighboring node, the source node selects the path with the highest quality as the candidate routing path. This means that the path with the lowest composite metric or the best performance is selected to construct the candidate routing path from the source node to the destination node through that neighboring node. For example, in the above example, if the composite metric of S->M->A is lower than that of S->N->A, then S->M->A will be considered as the candidate routing path for neighbor node A. Through this process, the source node performs path quality evaluation and optimal path selection for each neighboring node of the destination node, ultimately obtaining multiple candidate routing paths, each involving a different neighboring node. In this way, the source node can not only use the neighbor nodes of the destination node to build alternative routing paths, but also compare the optimal paths among multiple neighbor nodes, thereby selecting a group of paths with the best quality among all possible alternative routing paths.
[0050] This approach ensures that even in complex network environments, alternative routes can be constructed based on the optimal path. This allows for the rapid identification of the most suitable alternative path when the primary route quality deteriorates, maintaining efficient and stable network communications. Accurate quality assessment and optimal path selection enable more intelligent response to link failures and performance degradation, enabling fast, intelligent rerouting strategies.
[0051] Optional, Figure 4 is a schematic diagram of an optional alternative routing path identifier according to an embodiment of the present invention, such as Figure 4As shown in the figure, the comprehensive metric value is calculated based on multiple link metric indicators of the links through which the path passes, in accordance with the principle of hop-by-hop increment, such as 10125; link metric indicators include bandwidth, delay, hop count, reliability and load, such as bandwidth is 1000Mbps, delay is 100ms, and hop count is 10; reliability indicates the credibility of the route, expressed as a numerical value, the larger the value, the more reliable it is, the load is 200, and the value range is [0,255]; the neighbor node address indicates the neighbor node of the destination address, and the destination address to be converged is the destination address that needs to recalculate the route, as shown in the figure. Figure 2 As shown in the figure, the address of the destination node D is 10.0.5.1, and the address of its neighbor node B is 10.0.2.1.
[0052] Step S104, determining the path qualities corresponding to the plurality of candidate routing paths;
[0053] Optionally, after the alternative routing paths are constructed, the source node further evaluates the path quality of each alternative routing path. This path quality can be characterized by the link metric table and the comprehensive metric value of the alternative routing path. The comprehensive metric value is inversely proportional to the path quality. A lower comprehensive metric value indicates lower latency, higher bandwidth, or less packet loss, and thus better path quality.
[0054] In an optional embodiment, the path qualities corresponding to multiple alternative routing paths are determined, including: for any neighbor node among multiple neighbor nodes, determining the path quality between any neighbor node and the source node, and the path quality between any neighbor node and the destination node; based on the path quality between any neighbor node and the source node, and the path quality between any neighbor node and the destination node, determining the path quality of the alternative routing path corresponding to any neighbor node; and obtaining the path quality corresponding to multiple alternative routing paths by adopting a method of obtaining the path quality of the alternative routing path corresponding to any neighbor node.
[0055] Optionally, for each neighbor node of the destination node, the source node needs to evaluate the path quality between the source node and the neighbor node. The path quality can be characterized based on the comprehensive metric value of the alternative routing path, including but not limited to calculating or obtaining all link metric indicators on the routing path, such as bandwidth, delay, packet loss rate, etc., and then combining these indicators to form a path metric value, which represents the path quality from the source node to the neighbor node. Since any neighbor node and the destination node are adjacent nodes, the path quality between any neighbor node and the destination node can be understood as the link quality between any neighbor node and the destination node. For example, as Figure 2As shown in the figure, assuming the path from source node S to neighbor node A is S->M->A, the source node calculates the link quality of both the S->M and M->A links and then, based on these metrics, derives the path quality of the entire path S->M->A. Next, the source node needs to evaluate the quality of the direct link between each neighbor node and the destination node. This also relies on link performance metrics, including but not limited to bandwidth, latency, jitter, and packet loss rate. For example, the quality of the link A->D from neighbor node A to destination node D is evaluated separately. After obtaining the path quality from the source node to the neighbor node and the link quality from the neighbor node to the destination node, the source node combines these two pieces of information to calculate the overall path quality of the alternative routing path to the destination node through this neighbor node. This can be achieved by, but is not limited to, taking a weighted average of the two partial quality metrics or using some other comprehensive algorithm to reflect the performance of the entire alternative path. For example, assuming the path quality metric P1 for S->M->A and the link quality metric L1 for A->D, a weighted average algorithm is used to calculate the overall quality metric Q1 for the S->M->A->D path. By repeating the above process, the source node can evaluate the quality of the alternative routing paths associated with each neighbor node of the destination node, and finally obtain the path quality metrics of all alternative paths. These metrics will serve as the basis for subsequent selection of the optimal path.
[0056] In this approach, when constructing alternative routing paths, the path quality between the source node and neighboring nodes, as well as the link quality between neighboring nodes and the destination node, is carefully evaluated. Based on these evaluation results, the overall path quality of each alternative routing path is calculated. This ensures that alternative paths are selected based on the most comprehensive and accurate performance data. When the quality of the primary routing path deteriorates, the optimal alternative path can be selected, ensuring efficient and stable network communications. By accurately evaluating path and link quality, network devices can make more intelligent and optimized rerouting decisions, effectively responding to dynamic changes in the network.
[0057] Optionally, the neighbor node of the destination node can be selected based on the topology table to be converged. If the neighbor node is reachable, the path metric to the neighbor node and the link metric from the neighbor node to the destination node are used to calculate the comprehensive metric of all paths passing through the neighbor node as the quality metric of the alternative routing path; wherein, the neighbor node of the destination node is an item in the link metric table in the topology table, indicating the link metric from the destination node to the neighbor node, which is used for the calculation of the alternative routing path; wherein, the alternative path table may include, but is not limited to, the comprehensive metric value, path metric value, neighbor node, neighbor path, destination address, etc. of each alternative routing path, and the comprehensive metric value is the basis for sorting. All alternative routing paths are inserted into the alternative path table in sequence, ensuring that all alternative routing paths are arranged in ascending order according to the comprehensive metric value, and all alternative path calculations and alternative path table construction are completed. Still like Figure 2 As shown in the figure, assume the source node is S and the destination node is D. Destination node D has four neighboring nodes: A, B, C, and E. If there is a path from node S to nodes B and C, then the alternative routing paths through neighboring nodes B and C are S->B->D and S->C->D, respectively. The alternative path table contains two records, S->B->D and S->C->D, with path metrics of 6 and 7, respectively.
[0058] Optionally, the optimal path in the alternative path table is selected and added to the topology table as the new primary path to the destination node. The corresponding entry is deleted from the pending topology table and the alternative path table. For example, the path S->M->B->D with a combined distance of 6 is selected from the alternative path table, added to the topology table, and deleted from the pending topology table and the alternative path table.
[0059] Step S106 : determining a target routing path between the source node and the destination node from the multiple candidate routing paths based on the path qualities corresponding to the multiple candidate routing paths.
[0060] Optionally, after evaluating the quality of each candidate routing path, a path with the best quality can be selected as the target routing path (i.e., the optimal routing path) based on the combined metric of these paths. This target routing path can then serve as the new primary routing path between the source node and the destination node. The selection of the optimal path can follow a specific strategy, such as selecting the path with the lowest combined metric or randomly selecting a path from the paths that meet a minimum performance threshold to distribute traffic.
[0061] In an optional embodiment, based on the path qualities corresponding to the multiple alternative routing paths, a target routing path between the source node and the destination node is determined from the multiple alternative routing paths, including: determining the routing path with the highest path quality among the multiple alternative routing paths as the target routing path.
[0062] Optionally, the alternative routing path with the highest path quality (e.g., the lowest comprehensive metric value) among multiple alternative paths can be determined as the target routing path. The target routing path is the routing path with the best performance (e.g., lower latency, higher bandwidth, or less packet loss) among all the alternative routing paths, thereby achieving optimal routing path selection. For example, assume that the comprehensive metric value of the device selected routing path A is 6, the comprehensive metric value of alternative routing path B is 7, and the comprehensive metric value of alternative routing path C is 5. The lower the comprehensive metric value, the better the path quality, as it may mean lower latency, higher bandwidth, or less packet loss.
[0063] Optionally, the optimal path (i.e., the target routing path) is selected from the multiple alternative routing paths included in the alternative path table, added to the topology table as the main path to reach the rerouting, and the corresponding table entry is deleted from the topology table to be converged and the alternative path table, the alternative routing path is added to the topology table, and the table entry is deleted from the topology table to be converged and the alternative path table.
[0064] In an optional embodiment, after determining the target routing path between the source node and the destination node from multiple alternative routing paths based on the path qualities corresponding to the multiple alternative routing paths, the method further includes: sending the path information of the target routing path and the path quality of the target routing path to the neighbor nodes of the source node and the neighbor nodes of the destination node, wherein the path information includes at least the node sequence of the target routing path.
[0065] Optionally, after determining the target routing path, the specific information and path quality of the target routing path are sent to its direct neighbor nodes, as well as multiple neighbor nodes of the destination node, to ensure that all relevant devices in the network can promptly understand and apply the latest routing information. Once the target routing path is determined, its routing table is further updated, and the target routing path is set as the new primary path for data transmission between the source node and the destination node. This process can be immediate or gradual to ensure network stability and avoid traffic interruptions that may occur during the update process. The information sent not only includes the node sequence of the target routing path, but also includes path quality metrics such as comprehensive bandwidth, latency, and packet loss rate. The receiving node (neighboring node) can update its local routing table and link metric table based on this path quality information, ensuring that the routing information they store is up-to-date and reflects the actual status of the communication network. By sending path information and quality metrics to its neighbor nodes, the source node's neighbors can be helped to recalculate their optimal path to the destination node. By disseminating path information and path quality to the destination node's neighbors, we ensure that these nodes can also adjust their routing strategies based on the new target routing path, especially if other neighboring nodes may need to reroute. This ensures that routing information is quickly and accurately disseminated throughout the communication network, allowing all relevant devices to make decisions based on the latest path quality, thereby maintaining network stability and efficiency.
[0066] In an optional embodiment, after determining the target routing path between the source node and the destination node from multiple alternative routing paths based on the path qualities corresponding to the multiple alternative routing paths, the method also includes: detecting whether there are other routing paths associated with the main routing path and with the destination node as a neighbor node; when it is detected that there are other routing paths, constructing a first routing path based on the target routing path and the links between the destination node of the target routing path and the destination nodes of the other routing paths; and using the first routing path as an alternative routing path for the other routing paths.
[0067] Optionally, after the target routing path is determined, a check is performed to determine whether there are other routing paths associated with the original primary routing path and with the destination node as a neighboring node. These other routing paths point to routes to other targets in the communication network, but they share some links with the target routing path currently being adjusted, especially with the current destination node as a node or jump point in their path. If the existence of other routing paths is detected, a new alternative routing path (i.e., the first routing path) is constructed based on the already determined target routing path and the links between this target routing path and the other routing paths. The new alternative routing path can be used to provide an alternative solution for the other routing paths so that the continuity and reliability of data transmission can be guaranteed when a failure or performance degradation occurs in the network. Once the first routing path is constructed, the first routing path will be marked as an alternative path for the other routing paths and updated in the topology table. This means that if the main path on which these other routing paths rely degrades or fails, it can be quickly switched to the already constructed alternative path to maintain the stability and service quality of network communication. In this way, it can be ensured that even if the main path is damaged, data packets can still reach the target through the alternative path, thereby improving the reliability and robustness of the communication network. By building an alternative first routing path, network devices can more comprehensively respond to potential network changes and achieve fast rerouting and efficient management of paths.
[0068] Optionally, if there are other routing paths associated with the deteriorated path, the destination node in the new routing path is used as a neighbor node to calculate the alternative path to the new destination node to be converged, and insert it into the alternative path table in ascending order of the comprehensive metric value. Figure 2 In the example shown, node D is the newly added route to the topology table, and path S->A->D->E is the associated route with the degraded path S->A->D. Now, with node D as the new neighbor node and nodes A and D as the new destination nodes, the link metrics of the paths passing through node D to reach nodes A and E to be converged are calculated. The metrics of paths S->M->B->D->A and S->M->B->D->E are both 7. The path S->M->B->D->A with a comprehensive distance of 7 is selected from the candidate path table and added to the topology table. The corresponding entries in the topology table to be converged and the candidate path table are deleted. Since there is no link between nodes A and E, there is no need to update the candidate path table. The optimal path S->M->B->D->E with a metric of 7 is selected again and deleted from both the topology table to be converged and the candidate path table.
[0069] As an optional embodiment, when a link status change is detected in a communication network, such as when a new link is created, the node associated with the newly created link sends the locally stored network-wide link status to the corresponding neighboring node. When the peer node receives a link update message, it saves the link status with the latest timestamp to the link status table of the corresponding local topology structure and sends the updated link status to other neighboring nodes. The link update method is that when the link status changes, the node associated with the link sends the latest link status to the neighboring node using a multicast method. When the neighboring node receives a link update message, it selects the link status with the latest timestamp and saves it in the link status table of the local topology structure and sends the updated link status to other neighboring nodes. Figure 5 FIG. 1 is a schematic diagram of an optional link update message structure according to an embodiment of the present invention, such as Figure 5 As shown in Figure 1, a link update message uses a Type-Length-Value (TLV) structure to describe the link status from a network node to its corresponding neighbor node. The message includes the TLV type, TLV length, current timestamp, neighbor node network address, link metric, link metric value, and current node network address. Link metrics include latency, bandwidth, MTU, hop count, reliability, load, label, and tag.
[0070] Optional, Figure 6 FIG. 1 is a schematic diagram of an optional link state synchronization / update according to an embodiment of the present invention. Figure 6 As shown, assuming that after node K and node A establish a link and neighbor relationship, node K packages all its stored topology tables and link metric tables into routing update messages and link update messages, and sends them to node A. For example, the topology table of node K reaching node S stores the metric value and neighbor table of reaching node S, and the neighbor table contains the link metric values and neighbor addresses of reaching nodes M and N; at the same time, node A packages all its stored topology tables and link metric linked lists into routing update and link update messages, and sends them to node S. For example, the topology table contains reaching nodes A, B, C, D and E, the neighbor node of node A is D, the neighbor node of node B is D, the neighbor node of node C is D, the neighbor node of node E is D, and the neighbor nodes of node D are A, B, C and E.
[0071] Node S performs link update operation after receiving the link update message. Specifically, after receiving the link update message, the corresponding neighbor node searches the corresponding topology table in the topology structure according to the local network address of the link update message. Figure 6As shown in the figure, node A receives the routing update message and link update message sent by node K. For example, if the routing update message is the route to node S, and there is no route to node S locally, node A will create a new topology table to reach node S. The link status is searched in the topology table based on the network address of the neighbor node of the link update message, and the link status is compared with the status sequence number of the link update message. Figure 6 As shown, node A checks the topology table for nodes S, with the destination address being nodes M and N, to see if there are links to neighboring nodes M and N. If not, the neighbor links from node S to nodes M and N are added to the topology table for nodes S. If the link status and the state sequence number of the link update message are not greater than the local state sequence number, the link update message is discarded; otherwise, the link state table is updated using the link update message. For example, the link update message is compared with the state sequence number of the locally stored neighbor link. If they are not greater than the local state sequence number, the link update message is discarded; otherwise, the link from node S to neighboring nodes M and N is updated, and the received destination node, neighbor node, state sequence number, and metric value are stored in the local routing link metric table. After the corresponding neighbor node completes the link state update, it sends the changed link state to other neighboring nodes. For example, node A receives a route update message and a link update message from node K and updates its neighbor link table. Node A records the updated neighbor links, packages these updated links into a link update message, and sends it to neighbor node D.
[0072] Through the above steps S102 to S106, it is possible to form multiple alternative routing paths by utilizing neighbor nodes of the destination node that are not occupied by the main routing path, and accurately screen the routing paths according to the quality of each alternative path, thereby achieving the technical effect of optimizing routing path selection and improving the efficiency of recovering from abnormal routing path quality, thereby solving the technical problem of low efficiency of recovering from abnormal routing path quality in the communication network.
[0073] Based on the above embodiment and optional embodiment, the present invention proposes an optional implementation of a method for updating a routing path, the method comprising:
[0074] Figure 7 This is an optional flow chart of fast routing convergence based on path quality perception according to an embodiment of the present invention, such as Figure 7 As shown, the process specifically includes:
[0075] S110: When the source node detects that the quality of the primary path between the source node and the destination node has deteriorated, if a backup routing path exists, the backup routing path is switched to the primary path; otherwise, the topology table is marked as a topology table corresponding to the deteriorated path;
[0076] S120, sending the changed route and path quality to other neighbor nodes of the source node in an updated manner, informing the neighbor nodes of the source node of the current path quality; adding the topology table corresponding to the deteriorated path to the topology table to be converged;
[0077] S130: If the topology table to be converged is not empty, a global optimal path calculation method is started to calculate a new optimal path for the topology table entry to be converged, until the topology table to be converged is empty. Figure 8 is an optional global optimal path calculation flow chart according to an embodiment of the present invention, such as Figure 8 The specific steps are as follows:
[0078] S131. Select neighbor nodes of the destination node based on the to-be-converged topology table. If the neighbor nodes are reachable, calculate a comprehensive metric of the routing path passing through each neighbor node using the path metric from the source node to the neighbor node and the link metric from the neighbor node to the destination node. This metric is used as the quality metric of the candidate routing path.
[0079] S132. Insert all candidate routing paths into the candidate path table in sequence, ensuring that all candidate routing paths are arranged in ascending order according to the comprehensive metric values, and completing the calculation of all candidate routing paths and the construction of the candidate path table;
[0080] S133: Select the optimal path in the alternative path table, add it to the topology table as the new primary path to the destination node, and delete the corresponding entry from the to-converge topology table and the alternative path table;
[0081] S134: If there are other routing paths associated with the deteriorated path, use the destination node in the new routing path as a neighbor node, calculate alternative paths to the new destination node to be converged, and insert them into the alternative path table in ascending order of comprehensive metric values.
[0082] S135. If both the to-converge topology table and the alternative path table are not empty, repeat steps S133 and S134. If the alternative path table is empty and the to-converge topology table is not empty, set the to-converge topology table entry as unreachable and clear the to-converge topology table.
[0083] S140: After completing routing convergence, the new routing path and the corresponding path quality information are sent to the neighboring nodes of the source node and the neighboring nodes of the destination node in an updated manner.
[0084] When a link status change is detected in the communication network, the link status is synchronously updated, specifically including:
[0085] Figure 9 is an optional link synchronization flow chart according to an embodiment of the present invention, such as Figure 9 As shown, specifically including:
[0086] S210, after the two routers establish a link and neighbor relationship, they package the link status in the local topology into a link update message and send it to the peer node;
[0087] S220, performing a link update operation upon receiving the link update message;
[0088] Figure 10 is an optional link update flow chart according to an embodiment of the present invention, such as Figure 10 As shown, specifically including:
[0089] S221. After receiving the link update message, search the corresponding topology table in the topology structure according to the local network address of the link update message;
[0090] S222. Search the link state in the topology table according to the neighbor network address of the link update message, and compare the link state with the state sequence number of the link update message;
[0091] S223. If the number is not greater than the local state sequence number, discard the link update message; otherwise, use the link update message to update the link state table;
[0092] S224: Send the changed link status to other neighboring nodes.
[0093] Through this embodiment, the purpose of forming multiple alternative routing paths by utilizing the neighbor nodes of the destination node that is not occupied by the main routing path and accurately screening the routing paths according to the quality of each alternative path can be achieved, thereby achieving the technical effect of optimizing routing path selection and improving the efficiency of recovering from abnormal routing path quality, thereby solving the problems of low efficiency of recovering from abnormal main routing path quality in communication networks, massive nodes, limited resources, and rapid convergence of time-varying link networks.
[0094] This embodiment also provides a routing path update device, which is used to implement the above-mentioned embodiments and preferred embodiments. Details that have already been described will not be repeated. As used below, the terms "module" and "device" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.
[0095] According to an embodiment of the present invention, there is also provided an embodiment of a device for implementing the above-mentioned method for updating a routing path. Figure 11 is a schematic structural diagram of a routing path updating device according to an embodiment of the present invention. Figure 11As shown, the above-mentioned routing path updating device includes: an alternative path determination module 1100, a path quality determination module 1102, and a path screening module 1104, wherein:
[0096] The alternative path determination module 1100 is configured to, upon detecting that the quality of a primary routing path between a source node and a destination node in a communication network is abnormal, determine multiple alternative routing paths between the source node and the destination node based on multiple neighboring nodes of the destination node, wherein the multiple neighboring nodes are nodes not on the primary routing path; the alternative routing paths include routing paths between corresponding neighboring nodes and the source node, and links between corresponding neighboring nodes and the destination node;
[0097] A path quality determination module 1102, connected to the candidate path determination module 1100, is configured to determine the path qualities corresponding to the plurality of candidate routing paths;
[0098] The path screening module 1104 is connected to the path quality determination module 1102 and is configured to determine a target routing path between a source node and a destination node from a plurality of candidate routing paths based on the path qualities corresponding to the plurality of candidate routing paths.
[0099] In an embodiment of the present invention, an alternative path determination module 1100 is provided for determining, when detecting that the quality of the primary routing path between a source node and a destination node in a communication network is abnormal, a plurality of alternative routing paths between the source node and the destination node are determined based on a plurality of neighboring nodes of the destination node, wherein the plurality of neighboring nodes are nodes that are not on the primary routing path; the alternative routing paths include routing paths between corresponding neighboring nodes and the source node, and links between corresponding neighboring nodes and the destination node; a path quality determination module 1102 is connected to the alternative path determination module 1100, and is used to determine that the plurality of alternative routing paths correspond to path quality; a path screening module 1104, connected to the path quality determination module 1102, is used to determine the target routing path between the source node and the destination node from the multiple alternative routing paths based on the path qualities corresponding to the multiple alternative routing paths, thereby achieving the purpose of using the neighbor nodes of the destination node not occupied by the main routing path to form multiple alternative routing paths, and accurately screening the routing paths according to the quality of each alternative path, thereby achieving the technical effect of optimizing routing path selection and improving the efficiency of recovering from abnormal routing path quality, thereby solving the technical problem of low efficiency of recovering from abnormal routing path quality in the communication network.
[0100] It should be noted that the above modules can be implemented by software or hardware. For example, for the latter, it can be implemented in the following ways: the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0101] It should be noted that the aforementioned candidate path determination module 1100, path quality determination module 1102, and path screening module 1104 correspond to steps S102 through S106 in the embodiment. These modules and corresponding steps implement the same examples and application scenarios, but are not limited to those disclosed in the aforementioned embodiment. It should be noted that these modules, as part of the apparatus, can be run on a computer terminal.
[0102] It should be noted that the optional or preferred implementation of this embodiment can be found in the relevant description in the embodiment, which will not be repeated here.
[0103] The above-mentioned routing path updating device may further include a processor and a memory. The above-mentioned alternative path determination module 1100, path quality determination module 1102, path screening module 1104, etc. are all stored in the memory as program modules, and the processor executes the above-mentioned program modules stored in the memory to implement corresponding functions.
[0104] The processor includes a core, which retrieves corresponding program modules from memory. There can be one or more cores. Memory may include non-permanent memory in a computer-readable medium, random access memory (RAM), and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory includes at least one memory chip.
[0105] According to an embodiment of the present application, an embodiment of a non-volatile storage medium is further provided. Optionally, in this embodiment, the non-volatile storage medium includes a stored program, wherein when the program is executed, the device containing the non-volatile storage medium is controlled to execute any of the above-mentioned methods for updating a routing path.
[0106] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group, and the non-volatile storage medium includes a stored program.
[0107] Optionally, when the program is running, the device where the non-volatile storage medium is located is controlled to perform the following functions: when it is detected that the quality of the main routing path between the source node and the destination node in the communication network is abnormal, multiple alternative routing paths between the source node and the destination node are determined based on multiple neighbor nodes of the destination node, wherein the multiple neighbor nodes are nodes that are not on the main routing path; the alternative routing paths include routing paths between corresponding neighbor nodes and the source node, and links between corresponding neighbor nodes and the destination node; the path qualities corresponding to the multiple alternative routing paths are determined; based on the path qualities corresponding to the multiple alternative routing paths, the target routing path between the source node and the destination node is determined from the multiple alternative routing paths.
[0108] According to an embodiment of the present application, a processor embodiment is further provided. Optionally, in this embodiment, the processor is configured to run a program, wherein the program executes any of the above-mentioned methods for updating a routing path when the program is run.
[0109] According to an embodiment of the present application, an embodiment of a computer program product is also provided. When executed on a data processing device, the program is suitable for executing the steps of the updating method for initializing any of the above-mentioned routing paths.
[0110] Optionally, the above-mentioned computer program product, when executed on a data processing device, is suitable for executing a program initialized with the following method steps: when it is detected that the quality of the main routing path between the source node and the destination node in the communication network is abnormal, based on multiple neighbor nodes of the destination node, multiple alternative routing paths between the source node and the destination node are determined, wherein the multiple neighbor nodes are nodes that are not on the main routing path; the alternative routing paths include routing paths between corresponding neighbor nodes and the source node, and links between corresponding neighbor nodes and the destination node; the path qualities corresponding to the multiple alternative routing paths are determined; based on the path qualities corresponding to the multiple alternative routing paths, the target routing path between the source node and the destination node is determined from the multiple alternative routing paths.
[0111] An embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the following steps are implemented: upon detecting that the quality of a main routing path between a source node and a destination node in a communication network is abnormal, multiple alternative routing paths between the source node and the destination node are determined based on multiple neighboring nodes of the destination node, wherein the multiple neighboring nodes are nodes not on the main routing path; the alternative routing paths include routing paths between corresponding neighboring nodes and the source node, and links between corresponding neighboring nodes and the destination node; the path qualities corresponding to the multiple alternative routing paths are determined; and based on the path qualities corresponding to the multiple alternative routing paths, a target routing path between the source node and the destination node is determined from the multiple alternative routing paths.
[0112] The above sequence of the embodiments of the present invention is for description only and does not represent the superiority or inferiority of the embodiments.
[0113] In the above embodiments of the present invention, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0114] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the above modules can be a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, modules or indirect coupling or communication connection of modules, which can be electrical or other forms.
[0115] The modules described above as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0116] In addition, the functional modules in various embodiments of the present invention may be integrated into a single processing module, or each module may exist physically separately, or two or more modules may be integrated into a single module. The aforementioned integrated modules may be implemented in the form of hardware or software functional modules.
[0117] If the above-mentioned integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable non-volatile storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a non-volatile storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present invention. The aforementioned non-volatile storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program code.
[0118] The above are only preferred embodiments of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for updating a routing path, characterized in that: include: In a case where the quality of a primary routing path between a source node and a destination node in a communication network is detected to be abnormal, determining multiple alternative routing paths between the source node and the destination node based on multiple neighboring nodes of the destination node, wherein the multiple neighboring nodes are nodes not on the primary routing path; the alternative routing paths include routing paths between corresponding neighboring nodes and the source node, and links between the corresponding neighboring nodes and the destination node; Determining the path qualities corresponding to the plurality of candidate routing paths respectively; Based on the path qualities respectively corresponding to the multiple candidate routing paths, a target routing path between the source node and the destination node is determined from the multiple candidate routing paths.
2. The method according to claim 1, characterized in that The method of determining, when detecting that the quality of a primary routing path between a source node and a destination node in a communication network is abnormal, a plurality of alternative routing paths between the source node and the destination node based on a plurality of neighboring nodes of the destination node, comprises: In the case where it is detected that the quality of the main routing path between the source node and the destination node in the communication network is abnormal, detecting whether there is a backup routing path between the source node and the destination node; In a case where it is detected that the backup routing path does not exist, determining the multiple candidate routing paths based on the multiple neighboring nodes; or When it is detected that the backup routing path exists and the quality of the backup routing path is abnormal, the multiple candidate routing paths are determined based on the multiple neighboring nodes.
3. The method according to claim 1, characterized in that The determining, based on the multiple neighboring nodes of the destination node, multiple candidate routing paths between the source node and the destination node includes: For any neighbor node among the multiple neighbor nodes, if there are multiple routing paths between the any neighbor node and the source node, determine the path qualities corresponding to the multiple routing paths respectively; Determining, according to the routing path with the highest path quality among the multiple routing paths, an alternative routing path corresponding to any one of the neighboring nodes; The multiple candidate routing paths are obtained by obtaining the candidate routing path corresponding to any neighboring node.
4. The method according to claim 1, wherein The determining the path qualities corresponding to the plurality of candidate routing paths respectively includes: For any neighbor node among the multiple neighbor nodes, determine a path quality between the any neighbor node and the source node, and a path quality between the any neighbor node and the destination node; Determining the path quality of the alternative routing path corresponding to any neighbor node based on the path quality between any neighbor node and the source node and the path quality between any neighbor node and the destination node; The path qualities respectively corresponding to the multiple candidate routing paths are obtained by obtaining the path quality of the candidate routing path corresponding to any neighboring node.
5. The method according to claim 1, wherein The determining, based on the path qualities respectively corresponding to the multiple candidate routing paths, a target routing path between the source node and the destination node from the multiple candidate routing paths includes: The routing path with the highest path quality among the multiple candidate routing paths is determined as the target routing path.
6. The method according to claim 1, characterized in that Before determining, in the case where the quality of the primary routing path between the source node and the destination node in the communication network is detected to be abnormal, a plurality of alternative routing paths between the source node and the destination node based on a plurality of neighboring nodes of the destination node, the method further comprises: Obtain link metrics corresponding to the multiple links included in the main routing path, wherein the link metrics include at least two of the following metrics: bandwidth, delay information, packet loss rate, number of hops, reliability, and load information of the corresponding link; Based on the link metric indicators respectively corresponding to the multiple links, it is determined whether the quality of the main routing path is abnormal.
7. The method according to claim 6, characterized in that The determining whether the path quality is abnormal based on the link metric indicators respectively corresponding to the multiple links includes: Determine the weight value of each link metric; Determining link metric values corresponding to the multiple links respectively based on the link metric indicators respectively corresponding to the multiple links and the weight value of each link metric indicator; Determining weight values corresponding to the multiple links respectively; Obtaining a comprehensive metric value of the main routing path based on the link metric values corresponding to the multiple links and the weight values corresponding to the multiple links; When a link metric value of any link among the multiple links is greater than a preset first threshold, or the comprehensive metric value is greater than a preset second threshold, it is determined that the quality of the main routing path is abnormal; When the link metrics of the multiple links are all less than or equal to the preset first threshold, and the comprehensive metric is less than or equal to the preset second threshold, it is determined that the quality of the main routing path is not abnormal.
8. The method according to any one of claims 1 to 7, characterized in that After determining the target routing path between the source node and the destination node from the multiple candidate routing paths based on the path qualities corresponding to the multiple candidate routing paths, the method further includes: The path information of the target routing path and the path quality of the target routing path are sent to neighbor nodes of the source node and neighbor nodes of the destination node, wherein the path information at least includes a node sequence of the target routing path.
9. The method according to any one of claims 1 to 7, characterized in that After determining the target routing path between the source node and the destination node from the multiple candidate routing paths based on the path qualities corresponding to the multiple candidate routing paths, the method further includes: Detecting whether there is another routing path associated with the primary routing path and having the destination node as a neighbor node; In the case where the other routing path is detected, constructing a first routing path based on the target routing path and the link between the destination node of the target routing path and the destination node of the other routing path; The first routing path is used as an alternative routing path for the other routing paths.
10. An electronic device, characterized in that: The method comprises one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the routing path updating method according to any one of claims 1 to 9.
11. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method for updating a routing path according to any one of claims 1 to 9 are implemented.