Method for reducing network congestion and related equipment

By determining multiple backup paths between network nodes and sharing traffic according to bandwidth ratio, the network congestion problem caused by main path failure or congestion is solved, and more efficient resource utilization and network reliability are achieved.

CN119316344APending Publication Date: 2025-01-14HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310859957.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-12
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

In the network, when the main path fails or is congested, existing fast rerouting technologies are prone to network congestion, and there is a lack of an effective load sharing mechanism to alleviate this situation.

Method used

By determining multiple backup paths between network nodes and sharing traffic to multiple new primary paths in bandwidth proportion when the main path fails or congestion, avoiding network congestion caused by failure or congestion of a single path, while eliminating failures. Or degrade the path after congestion is alleviated to save resources.

Benefits of technology

It effectively reduces network congestion, improves network reliability and resource utilization, reduces overhead of network nodes, and avoids traffic loss due to main path failure or congestion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119316344A_ABST
    Figure CN119316344A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a method for reducing network congestion and related equipment. The method comprises the following steps: a first network node determines a main path and a plurality of backup paths to a second network node; if the first network node determines that the main path fails, the first network node upgrades the plurality of backup paths into new main paths; the first network node obtains a target proportion, wherein the target proportion is the proportion between the bandwidths of the main path and the plurality of new main paths; and the first network node performs load sharing on the flow sent to the second network node between the main path and the plurality of new main paths according to the target proportion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the network field, and in particular to a method for alleviating network congestion and related equipment. Background Art

[0002] Fast router (FRR) is a technology that provides backup protection for nodes or links after a link or node in the network fails, reduces the impact of link or node failure on traffic, and enables rapid recovery of traffic.

[0003] FRR is used in non-load-sharing network scenarios. There is usually a primary path and an FRR backup path. When the primary path fails, FRR rerouting is triggered, and the traffic on the primary path is switched to the FRR backup path for forwarding.

[0004] However, in actual scenarios, the FRR backup path can only be enabled when the primary path fails completely. Moreover, since there is only one FRR backup path, congestion is likely to occur when traffic on the primary path is switched over. Summary of the invention

[0005] The present application provides a method for alleviating network congestion and related equipment, which are used to alleviate the congestion level in a backbone network.

[0006] The first aspect of the present application provides a method for alleviating network congestion:

[0007] The first network node determines a main path and multiple backup paths to the second network node; if the first network node determines that the main path fails, the first network node upgrades the multiple backup paths to new main paths; the first network node obtains a target ratio, which is the ratio between the bandwidths of the main path and the multiple new main paths; the first network node performs load sharing on the traffic sent to the second network node between the main path and the multiple new main paths according to the target ratio.

[0008] In the present application, since there are multiple backup paths, when a primary path fails, the backup path can be upgraded to a new primary path and load sharing can be performed according to the bandwidth ratio, thereby avoiding network congestion caused by the primary path failure.

[0009] In a possible implementation, the first network node calculates the shortest N paths to the second network node based on a shortest path first algorithm, where N is an integer greater than 2; the first network node determines the N paths as a primary path and multiple backup paths.

[0010] In a possible implementation manner, the first network node determines multiple candidate paths to the second network node, the candidate paths include a segmented path, and the multiple candidate paths include a candidate path as a primary path and multiple candidate paths as backup paths.

[0011] In a possible implementation, the fault is a partial link failure of the primary path.

[0012] In the present application, when part of the links of the primary path fail, the backup path is upgraded to a new primary path, so that adjustments can be made more timely to avoid network congestion caused by the primary path failure.

[0013] In a possible implementation, if the first network node determines that the failure of the primary path has been eliminated, traffic is switched back from the multiple new primary paths to the primary path, and the multiple new primary paths are downgraded to backup paths.

[0014] In the present application, when the fault of the primary path is eliminated, the traffic is switched back from the new primary path to the primary path, and the new primary path is downgraded to a backup path, thereby avoiding occupying additional resources.

[0015] The second aspect of the present application provides a method for alleviating network congestion:

[0016] The first network node determines a main path and multiple backup paths to the second network node; if the first network node determines that the main path is congested, the first network node upgrades the multiple backup paths to new main paths; the first network node obtains a target ratio, which is the ratio between the bandwidths of the multiple new main paths; the first network node diverts a preset ratio of traffic in the main path to the multiple new main paths, and performs load sharing according to the target ratio.

[0017] In the present application, since there are multiple backup paths, when the main path is congested, the backup path can be upgraded to a new main path, and a preset proportion of the traffic on the main path can be diverted to multiple new main paths, and load sharing can be performed according to the bandwidth ratio, thereby alleviating the congestion of the main path while avoiding congestion of the new main path as much as possible.

[0018] In a possible implementation, the first network node calculates the shortest N paths to the second network node based on a shortest path first algorithm, where N is an integer greater than 2; the first network node determines the N paths as a primary path and multiple backup paths.

[0019] In a possible implementation manner, the first network node determines multiple candidate paths to the second network node, the candidate paths include a segmented path, and the multiple candidate paths include a candidate path as a primary path and multiple candidate paths as backup paths.

[0020] In a possible implementation manner, the first network node adds a low priority mark to a preset proportion of traffic.

[0021] In the present application, since a preset proportion of traffic is marked with a low priority, this portion of traffic can be preferentially discarded when congestion also occurs on the new primary path.

[0022] In a possible implementation manner, the first network node receives a congestion notification from a network node on a primary path, where the congestion notification is used to indicate that congestion occurs on the primary path.

[0023] In the present application, the first network node does not need to monitor the port cache queue by itself, but can determine that congestion occurs on the main path by receiving congestion notifications, thereby reducing the overhead of the first network node.

[0024] The third aspect of the present application provides a method for alleviating network congestion:

[0025] The first network node determines multiple main paths to the second network node; if the first network node determines that a first main path among the multiple main paths is congested, the first network node obtains a target ratio, which is the ratio between the bandwidths of the multiple second main paths, and the second main paths are the remaining main paths except the first main path; the first network node diverts a preset ratio of traffic in the first main path to the multiple second main paths, and performs load sharing according to the target ratio.

