Traffic distribution method and device, electronic equipment and computer program product

By adjusting the link weight in the network architecture, the weight over-limit problem in multi-path routing due to hardware load balancing restrictions is solved, and reasonable traffic allocation in the case of link failure is achieved, service traffic packet loss is avoided, and network stability is improved.

CN120281712APending Publication Date: 2025-07-08BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510436873.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-08
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

In the existing network architecture, bandwidth loss and service traffic packet loss caused by link failure, especially in multi-path routing, the weight over-limit cannot be issued due to hardware load balancing restrictions.

Method used

By obtaining the link weight between the multi-path route and the next hop route in the network architecture, adjusting the initial weight according to the upper weight limit value, obtaining the adjusted link weight, and distributing traffic according to the adjusted link weight, ensuring that the weight calculation result is less than the upper limit of the chip resource, while maintaining the weight ratio between each next hop in line with the actual bandwidth ratio.

Benefits of technology

It realizes reasonable allocation of traffic in the case of link failure, avoids packet loss of service traffic, improves network stability, and is applicable to any chip without being restricted by chip resource.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120281712A_ABST
    Figure CN120281712A_ABST
Patent Text Reader

Abstract

The invention relates to a traffic distribution method and device, electronic equipment and a computer program product, and belongs to the technical field of computers. The method comprises the following steps: acquiring an initial weight corresponding to each link between a multi-path route and a next-hop route in a network architecture; obtaining a weight upper limit value of the network architecture, and adjusting the initial weight according to the weight upper limit value to obtain an adjusted link weight; and carrying out flow distribution between the multi-path route and the next-hop route according to the adjusted link weight. According to the invention, the link weight of the multipath routing is adjusted according to the weight upper limit value, the traffic can be distributed more reasonably, the risk of service packet loss is reduced, and the stability of the network is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technologies, and in particular, to a traffic allocation method, a traffic allocation device, an electronic device, and a computer program product. Background Art

[0002] In the network architectures commonly used by Internet manufacturers, traffic allocation for each link is generally processed based on the principle of average allocation among layers of routing. When a certain link fails, the available bandwidth for each unit will also decrease accordingly. Therefore, a single-link failure in the network may result in a huge bandwidth loss and cause business traffic packet loss.

[0003] In view of this, there is an urgent need in the art for a traffic allocation method that can reduce the risk of business packet loss and ensure network stability.

[0004] It should be noted that the information disclosed in the above background art section is only used to enhance the understanding of the background of the present disclosure, and thus may include information that does not constitute the prior art known to those of ordinary skill in the art. Summary of the Invention

[0005] The purpose of the present disclosure is to provide a traffic allocation method, a traffic allocation device, an electronic device, and a computer program product, which can at least to some extent reduce the risk of business packet loss and ensure network stability.

[0006] According to a first aspect of the present disclosure, there is provided a traffic allocation method, including:

[0007] Obtaining initial weights corresponding to each link between a multipath route and a next-hop route in a network architecture;

[0008] Obtaining a weight upper limit value of the network architecture, and adjusting the initial weights according to the weight upper limit value to obtain adjusted link weights;

[0009] Performing traffic allocation between the multipath route and the next-hop route according to the adjusted link weights.

[0010] In an exemplary embodiment of the present disclosure, the obtaining initial weights corresponding to each link between a multipath route and a next-hop route in a network architecture includes:

[0011] Obtaining the bearable bandwidth of each link between a multipath route and a next-hop route in a network architecture;

[0012] Determining the initial weights corresponding to each link according to the bearable bandwidth of each link.

[0013] In an exemplary embodiment of the present disclosure, adjusting the initial weights according to the weight upper limit value to obtain the adjusted link weights includes:

[0014] Obtaining the total weight according to the initial weights corresponding to each link. If the total weight is greater than the weight upper limit value, determining a weight adjustment ratio according to the total weight and the weight upper limit value;

[0015] Adjusting the initial weights according to the weight adjustment ratio to obtain the adjusted link weights;

[0016] If the total weight is less than or equal to the weight upper limit value, directly taking the initial weights as the adjusted link weights.

[0017] In an exemplary embodiment of the present disclosure, determining the weight adjustment ratio according to the total weight and the weight upper limit value includes:

[0018] Obtaining the weight adjustment ratio according to the ratio between the weight upper limit value and the total weight.

[0019] In an exemplary embodiment of the present disclosure, adjusting the initial weights according to the weight adjustment ratio to obtain the adjusted link weights includes:

[0020] Obtaining the link weights by multiplying the weight adjustment ratio by the initial weights;

[0021] If the value of the link weights is a floating-point number, performing a floor operation on the link weights to obtain the adjusted link weights.

