Load balancing method, apparatus, device, medium and program product

CN121217656BActive Publication Date: 2026-08-18CHINA MOBILE INFORMATION TECHNOLOGY CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511475174.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-15
Publication Date
2026-08-18
Estimated Expiration
2045-10-15

AI Technical Summary

Technical Problem

[0006]本申请实施例提供一种负载均衡方法、装置、设备、介质及程序产品,可解决当前的负载分担方式的数据传输效率较低的问题

Benefits of technology

[0017]In this embodiment, the bottleneck path of the initial traffic path of the data stream to be processed in the network is obtained, and the link information of the network is obtained. The network includes multiple nodes, the bottleneck path is a portion of the initial traffic path, and the remaining bandwidth of the bottleneck path is less than the bandwidth consumed by the data stream to be processed. If the ratio between the remaining bandwidth and the consumed bandwidth of the bottleneck path is less than a preset threshold, load balancing optimization is performed on the bottleneck path based on the bottleneck path and the link information of the network to obtain an optimized traffic path set. The optimized traffic path set includes N paths, and the bottleneck path is one of the N paths, where N is an integer greater than 1. An optimization strategy is generated based on the optimized traffic path, wherein the optimization strategy instructs the data stream to be processed on the bottleneck path to be split into N sub-data streams, and instructs the N sub-data streams to be transmitted through the optimized traffic path set. The optimization strategy is then distributed to the network. The network receives and executes the optimization strategy, which adjusts the transmission of traffic data to be processed from the original bottleneck path to the optimized traffic path. This avoids link congestion when the data passes through the bottleneck segment, improving data transmission efficiency compared to packet-by-packet or flow-by-flow load balancing in existing technologies. Furthermore, during load balancing optimization, only the bottleneck path is optimized, not the entire initial traffic path. This significantly reduces the number of candidate paths during load balancing optimization, lowering the algorithm convergence time from seconds to milliseconds, further improving data transmission efficiency. In summary, the load balancing method of this application can improve data transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121217656B_ABST
    Figure CN121217656B_ABST
Patent Text Reader

Abstract

The application provides a load balancing method, device, equipment, medium and program product, which are applied to the technical field of communication. The method comprises the following steps: acquiring a bottleneck path of an initial traffic path of a data flow to be processed in a network, and acquiring link information of the network; in the case that a ratio between a remaining bandwidth of the bottleneck path and the consumed bandwidth is less than a preset threshold, performing load balancing optimization on the bottleneck path based on the bottleneck path and the link information of the network to obtain an optimized traffic path set; generating an optimized strategy based on the optimized traffic path set; and issuing the optimized strategy to the network. Through the method, link congestion of the data to be processed when passing through the bottleneck segment traffic path can be avoided, the algorithm convergence time is short when performing load balancing optimization, and the data transmission efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a load balancing method, apparatus, device, medium, and program product. Background Technology

[0002] To alleviate data transmission congestion, current network technologies generally employ two load balancing methods: packet-by-packet load balancing (PPLB) and flow-based load balancing (PBLB).

[0003] PPLB treats data packets as the smallest atom, with extremely fine granularity. It can make full use of the link but sacrifices orderliness. This can cause the Transmission Control Protocol (TCP) to misinterpret a large number of out-of-order data packets as packet loss and congestion in the network, thereby triggering a series of chain reactions such as pseudo packet loss and retransmission, congestion control misjudgment, and sudden drop in congestion window, resulting in low data transmission efficiency.

[0004] PBLB uses streams as atoms, ensuring order while significantly relaxing granularity. However, when elephant streams appear in the network, multiple elephant streams may be assigned to the same link, leading to link congestion or even packet loss. At the same time, other parallel links may be completely idle or underutilized. Therefore, PBLB may experience low transmission efficiency for elephant streams.

[0005] In summary, the current load balancing method has low data transmission efficiency. Summary of the Invention

[0006] This application provides a load balancing method, apparatus, device, medium, and program product that can solve the problem of low data transmission efficiency in current load balancing methods.

[0007] In a first aspect, embodiments of this application provide a load balancing method, the method comprising: Obtain the bottleneck path of the initial traffic path of the data stream to be processed in the network, and obtain the link information of the network, wherein the network includes multiple nodes, the bottleneck path is a part of the initial traffic path, and the remaining bandwidth of the bottleneck path is less than the bandwidth consumed by the data stream to be processed. If the ratio between the remaining bandwidth and the consumed bandwidth of the bottleneck path is less than a preset threshold, load balancing optimization is performed on the bottleneck path based on the link information of the bottleneck path and the network to obtain an optimized traffic path set. The optimized traffic path set includes N paths, and the bottleneck path is one of the N paths, where N is an integer greater than 1. An optimization strategy is generated based on the optimized traffic path, wherein the optimization strategy is used to instruct the data stream to be processed on the bottleneck path to be split into N sub-data streams, and to instruct the N sub-data streams to be transmitted through the optimized traffic path set. The optimization strategy is then distributed to the network.

[0008] Optionally, the step of optimizing the bottleneck path based on the bottleneck path and the network link information to obtain an optimized traffic path set includes: Based on the link information of the network and the bottleneck path, a first node and a second node are determined, wherein the first node is the upstream node of the starting node of the bottleneck path in the initial traffic path, and the second node is the downstream node of the final node of the bottleneck path in the initial traffic path. Based on the link information of the network, the entire link between the first node and the second node in the network is traversed to obtain the optimized traffic path set.