[0026] In the present application, when congestion occurs on the first main path, a preset proportion of traffic on the first main path is diverted to other main paths, and load sharing is performed according to the bandwidth ratio, thereby alleviating congestion on the main path while avoiding congestion on other main paths as much as possible.

[0027] In a possible implementation manner, the first network node determines a plurality of segment paths belonging to the same candidate path to the second network node, and the plurality of segment paths serve as a plurality of main paths.

[0028] In a possible implementation manner, the first network node adds a low priority mark to a set proportion of traffic.

[0029] In the present application, since a preset proportion of traffic is marked with a low priority, this portion of traffic can be discarded preferentially when congestion also occurs on other main paths.

[0030] In a possible implementation manner, the first network node receives a congestion notification from a network node on a first primary path, where the congestion notification is used to indicate that congestion occurs on the first primary path.

[0031] In the present application, the first network node does not need to monitor the port cache queue by itself, but can determine that congestion occurs on the first main path by receiving congestion notifications, thereby reducing the overhead of the first network node.

[0032] A fourth aspect of the present application provides a method for alleviating network congestion:

[0033] The first network node determines multiple main paths to the second network node; if the first network node determines that the main path fails, the first network node obtains a target ratio, which is the ratio between the bandwidths of the multiple main paths; the first network node performs load sharing on the traffic sent to the second network node among the multiple main paths according to the target ratio.

[0034] In the present application, when a primary path fails, the first network node performs load sharing according to the ratio of the bandwidth of the primary path, thereby avoiding network congestion caused by the primary path failure.

[0035] In a possible implementation manner, the first network node determines a plurality of segment paths belonging to the same candidate path to the second network node, and the plurality of segment paths serve as a plurality of main paths.

[0036] In a possible implementation, the fault is a partial link failure of the primary path.

[0037] In the present application, when part of the links of the primary path fail, the backup path is upgraded to a new primary path, so that adjustments can be made more timely to avoid network congestion caused by the primary path failure.

[0038] In a fifth aspect, the present application provides a first network node, including a processor and a memory, wherein the processor and the memory are coupled, the memory is used to store programs, and the processor is used to execute the programs in the memory, so that the first network node executes the method described in any of the above aspects.

[0039] In a sixth aspect, the present application provides a computer-readable storage medium, comprising a program, which, when executed on a computer, enables the computer to execute the method described in any of the preceding aspects.

[0040] A seventh aspect of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method described in any of the preceding aspects. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 A schematic diagram of an application scenario of this application;

[0042] Figure 2 A flowchart of a method for alleviating network congestion in this application;

[0043] Figure 3 This is a schematic diagram of the non-load-sharing scenario of the native IP in this application;

[0044] Figure 4 A schematic diagram of upgrading a backup path to a new primary path in this application;

[0045] Figure 5 Another schematic diagram of upgrading the backup path to a new primary path in this application;

[0046] Figure 6 Another flowchart of the method for alleviating network congestion in the present application is shown;

[0047] Figure 7 Another schematic diagram of upgrading the backup path to a new primary path in this application;

[0048] Figure 8 Another flowchart of the method for alleviating network congestion in the present application is shown;

[0049] Fig. 9 This is a schematic diagram of the scenario of native IP load sharing in this application;

[0050] Fig.10 A schematic diagram of a main path failure in this application;

[0051] Fig.11 Another schematic diagram of a main path failure in this application;

[0052] Fig.12 Another flowchart of the method for alleviating network congestion in the present application is shown;

[0053] Fig.13a This is a schematic diagram of the scenario of native IP load sharing in this application;

[0054] Fig.13b A schematic diagram of the main path congestion in this application;

[0055] Fig.14 This is a schematic diagram of the non-load sharing scenario of the SR policy in this application;

[0056] Fig.15 A schematic diagram of a main path failure in this application;

[0057] Fig.16 Another schematic diagram of a main path failure in this application;

[0058] Fig.17 A schematic diagram of the main path congestion in this application;

[0059] Fig.18This is a schematic diagram of the load sharing scenario of the SR policy in this application;

[0060] Fig.19 A schematic diagram of a main path failure in this application;

[0061] Fig. 20 Another schematic diagram of a main path failure in this application;

[0062] Fig.21 A schematic diagram of the main path congestion in this application;

[0063] Fig. 22 A schematic diagram of the structure of the first network node in this application;

[0064] Fig.23 is another structural schematic diagram of the first network node in this application;

[0065] Fig.24 is another structural schematic diagram of the first network node in this application;

[0066] Fig.25 is another structural schematic diagram of the first network node in this application;

[0067] Fig.26 This is another structural diagram of the first network node in the present application. DETAILED DESCRIPTION

[0068] The following describes the embodiments of the present application in conjunction with the accompanying drawings. Obviously, the described embodiments are only embodiments of a part of the present application, rather than all embodiments. It is known to those skilled in the art that with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0069] The terms "first", "second", etc. in the specification and claims of the present application 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 data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any of their variations 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 that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0070] The present application can be applied to backbone networks, including network scenarios of native IP or SR policy tunnels. Native IP refers to the ordinary IP shortest path forwarding scenario; SR policy tunnels can be sent down through a controller or manually configured, including two path working modes: single candidate path and multiple segmented paths, and multiple candidate paths and single segmented paths. Single candidate path and multiple segmented paths refer to only one candidate path, but there are multiple segmented paths (segmentlist) under the candidate path, and load sharing is achieved by multiple segmented paths; multiple candidate single segmented paths refer to the existence of two candidate paths, one segmented path is assigned to each candidate path, and the two candidate paths serve as the primary path and the backup path respectively.

[0071] See also Figure 1 For example, in a possible native IP or SR policy network scenario, there are five network nodes, namely R1, R2, R3, R4 and R5, where R1 needs to forward traffic to R5. The above network nodes can determine the bandwidth of the links between each other based on the IGP protocol. For example, there are two parallel links with a bandwidth of 15G between R1 and R2. The first network node in this application can be the above R1, and the second network node can be the above R5.

[0072] See also Figure 2 , the following is an introduction to a process of the method for alleviating network congestion in this application:

[0073] 201. A first network node determines a primary path and multiple backup paths to a second network node;

[0074] See also Figure 3 This embodiment is described by taking the application in the native IP scenario as an example. Figure 3The network nodes shown in the figure publish interface bandwidth based on the IGP protocol, thereby determining the bandwidth of the links between each other. For example, there are two parallel links with a bandwidth of 15G between R1 and R2, two parallel links with a bandwidth of 15G between R2 and R5, two parallel links with a bandwidth of 10G between R1 and R4, two parallel links with a bandwidth of 10G between R4 and R5, one link with a bandwidth of 10G between R1 and R3, and one link with a bandwidth of 10G between R3 and R5. R1 calculates the shortest N paths to reach R5 through the shortest path first algorithm, and determines the path with the smallest cost value as the main path, and determines the remaining paths as backup paths. The aforementioned N is an integer greater than 2, for example, it can be 3. Exemplarily, based on the aforementioned method, R1 determines the path of R1-R2-R5 as the main path, the path of R1-R3-R5 as the backup path 1, and the path of R1-R4-R5 as the backup path 2. Since the main path has two parallel links with a bandwidth of 15G, the bandwidth of the main path is 30G; since the backup path 1 has only one link with a bandwidth of 10G, the bandwidth of the backup path 1 is 10G; since the backup path 2 has two parallel links with a bandwidth of 10G, the bandwidth of the backup path 2 is 20G. When the main path works normally, R1 transmits all the traffic to R5 through the main path.

[0075] 202. If the first network node determines that the primary path fails, the first network node upgrades the multiple backup paths to new primary paths;

[0076] If R1 determines that the primary path fails by sensing changes in the bandwidth of the primary path, R1 updates the bandwidth of the primary path and records the failure status of the primary path. In addition, R1 upgrades the backup path to the new primary path.

[0077] The above fault can be a complete link failure of the primary path, or a partial link failure, which are described below:

[0078] 1. All links on the primary path fail

[0079] See also Figure 4 For example, if both parallel links between R1 and R2 fail, R1 updates the bandwidth of the primary path to 0G and records the failure status. R1 upgrades backup path 1 to new primary path 1 and backup path 2 to new primary path 2, that is, the traffic reaching R5 is transmitted through new primary path 1 and new primary path 2.

[0080] 2. Partial link failure on the primary path

[0081] See also Figure 5For example, if a link between R1 and R2 fails, R1 updates the bandwidth of the primary path to 15G and records the failure status. R1 upgrades backup path 1 to new primary path 1 and backup path 2 to new primary path 2, that is, the traffic to R5 is transmitted through the primary path, new primary path 1, and new primary path 2.

[0082] 203. The first network node obtains a target ratio, where the target ratio is a ratio between bandwidths of the primary path and the bandwidths of the multiple new primary paths;

[0083] After R1 updates the bandwidth of the main path, it calculates the ratio between the bandwidth of the main path and the bandwidth of the new main path. For example, if all links of the main path fail, the ratio of the main path: new main path 1: new main path 2 = 0:10:20, that is, 0:1:2; if some links of the main path fail, the ratio of the main path: new main path 1: new main path 2 = 15:10:20, that is, 3:2:4.

[0084] 204. The first network node performs load balancing on the traffic sent to the second network node between the primary path and the multiple new primary paths according to a target ratio.

[0085] R1 performs load sharing for the traffic reaching R5 between the main path and the new main path, and the load sharing ratio is the aforementioned target ratio. When the target ratio is the aforementioned 0:1:2, the ratio of the traffic transmitted through the main path: the traffic transmitted through the new main path 1: the traffic transmitted through the new main path 2 is also 0:1:2; when the target ratio is the aforementioned 3:2:4, the ratio of the traffic transmitted through the main path: the traffic transmitted through the new main path 1: the traffic transmitted through the new main path 2 is also 3:2:4.

[0086] Of course, after R1 determines that the fault of the primary path has been eliminated, it can also switch the traffic from the new primary path 1 and the new primary path 2 back to the primary path, and downgrade the new primary path 1 and the new primary path 2 to backup paths again.

[0087] In the present application, since there are multiple backup paths, when a primary path fails, the backup path can be upgraded to a new primary path and load sharing can be performed according to the bandwidth ratio, thereby effectively avoiding network congestion caused by the primary path failure.

[0088] See also Figure 6 , another process of the method for alleviating network congestion in this application is introduced below:

[0089] 601. A first network node determines a primary path and multiple backup paths to a second network node;

[0090] This embodiment is still described by taking the application in the native IP scenario as an example. Figure 2Step 201 in the illustrated embodiment is similar and will not be described again here.

[0091] 602. If the first network node determines that the primary path is congested, the first network node upgrades the plurality of backup paths to new primary paths;

[0092] See also Figure 7 If R1 determines that the primary path is congested by monitoring the status of the port buffer queue, R1 upgrades the backup path to the new primary path, that is, upgrades backup path 1 to new primary path 1, and upgrades backup path 2 to new primary path 2.

[0093] 603. The first network node obtains a target ratio, where the target ratio is a ratio between bandwidths of the multiple new primary paths.

[0094] R1 calculates the target ratio, which is the ratio of the bandwidths of the new primary paths, that is, new primary path 1: new primary path 2 = 10:20, which is 1:2.

[0095] 604. The first network node diverts a preset proportion of traffic in the primary path to multiple new primary paths, and performs load balancing according to a target proportion.

[0096] R1 diverts a preset proportion of traffic in the main path to the new main path. The preset proportion of traffic can be, for example, 50% of the traffic, or other situations, which are not limited here. The preset proportion of traffic is load-balanced between the new main paths according to the aforementioned target ratio, that is, the ratio of traffic transmitted through the new main path 1: the traffic transmitted through the new main path 2 is 1:2.

[0097] After making the above adjustment, R1 continues to detect whether the main path is still congested. If it is still congested, R1 continues to perform the above-mentioned diversion operation and repeats it for a maximum of P times, where P may be 3, for example.