[0022] In an exemplary embodiment of the present disclosure, after adjusting the initial weights according to the weight adjustment ratio, the method further includes:

[0023] Updating the total weight of the link weights;

[0024] Traversing the link weights to determine whether there is a special weight value in the link weights;

[0025] If there is the special weight value, determining whether the special value adjustment condition is satisfied according to the updated total weight;

[0026] If the special value adjustment condition is satisfied, assigning the special weight value in the link weights to the first weight value and updating the total weight of the link weights again.

[0027] In an exemplary embodiment of the present disclosure, determining whether the special value adjustment condition is satisfied according to the updated total weight includes:

[0028] Judge whether the special value adjustment condition is satisfied according to the difference between the updated total weight and the weight upper limit value.

[0029] According to a second aspect of the present disclosure, there is provided a traffic allocation device, including:

[0030] An initial weight acquisition module, configured to acquire initial weights corresponding to each link between multipath routing and next-hop routing in a network architecture;

[0031] A link weight adjustment module, configured to acquire the weight upper limit value of the network architecture and adjust the initial weights according to the weight upper limit value to obtain adjusted link weights;

[0032] A routing traffic allocation module, configured to perform traffic allocation between the multipath routing and the next-hop routing according to the adjusted link weights.

[0033] In an exemplary embodiment of the present disclosure, the initial weight acquisition module includes:

[0034] A link bandwidth acquisition unit, configured to acquire the bearable bandwidth of each link between multipath routing and next-hop routing in a network architecture;

[0035] An initial weight determination unit, configured to determine the initial weights corresponding to each link according to the bearable bandwidth of each link.

[0036] In an exemplary embodiment of the present disclosure, the link weight adjustment module includes:

[0037] An adjustment ratio determination unit, configured to obtain the total weight according to the initial weights corresponding to each link. If the total weight is greater than the weight upper limit value, determine the weight adjustment ratio according to the total weight and the weight upper limit value;

[0038] A first weight adjustment unit, configured to adjust the initial weights according to the weight adjustment ratio to obtain the adjusted link weights;

[0039] A second weight adjustment unit, configured to directly use the initial weights as the adjusted link weights if the total weight is less than or equal to the weight upper limit value.

[0040] In an exemplary embodiment of the present disclosure, the adjustment ratio determination unit includes:

[0041] An adjustment ratio calculation unit configured to execute obtaining the weight adjustment ratio according to the ratio between the weight upper limit value and the weight sum.

[0042] In an exemplary embodiment of the present disclosure, the first weight adjustment unit includes:

[0043] A link weight calculation unit configured to execute obtaining the link weight according to the product of the weight adjustment ratio and the initial weight;

[0044] A link weight rounding unit configured to execute if the value of the link weight is a floating point number, then perform a downward rounding operation on the link weight to obtain the adjusted link weight.

[0045] In an exemplary embodiment of the present disclosure, the link weight adjustment module further includes:

[0046] A weight sum update unit configured to execute updating the weight sum of the link weight;

[0047] A special weight value determination unit configured to execute traversing the link weight to determine whether there is a special weight value in the link weight;

[0048] An adjustment condition judgment unit configured to execute if there is the special weight value, then judge whether the special value adjustment condition is satisfied according to the updated weight sum;

[0049] A special weight value adjustment unit configured to execute if the special value adjustment condition is satisfied, then assign the special weight value in the link weight to the first weight value and update the weight sum of the link weight again.

[0050] In an exemplary embodiment of the present disclosure, the adjustment condition judgment unit includes:

[0051] A difference judgment unit configured to execute judging whether the special value adjustment condition is satisfied according to the difference between the updated weight sum and the weight upper limit value.

[0052] According to a third aspect of the present disclosure, there is provided an electronic device, including: a processor; a memory for storing instructions executable by the processor; wherein, the processor is configured to execute the instructions to implement the traffic allocation method described in any one of the above.

[0053] According to a fourth aspect of the present disclosure, there is provided a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the traffic allocation method described in any one of the above.

[0054] The exemplary embodiments of the present disclosure may have the following beneficial effects:

[0055] In the traffic allocation method of the exemplary embodiment of the present disclosure, by obtaining the initial weights corresponding to each link between the multipath routing and the next-hop routing in the network architecture and the weight upper limit value of the network architecture, and adjusting the initial weights according to the weight upper limit value to obtain the adjusted link weights, and then allocating traffic between the multipath routing and the next-hop routing according to the adjusted link weights. In the traffic allocation method of the exemplary embodiment of the present disclosure, the link weights of the multipath routing are adjusted according to the weight upper limit value, so that each layer of routing can allocate traffic more reasonably, solve the problem that the routing-based weights cannot be issued due to the maximum limit of the number of members of the hardware load balancer in the actual network, make the calculated result of the routing weight less than the weight upper limit of the chip resources, and at the same time, as much as possible ensure that the ratio of the weights between each next-hop conforms to the actual bandwidth ratio, avoid business traffic packet loss, and improve network stability. The traffic allocation method of the exemplary embodiment of the present disclosure is applicable to any chip and is not limited by chip resources.