[0009] Optionally, the optimized traffic path set is obtained by traversing all links between the first node and the second node based on the link information of the network, including: Based on the link information of the network, all links between the first node and the second node are traversed to obtain the first link set; The first link set is filtered N times to obtain the optimized traffic path set, wherein the optimized traffic path set includes N paths obtained from the N filtering processes, and the i-th filtering process in the N filtering processes includes: Along the direction from the first node to the second node, the link with the smallest remaining bandwidth is selected sequentially from the i-th link set to obtain the path of the i-th filtering; and the link corresponding to the path of the i-th filtering is deleted from the i-th link set to obtain the (i+1)-th link set; when i equals 1, the i-th link set is the first link set, where i is an integer and its value ranges from 1 to N.

[0010] Optionally, the optimization strategy is used to instruct that the data stream to be processed on the bottleneck path be split into N sub-data streams at the first node, and the optimization strategy includes: the sequence number of each sub-data stream when the data stream to be processed is split into the N sub-data streams at the first node; the optimization strategy is used to instruct that at the second node, the N sub-data streams be merged according to the sequence number of the sub-data streams to obtain the data stream processed by the second node.

[0011] Optionally, generating the optimization strategy based on the optimized traffic path set includes: Obtain the N remaining bandwidths corresponding to the N paths of the optimized traffic path set; Based on the N remaining bandwidths of the N paths, a traffic splitting weight is determined, wherein the traffic splitting weight includes N values, each of which corresponds one-to-one with the N remaining bandwidths, and the N values ​​are used to characterize the proportion of the N remaining bandwidths. The optimization strategy is generated based on the traffic splitting weights and the N paths, wherein the optimization strategy is used to instruct the data stream to be processed on the bottleneck path to be split into the N sub-data streams according to the traffic splitting weights, and to instruct the sub-data streams to be transmitted through their corresponding paths.

[0012] Optionally, distributing the optimization strategy to the network includes: A tuning strategy is sent to the network. The tuning strategy includes a Border Gateway Protocol Policy (BGP) message and a traffic redirection field. The BGP Policy message is used to instruct the unprocessed data flow of the bottleneck path to be split into N sub-data flows. The traffic redirection field includes node information of the N paths.

[0013] Secondly, embodiments of this application also provide a load balancing device, the device comprising: The acquisition module is used to acquire the bottleneck path of the initial traffic path of the data stream to be processed in the network, and to acquire the link information of the network, wherein the network includes multiple nodes, the bottleneck path is a part of the initial traffic path, and the remaining bandwidth of the bottleneck path is less than the bandwidth consumed by the data stream to be processed. An optimization module is used to perform load balancing optimization on the bottleneck path based on the link information of the bottleneck path and the network when the ratio between the remaining bandwidth and the consumed bandwidth of the bottleneck path is less than a preset threshold, to obtain a set of optimized traffic paths. The set of optimized traffic paths includes N paths, and the bottleneck path is one of the N paths, where N is an integer greater than 1. The strategy generation module is used to generate an optimization strategy based on the optimized traffic path set, wherein the optimization strategy is used to instruct the data stream to be processed on the bottleneck path to be split into N sub-data streams, and to instruct the N sub-data streams to be transmitted through the optimized traffic path set. The distribution module is used to distribute the optimization strategy to the network.

[0014] Thirdly, embodiments of this application also provide an electronic device, including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the load balancing method as described in the first aspect.

[0015] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the load balancing method as described in the first aspect.

[0016] Fifthly, a computer program product is provided, including computer instructions that, when executed by a processor, implement the steps of the load balancing method as described in the first aspect.

[0017] In this embodiment, the bottleneck path of the initial traffic path of the data stream to be processed in the network is obtained, and the link information of the network is obtained. The network includes multiple nodes, the bottleneck path is a portion of the initial traffic path, and the remaining bandwidth of the bottleneck path is less than the bandwidth consumed by the data stream to be processed. If the ratio between the remaining bandwidth and the consumed bandwidth of the bottleneck path is less than a preset threshold, load balancing optimization is performed on the bottleneck path based on the bottleneck path and the link information of the network to obtain an optimized traffic path set. The optimized traffic path set includes N paths, and the bottleneck path is one of the N paths, where N is an integer greater than 1. An optimization strategy is generated based on the optimized traffic path, wherein the optimization strategy instructs the data stream to be processed on the bottleneck path to be split into N sub-data streams, and instructs the N sub-data streams to be transmitted through the optimized traffic path set. The optimization strategy is then distributed to the network. The network receives and executes the optimization strategy, which adjusts the transmission of traffic data to be processed from the original bottleneck path to the optimized traffic path. This avoids link congestion when the data passes through the bottleneck segment, improving data transmission efficiency compared to packet-by-packet or flow-by-flow load balancing in existing technologies. Furthermore, during load balancing optimization, only the bottleneck path is optimized, not the entire initial traffic path. This significantly reduces the number of candidate paths during load balancing optimization, lowering the algorithm convergence time from seconds to milliseconds, further improving data transmission efficiency. In summary, the load balancing method of this application can improve data transmission efficiency. Attached Figure Description

[0018] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is one of the flowcharts illustrating the load balancing method provided in the embodiments of this application; Figure 2 This is one of the schematic diagrams of the initial traffic path provided in the embodiments of this application; Figure 3 This is a second schematic flowchart of the load balancing method provided in the embodiments of this application; Figure 4 This is one of the network link diagrams provided in the embodiments of this application; Figure 5This is the second network link diagram provided in the embodiments of this application; Figure 6 This is the third network link diagram provided in the embodiments of this application; Figure 7 This is the fourth network link diagram provided in the embodiments of this application; Figure 8 This is the third flowchart illustrating the load balancing method provided in the embodiments of this application. Figure 9 This is a schematic diagram of the load balancing device provided in the embodiments of this application; Figure 10 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0020] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0021] This application provides a load balancing method, wherein the execution subject of the method may be a network controller engine (NCE).