[0098] In a possible implementation, R1 can add a low priority mark to the above-preset proportion of traffic. If in an IPV4 network, the above-preset priority mark can be added in the TOS field, and if in an IPV6 network, the above-preset priority mark can be added in the TC field. Since the above-preset priority mark is carried, if congestion also occurs in the new main path, the above-preset proportion of traffic can be discarded preferentially.

[0099] In this application, since there are multiple backup paths, when the main path is congested, the backup path can be upgraded to a new main path, and the traffic of the main path can be diverted to the new main path, and load sharing is performed according to the bandwidth ratio, thereby effectively alleviating the congestion of the main path.

[0100] See also Figure 8, another process of the method for alleviating network congestion in this application is introduced below:

[0101] 801. A first network node determines multiple primary paths to a second network node;

[0102] See also Fig. 9 This embodiment is still described by taking the application in the native IP scenario as an example. Fig. 9 The network nodes shown in the figure publish interface bandwidth based on the IGP protocol, thereby determining the bandwidth of the links between each other, for example, there are two parallel links with a bandwidth of 10G between R1 and R2, two parallel links with a bandwidth of 10G between R2 and R5, two parallel links with a bandwidth of 10G between R1 and R4, two parallel links with a bandwidth of 10G between R4 and R5, a link with a bandwidth of 20G between R1 and R3, and a link with a bandwidth of 20G between R3 and R5. R1 calculates the shortest N paths to reach R5 through the shortest path first algorithm, and determines these paths as the main paths. Exemplarily, based on the above method, R1 determines the path of R1-R2-R5 as the main path 1, the path of R1-R3-R5 as the main path 2, and the path of R1-R4-R5 as the main path 3. The above main path 1 has two parallel links with a bandwidth of 10G, so the bandwidth is 20G; the above main path 2 has only one link with a bandwidth of 20G, so the bandwidth is 20G; the above main path 3 has two parallel links with a bandwidth of 10G, so the bandwidth is 20G. R1 transmits the traffic to reach R5 through main path 1, main path 2 and main path 3 respectively, and the traffic transmitted through main path 1: the traffic transmitted through main path 1: the traffic transmitted through main path 3 = 1:1:1.

[0103] 802. If the first network node determines that a primary path fails, the first network node obtains a target ratio, where the target ratio is a ratio between bandwidths of multiple primary paths;

[0104] If R1 determines that any main path has failed by sensing a change in the bandwidth of the main path, R1 updates the bandwidth of the main path and records the failure status of the main path.

[0105] The above fault can be a complete link failure of the primary path, or a partial link failure, which are described below:

[0106] 1. All links on the primary path fail

[0107] See also Fig.10 ,For example, if both parallel links between R1 and R2 fail, R1 updates the bandwidth of the main path 1 to 0G and records the failure status.

[0108] 2. Partial link failure on the primary path

[0109] See also Fig.11 ,For example, if a link between R1 and R2 fails, R1 updates the bandwidth of primary path 1 to 10G and records the failure status.

[0110] After R1 updates the bandwidth of the main path, it calculates the target ratio, which is the ratio between the bandwidths of multiple main paths. For example, if all links of the main paths fail, main path 1: main path 2: main path 3 = 0:20:20, that is, 0:1:1; if some links of the main paths fail, main path 1: main path 2: main path 3 = 10:20:20, that is, 1:2:2.

[0111] 803. The first network node performs load balancing on the traffic sent to the second network node among the multiple primary paths according to a target ratio.

[0112] R1 will perform load sharing for the traffic reaching R5 between the main paths, and the load sharing ratio is the aforementioned target ratio. When the target ratio is the aforementioned 0:1:1, the ratio of the traffic transmitted through main path 1: the traffic transmitted through main path 2: the traffic transmitted through main path 3 is also 0:1:1; when the target ratio is the aforementioned 1:2:2, the ratio of the traffic transmitted through main path 1: the traffic transmitted through main path 2: the traffic transmitted through main path 3 is also 1:2:2.

[0113] Of course, if R1 determines that the fault of the primary path is eliminated, the bandwidth of the primary path is updated, the aforementioned target ratio is recalculated, and load sharing is performed between the primary paths according to the target ratio.

[0114] In the present application, when a main path fails, the first network node promptly updates the bandwidth of the main path and performs load sharing according to the ratio between the bandwidths of the main paths, thereby effectively avoiding network congestion caused by the main path failure.

[0115] See also Fig.12 , another process of the method for alleviating network congestion in this application is introduced below:

[0116] 1201. A first network node determines multiple primary paths to a second network node;

[0117] See also Fig.13a This embodiment is still described by taking the application in the native IP scenario as an example. Fig.13aThe network nodes shown in the figure publish interface bandwidth based on the IGP protocol, thereby determining the bandwidth of the links between each other. For example, there are two parallel links with a bandwidth of 15G between R1 and R2, two parallel links with a bandwidth of 15G between R2 and R5, two parallel links with a bandwidth of 10G between R1 and R4, two parallel links with a bandwidth of 10G between R4 and R5, a link with a bandwidth of 10G between R1 and R3, and a link with a bandwidth of 10G between R3 and R5. R1 calculates the shortest N paths to reach R5 through the shortest path first algorithm, and determines these paths as the main paths. Exemplarily, based on the above method, R1 determines the path of R1-R2-R5 as the main path 1, the path of R1-R3-R5 as the main path 2, and the path of R1-R4-R5 as the main path 3. The above main path 1 has two parallel links with a bandwidth of 15G, so the bandwidth is 30G; the above main path 2 has only one link with a bandwidth of 10G, so the bandwidth is 10G; the above main path 3 has two parallel links with a bandwidth of 10G, so the bandwidth is 20G. R1 transmits the traffic to reach R5 through main path 1, main path 2 and main path 3 respectively, and the traffic transmitted through main path 1: the traffic transmitted through main path 1: the traffic transmitted through main path 3 = 1:1:1.

[0118] 1202. If the first network node determines that a first main path among the multiple main paths is congested, the first network node obtains a target ratio, where the target ratio is a ratio between bandwidths of the multiple second main paths, where the second main paths are the remaining main paths except the first main path;