[0056] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. Brief Description of the Drawings

[0057] The drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts.

[0058] Figure 1 Schematically shows a schematic diagram of the network architecture in a specific embodiment according to the present disclosure.

[0059] Figure 2 Schematically shows a schematic diagram of traffic allocation according to the weight ratio in a related embodiment according to the present disclosure.

[0060] Figure 3 Schematically shows a schematic diagram of traffic allocation according to the weight ratio in another related embodiment according to the present disclosure.

[0061] Figure 4 Shows a schematic flowchart of the traffic allocation method of the exemplary embodiment of the present disclosure.

[0062] Figure 5 Shows a schematic flowchart of adjusting the initial weights according to the weight upper limit value of the exemplary embodiment of the present disclosure.

[0063] Figure 6The flowchart shows the adjustment of the initial weight according to the weight adjustment ratio in an exemplary embodiment of the present disclosure.

[0064] Figure 7 The flowchart shows the adjustment of special weight values in an exemplary embodiment of the present disclosure.

[0065] Figure 8 The flowchart shows the flow of the traffic allocation method in a specific embodiment of the present disclosure.

[0066] Figure 9 The schematic diagram schematically shows the traffic allocation result in a specific embodiment of the present disclosure.

[0067] Figure 10 The block diagram shows the traffic allocation device in an exemplary embodiment of the present disclosure.

[0068] Figure 11 The schematic diagram shows the structure of a computer system of an electronic device suitable for implementing the embodiments of the present disclosure. Specific Embodiments

[0069] In order to enable those of ordinary skill in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0070] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure 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 such used data may be interchanged under appropriate circumstances so that the embodiments of the present disclosure described herein can be implemented in an order different from those illustrated or described herein.

[0071] The following exemplary embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the present disclosure will be more complete and comprehensive, and the concept of the exemplary embodiments will be fully conveyed to those skilled in the art. The features, structures, or characteristics described may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of the embodiments of the present disclosure. However, those skilled in the art will realize that the technical solutions of the present disclosure can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be used. In other cases, well-known technical solutions are not shown or described in detail to avoid obscuring the various aspects of the present disclosure.

[0072] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus repeated descriptions thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0073] Figure 1 Schematically shows a schematic diagram of a network architecture according to a specific embodiment of the present disclosure. Taking the network architecture DCN (Data Center Network) that connects the internal devices of a data center as an example, this architecture includes multiple layers of nodes. Among them, the SSP (Super Spine) is the highest-level device in an ultra-large-scale data center and connects multiple Sp nodes; the SP (Spine) is a core switching layer device and connects multiple LF nodes; the LF (Leaf) is an access layer device and directly connects to servers or storage devices; the TOR (Top of Rack) is located at the top of the server rack, connects the servers within the rack, and aggregates traffic.

[0074] In the above architecture, the connection between SSP and SP is a fullmesh connection, while the connection between SP and LF is a multi-plane connection, and each plane can be understood as a unit. When the SSP routing is passed to the LF layer, it is usually an ECMP (Equal-Cost Multi-Path) routing. According to the principle of evenly distributing traffic by ECMP, when the bandwidth of a certain plane decreases, the actually available bandwidth of other planes will also decrease accordingly, so as not to cause packet loss, that is, the barrel effect. However, the barrel effect will result in a huge bandwidth loss due to a single-link failure in the network.

[0075] In some related embodiments, the UCMP (Unequal-Cost Multi-Path) technology can be used to solve the barrel effect problem of ECMP and achieve load balancing in the network. Different from ECMP, UCMP allows routers to use paths with different costs to forward traffic. This method can more flexibly utilize network resources, optimize bandwidth usage, and improve the overall performance and reliability of the network.

[0076] In the UCMP scenario, traffic is no longer evenly distributed among the next hops of multi-path routing. Instead, different weights are assigned according to the ratio between the bandwidths that can be carried on different links. The chip distributes traffic according to the ratio of the weights, which can avoid packet loss of service traffic due to the reduction of the bandwidth of a certain plane.