[0022] See Figure 1 , Figure 1 This is a flowchart of the load balancing method provided in the embodiments of this application, such as... Figure 1 As shown, it includes the following steps: Step 101: Obtain the bottleneck path of the initial traffic path of the data stream to be processed in the network, and obtain the link information of the network, wherein the network includes multiple nodes, the bottleneck path is a part of the initial traffic path, and the remaining bandwidth of the bottleneck path is less than the bandwidth consumed by the data stream to be processed.

[0023] In this embodiment, the network can be a data center network, each node can be a computer device, and multiple nodes in the network can form links for data transmission. Each path in this embodiment includes at least one link. The data stream to be processed can be an elephant stream, which refers to a stream with a long duration and high traffic or bandwidth consumption, i.e., a very small amount of "huge" traffic that consumes the vast majority of the bandwidth.

[0024] In some embodiments, the identification and reporting of "elephant flows" can be as follows: the data flow to be processed originates from the head node of its traffic path, is forwarded through intermediate nodes, and arrives at the destination node; the head node marks the data to be processed as an "elephant flow" based on a data transmission rate threshold (e.g., ≥1Gbps) or an artificial intelligence (AI) prediction model; and the controller obtains the elephant flow information based on the head node. The determination of elephant flows can be based on statistical patterns, distinguished by manually setting a judgment baseline. Characteristics such as large data volume, long duration, and high bandwidth usage can be used as reference criteria.

[0025] The network link information can be obtained by the data plane devices reporting network metrics such as port rate, queue depth, and packet loss count to the NCE. This link information includes the remaining bandwidth information of all links in the network, and a network-wide remaining bandwidth matrix can be constructed using this information. The network-wide remaining bandwidth matrix refers to the available bandwidth (BW) of all links in the network within a specific time range (usually in minutes, such as 10 minutes, which can be set according to actual conditions). For a network topology G=(V,E), V represents the set of nodes, and E represents the set of links. If represented as a matrix, the remaining bandwidth matrix can be represented as a matrix BW=|V|*|V|. If there is no connection between two points, the corresponding element value is 0; if there is a connection, the corresponding element value represents the current remaining bandwidth.

[0026] The controller can analyze the bandwidth usage of the initial traffic path of the data stream to be processed based on the network's link information, thereby identifying bottleneck paths. Understandably, if the remaining bandwidth of the bottleneck path is less than the bandwidth consumed by the data stream to be processed, there is a risk of link congestion. For example, if subsequent large traffic streams with the same or even greater bandwidth consumption as the data stream to be processed appear, it will lead to bottleneck path congestion. For instance, consider an initial traffic path "ABCDE", where "BCD" is the bottleneck path. In this segment, the remaining bandwidth of the link is less than the bandwidth consumed by the data stream to be processed; while in segments "AB" and "DE", the remaining bandwidth of the link is greater than or equal to the bandwidth consumed by the data stream to be processed.

[0027] Step 102: If the ratio between the remaining bandwidth of the bottleneck path and the consumed bandwidth is less than a preset threshold, load balancing optimization is performed on the bottleneck path based on the link information of the bottleneck path and the network to obtain an optimized traffic path set. The optimized traffic path set includes N paths, and the bottleneck path is one of the N paths, where N is an integer greater than 1.

[0028] In this embodiment, the load balancing optimization is triggered as follows: the system dynamically identifies that there is room for optimization in the current bandwidth utilization. The controller monitors the network link information in real time, finds that there is a significant imbalance in bandwidth distribution in some parts of the network topology, and sets a preset threshold (a reference value of "remaining bandwidth of the bottleneck path / bandwidth consumed by the data stream to be processed"). When the data stream to be processed arrives, if the ratio between the remaining bandwidth of the bottleneck path and the consumed bandwidth in real time is less than the preset threshold, then the bottleneck path is more likely to be congested, and load balancing optimization is actively implemented.

[0029] In an optional embodiment, load balancing optimization can also be triggered by configuring a static threshold for link bandwidth utilization (a reference value of "bandwidth of the initial traffic path / bandwidth consumed by the data stream to be processed"). When the data stream to be processed arrives, if the ratio between the real-time bandwidth of the initial traffic path and the bandwidth consumed by the data stream to be processed is less than the static threshold, then the bottleneck path is more likely to be congested, and load balancing optimization is implemented. In this way, the link utilization can be made close to the static threshold, avoiding bandwidth idleness, and path optimization can be triggered in advance at the static threshold.

[0030] Furthermore, in the above embodiments, the consumed bandwidth can be the peak or average traffic of the data stream to be processed. During load balancing optimization, optimization is performed only on the bottleneck path, rather than on the entire initial traffic path. This means the number of candidate paths during load balancing optimization is significantly reduced, and the algorithm convergence time is reduced from seconds to milliseconds, thereby improving data transmission efficiency.

[0031] In this embodiment, the method of "optimizing the bottleneck path by load balancing based on the bottleneck path, the link information of the network, and the consumed bandwidth to obtain the optimized traffic path" can be as follows: determine the equivalent path of the bottleneck path according to the link information of the network, and select some paths from the equivalent paths as the paths in the N paths.

[0032] Step 103: Generate an optimization strategy based on the optimized traffic path set, wherein the optimization strategy is used to instruct the data stream to be processed on the bottleneck path to be split into N sub-data streams, and to instruct the N sub-data streams to be transmitted through the optimized traffic path set.

[0033] In this step, after obtaining the N paths included in the optimized traffic path, the following optimization strategy can be generated: randomly split the data to be processed into N sub-data streams, and then randomly allocate them to the N paths for transmission. This can reduce the load on the original bottleneck path, avoid link congestion, and thus improve data transmission efficiency. Figure 3As shown in the example, the initial traffic path of the data stream to be processed is "ABCDEF", where "CD" is the bottleneck path. After load balancing optimization, the optimized traffic paths are "CD" and "CHID". The data stream to be processed can be split into two sub-data streams and transmitted through "CD" and "CHID" respectively.