[0119] See also Fig.13b If R1 determines that the main path 2 is congested by monitoring the status of the port buffer queue, R1 calculates the target ratio, which is the ratio between the bandwidth of the main path 1 and the bandwidth of the main path 3, that is, 3:2.

[0120] 1203. The first network node diverts a preset proportion of traffic in the first main path to multiple second main paths, and performs load balancing according to the target proportion.

[0121] R1 diverts a preset proportion of traffic in main path 2 to main path 1 and main path 3. The preset proportion of traffic can be, for example, 50% of the traffic, or other situations, which are not limited here. The preset proportion of traffic is load-balanced between main path 1 and main path 3 according to the aforementioned target proportion, that is, the ratio of traffic transmitted through main path 1: traffic transmitted through main path 3 is 3:2.

[0122] After making the above adjustment, R1 continues to detect whether the main path 2 is still congested. If it is still congested, R1 continues to perform the above-mentioned diversion operation and repeats it for a maximum of P times, where P may be 3, for example.

[0123] In a possible implementation, R1 may add a low priority mark to the above preset proportion of traffic.

[0124] In the present application, when congestion occurs on the main path, the traffic on the main path is diverted to other main paths, and load sharing is performed according to the proportion of bandwidth, thereby effectively alleviating the congestion of the main path.

[0125] Please refer to step A01 to step A04, and another process of the method for alleviating network congestion in the present application is introduced below:

[0126] A01. The first network node determines a primary path and multiple backup paths to the second network node;

[0127] See also Fig.14 This embodiment is described by taking the application in the SR policy tunnel scenario as an example. Fig.14 The network nodes shown in FIG. publish interface bandwidth based on the IGP protocol, thereby determining the bandwidth of links between each other. For example, there are two parallel links with a bandwidth of 15G between R1 and R2, two parallel links with a bandwidth of 15G between R2 and R5, two parallel links with a bandwidth of 10G between R1 and R4, two parallel links with a bandwidth of 10G between R4 and R5, one link with a bandwidth of 10G between R1 and R3, and one link with a bandwidth of 10G between R3 and R5. Multiple candidate paths are manually configured or sent down by the controller, for example, including R1-R2-R5, R1-R3-R5, and R1-R4-R5, where R1-R2-R5 is the main path, R1-R3-R5 is the backup path 1, and R1-R4-R5 is the backup path 2. The above candidate paths all contain only one segment path. Since the main path has two parallel links with a bandwidth of 15G, the bandwidth of the main path is 30G; since the backup path 1 has only one link with a bandwidth of 10G, the bandwidth of the backup path 1 is 15G; since the backup path 2 has two parallel links with a bandwidth of 10G, the bandwidth of the backup path 2 is 20G. When the main path works normally, R1 transmits all the traffic to R5 through the main path.

[0128] A02. If the first network node determines that the primary path fails, the first network node upgrades the multiple backup paths to new primary paths;

[0129] If R1 determines that the primary path fails by sensing a change in the bandwidth of the primary path, R1 updates the bandwidth of the primary path and records the failure status of the primary path. In addition, it upgrades the backup path to the new primary path. It should be understood that the new primary path in this application refers to the new primary path, which is only a convenient name for distinction and has no other meaning.

[0130] The above fault can be a complete link failure of the primary path, or a partial link failure, which are described below:

[0131] 1. All links on the primary path fail

[0132] See also Fig.15 For example, if both parallel links between R1 and R2 fail, R1 updates the bandwidth of the primary path to 0G and records the failure status. R1 upgrades backup path 1 to new primary path 1 and backup path 2 to new primary path 2, that is, the traffic reaching R5 is transmitted through new primary path 1 and new primary path 2.

[0133] 2. Partial link failure on the primary path

[0134] See also Fig.16 For example, if a link between R1 and R2 fails, R1 updates the bandwidth of the primary path to 15G and records the failure status. R1 upgrades backup path 1 to new primary path 1 and backup path 2 to new primary path 2, that is, the traffic to R5 is transmitted through the primary path, new primary path 1, and new primary path 2.

[0135] A03. The first network node obtains a target ratio, where the target ratio is a ratio between bandwidths of the primary path and the plurality of new primary paths;

[0136] After R1 updates the bandwidth of the main path, it calculates the ratio between the bandwidth of the main path and the bandwidth of the new main path. For example, if all links of the main path fail, the ratio of the main path: new main path 1: new main path 2 = 0:10:20, that is, 0:1:2; if some links of the main path fail, the ratio of the main path: new main path 1: new main path 2 = 15:10:20, that is, 3:2:4.

[0137] A04. The first network node performs load sharing on the traffic sent to the second network node between the primary path and the multiple new primary paths according to a target ratio.

[0138] R1 performs load sharing for the traffic reaching R5 between the main path and the new main path, and the load sharing ratio is the aforementioned target ratio. When the target ratio is the aforementioned 0:1:2, the ratio of the traffic transmitted through the main path: the traffic transmitted through the new main path 1: the traffic transmitted through the new main path 2 is also 0:1:2; when the target ratio is the aforementioned 3:2:4, the ratio of the traffic transmitted through the main path: the traffic transmitted through the new main path 1: the traffic transmitted through the new main path 2 is also 3:2:4.

[0139] Of course, after R1 determines that the fault of the primary path has been eliminated, it can also switch the traffic back to the primary path and downgrade the new primary path 1 and the new primary path 2 to backup paths.

[0140] Please refer to step B01 to step B04, and another process of the method for alleviating network congestion in the present application is introduced below:

[0141] B01. The first network node determines a primary path and multiple backup paths to the second network node;

[0142] This embodiment is still introduced by taking the application in the SR policy tunnel scenario as an example. Step B01 of this embodiment is similar to the aforementioned step A01 and will not be described again here.

[0143] B02. If the first network node determines that the primary path is congested, the first network node upgrades the multiple backup paths to new primary paths;

[0144] R1 can determine whether the main path is congested by monitoring the status of the port buffer queue, or when the network node on the main path monitors the status of the port buffer queue and determines that the main path is congested, it will send a congestion notification to R1. R1 can determine that the main path is congested based on the congestion notification. Fig.17 If R1 determines that the primary path is congested, R1 upgrades the backup path to the new primary path, that is, upgrades backup path 1 to new primary path 1, and upgrades backup path 2 to new primary path 2.