[0077] Figure 2 FIG. schematically shows a schematic diagram of traffic distribution according to the weight ratio in a related embodiment of the present disclosure. Assume that there is 1 line connecting SSP-SP, and the bandwidth of each line is 400G, and the bandwidth of all 3 planes is 25.6T. There are 8 lines connecting SP-LF, and the bandwidth of each line is 400G. Assume that the service traffic is 64T, and the service traffic carried by each LEAF is 8T. In a possible fault scenario, the bold link represents the faulty link, that is, the first SP in plane 3 disconnects 2 uplink links.

[0078] In the case of using ECMP, there are 24 next hops for the first LEAF. According to the principle of evenly distributing traffic, the traffic sent by the LEAF to 3 SPs is: 8T / 24*8 = 2.67T. At this time, for the SP in the third plane connected to the first LEAF, there are only 6 links, and the total bandwidth is 2.4T. 2.6T obviously exceeds its total uplink bandwidth of 2.4T, resulting in packet loss of 200G of service traffic.

[0079] In the case of using UCMP, the LEAF side will assign different weights to different next hops according to the bandwidth ratio between SSP-SP. The switching chip distributes traffic according to the weight ratio of the routing next hops. At this time, the bandwidth ratios of the 3 planes are respectively: 3.2T: 3.2T: 2.4T. The weight ratio sequence of the 24 next hops of the first LEAF device is: {4:4:4:4:4:4:4:4:4:4:4:4:4:4:4:4:3:3:3:3:3:3:3:3}, so the traffic sent to the SPs in the 3 planes is respectively: 2.9T, 2.9T, 2.2T. The traffic of the SP in plane 3 does not exceed the total uplink bandwidth of 2.4T of the SP in plane 3, and there is no packet loss of service traffic. Therefore, compared with ECMP, UCMP can distribute traffic more reasonably and avoid packet loss of service traffic. However, although the UCMP solution can solve the problem of uneven bandwidth of different planes, there are still defects in some extreme scenarios.

[0080] Figure 3Schematically shown is a schematic diagram of traffic allocation according to the weight ratio in another related embodiment of the present disclosure. In another failure scenario under the same architecture, the first SP in plane 2 disconnects 1 uplink, and at the same time, the first SP in plane 3 disconnects 2 uplinks. Based on disconnecting 3 lines, at this time, the bandwidth ratios of the 3 planes are: 3.2T: 2.8T: 2.4T, and the weight ratio sequence of the 24 next hops of the first LEAF device is: {8: 8: 8: 8: 8: 8: 8: 8: 7: 7: 7: 7: 7: 7: 7: 7: 6: 6: 6: 6: 6: 6: 6: 6}.

[0081] However, when actually issuing chips, there is an upper limit to the sum of the next-hop weights supported by most chip manufacturers. For example, the upper limit of the sum of the next-hop weights supported by most manufacturers is 128, while the sum of the above set of weights is 168, which has exceeded the upper limit supported by the chip, and the chip does not support issuing this route. When such a failure occurs online, it may lead to the following two results:

[0082] 1. Routing issuance fails

[0083] In this case, it will cause a single or multiple LEAFs to lack the routes passed down by the SSP, and the corresponding traffic will be lost by at least 1 / 8, posing a risk of business traffic packet loss.

[0084] 2. Issue according to the ECMP weight

[0085] In this case, UCMP will fallback to the ECMP scenario, and due to the barrel effect, there is still a risk of business traffic packet loss.

[0086] Based on the above problems, the present exemplary embodiment first provides a traffic allocation method. Referring to Figure 4 as shown, the above traffic allocation method may include the following steps:

[0087] Step S410. Obtain the initial weights corresponding to each link between the multipath routing and the next-hop routing in the network architecture.

[0088] Step S420. Obtain the upper limit value of the weight of the network architecture, and adjust the initial weights according to the upper limit value of the weight to obtain the adjusted link weights.

[0089] Step S430. Perform traffic allocation between the multipath routing and the next-hop routing according to the adjusted link weights.

[0090] In the traffic allocation method of the exemplary embodiment of the present disclosure, the initial weights corresponding to each link between the multipath routing and the next-hop routing in the network architecture and the weight upper limit value of the network architecture are obtained, and the initial weights are adjusted according to the weight upper limit value to obtain the adjusted link weights. Then, traffic allocation is performed between the multipath routing and the next-hop routing according to the adjusted link weights. In the traffic allocation method of the exemplary embodiment of the present disclosure, the link weights of the multipath routing are adjusted according to the weight upper limit value, so that each layer of routing can allocate traffic more reasonably, and the problem that the routing-based weights cannot be issued due to the maximum limit of the number of members of the hardware load balancer in the actual network is solved, so that the calculated result of the routing weight is less than the weight upper limit of the chip resources, and at the same time, the ratio of the weights between the next hops is ensured to conform to the actual bandwidth ratio as much as possible, avoiding service traffic loss and improving network stability. The traffic allocation method in the exemplary embodiment of the present disclosure is applicable to any chip and is not limited by chip resources.