[0034] Step 104: Distribute the optimization strategy to the network.

[0035] After the controller calculates the tuning strategy, it can distribute the strategy to the network via the Border Gateway Protocol Flow Specification (BGP Flow). BGP Flow is an extension of BGP that automatically and on a large scale distributes network flow processing rules through routing protocols. Compared to traditional BGP, BGP Flow can understand more detailed "traffic characteristics" and perform various actions such as intelligent traffic splitting, forwarding, rate limiting, and isolation based on these characteristics.

[0036] The network executes the optimization strategy, which adjusts the transmission of traffic data to be processed from the original bottleneck path to the optimized traffic path. This avoids link congestion when the traffic data passes through the bottleneck segment, and improves data transmission efficiency compared to the packet-by-packet load balancing and flow-by-flow load balancing in the prior art.

[0037] Furthermore, to facilitate a better understanding of the beneficial effects of the method in this application, the following explanations are provided regarding per-packet load balancing and per-flow load balancing: PPLB uses individual data packets as the forwarding unit. When network devices discover multiple equivalent paths to the same destination address, the packet-by-packet mechanism treats each data packet in a unified data stream as an independent forwarding unit, distributing them to different paths using round-robin or random methods. This mechanism has the finest granularity and theoretically can evenly distribute the bandwidth requirements of a single flow across multiple paths, thereby maximizing link utilization. However, in practice, PPLB conflicts with the realities of TCP. Different physical paths naturally exhibit propagation differences on the order of microseconds to milliseconds. Data packets from the same TCP session, once distributed, will inevitably arrive out of order. TCP is designed based on ordered arrival. When it observes a large number of out-of-order data packets, it mistakenly interprets them as packet loss and congestion in the network. This misjudgment triggers a series of chain reactions, including false packet loss and retransmissions, congestion control misjudgments, and a sudden drop in the congestion window. Ultimately, the initial intention of utilizing more bandwidth results in an effective throughput far lower than using a single link, while also exacerbating network congestion due to numerous unnecessary retransmissions, thus reducing data transmission efficiency.

[0038] Equity-Cost Multi-Path (ECMP) in PBLB has become the de facto standard load balancing mechanism for data center networks. Instead of treating individual packets as forwarding atoms, it considers the entire data flow as an indivisible unit. Devices extract a constant five-tuple from the packet header (including the source Internet Protocol (IP) address, destination IP address, protocol number, source Transmission Control Protocol (TCP) / User Datagram Protocol (UDP) port number, and destination TCP / UDP port number). After hashing, the data flow is deterministically mapped to the same equivalent path, thus preventing out-of-order delivery at its source. Protocols such as Border Gateway Protocol (BGP), once they detect multiple paths with equal costs, write them together into the forwarding table, forming an ECMP set. Subsequent packets only need to select the next hop from this set based on the same hash result, achieving a simple and ordered process. PBLB avoids the pitfalls of packet-by-packet load balancing by ensuring intra-flow ordering, but its inherent insensitivity to congestion exposes new and serious flaws. The core problem of flow-by-flow load balancing lies in its lack of congestion awareness. While the hash function's calculation result is deterministic for each flow, it is completely random relative to the flow size. When an "elephant flow" occurs in the network, a random hash collision may cause multiple elephant flows to be hashed onto the same outbound link, leading to severe congestion or even packet loss on that link. Simultaneously, other parallel links in the flow-by-flow load balancing set may be completely idle or underutilized. The coexistence of severe congestion and significant bandwidth waste is a typical problem of the inefficiency of flow-by-flow load balancing under non-uniform traffic.

[0039] By comparison, it can be seen that the load balancing method of this application embodiment solves the problem of out-of-order data packets compared to PPLB, and can improve the accuracy and efficiency of data transmission; compared to PBLB, it solves the congestion problem caused by elephant flow, and can improve data transmission efficiency.

[0040] Optionally, step 102, which involves optimizing the load balancing of the bottleneck path based on the bottleneck path and the network link information to obtain an optimized traffic path, includes: Based on the link information of the network and the bottleneck path, a first node and a second node are determined, wherein the first node is the upstream node of the starting node of the bottleneck path in the initial traffic path, and the second node is the downstream node of the final node of the bottleneck path in the initial traffic path. Based on the link information of the network, the entire link between the first node and the second node in the network is traversed to obtain the optimized traffic path.

[0041] by Figure 3 For example, the following explanation is provided for the first node, the second node, and the optimized traffic path: The initial traffic path of the data stream to be processed is "ABCDEF", where "CD" is the bottleneck path. The starting node of the bottleneck path is node C, and the ending node is node D. Therefore, the upstream nodes can be nodes A and B located upstream of node C, and the downstream nodes can be nodes E and F located downstream of node D. It should be noted that, in an optional implementation, the first node is the upstream neighbor of the starting node, and the second node is the downstream neighbor of the ending node; that is, nodes within one hop range upstream and downstream of the bottleneck path. Figure 3 In the example, this is represented by nodes B and E. The links between nodes B and E are fewer than those between nodes A and F. In other words, the total number of links between the first and second nodes should be minimized to ensure that the scope of bottleneck path adjustment is minimized. This reduces the amount of data that needs to be processed, thereby improving efficiency.

[0042] After determining the first and second nodes, traffic paths can be optimized by selecting from all links between the first and second nodes. For example, links with remaining bandwidth greater than the bottleneck path can be selected from all links, and these links can be used to distribute the data flow to be processed.

[0043] In this embodiment, by determining the first and second nodes upstream and downstream of the bottleneck path, the optimized traffic path is determined only from the link between these two nodes, rather than analyzing the links of the entire network. This reduces the amount of data that needs to be processed, lowers algorithm latency, and improves efficiency.