[0145] B03. The first network node obtains a target ratio, where the target ratio is a ratio between bandwidths of the multiple new primary paths;

[0146] R1 calculates the target ratio, which is the ratio of the bandwidths of the new primary paths, that is, new primary path 1: new primary path 2 = 10:20, which is 1:2.

[0147] B04. The first network node diverts a preset proportion of traffic in the main path to multiple new main paths, and performs load balancing according to the target proportion.

[0148] R1 diverts a preset proportion of traffic in the main path to the new main path. The preset proportion of traffic can be, for example, 50% of the traffic, or other situations, which are not limited here. The preset proportion of traffic is load-balanced between the new main paths according to the aforementioned target ratio, that is, the ratio of traffic transmitted through the new main path 1: the traffic transmitted through the new main path 2 is 1:2.

[0149] After making the above adjustment, R1 continues to detect whether the main path is still congested. If it is still congested, R1 continues to perform the above-mentioned diversion operation and repeats it for a maximum of P times, where P may be 3, for example.

[0150] In a possible implementation, R1 can add a low priority mark to the above-preset proportion of traffic. If in an IPV4 network, the above-preset priority mark can be added in the TOS field, and if in an IPV6 network, the above-preset priority mark can be added in the TC field. Since the above-preset priority mark is carried, if congestion also occurs in the new main path, the above-preset proportion of traffic can be discarded preferentially.

[0151] Please refer to step C01 to step C03, and another process of the method for alleviating network congestion in the present application is introduced below:

[0152] C01. The first network node determines multiple primary paths to the second network node;

[0153] See also Fig.18 This embodiment is still described by taking the application in the SR policy tunnel scenario as an example. Fig.18The network nodes shown in the figure publish interface bandwidth based on the IGP protocol, thereby determining the bandwidth of the links between each other, for example, there are two parallel links with a bandwidth of 15G between R1 and R2, two parallel links with a bandwidth of 15G between R2 and R5, two parallel links with a bandwidth of 10G between R1 and R4, two parallel links with a bandwidth of 10G between R4 and R5, a link with a bandwidth of 10G between R1 and R3, and a link with a bandwidth of 10G between R3 and R5. A candidate path is manually configured or sent down by a controller, and the candidate path includes multiple segmented paths, and the multiple segmented paths include, for example, R1-R2-R5, R1-R3-R5, and R1-R4-R5. The above multiple segmented paths are all used as main paths, for example, R1-R2-R5 is used as main path 1, R1-R3-R5 is used as main path 2, and R1-R4-R5 is used as main path 3. Since the main path 1 has two parallel links with a bandwidth of 15G, the bandwidth of the main path 1 is 30G; since the main path 2 has only one link with a bandwidth of 10G, the bandwidth of the main path 2 is 10G; since the main path 3 has two parallel links with a bandwidth of 10G, the bandwidth of the main path 3 is 20G. R1 transmits the traffic to R5 through the main path 1, main path 2 and main path 3 respectively.

[0154] C02. If the first network node determines that the primary path fails, the first network node obtains a target ratio, where the target ratio is a ratio between bandwidths of the multiple primary paths;

[0155] If R1 determines that any main path has failed by sensing a change in the bandwidth of the main path, R1 updates the bandwidth of the main path and records the failure status of the main path.

[0156] The above fault can be a complete link failure of the primary path, or a partial link failure, which are described below:

[0157] 1. All links on the primary path fail

[0158] See also Fig.19 ,For example, if both parallel links between R1 and R2 fail, R1 updates the bandwidth of the main path 1 to 0G and records the failure status.

[0159] 2. Partial link failure on the primary path

[0160] See also Fig. 20 ,For example, if a link between R1 and R2 fails, R1 updates the bandwidth of primary path 1 to 15G and records the failure status.

[0161] After R1 updates the bandwidth of the main path, it calculates the target ratio, which is the ratio between the bandwidths of multiple main paths. For example, if all links of the main paths fail, main path 1: main path 2: main path 3 = 0:10:20, that is, 0:1:2; if some links of the main paths fail, main path 1: main path 2: main path 3 = 15:10:20, that is, 3:2:4.

[0162] C03. The first network node performs load balancing on the traffic sent to the second network node among the multiple main paths according to a target ratio.

[0163] R1 will perform load sharing for the traffic reaching R5 between the main paths, and the load sharing ratio is the aforementioned target ratio. When the target ratio is the aforementioned 0:1:2, the ratio of the traffic transmitted through main path 1: the traffic transmitted through main path 2: the traffic transmitted through main path 3 is also 0:1:2; when the target ratio is the aforementioned 3:2:4, the ratio of the traffic transmitted through main path 1: the traffic transmitted through main path 2: the traffic transmitted through main path 3 is also 3:2:4.

[0164] Of course, if R1 determines that the fault of the primary path is eliminated, the bandwidth of the primary path is updated, the aforementioned target ratio is recalculated, and load sharing is performed between the primary paths according to the target ratio.

[0165] Please refer to step D01 to step D03, and another process of the method for alleviating network congestion in the present application is introduced below:

[0166] D01. The first network node determines multiple primary paths to the second network node;

[0167] This embodiment is still introduced by taking the application in the SR policy tunnel scenario as an example. Step D01 of this embodiment is similar to the aforementioned step C01 and will not be described in detail here.

[0168] D02. If the first network node determines that a first main path among the multiple main paths is congested, the first network node obtains a target ratio, where the target ratio is a ratio between bandwidths of the multiple second main paths, where the second main paths are the remaining main paths except the first main path;

[0169] R1 can determine whether the main path is congested by monitoring the status of the port buffer queue, or when the network node on the main path monitors the status of the port buffer queue and determines that the main path is congested, it will send a congestion notification to R1. R1 can determine that the main path is congested based on the congestion notification. Fig.21 If R1 determines that the main path 2 is congested, R1 calculates the target ratio, which is the ratio between the bandwidth of the main path 1 and the bandwidth of the main path 3, that is, 3:2.