[0091] Next, the above steps of the exemplary embodiment will be described in more detail in conjunction with Figures 5 to 7 This example embodiment will be described in more detail.

[0092] In step S410, the initial weights corresponding to each link between the multipath routing and the next-hop routing in the network architecture are obtained.

[0093] In this exemplary embodiment, multipath routing allows data to be transmitted from the source to the destination simultaneously or dynamically through multiple paths. When data is transmitted, the traffic ratio of each path can be determined in advance based on the bandwidth weights.

[0094] In this exemplary embodiment, the bearable bandwidth of each link between the multipath routing and the next-hop routing in the network architecture can be obtained, and the initial weights corresponding to each link can be determined according to the bearable bandwidth of each link.

[0095] In the UCMP scenario, different initial weights can be issued between the next hops of the multipath routing according to the ratio between the bandwidths that can be borne on different links.

[0096] In step S420, the weight upper limit value of the network architecture is obtained, and the initial weights are adjusted according to the weight upper limit value to obtain the adjusted link weights.

[0097] In this exemplary embodiment, there is an upper limit to the sum of weights supported by the chip. For example, the upper limit value of the sum of weights supported by the chip can be 128. If it exceeds the upper limit supported by the chip, it will cause routing issuance failure or service traffic loss. Therefore, if the sum of the initial weights exceeds the upper limit, the initial weights need to be adjusted according to the weight upper limit value of the network architecture.

[0098] In this exemplary embodiment, asFigure 5 As shown, the initial weights are adjusted according to the weight upper limit value to obtain the adjusted link weights, which may specifically include the following steps:

[0099] Step S510. Obtain the total weight based on the initial weights corresponding to each link. If the total weight is greater than the weight upper limit value, determine the weight adjustment ratio according to the total weight and the weight upper limit value.

[0100] First, obtain the initial weights corresponding to each link of the total weight. If the total weight is greater than the weight upper limit value, for example, greater than the upper limit value of 128, obtain the weight adjustment ratio α according to the ratio between the weight upper limit value and the total weight.

[0101] Step S520. Adjust the initial weights according to the weight adjustment ratio to obtain the adjusted link weights.

[0102] In the present exemplary embodiment, as Figure 6 shown, the initial weights are adjusted according to the weight adjustment ratio to obtain the adjusted link weights, which may specifically include the following steps:

[0103] Step S610. Obtain the link weights according to the product of the weight adjustment ratio and the initial weights.

[0104] Scale the initial weight sequence proportionally according to the weight adjustment ratio. The scaled link weight sequence is The weight adjustment ratio is α, ensuring that the sum of the scaled weights is less than the upper limit W of the sum of weights in the chip max . The calculation formula is as follows:

[0105]

[0106] Since what is concerned during the data transmission process is the weight ratio between each next hop or the proportion of each next hop weight in the total weight, the scaling of weights will not cause loss of precision.

[0107] Step S620. If the value of the link weight is a floating point number, perform a floor operation on the link weight to obtain the adjusted link weight.

[0108] Since the weight adjustment ratio may be of floating point type, the elements in will probably have floating point type data, and the floating point type data needs to be smoothed. By traversing each array element in

[0109] In this exemplary embodiment, after adjusting the initial weights according to the weight adjustment ratio, the special weight values in the link weights can also be adjusted. For example, Figure 7 As shown, the adjustment method of the special weight values may include the following steps:

[0110] Step S710. Update the total weight of the link weights.

[0111] After scaling the link weights, update the sum of weights SUM.

[0112] Step S720. Traverse the link weights to determine whether there are special weight values in the link weights.

[0113] Traverse again each array element in, and determine whether there are special weight values. Among them, the special weight value is 0.

[0114] Step S730. If there are special weight values, determine whether the special value adjustment condition is satisfied according to the updated total weight.

[0115] If there are array elements with a weight value of 0, determine whether the special value adjustment condition is satisfied according to the difference between the updated total weight and the weight upper limit value, that is, determine whether the current total weight SUM is less than or equal to the weight upper limit value - 1.

[0116] Step S740. If the special value adjustment condition is satisfied, assign the special weight value in the link weights to the first weight value, and update the total weight of the link weights again.

[0117] If there exists W scaledi equal to 0, and at this time the total weight SUM is less than or equal to the weight upper limit value - 1, then process the link weights with a floor value of 0 according to the current SUM, and assign these link weights to 1 to ensure that the number of next hops does not change.