[0044] Optionally, the process of traversing all links between the first node and the second node based on the link information of the network to obtain the optimized traffic path set includes: Based on the link information of the network, all links between the first node and the second node are traversed to obtain the first link set; The first link set is filtered N times to obtain the optimized traffic path set, wherein the optimized traffic path set includes N paths obtained from the N filtering processes, and the i-th filtering process in the N filtering processes includes: Along the direction from the first node to the second node, the link with the smallest remaining bandwidth is selected sequentially from the i-th link set to obtain the path of the i-th filtering; and the link corresponding to the path of the i-th filtering is deleted from the i-th link set to obtain the (i+1)-th link set; when i equals 1, the i-th link set is the first link set, where i is an integer and its value ranges from 1 to N.

[0045] In this embodiment, the minimum necessary interval principle is adopted, and unbalanced link load balancing (Unequal-Cost Multi-Path, UCMP) splitting is performed only on bottleneck paths. The focus is on determining the set of optimized traffic paths. The calculation of optimized traffic paths is performed by the NCE based on the collected topology data (bandwidth, cost values, etc.). The calculation process is illustrated by the following example: like Figure 4 As shown, v1 is the first node, v6 is the second node, and there are multiple nodes and links between v1 and v6. The value on each link represents the remaining bandwidth BW. The first set of links is... Figure 4 The entire link is shown. Step 1: Starting from node v1, perform a breadth-first search on all neighbors of v1, selecting the neighbor node with the smallest bandwidth, such as (v1, v2); Step 2: Starting from node v2, traverse all unvisited neighbor nodes, similarly selecting the neighbor node with the smallest bandwidth for the current link, such as (v2, v5); Step 3: Starting from v5, traverse all unvisited neighbor nodes, similarly selecting the neighbor node with the smallest bandwidth for the current link, such as (v2, v6), and so on. Figure 5 As shown, a path v1-v2-v5-v6 with a bandwidth of 1 ( Figure 5 The calculation of the path (thickened in the middle line) is complete. Steps one through three above can be understood as the process of performing the first filtering on the first set of links. It should be noted that the link corresponding to the path in the i-th filtering refers to the links included in the path in the i-th filtering, that is, all the links that make up the path in the i-th filtering. Step four: Based on the first set of links, remove the above paths and deduct the corresponding bandwidth. The updated bandwidth is BW=BW-{(v1,v2),(v2, v5),(v5,v6)}, resulting in the following... Figure 6 The link graph shown (i.e., the second set of links) is recalculated from the updated graph paths (the second set of links), repeating steps one through three, to obtain the following: Figure 7The bolded path shown, v1-v3-v4-v6, has a bandwidth of 2. It's important to note that when determining and optimizing traffic paths, after identifying the first link of each path (e.g., v1-v3 with a bandwidth of 2), the remaining bandwidth of subsequent links in that path (v3-v4 with a bandwidth of 2) must be greater than or equal to that of the first link. This avoids situations where the bandwidth required for the data flow is less than the remaining bandwidth of the first link but greater than the remaining bandwidth of subsequent links.

[0046] The above method can be used to determine the optimized traffic path set, which is used to distribute the data of the bottleneck path and avoid bottleneck path congestion.

[0047] Optionally, the optimization strategy is used to instruct that the data stream to be processed on the bottleneck path be split into N sub-data streams at the first node, and the optimization strategy includes: the sequence number of each sub-data stream when the data stream to be processed is split into the N sub-data streams at the first node; the optimization strategy is used to instruct that at the second node, the N sub-data streams be merged according to the sequence number of the sub-data streams to obtain the data stream processed by the second node.

[0048] In this embodiment, the first node is the location where the data stream to be processed is split, and the second node is the location where the N sub-data streams are merged. When splitting the data stream to be processed at the first node, a sequence number is assigned to each sub-data stream; at the second node, the N sub-data streams are merged sequentially according to the sequence number, ensuring that the order of the sub-data streams in the merged data stream is completely consistent with the original order, guaranteeing that the transmitted data is correct and avoiding out-of-order transmission.

[0049] Optionally, generating the optimization strategy based on the optimized traffic path set includes: Obtain the N remaining bandwidths corresponding to the N paths of the optimized traffic path set; Based on the N remaining bandwidths of the N paths, a traffic splitting weight is determined, wherein the traffic splitting weight includes N values, each of which corresponds one-to-one with the N remaining bandwidths, and the N values ​​are used to characterize the proportion of the N remaining bandwidths. The optimization strategy is generated based on the traffic splitting weights and the N paths, wherein the optimization strategy is used to instruct the data stream to be processed on the bottleneck path to be split into the N sub-data streams according to the traffic splitting weights, and to instruct the sub-data streams to be transmitted through their corresponding paths.

[0050] In this embodiment, traffic splitting weights are distributed according to the real-time remaining bandwidth ratio X:Y for each link. These weights only apply to the data streams awaiting processing, ensuring that the traffic truly causing congestion is accurately distributed according to the remaining capacity, maximizing bandwidth utilization. When the remaining bandwidth changes, the traffic splitting weights are updated accordingly, but the updated splitting targets remain the data streams awaiting processing. This dynamic binding ensures accurate scheduling while preventing uncongested flows from being unnecessarily routed.

[0051] In an optional implementation, FlowSpec can be used to identify sets of "elephant flows" (data flows to be processed) and "micro flows" (small flows located in bottleneck sections with bandwidth consumption less than a preset value). These flows are then placed into a scheduling pool to avoid subsequent calculation of irrelevant traffic (traffic consuming bandwidth between elephant flows and micro flows). Scheduling micro flows also allows for more precise utilization of remaining bandwidth, improving efficiency.

[0052] In this embodiment, the controller proportionally divides the large, bandwidth-intensive data stream (the stream to be processed) into N slices (N sub-data streams), immediately and precisely relocates the traffic, and calculates the new utilization rate of each slice after relocation. This ensures that the faulty segment immediately frees up capacity after relocation, making packet loss and retransmission virtually invisible during transmission. Due to the focused monitoring range, it can achieve second-level or even sub-second-level relocation, improving the overall network link utilization by 10-20% while reducing packet loss and retransmission.

[0053] Optionally, distributing the optimization strategy to the network includes: A tuning strategy is sent to the network. The tuning strategy includes a Border Gateway Protocol Policy (BGP) message and a traffic redirection field. The BGP Policy message is used to instruct the unprocessed data flow of the bottleneck path to be split into N sub-data flows. The traffic redirection field includes node information of the N paths.

[0054] In this embodiment, a redirection policy is issued via BGP Flow, and the corresponding Binding Segment Identifier (Binding SID) and its list are carried in the same BGP Policy message; for this, a lightweight protocol extension to the BGP FlowSpec address family is required. The NLRI 12 matching rules of FlowSpec are used to accurately locate the traffic requiring load balancing. The FlowSpec matching rules are shown in Table 1: Table 1 The controller performs UCMP replacement only on the SIDs of bottleneck paths, mapping the original SIDs to multiple parallel Binding-SIDs according to a predetermined ratio in the tuning strategy, without modifying other paths. The implementation process involves adding a new Action TLV type—Software-Defined Load-Balance (SDLB)—through BGP FlowSpec addresses. Specifically, the controller writes a new rule that applies the newly defined SDLB action to all elephant flows on congested paths. This rule is sent via BGP, and upon receiving it, the ingress device immediately redistributes the elephant flows, previously entirely congested, according to the predetermined ratio. The implementation only affects the specified elephant flows; micro flows within the same network segment maintain their source paths, resulting in no latency jitter. The Action TLVs supported by the existing technology are shown in Table 2. Table 2 In this embodiment, a new Action TLV type is added: SDLB TLV, as shown in Table 3: Table 3 Considering the scalability of SDLB TLV, the Redirect SID sub TLV is extended to ensure the scalability of subsequent subtypes. The extended fields are described in Table 4. Table 4 The controller distributes the load balancing policy to the starting node of the congested path, i.e., the S / E position is 0 in Table 4. The first node replaces the original SID content according to the LB SID, weight and MTU specified in the policy. At the same time, the controller also distributes the load balancing policy to the ending node of the congested segment, i.e., the S / E position is 1 in Table 4. The ending node reassembles the data according to the correspondence between the LB SID and the Origin SID and continues to forward the data.

[0055] The above strategy is distributed to the starting and ending nodes of the congested segment via the BGP FlowSpec address family. The two network devices convert the protocol extension content into flow tables and distribute them to the router hardware, which then performs load balancing and offloading based on the hardware.

[0056] Please refer to Figure 3 and Figure 8Once traffic optimization is complete and the traffic reaches the bottleneck path's starting device, the flow table replaces the original Origin SID with two UCMP SDLB SIDs using a 3:5 weighted approach. This bypasses the bottleneck in just two hops, meaning 3 / 8 of the traffic is transmitted via SDLB SID A and 5 / 8 via SDLB SID B. Upon reaching the destination device, the traffic is reordered based on the mapping between SDLB SID and Origin SID, and then forwarded along the original path to the next SID. The granularity of packet windows or time slots is dynamically set based on real-time calculations to ensure minimal buffer usage and latency.

[0057] See Figure 9 , Figure 9 This is a structural diagram of a load balancing device 900 provided in an embodiment of this application. Figure 9 As shown, the device 900 includes: The acquisition module 901 is used to acquire the bottleneck path of the initial traffic path of the data stream to be processed in the network, and to acquire the link information of the network, wherein the network includes multiple nodes, the bottleneck path is a part of the initial traffic path, and the remaining bandwidth of the bottleneck path is less than the bandwidth consumed by the data stream to be processed. The optimization module 902 is used to perform load balancing optimization on the bottleneck path based on the link information of the bottleneck path and the network when the ratio between the remaining bandwidth and the consumed bandwidth of the bottleneck path is less than a preset threshold, so as to obtain an optimized traffic path set. The optimized traffic path set includes N paths, and the bottleneck path is one of the N paths, where N is an integer greater than 1. The strategy generation module 903 is used to generate an optimization strategy based on the optimized traffic path set, wherein the optimization strategy is used to instruct the data stream to be processed in the bottleneck path to be split into N sub-data streams, and to instruct the N sub-data streams to be transmitted through the optimized traffic path set. The distribution module 904 is used to distribute the optimization strategy to the network.

[0058] Optionally, the optimization module 902 includes: The first determining submodule is used to determine a first node and a second node based on the link information of the network and the bottleneck path, wherein the first node is the upstream node of the starting node of the bottleneck path in the initial traffic path, and the second node is the downstream node of the ending node of the bottleneck path in the initial traffic path. The second determining submodule is used to traverse all links between the first node and the second node in the network based on the link information of the network to obtain the optimized traffic path set.

[0059] Optionally, the second determining submodule is also used for: Based on the link information of the network, all links between the first node and the second node are traversed to obtain the first link set; The first link set is filtered N times to obtain the optimized traffic path set, wherein the optimized traffic path set includes N paths obtained from the N filtering processes, and the i-th filtering process in the N filtering processes includes: Along the direction from the first node to the second node, the link with the smallest remaining bandwidth is selected sequentially from the i-th link set to obtain the path of the i-th filtering; and the link corresponding to the path of the i-th filtering is deleted from the i-th link set to obtain the (i+1)-th link set; when i equals 1, the i-th link set is the first link set, where i is an integer and its value ranges from 1 to N.

[0060] Optionally, the optimization strategy is used to instruct that the data stream to be processed on the bottleneck path be split into N sub-data streams at the first node, and the optimization strategy includes: the sequence number of each sub-data stream when the data stream to be processed is split into the N sub-data streams at the first node; the optimization strategy is used to instruct that at the second node, the N sub-data streams be merged according to the sequence number of the sub-data streams to obtain the data stream processed by the second node.

[0061] Optionally, the policy generation module 903 includes: The acquisition submodule is used to acquire the N remaining bandwidths corresponding to the N paths of the optimized traffic path set; The third determining submodule is used to determine the traffic splitting weight based on the N remaining bandwidths of the N paths, wherein the traffic splitting weight includes N values, the N values ​​correspond one-to-one with the N remaining bandwidths, and the N values ​​are used to characterize the proportion of the N remaining bandwidths. A generation submodule is used to generate the optimization strategy based on the traffic splitting weight and the N paths, wherein the optimization strategy is used to instruct the data stream to be processed on the bottleneck path to be split into the N sub-data streams according to the traffic splitting weight, and to instruct the sub-data streams to be transmitted through their corresponding paths.

[0062] Optionally, the distribution module 904 is also used for: A tuning strategy is sent to the network. The tuning strategy includes a Border Gateway Protocol Policy (BGP) message and a traffic redirection field. The BGP Policy message is used to instruct the unprocessed data flow of the bottleneck path to be split into N sub-data flows. The traffic redirection field includes node information of the N paths.

[0063] The load balancing device 900 provided in this application embodiment is capable of implementing... Figure 1 The entire technical process of the load balancing method shown is to achieve the same technical effect, and will not be repeated here to avoid duplication.

[0064] This application also provides an electronic device. Since the principle by which the electronic device solves the problem is similar to the load balancing method in this application, the implementation of this electronic device can refer to the implementation of the above-described load balancing method; repeated details will not be elaborated further. Figure 10 As shown, the electronic device according to an embodiment of this application includes: a processor 700, configured to read a program from a memory 720 and execute the following processes: Obtain the bottleneck path of the initial traffic path of the data stream to be processed in the network, and obtain the link information of the network, wherein the network includes multiple nodes, the bottleneck path is a part of the initial traffic path, and the remaining bandwidth of the bottleneck path is less than the bandwidth consumed by the data stream to be processed. If the ratio between the remaining bandwidth and the consumed bandwidth of the bottleneck path is less than a preset threshold, load balancing optimization is performed on the bottleneck path based on the link information of the bottleneck path and the network to obtain an optimized traffic path set. The optimized traffic path set includes N paths, and the bottleneck path is one of the N paths, where N is an integer greater than 1. An optimization strategy is generated based on the optimized traffic path set, wherein the optimization strategy is used to instruct the data stream to be processed on the bottleneck path to be split into N sub-data streams, and to instruct the N sub-data streams to be transmitted through the optimized traffic path set. The optimization strategy is then distributed to the network.

[0065] Among them, Figure 10 In this context, the bus architecture can include any number of interconnected buses and bridges, specifically linking various circuits together, represented by one or more processors (processor 700) and memory (memory 720). The bus architecture can also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides the interface. Processor 700 is responsible for managing the bus architecture and general processing, and memory 720 can store data used by processor 700 during operation.

[0066] Optionally, the processor 700 is configured to read the program from the memory 720 and execute the following processes: Based on the link information of the network and the bottleneck path, a first node and a second node are determined, wherein the first node is the upstream node of the starting node of the bottleneck path in the initial traffic path, and the second node is the downstream node of the final node of the bottleneck path in the initial traffic path. Based on the link information of the network, the entire link between the first node and the second node in the network is traversed to obtain the optimized traffic path set.

[0067] Optionally, the processor 700 is configured to read the program from the memory 720 and execute the following processes: Based on the link information of the network, all links between the first node and the second node are traversed to obtain the first link set; The first link set is filtered N times to obtain the optimized traffic path set, wherein the optimized traffic path set includes N paths obtained from the N filtering processes, and the i-th filtering process in the N filtering processes includes: Along the direction from the first node to the second node, the link with the smallest remaining bandwidth is selected sequentially from the i-th link set to obtain the path of the i-th filtering; and the link corresponding to the path of the i-th filtering is deleted from the i-th link set to obtain the (i+1)-th link set; when i equals 1, the i-th link set is the first link set, where i is an integer and its value ranges from 1 to N.

[0068] Optionally, the optimization strategy is used to instruct that the data stream to be processed on the bottleneck path be split into N sub-data streams at the first node, and the optimization strategy includes: the sequence number of each sub-data stream when the data stream to be processed is split into the N sub-data streams at the first node; the optimization strategy is used to instruct that at the second node, the N sub-data streams be merged according to the sequence number of the sub-data streams to obtain the data stream processed by the second node.

[0069] Optionally, the processor 700 is configured to read the program from the memory 720 and execute the following processes: Obtain the N remaining bandwidths corresponding to the N paths of the optimized traffic path set; Based on the N remaining bandwidths of the N paths, a traffic splitting weight is determined, wherein the traffic splitting weight includes N values, each of which corresponds one-to-one with the N remaining bandwidths, and the N values ​​are used to characterize the proportion of the N remaining bandwidths. The optimization strategy is generated based on the traffic splitting weights and the N paths, wherein the optimization strategy is used to instruct the data stream to be processed on the bottleneck path to be split into the N sub-data streams according to the traffic splitting weights, and to instruct the sub-data streams to be transmitted through their corresponding paths.

[0070] Optionally, the processor 700 is configured to read the program from the memory 720 and execute the following processes: A tuning strategy is sent to the network. The tuning strategy includes a Border Gateway Protocol Policy (BGP) message and a traffic redirection field. The BGP Policy message is used to instruct the unprocessed data flow of the bottleneck path to be split into N sub-data flows. The traffic redirection field includes node information of the N paths.

[0071] This application also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the various processes of the above-described load balancing method embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0072] This application also provides a computer program product, including computer instructions, which, when executed by a processor, implement the above-described... Figure 1 The various processes of the load balancing method embodiment shown can achieve the same technical effect, and will not be described again here to avoid repetition.