[0170] D03. The first network node diverts a preset proportion of traffic in the first main path to multiple second main paths, and performs load balancing according to the target proportion.

[0171] R1 diverts a preset proportion of traffic in main path 2 to main path 1 and main path 3. The preset proportion of traffic can be, for example, 50% of the traffic, or other situations, which are not limited here. The preset proportion of traffic is load-balanced between main path 1 and main path 3 according to the aforementioned target proportion, that is, the ratio of traffic transmitted through main path 1: traffic transmitted through main path 3 is 3:2.

[0172] After making the above adjustment, R1 continues to detect whether the main path 2 is still congested. If it is still congested, R1 continues to perform the above-mentioned diversion operation and repeats it for a maximum of P times, where P may be 3, for example.

[0173] In a possible implementation, R1 may add a low priority mark to the above preset proportion of traffic.

[0174] In the aforementioned various embodiments applied to native IP scenarios, the parallel links between network nodes (for example, two parallel links between R1 and R2) can be, for example, Eth-Trunk ports; in the aforementioned various embodiments applied to SR policy scenarios, the parallel links between network nodes (for example, two parallel links between R1 and R2) can be, for example, BundleSIDs.

[0175] The method in this application is introduced above, and the device in this application is introduced below:

[0176] See also Fig. 22 , the first network node 2200 in the present application includes a determining unit 2201 , a processing unit 2202 and an acquiring unit 2203 .

[0177] A determining unit 2201, configured to determine a primary path and a plurality of backup paths to a second network node;

[0178] The processing unit 2202 is configured to upgrade the plurality of backup paths to new primary paths if it is determined that the primary path fails;

[0179] An acquiring unit 2203 is configured to acquire a target ratio, where the target ratio is a ratio between bandwidths of the primary path and the plurality of new primary paths;

[0180] The processing unit 2202 is further configured to perform load sharing on the traffic sent to the second network node between the primary path and the multiple new primary paths according to a target ratio.

[0181] In one possible implementation,

[0182] The determining unit 2201 is specifically configured to calculate N shortest paths to the second network node based on a shortest path first algorithm, where N is an integer greater than 2;

[0183] The determining unit 2201 is specifically configured to determine N paths as a primary path and a plurality of backup paths respectively.

[0184] In one possible implementation,

[0185] The determining unit 2201 is specifically configured to determine multiple candidate paths to the second network node, where the candidate paths include a segmented path, and the multiple candidate paths include a candidate path as a primary path and multiple candidate paths as backup paths.

[0186] In a possible implementation, the fault is a partial link failure of the primary path.

[0187] In one possible implementation,

[0188] The processing unit 2202 is further configured to switch traffic from the multiple new primary paths back to the primary path if it is determined that the failure of the primary path has been eliminated, and downgrade the multiple new primary paths to backup paths.

[0189] See also Fig.23 The first network node 2300 in the present application includes a determining unit 2301 , a processing unit 2302 and an acquiring unit 2303 .

[0190] A determining unit 2301, configured to determine a primary path and multiple backup paths to a second network node;

[0191] The processing unit 2302 is configured to upgrade the plurality of backup paths to new primary paths if it is determined that the primary path is congested;

[0192] An acquiring unit 2303 is used to acquire a target ratio, where the target ratio is a ratio between bandwidths of the multiple new primary paths;

[0193] The processing unit 2302 is further configured to divert a preset proportion of traffic in the main path to multiple new main paths, and perform load sharing according to a target proportion.

[0194] In one possible implementation,

[0195] The determining unit 2301 is specifically configured to calculate, by the first network node, N shortest paths to the second network node based on a shortest path first algorithm, where N is an integer greater than 2;

[0196] The determining unit 2301 is specifically configured to determine N paths as a primary path and a plurality of backup paths respectively.

[0197] In one possible implementation,

[0198] The determining unit 2301 is specifically configured to determine a plurality of candidate paths to the second network node, wherein the candidate paths include a segmented path, and the plurality of candidate paths include a candidate path as a primary path and a plurality of candidate paths as backup paths.

[0199] In one possible implementation,

[0200] The processing unit 2302 is further configured to add a low priority mark to a preset proportion of traffic.

[0201] In one possible implementation,

[0202] The processing unit 2302 is further configured to receive a congestion notification from a network node on the primary path, where the congestion notification is used to indicate that congestion occurs on the primary path.

[0203] See also Fig.24 , the first network node 2400 in the present application includes a determining unit 2401 , an acquiring unit 2402 and a processing unit 2403 .

[0204] The determining unit 2401 is configured to determine a plurality of primary paths to a second network node;

[0205] The acquiring unit 2402 is configured to acquire, by the first network node, a target ratio if it is determined that a first main path among the plurality of main paths is congested, where the target ratio is a ratio between bandwidths of the plurality of second main paths, where the second main paths are the remaining main paths except the first main path;

[0206] The processing unit 2403 is configured to distribute a preset proportion of traffic in the first main path to multiple second main paths, and perform load sharing according to a target proportion.

[0207] In one possible implementation,

[0208] The determining unit 2401 is specifically configured to determine a plurality of segment paths belonging to the same candidate path to the second network node, and the plurality of segment paths are used as a plurality of main paths.

[0209] In one possible implementation,

[0210] The processing unit 2403 is further configured to add a low priority mark to a preset proportion of traffic.

[0211] In one possible implementation,

[0212] The acquiring unit 2402 is specifically configured to receive a congestion notification from a network node on the first primary path, where the congestion notification is used to indicate that congestion occurs on the first primary path.

[0213] See also Fig.25 , the first network node 2500 in the present application includes a determining unit 2501 , an acquiring unit 2502 and a processing unit 2503 .

[0214] A determining unit 2501, configured to determine a plurality of primary paths to a second network node;

[0215] The acquisition unit 2502 is configured to, if it is determined that the primary path fails, obtain a target ratio at the first network node, where the target ratio is a ratio between bandwidths of the plurality of primary paths;

[0216] The processing unit 2503 is configured to perform load sharing on the traffic sent to the second network node among the multiple primary paths according to a target ratio.

[0217] In one possible implementation,