[0118] Step S530. If the total weight is less than or equal to the weight upper limit value, directly use the initial weights as the adjusted link weights.

[0119] If SUM is less than or equal to the weight upper limit specified by the chip resources at this time, directly end the algorithm without adjusting the initial weights and they can be used directly.

[0120] In step S430, perform traffic allocation between multi-path routing and next-hop routing according to the adjusted link weights.

[0121] Finally, perform traffic allocation for the next hop according to the adjusted link weights W scaledi At this time, the routing weight calculation result is less than the weight upper limit of the chip resources, and the ratio of the weights between the next hops conforms to the actual bandwidth ratio.

[0122] As shown Figure 8 in the following flowchart of the traffic allocation method in a specific embodiment of the present disclosure, which is an example illustration of the above steps in this exemplary embodiment. The specific steps of this flowchart are as follows:

[0123] Step S802. Calculate the total weight SUM.

[0124] Calculate the sum SUM of the existing weight sequence.

[0125] Step S804. Determine whether SUM is less than or equal to the chip weight upper limit.

[0126] If SUM is less than or equal to the upper limit specified by the chip resources at this time, directly end the algorithm; otherwise, continue.

[0127] Step S806. Calculate the scaling factor α.

[0128] Obtain the weight scaling factor α according to the ratio between the weight upper limit value and the total weight SUM.

[0129] Step S808. Determine whether the traversal of the array ends.

[0130] Start the first traversal of the weight sequence array.

[0131] Step S810. Weight scaling.

[0132] According to the weight scaling factor α, scale the original weight to

[0133] Step S812. Round down the array elements.

[0134] If there are floating-point numbers, round down the

[0135] Step S814. Update SUM.

[0136] Update the sum SUM of the weight sequence, continue to traverse the next array element, and repeat steps S810 to S814 until all array elements in the weight sequence are traversed.

[0137] Step S816. Determine whether the traversal of the array ends.

[0138] Start the second traversal of the weight sequence array.

[0139] Step S818. Determine whether there are special values and meet the processing conditions.

[0140] If there exists Equal to 0, and at this time SUM is less than or equal to the upper limit of chip resources - 1, jump to step S820, otherwise continue traversing.

[0141] Step S820. Special value processing.

[0142] The value after rounding is 0 Modify it to 1.

[0143] Step S822. Update SUM.

[0144] Update the sum SUM of the weight sequence, continue to traverse the next array element, and repeat steps S818 to S822 until all elements of the weight sequence array are traversed, and the algorithm ends.

[0145] Figure 9 Schematically shows a schematic diagram of the traffic allocation result according to a specific embodiment of the present disclosure. In the scenario where UCMP has defects, the weight sequence recalculated by the above traffic allocation method is: {6:6:6:6:6:6:6:6:5:5:5:5:5:5:5:5:4:4:4:4:4:4:4:4}, and the sum of the optimized weights is: 6 * 8 + 5 * 8 + 4 * 8 = 120, which is less than the weight upper limit of the chip resources 128. Therefore, normal routing issuance can be guaranteed. At this time, the traffic allocation result is: 3.2T:2.6T:2.2T. It also does not exceed the total upstream bandwidth 2.4T of the SP in plane 3 and will not cause loss of service traffic.

[0146] It should be noted that although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that these steps must be executed in this specific order, or that all the steps shown must be executed to achieve the desired result. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step for execution, and / or one step may be decomposed into multiple steps for execution, etc.

[0147] Furthermore, the present disclosure also provides a traffic allocation device. Refer to Figure 10 As shown, the traffic allocation device may include an initial weight acquisition module 1010, a link weight adjustment module 1020, and a routing traffic allocation module 1030. Among them:

[0148] The initial weight acquisition module 1010 is configured to obtain the initial weights corresponding to each link between the multipath routing and the next-hop routing in the network architecture;

[0149] The link weight adjustment module 1020 is configured to obtain the weight upper limit value of the network architecture and adjust the initial weights according to the weight upper limit value to obtain the adjusted link weights;

[0150] The routing traffic allocation module 1030 is configured to perform traffic allocation between multipath routing and next-hop routing according to the adjusted link weights.

[0151] In some exemplary embodiments of the present disclosure, the initial weight acquisition module 1010 may include a link bandwidth acquisition unit and an initial weight determination unit. Among them:

[0152] The link bandwidth acquisition unit is configured to acquire the bearable bandwidth of each link between multipath routing and next-hop routing in the network architecture;

[0153] The initial weight determination unit is configured to determine the initial weight corresponding to each link according to the bearable bandwidth of each link.