[0073] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0074] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0075] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A load balancing method, characterized in that, The method includes: Obtain the bottleneck path of the initial traffic path of the data stream to be processed in the network, and obtain the link information of the network, wherein the network includes multiple nodes, the bottleneck path is a part of the initial traffic path, and the remaining bandwidth of the bottleneck path is less than the bandwidth consumed by the data stream to be processed. If the ratio between the remaining bandwidth and the consumed bandwidth of the bottleneck path is less than a preset threshold, load balancing optimization is performed on the bottleneck path based on the link information of the bottleneck path and the network to obtain an optimized traffic path set. The optimized traffic path set includes N paths, and the bottleneck path is one of the N paths, where N is an integer greater than 1. The N paths are determined by: determining the equivalent paths of the bottleneck path based on the link information of the network, and selecting a portion of the equivalent paths as the paths in the N paths. An optimization strategy is generated based on the optimized traffic path set, wherein the optimization strategy is used to instruct the data stream to be processed on the bottleneck path to be split into N sub-data streams, and to instruct the N sub-data streams to be transmitted through the optimized traffic path set. The optimization strategy is then distributed to the network.

2. The method according to claim 1, characterized in that, The process of optimizing the bottleneck path based on the link information of the bottleneck path and the network to obtain a set of optimized traffic paths includes: Based on the link information of the network and the bottleneck path, a first node and a second node are determined, wherein the first node is the upstream node of the starting node of the bottleneck path in the initial traffic path, and the second node is the downstream node of the final node of the bottleneck path in the initial traffic path. Based on the link information of the network, the entire link between the first node and the second node in the network is traversed to obtain the optimized traffic path set.

