Routing tree construction method, communication method, program product, and electronic device
By constructing a routing tree by building an Eulerian directed graph and sorting it by local connectivity, the problem of global connectivity limitation in traditional methods is solved. This achieves the matching of fault tolerance capability and link resources for each node, improves network reliability and the efficiency of fast rerouting, and ensures low latency characteristics.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TSINGHUA UNIVERSITY
- Filing Date
- 2026-05-07
- Publication Date
- 2026-06-26
AI Technical Summary
In existing FRR technology, the route tree construction method is limited by global connectivity, which cannot make full use of local redundant resources, resulting in insufficient fault tolerance of nodes, and heuristic algorithms cannot theoretically guarantee perfect fault tolerance.
By constructing an Eulerian directed graph, calculating local connectivity, removing non-target nodes in ascending order of local connectivity, recording arc pairing information, reversing the order and assigning route tree identifiers, and constructing multiple arc-disjoint route trees, we can ensure that the number of fault-tolerant paths for each node is equal to its local connectivity.
It breaks through the global connectivity bottleneck, makes full use of local redundant resources, and realizes that the fault tolerance capability of each node matches its link resources, thereby improving the reliability of the network and the efficiency of fast rerouting, and ensuring low latency characteristics.
Smart Images

Figure CN122293579A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and more specifically, to a routing tree construction method, a communication method, a program product, and an electronic device. Background Technology
[0002] In modern carrier-grade backbone networks, latency-sensitive services such as virtual reality, cloud gaming, and financial transactions require the network to restore service within an extremely short time (typically milliseconds) after a link or node failure. Fast Reroute (FRR) technology, as a core means of ensuring service continuity, aims to quickly switch to a backup path when a network link or node fails, avoiding data transmission interruptions or latency spikes. The construction of the routing tree is a crucial step in FRR technology, and its performance directly determines the efficiency of fault recovery, fault tolerance, and transmission latency.
[0003] In related FRR (Fault-Responding Routing) technologies, the construction of routing trees is mostly based on traditional spanning tree theory or heuristic routing algorithms. This involves building multiple non-overlapping routing trees to provide backup paths for nodes. Traditional spanning tree theory requires that the constructed routing trees cover all nodes in the network. This limits the maximum number of non-overlapping routing trees to be built, which is restricted by the weakest link in the entire network (i.e., global connectivity, typically only 2-3). This prevents the full utilization of local redundancy resources, making it difficult to improve node fault tolerance and resulting in a significant waste of local resources.
[0004] While routing trees built based on heuristic routing algorithms do not need to cover all nodes in the entire network, thus improving the utilization of local resources to some extent, these methods cannot theoretically prove that a "perfect routing tree" (i.e., the number of independent backup paths obtained by each node equals its local connectivity) necessarily exists in any bidirectional network. This leads to the fact that in actual deployment, the number of fault-tolerant paths of a node may be lower than its theoretically achievable upper limit, and reliability and stability are uncontrollable.
[0005] Therefore, there is an urgent need for a routing tree construction method that can overcome the limitations of global connectivity and ensure perfect fault tolerance. Summary of the Invention
[0006] In view of this, this application provides a routing tree construction method, a communication method, a program product, and an electronic device.
[0007] According to a first aspect of this application, a method for constructing a routing tree is provided, the routing tree being used for Fast Rerouting (FFR), the method comprising: Obtain the Eulerian directed graph of the target network that supports FRR, wherein the nodes in the Eulerian directed graph represent network devices in the target network, and the directed arcs between nodes represent bidirectional connectivity between network devices; Determine the local connectivity of each non-target node in the Eulerian directed graph. The local connectivity of each non-target node is the number of non-intersecting arc paths from the non-target node to the target node. Remove each non-target node in the Eulerian directed graph in ascending order of local connectivity. During the removal of each non-target node, replace each pair of original in-and out-arcs of the non-target node with a new directed arc connecting the upstream and downstream neighbor nodes of the non-target node, and record the pairing information of the original in-and out-arcs and the new directed arcs. The Eulerian directed graph is restored in reverse order of node removal. During the restoration of each non-target node, the original ingress and egress arc pairs of the non-target node are recovered based on the pairing information of the non-target node, and a route tree identifier is assigned to the recovered original ingress and egress arc pairs, such that the number of non-intersecting arc paths from the non-target node to the target node is equal to the local connectivity of the non-target node. Multiple arc-disjoint routing trees are constructed based on the routing tree identifier and used for the FRR of the target network.
[0008] According to a second aspect of this application, a communication method is provided, the method being used for a first network device in a target network, the target network further comprising a second network device, the method comprising: Obtain the target data to be sent to the second network device; If a failure is detected in the primary path from the first network device to the second network device, a target backup path is selected from the preset backup paths to send the target data to the second network device using the target backup path. The primary path and the backup path are determined based on a pre-built routing tree, which is constructed using the method mentioned in the first aspect above.
[0009] According to a third aspect of this application, a computer program product is provided, the computer program product comprising a computer program that, when executed, implements the method mentioned in the first aspect above.
[0010] According to a fourth aspect of this application, an electronic device is provided, the electronic device including a processor, a memory, and a computer program stored in the memory that is executable by the processor, wherein the processor executes the computer program to implement the method mentioned in the first aspect above.
[0011] According to a fifth aspect of this application, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed, implements the method mentioned in the first aspect above.
[0012] By applying the scheme provided in this application, an Eulerian directed graph can be obtained to characterize the bidirectional connectivity between network devices in the target network. For any target node in the Eulerian directed graph, the local connectivity from each non-target node to the target node can be calculated. The non-target nodes are then separated in ascending order of their local connectivity, i.e., the original inbound and outbound arc pairs of the node are replaced with newly added directed arcs connecting its upstream and downstream neighboring nodes and the pairing information is recorded. The nodes are then restored in reverse order of the node removal order. Based on the pairing information, the original inbound and outbound arcs are recovered and route tree identifiers are assigned. Finally, multiple arc-disjoint route trees are constructed.
[0013] By employing a "decompose-then-reconstruct" logic and using local connectivity as the basis for node operations, this approach overcomes the bottleneck of traditional methods limited by global connectivity, fully activating redundant link resources in densely populated areas such as the core layer. The pairing information recorded during arc separation provides accurate data support for node reconstruction. Combined with reverse-order reconstruction and routing tree identifier allocation, it ensures that the number of non-intersecting arc paths from each non-target node to the target node strictly matches its local connectivity, achieving "perfect fault tolerance" (the number of paths represents the upper limit of fault tolerance).
[0014] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a flowchart of a routing tree construction method according to an embodiment of this application.
[0017] Figure 2 This is a schematic diagram illustrating the conversion of a physical topology graph into an Eulerian directed graph according to an embodiment of this application.
[0018] Figure 3 This is a schematic diagram illustrating the calculation of local connectivity according to an embodiment of this application.
[0019] Figure 4 This is a schematic diagram of an embodiment of the present application, showing how a newly added directed arc is split into original inbound and outbound arc pairs and assigned routing tree identifiers.
[0020] Figure 5 This is a schematic diagram of another embodiment of this application, showing how a newly added directed arc is split into original inbound and outbound arc pairs and assigned a routing tree identifier.
[0021] Figure 6 This is a schematic diagram of the logical structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0022] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0023] In modern carrier-grade backbone networks, latency-sensitive services such as virtual reality, cloud gaming, and financial transactions require the network to restore service within a very short time (typically milliseconds) after a link or node failure. Fast Rerouting (FRR) technology, by pre-compiling and configuring backup forwarding tables, allows routers to switch data packets to backup paths based solely on local information (such as destination address, ingress port, and link state) when a neighboring link failure is detected, without waiting for the global routing protocol to reconverge.
[0024] Currently, mainstream FRR (Functional Route Response) schemes typically employ the "Arc-disjoint Spanning Arborescences" technique. This involves constructing multiple routing trees covering all nodes in the network for each destination node, with each routing tree providing a unique path to the destination node. When the primary path fails, network devices switch to the next routing tree in a pre-defined cyclical order, using the backup path provided by that tree for forwarding.
[0025] Then, traditional routing trees require coverage of all nodes in the network, which limits the maximum number of multi-arc non-intersecting spanning trees to the weakest link in the entire network (i.e., global connectivity, which is usually only 2-3). Even if there are a large number of parallel links (e.g., more than 10 physical paths) in local areas of the network (such as between core layer nodes), forming a dense subgraph, these redundant resources cannot be effectively utilized due to the "bottleneck effect" of global connectivity.
[0026] Traditional "spanning trees" require that all nodes in the network be included. Therefore, the upper limit of the number of arc-disjoint spanning trees that can be constructed is limited by the weakest link in the entire network (i.e., global connectivity, which is usually only 2 or 3). Even if there are locally very dense subgraphs in the network (e.g., there may be more than 10 physical paths between core layer nodes), existing methods cannot utilize these additional redundant paths to provide higher fault tolerance.
[0027] Furthermore, to overcome the global connectivity limitation, existing research has proposed the concept of "routing arborescences," which does not require coverage of the entire network. However, existing algorithms (such as the DLCP algorithm) are mostly based on heuristic strategies or complex integer linear programming (ILP), and cannot theoretically prove that a "perfect routing tree" (i.e., providing each node with an independent path equal to its local connectivity) necessarily exists in any bidirectional network, leading to uncontrollable reliability in practical deployments.
[0028] Therefore, there is an urgent need for a routing tree construction method that can overcome the limitations of global connectivity and ensure perfect fault tolerance.
[0029] Based on this, this application provides a routing tree construction method for fast rerouting. It can obtain an Eulerian directed graph that represents the bidirectional connectivity between network devices in the target network. For any target node in the Eulerian directed graph, the local connectivity from each non-target node to the target node can be calculated. The non-target nodes are then separated in ascending order of local connectivity. This involves replacing the original inbound and outbound arc pairs of the node with newly added directed arcs connecting its upstream and downstream neighbor nodes and recording the pairing information. The nodes are then restored in reverse order of node removal. Based on the pairing information, the original inbound and outbound arcs are recovered and routing tree identifiers are assigned. Finally, multiple arc-disjoint routing trees are constructed.
[0030] By employing a "decomposition-then-reconstruction" logic, and using local connectivity as the core basis, combined with the technical logic of "node arc separation and removal sorted by local connectivity + reverse restoration + route tree identifier allocation," multiple arc-disjoint routing trees are constructed. Using local connectivity as the basis for node operations overcomes the bottleneck of traditional methods limited by global connectivity, fully activating redundant link resources in densely populated areas such as the core layer. The pairing information recorded during arc separation provides accurate data support for node restoration. Combined with reverse restoration and route tree identifier allocation, it ensures that the number of arc-disjoint paths from each non-target node to the target node strictly matches its local connectivity, achieving "perfect fault tolerance" (the number of paths is the upper limit of fault tolerance capability). The final constructed arc-disjoint routing tree avoids fault tolerance failure caused by shared links and provides low-latency backup path selection for rapid rerouting, significantly improving network fault recovery efficiency and service transmission continuity.
[0031] The routing tree construction method provided in this application can be executed by various electronic devices, such as mobile phones, tablets, laptops, desktop computers, physical servers, cloud servers, etc. For example, in some scenarios, the routing tree construction method can be executed by software or tools with routing tree construction functions. This software or tool can be installed on electronic devices such as mobile phones and computers. Users can input the physical topology diagram of each network device in the target network, and the software or tool can output the constructed routing tree.
[0032] like Figure 1 As shown, the routing tree construction method provided in this application embodiment may include the following steps: S102. Obtain the Eulerian directed graph of the target network that supports FFR, where the nodes in the Eulerian directed graph represent network devices in the target network, and the directed arcs between nodes represent the bidirectional connectivity between network devices. In step S102, you can refer to Figure 2 This method can obtain the physical topology of a target network that supports FFR and convert it into an Eulerian directed graph. The physical topology can be obtained by abstracting and modeling the physical topology of the target network. For example, each network device (such as a router or switch) in the target network can be mapped to a node in the physical topology graph. For any two network devices in the target network, the connection link can be mapped to the edge connecting the two nodes in the physical topology graph. Then, each undirected edge in the physical topology graph can be replaced with two directed arcs in opposite directions to obtain the Eulerian directed graph. For example, the undirected link between network device A and network device B can be split into two directed arcs, "A→B" and "B→A," forming a complete Eulerian directed graph. The core function of the directed arcs is to accurately represent the bidirectional communication capability between network devices, ensuring that subsequent path calculations are consistent with the actual network data transmission direction.
[0033] S104. Determine the local connectivity of each non-target node in the Eulerian directed graph. The local connectivity of each non-target node is the number of non-intersecting arc paths from the non-target node to the target node. In step S104, using the target node in the Eulerian directed graph (i.e., the root node of the routing tree, which could be a pre-defined destination node, etc.) as a benchmark, for each non-target node, the total number of "arc-disjoint paths" from it to the target node within its local subgraph is calculated. This total number represents the local connectivity of the non-target node. Here, "arc-disjoint paths" refers to paths that do not share any directed arcs (i.e., a directed arc contained in one path is not contained in other paths), ensuring the independence of the paths (i.e., independent paths). During the calculation, there is no need to consider the weakest link in the global network (global connectivity); only the available independent path resources from the node itself to the target node are focused on. This provides a quantitative basis for subsequent node removal sorting and routing tree path allocation, ensuring that the fault tolerance capability of each non-target node matches its own link resource situation, avoiding problems of "resource waste" or "insufficient fault tolerance."
[0034] For example, such as Figure 3 As shown, assuming the target node is node E in the graph, then for non-target node A, the non-intersecting arc paths (independent paths) to node E are: ABE, ACE, ADE. Therefore, the local arc connectivity of node A is 3.
[0035] S106. Remove each non-target node in the Eulerian directed graph in ascending order of local connectivity. During the removal of each non-target node, replace each pair of original in-and out-arcs of the non-target node with a newly added directed arc connecting the upstream and downstream neighbor nodes of the non-target node, and record the pairing information of the original in-and out-arcs and the newly added directed arcs. In step S106, all non-target nodes in the Eulerian directed graph can be sorted in ascending order of local connectivity. Arc separation operations are then performed on each non-target node in this order. For example, for the node to be removed, all its original incoming and outgoing arcs can be traversed, and each original incoming arc can be paired with an original outgoing arc to form an "original incoming-outgoing arc pair." Then, a new directed arc directly connecting the upstream and downstream neighbors of the node is used to replace this pair. Finally, the node is removed from the Eulerian directed graph. For instance, taking node v as the node to be removed, each original incoming arc, such as "u→v", is paired with an original outgoing arc, such as "v→w", to form an "original incoming-outgoing arc pair." Then, the new directed arc "u→w" connecting node v's neighbor u and neighbor v is used to replace "u→v" and "v→w".
[0036] During the removal of each node, complete arc pairing information can be recorded for each node. This arc pairing information can include the correspondence between "original incoming arc and original outgoing arc", the endpoints (neighbor nodes) of the newly added directed arc, and the mapping relationship between the newly added directed arc and the original incoming and outgoing arc pairs.
[0037] By removing nodes in ascending order of local connectivity, edge nodes (with low local connectivity and few link resources) are prioritized for processing, while core nodes (with high local connectivity and many link resources) are processed later. This avoids disrupting redundant links of core nodes by removing edge nodes, ensuring that global connectivity is not reduced. The arc separation operation replaces the relay role of the original node with direct connection between neighboring nodes, preserving the connectivity between nodes while simplifying the graph structure and providing a clear link mapping foundation for subsequent reverse reconstruction. Detailed recording of arc pairing information ensures accurate tracing of the original link relationships during subsequent node restoration, avoiding path loss or confusion, and providing data support for the construction of a "perfect routing tree."
[0038] S108. Restore the Eulerian directed graph in reverse order of node removal. During the restoration of each non-target node, restore the original inbound and outbound arc pairs of the non-target node based on the pairing information of the non-target node, and add a route tree identifier to the restored original inbound and outbound arc pairs, so that the number of non-intersecting arc paths from the non-target node to the target node is equal to the local connectivity of the non-target node. In step S108, non-target nodes are restored one by one in reverse order of node removal (i.e., "local connectivity from largest to smallest"). For nodes to be restored, all newly added directed arcs that replace the node can be found based on its arc pairing information. Each newly added directed arc is split into corresponding original inbound and outbound arc pairs, restoring the connection between the node and its upstream and downstream neighboring nodes. Then, a routing tree identifier is assigned to the original inbound and outbound arcs in the restored original inbound and outbound arc pairs. Directed arcs on the same routing tree share a single routing tree identifier, facilitating the extraction of paths from the restored Eulerian directed graph based on the routing tree identifier to construct the routing tree. During the process of adding routing tree identifiers to the original inbound and outbound arcs, it is ensured that the number of non-intersecting paths from each non-target node to the target node equals its local connectivity, achieving theoretically maximized "perfect fault tolerance." This allows the fault tolerance of a node to reach the upper limit of its link resources; for example, a node with a local connectivity of 3 can withstand the failure of two paths and still maintain normal communication.
[0039] S110. Construct multiple arc-disjoint routing trees based on the routing tree identifier, which are used for the FFR of the target network.
[0040] In step S110, all directed arcs with routing tree identifiers in the Eulerian directed graph are traversed. Directed arcs with the same routing tree identifier are integrated according to the path logic of "target node → non-target node" to form multiple independent routing trees. Each routing tree consists of continuous directed arcs, covering some or all non-target nodes with communication needs. No two routing trees share any directed arcs (i.e., the arcs do not intersect), ensuring that the paths of different routing trees are independent and do not affect each other. The constructed routing trees can be used for fast rerouting in the target network. For example, for any non-target node to target node, a path from the non-target node to the target node can be determined as the primary path based on the constructed routing trees, and multiple backup paths can be determined. When a failure is detected in the primary path, a backup path is selected from the backup paths according to a pre-set priority for data transmission.
[0041] The routing tree construction method in this application breaks through the global connectivity bottleneck, makes full use of local redundant resources, solves the problems of "local resource waste and insufficient fault tolerance" in traditional methods, and realizes the theoretical guarantee of "perfect routing tree", ensuring that the fault tolerance of each node matches its link resources, thereby improving the controllability of network reliability.
[0042] Existing routing tree construction algorithms primarily focus on "maximizing the number of paths" while neglecting the "length of backup paths." This often results in severely detoured backup paths (high PathStretch), significantly increasing packet transmission latency after failover, reducing bandwidth utilization, and failing to meet the demands of low-latency services. Furthermore, prematurely removing nodes with small hop counts from the target node can disrupt multiple associated links, requiring frequent addition of detour arcs in subsequent arc separation operations. This not only increases the complexity of pairing information recording but also causes severe path detours during reverse reconstruction, reducing the low-latency characteristics of the routing tree. Therefore, in some embodiments, when removing non-target nodes in the Eulerian directed graph node by node according to their local connectivity from smallest to largest, if at least two non-target nodes have the same local connectivity, the hop count required for each of these two non-target nodes to reach the target node can be determined. The removal order of non-target nodes with the same local connectivity is then determined according to the principle that non-target nodes with larger hop counts are removed first.
[0043] To prevent the tree structure from prematurely diverging, a two-level sorting strategy using "local connectivity as the primary factor and hop count as the secondary factor" can be employed. After sorting by local connectivity from smallest to largest, if at least two non-target nodes have the same local connectivity, the "hop count" from each of these nodes to the target node is calculated first. This hop count represents the number of directed arcs in the shortest path from the node to the target node. For example, if the target node is E and the shortest path for node B is "B→A→E", then B has a hop count of 2. The removal order of these nodes is then determined according to the principle of "the larger the hop count, the earlier it is removed." Edge nodes farther from the target node are removed first, while core nodes closer to the target node are removed last. For example, given non-target node F (local connectivity 2, hop count 3) and non-target node A (local connectivity 2, hop count 2), since F > A, F is removed first, followed by A.
[0044] Removing edge nodes first does not disrupt the link structure of core nodes, preserving redundant link resources for subsequent operations. This ensures that global network connectivity is not reduced during arc separation, providing a better link foundation for path restoration during reverse reconstruction. When edge nodes are split first, the newly added replacement arcs are mostly short paths between their direct neighbors, avoiding long-distance detours caused by premature core node splitting, reducing the complexity of pairing information, and improving the efficiency of reverse reconstruction. Furthermore, removing core nodes later makes it easier to record their associated paths completely, generating shorter paths during reverse reconstruction, effectively controlling path stretching in the routing tree, and ensuring the low-latency characteristics required for fast rerouting.
[0045] Considering that pairing the original incoming and outgoing arcs of non-target nodes and replacing the paired original incoming and outgoing arc pairs with newly added directed arcs, using random pairing can easily lead to the forced splitting of naturally existing bidirectional symmetrical links in the original network. For example, if node v has bidirectional communication capabilities with nodes u and w respectively (i.e., there are four directed arcs "u→v", "v→u", "w→v", and "v→w", corresponding to two bidirectional links uv and vw), pairing "u→v" with "v→u" and "w→v" with "v→w" will generate two self-looping arcs "u→u" and "w→w", or incorrectly splitting "u→v" with "v→w" and "w→v" with "v→u" into non-corresponding groups, destroying the symmetrical association of bidirectional links. This splitting not only artificially introduces redundant detour structures and loses the excellent topological characteristics of the original network, but also requires multiple arcs to be spliced together to restore the path during subsequent reverse reconstruction, increasing the risk of path stretching and reducing the quality and transmission efficiency of the routing tree.
[0046] Based on this, in some embodiments, when pairing the original incoming and outgoing arcs of non-target nodes, "prioritizing pairing arc combinations that form bidirectional edges" is possible. After obtaining all the original incoming arcs (such as "u→v", "w→v") and original outgoing arcs (such as "v→u", "v→w") of the non-target node v to be removed, the core objective of pairing is to "preserve the bidirectional symmetry characteristics of the original network to the greatest extent." Therefore, incoming arc-outgoing arc combinations that can form bidirectional edges are prioritized. That is, when there is an incoming arc "u→v" and an outgoing arc "v→w", the incoming arc "w→v" and the outgoing arc "v→u" are searched simultaneously, and these two sets of arcs are respectively used to form original incoming and outgoing arc pairs (first set: "u→v" + "v→w", second set: "w→v" + "v→u"). Then, each original pair of incoming and outgoing arcs can be replaced with a new directed arc connecting upstream and downstream neighboring nodes. For example, the first pair can be replaced with "u→w", and the second pair can be replaced with "w→u". This ensures that the new arcs after replacement still maintain the bidirectional communication capability between u and w. If there are any remaining unpaired incoming or outgoing arcs, they can be supplemented by matching them according to the regular rules.
[0047] By prioritizing the preservation of bidirectional edge pairing logic, the original network's topological advantages are maintained to the greatest extent possible. This avoids the artificial detours caused by the algorithm forcibly splitting bidirectional links, preserving the excellent topological characteristics of short paths and high symmetry for subsequent route tree generation. The newly generated directed arcs after replacement still maintain bidirectional communication connections, reducing the complexity of path reconstruction during reverse engineering and lowering the probability of long-distance detours, thus ensuring the low-latency characteristics of the route tree. Furthermore, the symmetry of bidirectional links is preserved, making it easier to generate independent paths with non-intersecting arcs during subsequent route tree identifier allocation, further enhancing the fault tolerance of the route tree.
[0048] After removing all non-target nodes from the Eulerian directed graph, only the target node remains. This target node typically forms multiple self-loops due to the arc separation operations performed on the non-target nodes in the previous process; these are directed arcs pointing from the target node to itself, such as "E→E". The number of self-loops is equal to the in-degree of the target node. For example, ... Figure 3As shown, there are 5 directed arcs pointing to the target node E, resulting in an in-degree of 5, forming 5 self-loops. To facilitate the simultaneous construction of routing trees during the subsequent reconstruction of the Eulerian directed graph, in some embodiments, after removing all non-target nodes from the Eulerian directed graph, the graph now only contains the target node and multiple self-loops generated by the previous arc separation operation. For each self-loop, a distinct routing tree identifier can be assigned, ensuring that each self-loop corresponds to a unique routing tree identifier and that routing tree identifiers for different self-loops are not duplicated. For example, if the target node E ultimately forms 5 self-loops, these 5 self-loops are assigned identifiers 1, 2, 3, 4, and 5 sequentially (or different colors can be used), and all identifiers are non-overlapping. By assigning unique routing tree identifiers to the self-loops, the target node's self-loop resources are transformed into independent routing tree bases that can be utilized in subsequent reconstruction, allowing the direct link resources corresponding to the self-loops to be fully activated and avoiding redundancy and waste.
[0049] In some embodiments, during the process of reconstructing the route tree by restoring the Eulerian directed graph and adding route tree identifiers to the restored original inbound and outbound arc pairs, a route tree identifier allocation scheme of "inbound arc inheritance and outbound arc scenario adaptation" can be adopted to ensure that the constructed route tree has continuous, non-cyclic paths and that the non-intersecting paths of the arcs from each node to the target node are equal to their connectivity. Specifically, when restoring non-target nodes in reverse order of node removal, all newly added directed arcs added when the node is removed can be determined based on the pairing information recorded during the node removal phase. For each newly added directed arc, it is split into corresponding original inbound and outbound arc pairs according to the pairing information, and the original inbound arc is directly assigned the same route tree identifier as the newly added directed arc (i.e., the original inbound arc directly inherits the route tree identifier of the newly added directed arc), ensuring the identifier association between the inbound arc and the newly added arc.
[0050] For example, such as Figure 4 As shown, in the process of restoring the Eulerian directed graph, assuming that node Vi needs to be restored, the pairing information of the removed stage record can be used to determine that removing Vi is a newly added directed arc, assuming Va→Vb (marked in red in the routing tree) and Vc→Vd (marked in blue in the routing tree). Among them, Va→Vb can be decomposed into Va→Vi (original incoming arc) and Vi→Vb (original outgoing arc), and Vc→Vd can be decomposed into Vc→Vi (original incoming arc) and Vi→Vd (original outgoing arc). The original incoming arc can directly inherit the color of the corresponding newly added directed arc, that is, Va→Vi inherits red and Vc→Vi inherits blue.
[0051] For the original outgoing arc, a routing tree identifier can be assigned to it based on the actual situation. For example, if the routing tree identifiers of all newly added directed arcs are unique, the original outgoing arc corresponding to each newly added directed arc can directly use the routing tree identifier of the newly added directed arc, ensuring that the identifiers of the ingoing and outgoing arcs in the same group are consistent, thus forming a continuous path.
[0052] If at least two newly added directed arcs have the same route tree identifier (i.e., identifier conflict), then from the original outgoing arcs split from these newly added arcs with the same identifier, the target original outgoing arc that "will not cause a route tree loop" is selected, and only this target original outgoing arc is assigned the duplicate route tree identifier. The original outgoing arcs split from the other newly added directed arcs with the same route tree identifier are not assigned route tree identifiers for the time being. When determining the target original outgoing arc that does not form a loop, the risk of loop can be eliminated by determining whether the downstream node pointed to by the outgoing arc already has a path pointing back to the current node. For example, if the newly added directed arc of the node to be restored v contains route tree identifier 1 (2 lines) and route tree identifier 2 (1 line), then the original outgoing arc corresponding to route tree identifier 2 will directly use route tree identifier 2. From the two original outgoing arcs split from the two newly added directed arcs corresponding to route tree identifier 1, the one that has no reverse path pointing to the downstream node is selected as the target original outgoing arc and assigned route tree identifier 1 to avoid loop.
[0053] For example, such as Figure 4 As shown, the routing tree identifiers of the newly added directed arcs Va→Vb (identified in red) and Vc→Vd (identified in blue) are not repeated. Therefore, the original outgoing arcs that are split off from each arc inherit their respective routing tree identifiers. For example, Vi→Vb inherits the red one, and Vi→Vd inherits the blue one.
[0054] like Figure 5 As shown, among the newly added directed arcs Va→Vb (indicated in red by the routing tree), Vc→Vd (indicated in blue by the routing tree), and Ve→Vf (indicated in blue by the routing tree), there are directed arcs Vc→Vd and Ve→Vf with duplicate routing tree identifiers. Therefore, a non-looping original outgoing arc (e.g., Vi→Vd) can be selected from the original outgoing arcs Vi→Vd and Vi→Vf obtained from their respective splitting processes to inherit the blue one. When assigning routing tree identifiers to the recovered original ingoing and outgoing arcs, the original incoming arc inherits the routing tree identifier of the newly added directed arc, ensuring the continuity of routing tree identifier allocation and providing a foundation for the continuity of paths within the same routing tree. By assigning routing tree identifiers to the original outgoing arcs according to different scenarios, operations are simplified and efficiency is improved when there are no routing tree identifier conflicts. Furthermore, when routing tree identifier conflicts occur, loop detection is used to filter the target original outgoing arc, preventing routing tree loop failures from the root and ensuring the availability of the routing tree.
[0055] Of course, there are various ways to allocate routing tree identifiers to the original incoming and outgoing arcs, not limited to those mentioned above. The general principle is to ensure that the number of non-intersecting paths from each non-target node to the target node is equal to its local connectivity. For example, in some scenarios, the original incoming arc can directly inherit the routing tree identifier of the corresponding newly added arc. For the allocation of routing tree identifiers for the original outgoing arc, a pre-defined available pool of routing tree identifiers can be allocated for the non-target node to be restored. This available pool can include the routing tree identifiers of all newly added arcs of the node and the unused routing tree identifiers of its neighboring nodes, ensuring that the total number of identifiers in the available pool is greater than the local connectivity of the node (ensuring that the number of paths can be completed). For all the original outgoing arcs obtained from the split, they are sorted according to the validity of the path from the downstream node pointed to by the original outgoing arc to the target node. Priority is given to allocating identifiers from the available pool to the original outgoing arcs that can directly reach the downstream node, have no reverse loops, and have continuous paths, ensuring that the same routing tree identifier appears only on one original outgoing arc, ensuring that the arcs do not intersect. After the allocation is completed, the number of identifiers of the original outgoing arcs of the node is exactly equal to its local connectivity.
[0056] In some embodiments, when selecting the target original outgoing arc for inheriting duplicate route tree identifiers, a dual screening scheme of "preventing loop formation + hop count screening" can be adopted to avoid detours and reduce path stretching. That is, in scenarios where there are at least two newly added directed arcs with duplicate route tree identifiers, candidate original outgoing arcs that "will not cause the route tree to form a loop" can be screened from all the original outgoing arcs obtained by splitting these newly added directed arcs (for example, by determining whether there is a path back to the current node from the downstream node pointed to by the outgoing arc to eliminate the risk of loops). For each candidate original outgoing arc, a route tree containing the outgoing arc is simulated and constructed. The number of hops (i.e., the number of directed arcs contained in the path) of the non-target node to the target node through the candidate outgoing arc is calculated. From all candidate original outgoing arcs, the one with the smallest number of hops is selected as the target original outgoing arc, and the duplicate route tree identifier is retained. For example, if the newly added directed arc with duplicate identifiers is split into 3 anti-loop candidate outgoing arcs with corresponding path hop counts of 2, 3, and 4, then the candidate outgoing arc with a hop count of 2 is selected as the target original outgoing arc.
[0057] By employing a two-layer filtering logic of "preventing loops first and then selecting the shortest path," it ensures that the original outgoing arc of the target does not cause the routing tree to fail in a closed loop, while minimizing the path length from the non-target node to the target node. This controls path stretching from the source and guarantees the low latency characteristics required for FRR.
[0058] To address scenarios where newly added directed arcs have duplicate route tree identifiers, after assigning the duplicated route tree identifier to a single target original outgoing arc, in order to convert the remaining unassigned route tree identifiers into independent paths, it is crucial to ensure that the number of non-intersecting paths between non-target nodes and target nodes equals their local connectivity, thus achieving "perfect fault tolerance." In some embodiments, a "path completion mechanism" can be employed. For example, in scenarios where route tree identifiers overlap in newly added directed arcs, after filtering out non-cyclic target original outgoing arcs and having them inherit duplicate route tree identifiers, it can be determined whether the number of non-intersecting paths between the current non-target node and target node reaches its local connectivity. If not, at least one other original outgoing arc besides the target original outgoing arc is selected from the split original outgoing arcs. The number of other selected original outgoing arcs can be determined based on the difference between the number of non-intersecting paths between the current non-target node and target node and their local connectivity. For example, if there are still two independent paths missing, then two other original outgoing arcs can be selected. For each selected original outgoing arc, we can determine the specific neighbor node (i.e., the endpoint node of the outgoing arc) that it points to. We query all the routing tree identifiers to which the neighbor node belongs, filter out the routing tree identifiers that are not occupied by the current non-target node, and select one of the routing tree identifiers as the target routing tree identifier to be assigned to the other original outgoing arc. We perform the above operation on each of the remaining selected original outgoing arcs one by one until the number of non-target node to target node arc non-intersecting paths is exactly equal to its local connectivity.
[0059] For example, if other original outgoing arcs "v→w" that are not the target node v point to the neighbor node w, query the set of routing tree identifiers of the routing tree to which w belongs, for example: {2,3,5}. After excluding the identifier 2 that v has already occupied, assign the identifier 3 or 5 to "v→w" to ensure that the outgoing arc is connected to the corresponding routing tree to which w belongs.
[0060] Through a targeted completion mechanism, the number of node paths is strictly matched with the local connectivity, achieving the goal of "perfect fault tolerance". In addition, the target route tree identifier is directly derived from the identifier of the neighbor node pointed to by other original outgoing arcs, ensuring that the outgoing arc and the route tree of the neighbor node are directly associated. Continuous paths can be built without additional traversal, effectively controlling the number of path hops and transmission latency, and adapting to the low latency requirements of fast rerouting. The identifier selection strictly follows the principle of "not occupied by the current node", ensuring that the completed path and the existing path are strictly non-intersecting, maintaining the core fault tolerance characteristics of the route tree.
[0061] In some embodiments, when allocating route tree identifiers to selected other original outgoing arcs to supplement the number of paths, in order to reduce the hops of the supplementary paths and reduce the path stretching rate, when allocating route tree identifiers for each other original outgoing arc, all route tree identifiers belonging to the neighboring nodes pointed to by the non-target node through that other original outgoing arc can be queried. Route tree identifiers not currently occupied by the non-target node are then selected as candidate route tree identifiers (ensuring no identifier allocation conflicts and maintaining the non-intersecting arc characteristic). For each candidate route tree identifier, the route tree constructed after allocating it to the remaining original outgoing arcs is simulated, and the hop count (i.e., the number of directed arcs in the path) of the non-target node reaching the target node through the path corresponding to that identifier is calculated. From all candidate route tree identifiers, the route tree identifier that minimizes the hop count is selected as the target route tree identifier and allocated to the remaining original outgoing arcs. For example, if the unoccupied candidate route tree identifiers are 2, 3, and 4, and the corresponding hop counts after allocation are 2, 3, and 4 respectively, then candidate route tree identifier 2 is selected as the target route tree identifier.
[0062] By using the filtering condition of "not occupied by the current node," it is ensured that the supplementary allocated identifier will not conflict with the existing path, maintaining the non-intersecting arc characteristic of the routing tree and guaranteeing the core advantage of "perfect fault tolerance." Using "minimum hop count" as the selection criterion, the length of the supplementary path is shortened to the minimum, avoiding the increase in latency caused by detours, perfectly adapting to the low latency requirements of FRR.
[0063] In some embodiments, the routing tree identifier can be a color identifier. For example, for an Eulerian directed graph that only includes the target node, when assigning a routing tree identifier to the self-loop of the target node, a unique exclusive color identifier (such as red, blue, green, etc.) can be assigned to each self-loop. Different color identifiers correspond to different routing trees, which facilitates the extraction of paths from the Eulerian directed graph and the construction of the routing tree based on the color identifier.
[0064] The strong intuitiveness of color coding allows maintenance personnel to quickly distinguish the routing tree to which an arc belongs visually. The structural boundaries of multiple routing trees in the topology diagram are clearly visible. During fault diagnosis, the routing tree and backup resources corresponding to the abnormal arc can be located instantly, reducing the problem location time from minutes to seconds.
[0065] In related technologies, to meet the requirement of non-intersecting arcs, the path from some nodes to the target node needs to pass through multiple relay nodes instead of a direct link. This leads to a significant increase in data transmission latency after failover, wasting network bandwidth resources and failing to meet the stringent transmission efficiency requirements of low-latency services. Furthermore, existing solutions lack targeted optimization mechanisms for routing tree path lengths, making it difficult to maintain the non-intersecting arc characteristic while ensuring low latency. Therefore, in some embodiments, a "shortest path optimization of routing trees under non-intersecting arc constraints" scheme can be adopted to minimize the path stretching of the routing tree. For example, after constructing multiple non-intersecting routing trees based on the routing tree identifier, optimization processing can be performed on each routing tree. Specifically, "directed arcs contained in other routing trees besides the current routing tree" (i.e., the target directed arc) can be deleted from the Eulerian directed graph to obtain a residual graph that only retains the directed arcs of the current routing tree. This operation ensures that the residual graph only contains the link resources of the current routing tree, avoiding intersections with arcs of other routing trees and maintaining the core characteristic of non-intersecting arcs. Then, in the residual graph, with the target node as the destination node, calculate the shortest path covering all nodes in the current routing tree (path metrics can include hop count, transmission latency, etc., prioritizing paths with shorter physical links and lower latency). The original routing tree can then be replaced with the routing tree corresponding to this shortest path, achieving iterative optimization of path length. For example, if the path from node C to target node E in the original routing tree is "C→A→B→E" (3 hops), after deleting arcs from other routing trees in the residual graph, the shortest path "C→E" (1 hop) can be found. The original tree can then be replaced with a new routing tree containing this shortest path.
[0066] Since the optimization process is based on the residual graph, by deleting arcs of other routing trees, the non-intersecting arc characteristic of the original routing tree is strictly preserved, ensuring that the core advantage of "perfect fault tolerance" is not affected. By replacing the shortest path, the path detour problem of the original routing tree can be solved, and the path length of each routing tree can be optimized to the theoretical shortest, which greatly reduces the transmission latency after failover and improves bandwidth utilization.
[0067] The following section uses a specific example to introduce the routing tree construction method provided in this application.
[0068] Traditional routing tree construction suffers from limitations imposed by global connectivity, leading to wasted local redundant resources, a lack of theoretical guarantees of "perfection," severe path stretching, and high communication latency. To address these issues, this embodiment provides a routing tree construction scheme that ensures, in any bidirectional network, the construction of a number of non-intersecting arc paths equal to the local connectivity of each node (i.e., achieving "perfection"), while minimizing path length as the core optimization objective, significantly reducing network latency after fault recovery.
[0069] Based on the properties of Eulerian graphs and the theory of edge splitting in graph theory, this embodiment proposes an algorithm framework of "decomposition first, then reverse reconstruction". The main steps are as follows: Step 1: Network Topology Modeling and Preprocessing (1) Obtain the physical topology of the network ,in For a set of nodes, It is an edge set.
[0070] Euler's directed graph transformation: transforming an undirected graph Convert to Euler directed graph The specific operation is as follows: [The rest of the text appears to be a list of steps or instructions, and doesn't form a co Each undirected edge in the array is replaced with two directed arcs in opposite directions (i.e., for each edge...). Generate arc and Since actual backbone network links are typically bidirectional, this conversion is always feasible.
[0071] Determine the destination node As the root node, calculate the values of all other nodes in the graph. arrive Local arc connectivity .
[0072] Step 2: Construct a connectivity-preserving graph sequence (GraphDecomposition) Using the Split-off operation on the graph Perform node-by-node removal to generate a graph sequence with decreasing node count. .
[0073] (1) Determine the node removal order: First, follow the path from node to root node. Local connectivity Arranged in a strictly ascending order.
[0074] Optimization Strategy O1: For nodes with the same connectivity, introduce a "decreasing hop count" as a secondary sorting criterion, based on their distance to the root node. The hop distances are arranged in strictly decreasing order. This allows the subsequent reverse construction process (i.e., the node recovery process) to simulate the "natural growth" pattern from the root node to the edge nodes, thereby preventing the tree structure from diverging too far away prematurely.
[0075] (2) Perform arc separation operation: Following the above order, for each non-root node Perform a complete split (CompleteSplitting-off). That is... Each incoming arc Find a matching arc Replace them with and remove the node At the same time, maintain the local connectivity between any nodes in the remaining graph. Record each node. List of all arc pairing information when removed .
[0076] Optimization strategy O2: When searching for splittable in-arc-out-arc pairs, prioritize pairs that can form bidirectional edges, i.e. ( , )and( , To the greatest extent possible, the bidirectional symmetry of the original network topology is preserved, and the artificial detours introduced by the algorithm's forced splitting of bidirectional links are reduced, thus retaining more excellent topological features for generating high-quality routing trees.
[0077] Step 3: Reverse Construction of the Perfect Routing Tree (Arborescence Construction) From only containing the root node The picture Begin by adding back the nodes one by one in reverse order of the removal order in step two, and simultaneously build the routing tree set. .
[0078] (1) Initialization: In the diagram In the middle, the root node have (node (In-degree) self-loops. Each self-loop is assigned a unique color identifier (representing a different routing tree index).
[0079] (2) Node restoration and color assignment: such as Figure 5 When the node is added back At that time, based on the recorded pairing information The previous straight arc (such as ) split into two arcs ( and Arc Directly inherit the original direct arc The color. Out of arc. The coloring must follow the following judgment logic: Case 1 (no conflict): If the current directly connected arc The color, when added back to the node It appears only once in the multiple straight arcs that are split (i.e. Color and (Different), then the arc Directly inherit the original direct arc The color.
[0080] Case 2 (Preventing Loop Conflicts): If multiple directly connected arcs have the same color (assuming it's color) ), indicating in color In the corresponding routing tree, the node Located at the intersection of multiple paths. At this point, it's necessary to check: if the color... If assigning a particular outgoing arc would cause a loop in the routing tree or result in other nodes becoming disconnected, then that assignment is prohibited; otherwise, any valid outgoing arc can be chosen to inherit its color. .
[0081] Why must there be acyclic solutions? The only condition for a cycle to occur is "circular dependence." For example... Figure 5 If you choose to exit the arc This resulted in a loop, indicating that the original path... The downstream will eventually point to (Right now ), thus forming The closed loop. However, due to the left figure The set of colors in the diagram is an acyclic tree, meaning that it is impossible for two colors to exist simultaneously. and In this case (otherwise, the original graph contains a loop). Therefore, in Two candidate arcs and In this case, at least one downstream node will not point back to the previous node. Other ingress nodes ensure that a legal outgress arc that does not form a loop can always be found.
[0082] Case 3 (Perfection Guarantee): For nodes The remaining unassigned color arcs ( New colors need to be assigned to ensure The number of independent paths it possesses reaches its local connectivity. .
[0083] At this point, color sufficiency is guaranteed by the node splitting order in step two. Since nodes are split in ascending order of local connectivity, adding them back in reverse... At that time, the neighbor node it points to The connectivity must be greater than or equal to This means the neighbors At least belong to A routing tree. Specifically, the operation involves checking neighboring nodes. Excluding the colors of all the routing trees to which it belongs. For every color that has been used, there must be some remaining available colors. One of these remaining colors is selected and assigned to the current outgoing arc, where for each outgoing arc, its corresponding neighbor node is the neighbor node that the outgoing arc points to. This process ensures that each node obtains the theoretically maximum number of independent paths.
[0084] Optimization Strategy O3: In cases 2 and 3 above, when multiple valid colors or arcs are available, select the node that... to the root node The color or arc with the shortest path length. This real-time correction mechanism effectively prevents the path from being unnecessarily lengthened during the construction process.
[0085] Step 4: Post-processing optimization based on residual map (i.e., optimization strategy O4) After initially constructing all routing trees Then, perform the following post-processing: (1) Traverse each tree .
[0086] (2) Construct a temporary residual graph that contains all nodes in the network, but removes all nodes belonging to other trees from the edge set. The arc (to ensure the arcs do not intersect).
[0087] (3) In this residual plot, with Calculate the shortest path tree (SPT) for the root.
[0088] (4) Replace the original with the calculated SPT. .
[0089] This step eliminates unnecessary detours during the construction process, ensuring that each routing tree, while satisfying the non-intersecting arc constraint, has a path that is as close as possible to the shortest path.
[0090] This solution has the following significant beneficial effects: (1) Overcoming the global connectivity bottleneck and achieving theoretically maximized "perfect" fault tolerance: This scheme theoretically guarantees and implements the construction of a "perfect routing tree" in Eulerian graphs and bidirectional networks. For any node As long as it exists in the network The method generates a routing tree that provides a path to the root node. The logical protection path for non-intersecting arcs provides protection for this node. Its fault tolerance capability is far superior to traditional methods that are limited by global connectivity.
[0091] (2) Significantly reduce the latency of backup paths through multi-dimensional topology-aware optimization: This scheme integrates four path optimization mechanisms—hop count-decreasing growth simulation (O1), bidirectional link priority maintenance (O2), greedy shortest selection during reconstruction (O3), and global shortest tree reconstruction based on residual graphs (O4). Experimental data show that this combined strategy reduces the average path stretch rate by 10%-30% and enables more than 50% of node pairs to transmit along the physical shortest path under normal conditions. This means that while providing high reliability, it effectively guarantees the quality of service (QoS) of low-latency services.
[0092] (3) It has deterministic polynomial complexity, which meets the requirements of large-scale network engineering: Although it provides stronger theoretical guarantees and path optimization, the time complexity of this algorithm is mainly determined by the graph decomposition stage. In actual tests (such as a USFibre network with 170 nodes), the calculation is completed within 87 seconds, which fully meets the requirements of offline routing table calculation.
[0093] Furthermore, embodiments of this application also provide a communication method for a first network device in a target network, the target network further including a second network device, the method comprising the following steps: Obtain the target data to be sent to the second network device; For example, when the first network device needs to send target data to the second network device, it can obtain the target data to be sent. The target data can include various types of communication data, such as video data, voice data, etc.
[0094] If a failure is detected in the primary path from the first network device to the second network device, a target backup path is selected from the preset backup paths to send the target data to the second network device. The primary path and the backup path are determined based on a pre-built routing tree, which can be constructed by the routing tree construction method mentioned in any of the above embodiments.
[0095] The second network device can be used as the target node, and a routing tree from each non-target node to the target node can be constructed according to the method described in the above embodiments. Then, based on the constructed routing tree, the main path and multiple backup paths from the first network device to the second network device can be determined. The backup paths can be sorted according to the transmission delay. When the main path fails, a target backup path can be selected from the backup paths in a pre-set order to send the target data using the target backup path.
[0096] In this way, when the primary path fails, a backup path can be quickly determined, and the target data can be sent using the backup path, reducing data transmission latency.
[0097] The solutions in the above embodiments can be freely combined to obtain new solutions when there is no conflict. Due to space limitations, they will not be listed one by one here.
[0098] Furthermore, embodiments of this application also provide a computer program product, including a computer program / instructions that, when executed by a processor, implement the methods mentioned in any of the above embodiments.
[0099] Furthermore, embodiments of this application also provide an electronic device, such as... Figure 6 As shown, the electronic device 60 includes: a processor 61; a memory 62 for storing executable instructions of the processor 61; wherein the processor 61 implements the methods mentioned in any of the above embodiments by running the executable instructions.
[0100] Accordingly, this application also provides a computer storage medium storing a program that, when executed by a processor, implements the method in any of the above embodiments.
[0101] The embodiments of this application may take the form of a computer program product implemented on one or more storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing program code. Computer-usable storage media include permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information may be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to: phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, read-only optical discs, read-only memory (CD-ROM), digital versatile optical discs (DVD) or other optical storage, magnetic tape, disks or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0102] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0103] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0104] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0105] The methods and apparatus provided in the embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this application should not be construed as a limitation of this application.
Claims
1. A method for constructing a routing tree, characterized in that, The routing tree is used for Fast Rerouting (FRR), and the method includes: Obtain the Eulerian directed graph of the target network that supports FRR, wherein the nodes in the Eulerian directed graph represent network devices in the target network, and the directed arcs between nodes represent bidirectional connectivity between network devices; Determine the local connectivity of each non-target node in the Eulerian directed graph. The local connectivity of each non-target node is the number of non-intersecting arc paths from the non-target node to the target node. Remove each non-target node in the Eulerian directed graph in ascending order of local connectivity. During the removal of each non-target node, replace each pair of original in-and out-arcs of the non-target node with a new directed arc connecting the upstream and downstream neighbor nodes of the non-target node, and record the pairing information of the original in-and out-arcs and the new directed arcs. The Eulerian directed graph is restored in reverse order of node removal. During the restoration of each non-target node, the original ingress and egress arc pairs of the non-target node are recovered based on the pairing information of the non-target node, and a route tree identifier is assigned to the recovered original ingress and egress arc pairs, such that the number of non-intersecting arc paths from the non-target node to the target node is equal to the local connectivity of the non-target node. Multiple arc-disjoint routing trees are constructed based on the routing tree identifier and used for the FRR of the target network.
2. The method according to claim 1, wherein removing each non-target node in the Eulerian directed graph in ascending order of local connectivity comprises: If there are at least two non-target nodes with the same local connectivity, then determine the number of hops required from each of the at least two non-target nodes to the target node; The removal order of the at least two non-target nodes is determined based on the hop count, wherein the non-target node with the larger hop count is removed first.
3. The method according to claim 1, wherein replacing each pair of original in-and-out arcs of the non-target node with newly added directed arcs connecting the upstream and downstream neighbor nodes of the non-target node includes: Obtain the original incoming arc and original outgoing arc of the non-target node; The original incoming arc and the original outgoing arc are paired to obtain at least one pair of original incoming and outgoing arcs; wherein, original incoming arcs and original outgoing arcs with bidirectional links are preferentially paired into the original incoming and outgoing arc pairs. Replace each original pair of in-and-out arcs with a new directed arc connecting the upstream and downstream neighboring nodes of the non-target node.
4. The method according to claim 1, further comprising, after removing all non-target nodes from the Eulerian directed graph: For an Eulerian directed graph that includes only the target node, a routing tree identifier is assigned to each self-loop of the target node in the Eulerian directed graph, wherein the routing tree identifiers of different self-loops are different.
5. The method according to claim 4, wherein recovering the original inbound / outbound arc pair of the non-target node based on the pairing information of the non-target node, and assigning a routing tree identifier to the recovered original inbound / outbound arc pair, comprises: For each non-target node to be restored, all newly added directed arcs added during the process of removing the non-target node are determined based on the pairing information; For each newly added directed arc, based on the pairing information, the newly added directed arc is split into corresponding original inbound and outbound arc pairs, and the original inbound arcs obtained from the splitting are assigned the same routing tree identifier as the newly added directed arc. Based on the overlap of the routing tree identifiers of all the newly added directed arcs, a routing tree identifier is assigned to the original outgoing arcs obtained from the splitting. If the routing tree identifiers of all newly added directed arcs are different, the original outgoing arcs obtained by splitting each newly added directed arc will retain the routing tree identifier of that newly added directed arc. If at least two of the newly added directed arcs have the same routing tree identifier, then a target original outgoing arc is selected from the original outgoing arcs obtained by splitting each of the at least two newly added directed arcs, and the routing tree identifier of the at least two newly added directed arcs is retained. The target original outgoing arc ensures that the constructed routing tree will not form a loop.
6. The method according to claim 5, wherein the target original arc is determined based on the following: Candidate original outgoing arcs are selected from the original outgoing arcs obtained by splitting each of the at least two newly added directed arcs, and the candidate original outgoing arcs ensure that the constructed routing tree does not form a loop. Determine the number of hops from the non-target node to the target node in the route tree constructed when each candidate original outgoing arc is selected; The candidate original arc with the smallest number of jumps is selected as the target original arc.
7. The method according to claim 5, wherein after selecting a target original outgoing arc from the original outgoing arcs obtained by splitting each of the at least two newly added directed arcs and using the routing tree identifier of the at least two newly added directed arcs, the method comprises: If the number of non-intersecting arc paths from the current non-target node to the target node is less than the local connectivity of the non-target node, then at least one other original outgoing arc is selected from the original outgoing arcs obtained from the splitting, excluding the target original outgoing arc, and a target routing tree identifier is assigned to each of the at least one other original outgoing arc, so that the number of non-intersecting arc paths from the non-target node to the target node is equal to the local connectivity of the non-target node; The target route tree identifier assigned to each other original outgoing arc is: the route tree identifier that is not occupied by the non-target node in the route tree identifier of the neighbor node to which the non-target node is pointed through the other original outgoing arc.
8. The method of claim 7, wherein the target route tree identifier assigned to each other original outgoing arc is determined based on the following: Determine the candidate route tree identifiers that are not occupied by the non-target node from the route tree identifiers of the neighboring nodes to which the non-target node is pointed through the other original outgoing arc; If each candidate route tree identifier is selected as the route tree identifier for the other original outgoing arc, the number of hops from the non-target node to the target node in the constructed route tree; The candidate route tree identifier with the smallest hop count is selected as the target route tree identifier.
9. The method according to any one of claims 1-8, wherein the routing tree identifier includes a color identifier; and / or After constructing multiple arc-disjoint routing trees based on the routing tree identifier, the method further includes: For each constructed routing tree, the target directed arc in the Eulerian directed graph is deleted to obtain the residual graph corresponding to the routing tree. The target directed arc is the directed arc contained in the other routing trees besides the routing tree in the multiple routing trees. In the residual graph, determine the shortest path that uses the target node as the destination node and covers all nodes in the routing tree; Replace the routing tree with the routing tree corresponding to the shortest path.
10. A communication method, characterized in that, The method is used for a first network device in a target network, the target network further including a second network device, the method comprising: Obtain the target data to be sent to the second network device; If a failure is detected in the primary path from the first network device to the second network device, a target backup path is selected from the preset backup paths to send the target data to the second network device using the target backup path, wherein the primary path and the backup path are determined based on a pre-built routing tree, which is constructed by the method described in any one of claims 1-9.
11. A computer program product, characterized in that, Includes a computer program / instructions that, when executed by a processor, implement the steps of the method as described in any one of claims 1-10.
12. An electronic device, characterized in that, include: processor; A memory for storing processor-executable instructions; wherein the processor implements the steps of the method as described in any one of claims 1-10 by executing the executable instructions.