[0154] In some exemplary embodiments of the present disclosure, the link weight adjustment module 1020 may include an adjustment ratio determination unit, a first weight adjustment unit, and a second weight adjustment unit. Among them:

[0155] The adjustment ratio determination unit is configured to obtain the total weight according to the initial weight corresponding to each link. If the total weight is greater than the weight upper limit value, the weight adjustment ratio is determined according to the total weight and the weight upper limit value;

[0156] The first weight adjustment unit is configured to adjust the initial weight according to the weight adjustment ratio to obtain the adjusted link weight;

[0157] The second weight adjustment unit is configured to directly use the initial weight as the adjusted link weight if the total weight is less than or equal to the weight upper limit value.

[0158] In some exemplary embodiments of the present disclosure, the adjustment ratio determination unit may include an adjustment ratio calculation unit, which is configured to obtain the weight adjustment ratio according to the ratio between the weight upper limit value and the total weight.

[0159] In some exemplary embodiments of the present disclosure, the first weight adjustment unit may include a link weight calculation unit and a link weight rounding unit. Among them:

[0160] The link weight calculation unit is configured to obtain the link weight according to the product of the weight adjustment ratio and the initial weight;

[0161] The link weight rounding unit is configured to perform a downward rounding operation on the link weight if the value of the link weight is a floating point number to obtain the adjusted link weight.

[0162] In some exemplary embodiments of the present disclosure, the link weight adjustment module 1020 may further include a weight sum update unit, a special weight value determination unit, an adjustment condition judgment unit, and a special weight value adjustment unit. Among them:

[0163] The weight sum update unit is configured to update the weight sum of the link weights;

[0164] The special weight value determination unit is configured to traverse the link weights and determine whether there is a special weight value in the link weights;

[0165] The adjustment condition judgment unit is configured to, if there is a special weight value, determine whether the special value adjustment condition is satisfied according to the updated weight sum;

[0166] The special weight value adjustment unit is configured to, if the special value adjustment condition is satisfied, assign the special weight value in the link weights to the first weight value and update the weight sum of the link weights again.

[0167] In some exemplary embodiments of the present disclosure, the adjustment condition judgment unit may include a difference judgment unit, which is configured to determine whether the special value adjustment condition is satisfied according to the difference between the updated weight sum and the weight upper limit value.

[0168] The specific details of each module / unit in the above traffic distribution device have been described in detail in the corresponding method embodiment part, and will not be repeated here.

[0169] Figure 11 FIG. shows a schematic structural diagram of a computer system of an electronic device suitable for implementing the embodiments of the present disclosure.

[0170] It should be noted that Figure 11 the computer system 1100 of the electronic device shown is only an example and should not impose any limitation on the functions and usage scope of the embodiments of the present disclosure.

[0171] As Figure 11 shown, the computer system 1100 includes a central processing unit (CPU) 1101, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1102 or the program loaded from the storage section 1108 into the random access memory (RAM) 1103. In the RAM 1103, various programs and data required for system operation are also stored. The CPU 1101, ROM 1102, and RAM 1103 are connected to each other through a bus 1104. The input / output (I / O) interface 1105 is also connected to the bus 1104.

[0172] The following components are connected to the I / O interface 1105: an input section 1106 including a keyboard, a mouse, etc.; an output section 1107 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 1108 including a hard disk, etc.; and a communication section 1109 including a network interface card such as a LAN card, a modem, etc. The communication section 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to the I / O interface 1105 as needed. A removable medium 1111, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1110 as needed so that a computer program read from it can be installed into the storage section 1108 as needed.

[0173] Specifically, according to an embodiment of the present disclosure, the processes described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program codes for executing the methods shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 1109, and / or installed from the removable medium 1111. When the computer program is executed by a central processing unit (CPU) 1101, various functions defined in the system of the present disclosure are executed.

[0174] An exemplary embodiment of the present disclosure also provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the above-mentioned traffic allocation method is implemented.

[0175] In one embodiment, the computer program product may be a tangible product containing a computer program, such as a computer-readable storage medium storing the computer program. The readable storage medium may be a storage medium based on signals such as electricity, magnetism, light, electromagnetic, infrared, etc., including but not limited to: random access memory (RAM), read-only memory (ROM), magnetic tape, floppy disk, flash memory, mechanical hard disk (HDD), solid state drive (SSD), etc. Exemplarily, the computer program product may be implemented as a non-volatile storage medium storing the computer program, such as read-only memory, Nand Flash, etc.

[0176] In one embodiment, the computer program product may be an intangible product containing a computer program. Exemplarily, the computer program product may be implemented as a virtual digital product, such as an executable file storing the computer program, an installation package, etc. digital files.