3. The method according to claim 2, characterized in that, The optimized traffic path set obtained by traversing all links between the first node and the second node based on the link information of the network includes: Based on the link information of the network, all links between the first node and the second node are traversed to obtain the first link set; The first link set is filtered N times to obtain the optimized traffic path set, wherein the optimized traffic path set includes N paths obtained from the N filtering processes, and the i-th filtering process in the N filtering processes includes: Along the direction from the first node to the second node, the link with the smallest remaining bandwidth is selected sequentially from the i-th link set to obtain the path of the i-th filtering; and the link corresponding to the path of the i-th filtering is deleted from the i-th link set to obtain the (i+1)-th link set; when i equals 1, the i-th link set is the first link set, where i is an integer and its value ranges from 1 to N.

4. The method according to claim 2, characterized in that, The optimization strategy is used to instruct that the data stream to be processed on the bottleneck path be split into N sub-data streams at the first node, and the optimization strategy includes: the sequence number of each sub-data stream when the data stream to be processed is split into the N sub-data streams at the first node; the optimization strategy is used to instruct that at the second node, the N sub-data streams be merged according to the sequence number of the sub-data streams to obtain the data stream processed by the second node.

5. The method according to claim 1, characterized in that, The generation of optimization strategies based on the optimized traffic path set includes: Obtain the N remaining bandwidths corresponding to the N paths of the optimized traffic path set; Based on the N remaining bandwidths of the N paths, a traffic splitting weight is determined, wherein the traffic splitting weight includes N values, each of which corresponds one-to-one with the N remaining bandwidths, and the N values ​​are used to characterize the proportion of the N remaining bandwidths. The optimization strategy is generated based on the traffic splitting weights and the N paths, wherein the optimization strategy is used to instruct the data stream to be processed on the bottleneck path to be split into the N sub-data streams according to the traffic splitting weights, and to instruct the sub-data streams to be transmitted through their corresponding paths.