[0218] The determining unit 2501 is specifically configured to determine a plurality of segment paths belonging to the same candidate path to the second network node, and the plurality of segment paths are used as a plurality of main paths.

[0219] In a possible implementation, the fault is a partial link failure of the primary path.

[0220] Fig.26 It is a structural diagram of a first network node 2600 provided in the present application, which may include one or more central processing units (CPU) 2601 and a memory 2605, wherein the memory 2605 stores one or more application programs or data.

[0221] The memory 2605 may be a volatile storage or a persistent storage. The program stored in the memory 2605 may include one or more modules, each of which may include a series of instruction operations on the server. Furthermore, the central processor 2601 may be configured to communicate with the memory 2605 and execute a series of instruction operations in the memory 2605 on the first network node 2600.

[0222] The first network node 2600 may further include one or more power supplies 2602 , one or more wired or wireless network interfaces 2603 , one or more input and output interfaces 2604 , and / or one or more operating systems.

[0223] The central processor 2601 can execute the operations of the aforementioned first network node, and the details are not repeated here.

[0224] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0225] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units 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 an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0226] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0227] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0228] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network node, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.

Claims

1. A method for alleviating network congestion, characterized in that: include: The first network node determines a primary path and a plurality of backup paths to the second network node; If the first network node determines that the primary path fails, the first network node upgrades the multiple backup paths to new primary paths; The first network node acquires a target ratio, where the target ratio is a ratio between bandwidths of the primary path and the plurality of new primary paths; The first network node performs load sharing on the traffic sent to the second network node between the primary path and the multiple new primary paths according to the target ratio.

2. The method according to claim 1, characterized in that The first network node determining a primary path and a plurality of backup paths to the second network node comprises: The first network node calculates N shortest paths to the second network node based on a shortest path first algorithm, where N is an integer greater than 2; The first network node determines the N paths as the primary path and the plurality of backup paths respectively.

3. The method according to claim 1, characterized in that The first network node determining a primary path and a plurality of backup paths to the second network node comprises: The first network node determines a plurality of candidate paths to the second network node, the candidate paths comprising a segmented path, the plurality of candidate paths including a candidate path as the primary path and a plurality of candidate paths as the backup paths.

4. The method according to claim 3, characterized in that The failure is a partial link failure of the primary path.

5. The method according to claim 4, characterized in that The method further comprises: If the first network node determines that the failure of the primary path has been eliminated, the traffic is switched back from the multiple new primary paths to the primary path, and the multiple new primary paths are downgraded to backup paths.

6. A method for alleviating network congestion, characterized in that: include: The first network node determines a primary path and a plurality of backup paths to the second network node; If the first network node determines that the primary path is congested, the first network node upgrades the multiple backup paths to new primary paths; The first network node acquires a target ratio, where the target ratio is a ratio between bandwidths of the multiple new primary paths; The first network node diverts a preset proportion of traffic in the main path to the multiple new main paths, and performs load sharing according to the target proportion.

7. The method according to claim 6, characterized in that The first network node determining a primary path and a plurality of backup paths to the second network node comprises: The first network node calculates N shortest paths to the second network node based on a shortest path first algorithm, where N is an integer greater than 2; The first network node determines the N paths as the primary path and the plurality of backup paths respectively.

8. The method according to claim 6, characterized in that The first network node determining a primary path and a plurality of backup paths to the second network node comprises: The first network node determines a plurality of candidate paths to the second network node, the candidate paths comprising a segmented path, the plurality of candidate paths including a candidate path as the primary path and a plurality of candidate paths as the backup paths.

9. The method according to claim 7 or 8, characterized in that: The method further comprises: The first network node adds a low priority mark to the preset proportion of traffic.

10. The method according to claim 8, characterized in that The first network node determining that congestion occurs on the primary path includes: The first network node receives a congestion notification from a network node on the primary path, where the congestion notification is used to indicate that congestion occurs on the primary path.

11. A method for alleviating network congestion, characterized in that: include: The first network node determines a plurality of primary paths to the second network node; If the first network node determines that a first main path among the multiple main paths is congested, the first network node obtains a target ratio, where the target ratio is a ratio between bandwidths of multiple second main paths, where the second main paths are the remaining main paths except the first main path; The first network node diverts a preset proportion of traffic in the first main path to the multiple second main paths, and performs load sharing according to the target proportion.

12. The method according to claim 11, characterized in that The first network node determines a plurality of primary paths to the second network node including: The first network node determines a plurality of segment paths belonging to the same candidate path to the second network node, and the plurality of segment paths serve as the plurality of main paths.

13. The method according to claim 11 or 12, characterized in that: The method further comprises: The first network node adds a low priority mark to the preset proportion of traffic.

14. The method according to claim 12, characterized in that The first network node determining that congestion occurs on a first primary path among the multiple primary paths includes: The first network node receives a congestion notification from a network node on the first primary path, where the congestion notification is used to indicate that congestion occurs on the first primary path.

15. A method for alleviating network congestion, characterized in that: include: The first network node determines a plurality of primary paths to the second network node; If the first network node determines that the primary path fails, the first network node acquires a target ratio, where the target ratio is a ratio between bandwidths of the multiple primary paths; The first network node performs load sharing on the traffic sent to the second network node among the multiple primary paths according to the target ratio.

16. The method according to claim 15, characterized in that The first network node determines a plurality of primary paths to the second network node including: The first network node determines a plurality of segment paths belonging to the same candidate path to the second network node, and the plurality of segment paths serve as the plurality of main paths.

17. The method according to claim 15 or 16, characterized in that The failure is a partial link failure of the primary path.

18. A first network node, comprising a processor and a memory, wherein the processor is coupled to the memory, and characterized in that: The memory is used to store a program, and the processor is used to execute the program in the memory, so that the first network node performs the method according to any one of claims 1 to 17.

19. A computer-readable storage medium comprising a program, characterized in that: When the method is executed on a computer, the computer is caused to execute the method according to any one of claims 1 to 17.

20. A computer program product comprising instructions, characterized in that When the method is executed on a computer, the computer is caused to execute the method according to any one of claims 1 to 17.