[0177] The code of a computer program can be written in one or more programming languages. Examples of programming languages include C, Java, C++, etc. The program code can be executed entirely on the user's computing device, or partially on the user's computing device, or as a standalone software package, or partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device can be connected to the user's computing device via any type of network, such as a local area network (LAN), wide area network (WAN), etc., or it can be connected to an external computing device (e.g., via an Internet connection provided by an operator).

[0178] A computer program can be carried or transmitted by signals such as electrical, magnetic, optical, electromagnetic, infrared, etc. An electronic device can convert the signal carrying the computer program into a digital signal and then run the computer program. When the computer program runs on an electronic device, its code is used to cause the electronic device to execute (more specifically, to cause the processor of the electronic device to execute) the method steps of various exemplary embodiments of the present disclosure, such as the above-described traffic allocation method can be executed.

[0179] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram can represent a module, a program segment, or a portion of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions denoted in the blocks may occur in a different order than that denoted in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and combinations of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or by a combination of dedicated hardware and computer instructions.

[0180] It should be noted that although several modules of devices for performing actions are mentioned in the above detailed description, such a division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more of the above-described modules can be embodied in one module. Conversely, the features and functions of one module described above can be further divided and embodied by multiple modules.

[0181] Other embodiments of the present disclosure will be readily apparent to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include known common general knowledge or conventional technical means in the technical field not disclosed by the present disclosure.

[0182] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.

Claims

1. A flow allocation method, characterized in that, Including: Obtain the initial weights corresponding to each link between the multipath routing and the next-hop routing in the network architecture; Obtain the weight upper limit value of the network architecture, and adjust the initial weights according to the weight upper limit value to obtain the adjusted link weights; Perform traffic allocation between the multipath routing and the next-hop routing according to the adjusted link weights.

2. The flow distribution method according to claim 1, characterized in that The obtaining the initial weights corresponding to each link between the multipath routing and the next-hop routing in the network architecture includes: Obtain the bearable bandwidth of each link between the multipath routing and the next-hop routing in the network architecture; Determine the initial weights corresponding to each link according to the bearable bandwidth of each link.

3. The flow distribution method according to claim 1, wherein The adjusting the initial weights according to the weight upper limit value to obtain the adjusted link weights includes: Obtain the total weight according to the initial weights corresponding to each link. If the total weight is greater than the weight upper limit value, determine the weight adjustment ratio according to the total weight and the weight upper limit value; Adjust the initial weights according to the weight adjustment ratio to obtain the adjusted link weights; If the total weight is less than or equal to the weight upper limit value, directly use the initial weights as the adjusted link weights.

4. The flow rate distribution method according to claim 3, characterized in that The determining the weight adjustment ratio according to the total weight and the weight upper limit value includes: Obtain the weight adjustment ratio according to the ratio between the weight upper limit value and the total weight.

5. The flow rate distribution method according to claim 3, characterized in that The adjusting the initial weights according to the weight adjustment ratio to obtain the adjusted link weights includes: Obtain the link weights according to the product of the weight adjustment ratio and the initial weights; If the value of the link weights is a floating-point number, perform a floor operation on the link weights to obtain the adjusted link weights.

6. The flow rate distribution method according to claim 3, wherein After adjusting the initial weights according to the weight adjustment ratio, the method further includes: Update the total weight of the link weights; Traverse the link weights to determine whether there is a special weight value in the link weights; If there is the special weight value, determine whether the special value adjustment condition is satisfied according to the updated total weight; If the special value adjustment condition is satisfied, assign the special weight value in the link weights to the first weight value, and update the total weight of the link weights again.

7. The flow rate distribution method according to claim 6, characterized in that, The determining whether the special value adjustment condition is satisfied according to the updated total weight includes: Determine whether the special value adjustment condition is satisfied according to the difference between the updated total weight and the weight upper limit value.

8. A flow distribution device, characterized in that, Including: An initial weight obtaining module, configured to execute obtaining the initial weights corresponding to each link between the multipath routing and the next-hop routing in the network architecture; A link weight adjusting module, configured to execute obtaining the weight upper limit value of the network architecture, and adjusting the initial weights according to the weight upper limit value to obtain the adjusted link weights; A routing traffic allocation module, configured to execute performing traffic allocation between the multipath routing and the next-hop routing according to the adjusted link weights.

9. An electronic device, characterized in that, Including: A processor; A memory for storing the processor-executable instructions; Wherein, the processor is configured to execute the instructions to implement the traffic allocation method according to any one of claims 1 to 7.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the traffic allocation method according to any one of claims 1 to 7.