6. The method according to any one of claims 1 to 5, characterized in that, The step of distributing the optimization strategy to the network includes: A tuning strategy is sent to the network. The tuning strategy includes a Border Gateway Protocol Policy (BGP) message and a traffic redirection field. The BGP Policy message is used to instruct the unprocessed data flow of the bottleneck path to be split into N sub-data flows. The traffic redirection field includes node information of the N paths.

7. A load balancing device, characterized in that, The device includes: The acquisition module is used to acquire the bottleneck path of the initial traffic path of the data stream to be processed in the network, and to acquire the link information of the network, wherein the network includes multiple nodes, the bottleneck path is a part of the initial traffic path, and the remaining bandwidth of the bottleneck path is less than the bandwidth consumed by the data stream to be processed. An optimization module is configured to perform load balancing optimization on the bottleneck path based on the link information of the bottleneck path and the network when the ratio between the remaining bandwidth and the consumed bandwidth of the bottleneck path is less than a preset threshold, thereby obtaining a set of optimized traffic paths. The set of optimized traffic paths includes N paths, and the bottleneck path is one of the N paths, where N is an integer greater than 1. The N paths are determined by: determining the equivalent paths of the bottleneck path based on the link information of the network, and selecting a portion of the equivalent paths as the paths in the N paths. The strategy generation module is used to generate an optimization strategy based on the optimized traffic path set, wherein the optimization strategy is used to instruct the data stream to be processed on the bottleneck path to be split into N sub-data streams, and to instruct the N sub-data streams to be transmitted through the optimized traffic path set. The distribution module is used to distribute the optimization strategy to the network.

8. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the load balancing method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the load balancing method as described in any one of claims 1 to 6.

10. A computer program product, characterized in that, It includes computer instructions that, when executed by a processor, implement the steps of the load balancing method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Multipath load balancing method based on service awareness

    CN103685054A

  • Rated bandwidth adjusting method, terminal and storable medium

    CN109639459A