Load balancing methods, devices, computer equipment, storage media and software products
By sorting multiple performance parameters of data packets and links in a software-defined wide area network, the problems of low efficiency and poor accuracy in load balancing are solved, and efficient and reliable load balancing is achieved.
Patent Information
- Application Number
- CN202411708418.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2044-11-26
AI Technical Summary
In existing technologies, load balancing methods in software-defined wide area networks cannot effectively perceive server status, resulting in low load balancing efficiency and poor accuracy. Furthermore, existing methods are either highly complex or lack comprehensive link information.
By sorting the remaining capacity of data packets and links under multiple performance parameters, and using the bubble sort algorithm combined with weight ratios, the transmission capacity of data packets and links is determined, thereby achieving ordered matching of data packets and optimized allocation of links.
It improves the accuracy and reliability of load balancing, simplifies the implementation process, and increases the efficiency of load balancing.
Smart Images

Figure CN119835223B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network communication technology, specifically to load balancing methods, devices, computer equipment, storage media, and program products. Background Technology
[0002] SD-WAN (Software-Defined Wide Area Network) is a network technology that uses software-defined networking (SDN) principles to manage and optimize wide area network (WAN) performance. As network scale and complexity increase, link load balancing becomes particularly prominent, and how to balance the load across different links is a pressing issue.
[0003] Traditional load balancing techniques employ methods such as round-robin, weighted round-robin, and least connections. However, round-robin and weighted round-robin methods cannot detect server status and cannot guarantee efficient network performance, while the least connections method is highly complex. Related technologies use load balancing methods based on latency or link and device status; however, these methods are not comprehensive enough and have poor accuracy in load balancing. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a load balancing method, apparatus, computer equipment, storage medium and program product to solve the problems of low efficiency and poor accuracy when performing load balancing.
[0005] In a first aspect, the present invention provides a load balancing method, the method being applied to a server-side load balancer in a software-defined wide area network; the software-defined wide area network further includes a client; the server-side load balancer is communicatively connected to the client via multiple links; the method includes:
[0006] Obtain each data packet to be transmitted, as well as the priority and multiple performance parameters of each data packet;
[0007] The data packets are sorted according to performance parameters to obtain the sorting results of each data packet under different performance parameters; the sorting results of each data packet under different performance parameters are used to indicate the size relationship of the performance parameters corresponding to each data packet.
[0008] Obtain multiple performance parameters corresponding to each of the multiple links, and calculate the remaining capacity of each performance parameter of each link;
[0009] The remaining capacity of each link is sorted according to the performance parameters to obtain the remaining capacity sorting results of each link under different performance parameters; the remaining capacity sorting results of each link under different performance parameters are used to indicate the size relationship of the remaining capacity of each link corresponding to the performance parameters.
[0010] The sorting results of each data packet under different performance parameters are compared with the sorting results of the remaining capacity of each link under different performance parameters to obtain the transmission capacity results of each link.
[0011] The data packets are then distributed to the links in descending order of their transmission capacity, according to their priority, for data transmission.
[0012] In one optional implementation, sorting the data packets according to performance parameters includes:
[0013] The bubble sort algorithm is used to sort the data packets under different performance parameters;
[0014] After obtaining the sorting results of each data packet under different performance parameters, the method further includes:
[0015] Based on the sorting results of each data packet under different performance parameters, each data packet is scored under different performance parameters to obtain the score results of each data packet under different performance parameters.
[0016] In one optional implementation, sorting the links according to their remaining capacity based on performance parameters includes:
[0017] The bubble sort algorithm is used to sort the remaining capacity of each link under different performance parameters;
[0018] After obtaining the ranking results of the remaining capabilities of each link under different performance parameters, the method further includes:
[0019] Based on the ranking of the remaining capacity of each link under different performance parameters, each link is scored under different performance parameters to obtain the remaining capacity score of each link under different performance parameters, and recorded in the link remaining capacity score table.
[0020] In one optional implementation, comparing the sorting results of each data packet under different performance parameters with the sorting results of the remaining capacity of each link under different performance parameters to obtain the transmission capacity result of each link includes:
[0021] Based on the scoring results of each data packet under different performance parameters and the scoring results of the remaining capacity of each link under different performance parameters in the link remaining capacity score table, the transmission capacity of each link is scored, and the transmission capacity scoring results of each link are obtained and recorded in the link transmission score table.
[0022] The step of allocating the data packets sequentially to each link, ranked by transmission capacity from high to low, according to priority includes:
[0023] The data packets are then assigned to the links in the transmission capability score table, sorted from highest to lowest according to their priority.
[0024] In an optional implementation, the method further includes:
[0025] Assign corresponding weight ratios to different performance parameters;
[0026] The process of assigning scores to each data packet under different performance parameters to obtain the score results of each data packet under different performance parameters includes:
[0027] Each data packet is scored under different performance parameters and multiplied by the corresponding weight ratio to obtain the score results of each data packet under different performance parameters;
[0028] The process of assigning scores to each link under different performance parameters to obtain the remaining capacity score results of each link under different performance parameters includes:
[0029] Each link is scored under different performance parameters and multiplied by the corresponding weight ratio to obtain the remaining capacity score of each link under different performance parameters.
[0030] In one alternative implementation, the plurality of performance parameters include bandwidth, latency, throughput, and packet loss rate.
[0031] In a second aspect, the present invention provides a load balancing device, which is applied to a server-side load balancer in a software-defined wide area network (SDB); the SDB further includes a client; the server-side load balancer is communicatively connected to the client via multiple links; the device includes:
[0032] The data packet acquisition module is used to acquire each data packet to be transmitted, as well as the priority and multiple performance parameters of each data packet;
[0033] The data packet sorting module is used to sort each data packet according to performance parameters to obtain the sorting results of each data packet under different performance parameters; the sorting results of each data packet under different performance parameters are used to indicate the size relationship of the performance parameters corresponding to each data packet.
[0034] The link acquisition module is used to acquire multiple performance parameters corresponding to each of the multiple links, and calculate the remaining capacity of each performance parameter of each link;
[0035] The link sorting module is used to sort each link according to the remaining capacity of performance parameters, and obtain the sorting result of the remaining capacity of each link under different performance parameters; the sorting result of the remaining capacity of each link under different performance parameters is used to indicate the size relationship of the remaining capacity of each link corresponding to the performance parameters respectively.
[0036] The transmission capacity module is used to compare the sorting results of each data packet under different performance parameters with the sorting results of the remaining capacity of each link under different performance parameters to obtain the transmission capacity result of each link.
[0037] The data transmission module is used to distribute the data packets in order of priority to each link with transmission capacity sorted from high to low, so as to carry out data transmission.
[0038] Thirdly, the present invention provides a computer device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the load balancing method of the first aspect or any corresponding embodiment thereof.
[0039] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform the load balancing method of the first aspect or any corresponding embodiment thereof.
[0040] Fifthly, the present invention provides a computer program product, including computer instructions for causing a computer to execute the load balancing method of the first aspect or any corresponding embodiment thereof.
[0041] The technical solution provided by this invention may include the following beneficial effects:
[0042] The load balancing method provided by this invention is applied to a server-side load balancer in a software-defined wide area network (SDA Network). The SDA Network also includes clients, and the server-side load balancer communicates with the clients through multiple links. During load balancing, the method first acquires each data packet to be transmitted, along with its priority and multiple performance parameters. Then, the data packets are sorted according to these performance parameters, resulting in a sorting result for each data packet under different performance parameters. This sorting result indicates the relative magnitudes of the performance parameters for each data packet. Next, the method acquires multiple performance parameters for each link and calculates the remaining capacity for each performance parameter of each link. The links are then sorted according to their remaining capacity under different performance parameters, resulting in a sorting result indicating the relative magnitudes of the remaining capacity for each link. Finally, the sorting result of each data packet under different performance parameters is compared with the sorting result of the remaining capacity of each link under different performance parameters to obtain the transmission capacity result of each link. Finally, the data packets are allocated sequentially to the links with the highest to lowest transmission capacity according to their priority for data transmission. The above scheme, by sorting the remaining capacity of each data packet and each link under multiple performance parameters, can comprehensively consider the performance parameters of each link in the software-defined wide area network and the performance parameters of the data packets to be transmitted. It can also perform targeted and orderly matching of the remaining capacity of data packets and links, ensuring the accuracy and reliability of load balancing. Moreover, the scheme is simple and easy to implement, improving the efficiency of load balancing. Attached Figure Description
[0043] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0044] Figure 1 This is a flowchart illustrating a load balancing method according to an embodiment of the present invention;
[0045] Figure 2 This is a flowchart illustrating another load balancing method according to an embodiment of the present invention;
[0046] Figure 3 This is a schematic diagram of the structure of a software-defined wide area network according to an embodiment of the present invention;
[0047] Figure 4This is a schematic diagram of the bubble sort algorithm according to an embodiment of the present invention;
[0048] Figure 5 This is a structural block diagram of a load balancing device according to an embodiment of the present invention;
[0049] Figure 6 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0051] A WAN (Wide Area Network) is a large network spanning cities, provinces, or countries, typically composed of multiple local area networks (LANs) connected by devices such as routers and switches. SDN (Software Defined Networking) is an innovative network architecture that separates the control plane from the data plane of network devices, enabling flexible control and optimization of network traffic. SD-WAN (Software-Defined Wide Area Network) is a network technology that utilizes SDN principles to manage and optimize WAN performance. As network scale and complexity increase, link load balancing becomes particularly prominent, and how to balance the load across different links is a pressing issue.
[0052] Traditional load balancing techniques employ methods such as round-robin, weighted round-robin, and least connections. However, due to dynamic changes in network traffic and differences in server performance, round-robin and weighted round-robin methods cannot detect server status and cannot guarantee efficient network performance, while the least connections method is highly complex. Related technologies use load balancing methods based on latency or link and device status; however, these methods do not consider comprehensive link information, resulting in poor accuracy in load balancing.
[0053] Therefore, embodiments of the present invention provide a load balancing method that sorts the remaining capacity of each data packet and each link under multiple performance parameters to ensure the accuracy, reliability and efficiency of load balancing.
[0054] According to an embodiment of the present invention, a load balancing method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0055] This embodiment provides a load balancing method applied to a server-side load balancer in a software-defined wide area network (SDA Network). The SDA Network also includes clients. The server-side load balancer communicates with these clients via multiple links. The server can be a desktop computer, laptop computer, server, etc. Figure 1 This is a flowchart of a load balancing method according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps:
[0056] Step S101: Obtain each data packet to be transmitted, as well as the priority and multiple performance parameters corresponding to each data packet.
[0057] The data packets to be transmitted are data packets generated by the client to provide various services to the user, based on the user's needs and instructions, and need to be transmitted to the server. The priority of each data packet is based on the service type to which it belongs; for example, data packets for real-time transmission services have a higher priority than data packets for download tasks. The performance parameters are the performance parameters for data transmission across multiple links, such as bandwidth, latency, throughput, packet loss rate, jitter, response time, and mean opinion score. Appropriate performance parameters can be selected according to actual needs.
[0058] Optionally, the data packets to be transmitted are the data packets that the client needs to transmit to the server within a transmission cycle. That is, within each transmission cycle, the server load balancer allocates appropriate links to the data packets to be transmitted sent by the client using the load balancing method provided by this invention to perform load balancing.
[0059] Step S102: Sort each data packet according to performance parameters to obtain the sorting results of each data packet under different performance parameters.
[0060] The sorting results of each data packet under different performance parameters are used to indicate the relative magnitudes of each data packet for that performance parameter. For each performance parameter, the data packets are sorted according to their respective performance parameters to obtain the sorting results of each data packet under each performance parameter.
[0061] Step S103: Obtain multiple performance parameters corresponding to each of the multiple links, and calculate the remaining capacity of each performance parameter of each link.
[0062] The multiple performance parameters corresponding to the link and the multiple performance parameters corresponding to the data packet are in one-to-one correspondence. For example, the performance parameters of the data packet include bandwidth, which represents the bandwidth required to transmit the data packet. Similarly, the performance parameters of the link also include bandwidth, which represents the bandwidth capability of the link when transmitting data.
[0063] When calculating the remaining capacity of performance parameters, methods for calculating remaining capacity in related technologies can be used. For example, the proportion of currently available resources to total resources of the link under different performance parameters can be calculated. If the currently available bandwidth accounts for 80% of the total bandwidth, then the remaining bandwidth capacity is 80%.
[0064] Step S104: Sort each link according to its remaining capacity under different performance parameters to obtain the sorting results of the remaining capacity of each link under different performance parameters.
[0065] The ranking of remaining capacity of each link under different performance parameters indicates the relative magnitudes of the remaining capacity of each link for that performance parameter. For each performance parameter, the links are ranked according to their remaining capacity for that performance parameter, resulting in the ranking of each link under each performance parameter.
[0066] Step S105: Compare the sorting results of each data packet under different performance parameters with the sorting results of the remaining capacity of each link under different performance parameters to obtain the transmission capacity results of each link.
[0067] For each performance parameter, the ranking results of each data packet under that performance parameter and the ranking results of the remaining capacity of each link under that performance parameter are compared to obtain the transmission capacity result representing the data transmission capability of each link. For example, if more than half of the ranking results of the target data packet under different performance parameters are lower than the ranking results of the target link under the corresponding performance parameter, it indicates that the target link has sufficient transmission capacity to transmit the target data packet. This process is repeated to determine the transmission capacity of each link for each data packet to be transmitted, and then counting or scoring is performed to obtain the transmission capacity result for each link. Each link is compared with all data packets under all performance parameters. For example, if there are 5 performance parameters, and the ranking of the target data packet is lower than the ranking of the target link under 3 of them, it indicates that the target link has sufficient transmission capacity to transmit the target data packet. If there are 7 data packets, and the target link has sufficient transmission capacity for 4 of them, then when using counting to determine the transmission capacity result, the transmission capacity result of the target link is 4. When using scoring to determine the transmission capacity result, a score is performed according to a preset scoring rule, and the score result is used as the transmission capacity result.
[0068] Step S106: The data packets are allocated to the links in descending order of their transmission capacity according to their priority for data transmission.
[0069] During data transmission, data packets are processed according to their priority order, with higher-priority packets being allocated links first. When allocating links, those with higher transmission capacity are assigned first, and ultimately, higher-priority data packets are assigned to links with higher transmission capacity to ensure load balancing during data transmission.
[0070] The load balancing method provided in this embodiment is applied to a server-side load balancer in a software-defined wide area network (SDA Network). The SDA Network also includes clients, and the server-side load balancer communicates with the clients through multiple links. During load balancing, the method first obtains each data packet to be transmitted, along with its priority and multiple performance parameters. Then, it sorts the data packets according to these performance parameters, obtaining a sorting result for each data packet under different performance parameters. This sorting result indicates the relative magnitudes of the performance parameters for each data packet. Next, it obtains multiple performance parameters for each link and calculates the remaining capacity for each performance parameter of each link. Then, it sorts the links according to their remaining capacity under different performance parameters, obtaining a sorting result for the remaining capacity of each link under different performance parameters. This sorting result indicates the relative magnitudes of the remaining capacity of each link under different performance parameters. Finally, it compares the sorting result of each data packet under different performance parameters with the sorting result of the remaining capacity of each link under different performance parameters to obtain the transmission capacity result of each link. Finally, it allocates each data packet, according to its priority, to the links sorted in descending order of transmission capacity for data transmission. The above scheme, by sorting the remaining capacity of each data packet and each link under multiple performance parameters, can comprehensively consider the performance parameters of each link in the software-defined wide area network and the performance parameters of the data packets to be transmitted. It can also perform targeted and orderly matching of the remaining capacity of data packets and links, ensuring the accuracy and reliability of load balancing. Moreover, the scheme is simple and easy to implement, improving the efficiency of load balancing.
[0071] This embodiment provides a load balancing method applied to a server-side load balancer in a software-defined wide area network (SDA Network). The SDA Network also includes clients. The server-side load balancer communicates with these clients via multiple links. The server can be a desktop computer, laptop computer, server, etc. Figure 2 This is a flowchart of a load balancing method according to an embodiment of the present invention, such as... Figure 2As shown, the process includes the following steps:
[0072] Step S201: Obtain each data packet to be transmitted, as well as the priority and multiple performance parameters corresponding to each data packet.
[0073] Figure 3 This is a schematic diagram of the structure of a software-defined wide area network according to an embodiment of the present invention, such as... Figure 3 As shown, the server-side load balancer connects to the client through multiple links.
[0074] Optionally, these multiple performance parameters include bandwidth, latency, throughput, and packet loss rate, i.e., obtaining each data packet to be transmitted and the priority, bandwidth, latency, throughput, and packet loss rate of each data packet.
[0075] Step S202: Sort each data packet according to performance parameters to obtain the sorting results of each data packet under different performance parameters.
[0076] The sorting results of each data packet under different performance parameters are used to indicate the magnitude relationship of each data packet to that performance parameter.
[0077] Optionally, when sorting data packets according to performance parameters, a bubble sort algorithm can be used to sort the data packets under different performance parameters. Specifically, for each data packet, a queue corresponding to its performance parameter is created. Then, the bubble sort algorithm is used to arrange the data packets according to their respective performance parameters in descending order, obtaining the sorting result of each data packet under its corresponding performance parameter. For example, the bandwidth / latency / throughput / packet loss rate of each data packet is obtained, and a queue for each data packet is created for each bandwidth / latency / throughput / packet loss rate. Then, the bubble sort algorithm is used to arrange the data packets according to their bandwidth / latency / throughput / packet loss rate in descending order, obtaining the sorting result of each data packet under its respective bandwidth / latency / throughput / packet loss rate.
[0078] Step S203: According to the sorting results of each data packet under different performance parameters, assign a score to each data packet under different performance parameters to obtain the score results of each data packet under different performance parameters.
[0079] When assigning scores to data packets, scores can be assigned separately for each performance parameter. Scoring rules can be preset according to requirements, such as assigning scores in ascending order of sorting results. For example, if there are 4 data packets, scores of 1, 2, 3, and 4 can be assigned respectively in ascending order of sorting results. After assigning scores to each performance parameter separately, the score of each data packet under each performance parameter is obtained.
[0080] Optionally, different performance parameters are assigned corresponding weight ratios according to preset priorities. When scoring each data packet, a score is assigned to each data packet under different performance parameters, and then multiplied by the corresponding weight ratio to obtain the score result of each data packet under different performance parameters. For example, if the preset priority of bandwidth and throughput is higher than that of latency and packet loss rate, then a higher weight ratio is assigned to bandwidth and throughput, such as assigning a weight ratio of 2 to bandwidth and throughput, and a weight ratio of 1 to latency and packet loss rate. When scoring, bandwidth and throughput are assigned scores in ascending order of sorting results, multiplied by a weight ratio of 2, for example, 2 points, 4 points, 6 points, and 8 points. Latency and packet loss rate are assigned scores in ascending order of sorting results, multiplied by a weight ratio of 1, for example, 1 point, 2 points, 3 points, and 4 points.
[0081] Step S204: Obtain multiple performance parameters corresponding to each of the multiple links, and calculate the remaining capacity of each performance parameter of each link.
[0082] Specifically, obtain the bandwidth, latency, throughput, and packet loss rate for each of the multiple links, and calculate the remaining capacity of each link in terms of bandwidth, latency, throughput, and packet loss rate.
[0083] Step S205: Sort each link according to its remaining capacity under different performance parameters to obtain the sorting results of the remaining capacity of each link under different performance parameters.
[0084] The ranking of the remaining capacity of each link under different performance parameters is used to indicate the relative magnitudes of the remaining capacity of each link for that performance parameter.
[0085] Optionally, when sorting the remaining capacity of each link according to its performance parameters, a bubble sort algorithm can be used to sort the remaining capacity of each link under different performance parameters. Specifically, under different performance parameters, queues corresponding to the performance parameters of each link are created, and then the bubble sort algorithm is used to arrange the corresponding performance parameters of each link in descending order to obtain the sorting result of each link under the corresponding performance parameters. For example, the bandwidth / latency / throughput / packet loss rate of each link is obtained, and queues for bandwidth / latency / throughput / packet loss rate are created for each link, and then the bubble sort algorithm is used to arrange the bandwidth / latency / throughput / packet loss rate of each link in descending order to obtain the sorting result of each link under bandwidth / latency / throughput / packet loss rate.
[0086] Figure 4 This is a schematic diagram of the bubble sort algorithm according to an embodiment of the present invention. Figure 4As shown, assuming there are a total of 6 links, and the scores of links 1 to 6 decrease sequentially, if the original order is link 2, link 1, link 4, link 6, link 3, link 5, after being sorted by the bubble sort algorithm, the order becomes link 1 to link 6.
[0087] Step S206: According to the sorting results of the remaining capacity of each link under different performance parameters, assign a score to each link under different performance parameters to obtain the score of the remaining capacity of each link under different performance parameters, and record it in the link remaining capacity score table.
[0088] When assigning scores to links, scores are assigned separately for each performance parameter. Scoring rules can be preset according to requirements, such as assigning scores in ascending order of sorting results. For example, if there are 6 links, scores of 1, 2, 3, 4, 5, and 6 can be assigned respectively in ascending order of sorting results. After assigning scores to each performance parameter separately, the score result of each link under each performance parameter is obtained.
[0089] Optionally, weight ratios are assigned to different performance parameters according to preset priorities. When assigning scores to each link, scores are assigned to each link under different performance parameters and multiplied by the corresponding weight ratio to obtain the remaining capacity score of each link under different performance parameters. This is similar to assigning scores to each data packet according to weight ratios in step S203, and will not be described in detail here.
[0090] After assigning scores to the remaining capacity of each link under different performance parameters, the scores for the remaining capacity under different performance parameters are recorded in the remaining capacity score table corresponding to the different performance parameters.
[0091] Step S207: Compare the sorting results of each data packet under different performance parameters with the sorting results of the remaining capacity of each link under different performance parameters to obtain the transmission capacity results of each link.
[0092] Specifically, based on the scoring results of each data packet under different performance parameters and the scoring results of the remaining capacity of each link under different performance parameters in the link remaining capacity score table, the transmission capacity of each link is scored, and the transmission capacity score results of each link are obtained and recorded in the link transmission score table.
[0093] Optionally, the transmission capacity of each link can be scored according to preset scoring rules. For example, when the score of the target data packet under the target performance parameters is less than a first threshold relative to the remaining capacity score of the target link under the target performance parameters, it indicates that the actual transmission capacity of the target link is much greater than the transmission capacity required to transmit the target data packet, and the target link is scored 1 point; when the score of the target data packet under the target performance parameters is greater than the first threshold but not more than 100% relative to the remaining capacity score of the target link under the target performance parameters, it indicates that the actual transmission capacity of the target link is comparable to the transmission capacity required to transmit the target data packet, and the target link is scored 0 points; when the score of the target data packet under the target performance parameters is greater than the remaining capacity score of the target link under the target performance parameters, it indicates that the actual transmission capacity of the target link is less than the transmission capacity required to transmit the target data packet, and the target link is scored -1 point.
[0094] Optionally, the transmission capacity scores of each link under different performance parameters are summed to obtain the transmission capacity score of each link, and recorded in the link transmission score table.
[0095] Step S208: All data packets are assigned to each link in descending order of transmission capacity according to priority, so as to carry out data transmission.
[0096] Specifically, each data packet is assigned to a link in descending order of its transmission capacity score, according to its priority. In other words, data packets with higher priority are assigned to links with higher transmission capacity scores. For example, the highest-priority target data packet is assigned to the target link with the highest transmission capacity.
[0097] Optionally, if the number of links is less than the number of data packets, steps S204 to S207 are executed again to calculate the transmission capacity of the links after allocating one round of data packets, and links are allocated to the remaining unallocated data packets until all links of all data packets are allocated.
[0098] It should be noted that steps S201 to S208 are a load balancing method for data transmission from the client to the server within a transmission cycle. When entering the next transmission cycle, the process returns to step S201 and restarts the execution of steps S201 to S208. In other words, at the beginning of each transmission cycle, new data packets to be transmitted are reacquired, and the remaining capacity of each link after the previous transmission cycle is updated. Links are then allocated to new data packets to be transmitted in order to achieve real-time load balancing.
[0099] The load balancing method provided in this embodiment is applied to a server-side load balancer in a software-defined wide area network (SDA Network). The SDA Network also includes clients, and the server-side load balancer communicates with the clients through multiple links. During load balancing, the method first obtains each data packet to be transmitted, along with its priority and multiple performance parameters. Then, it sorts the data packets according to these performance parameters, obtaining a sorting result for each data packet under different performance parameters. This sorting result indicates the relative magnitudes of the performance parameters for each data packet. Next, it obtains multiple performance parameters for each link and calculates the remaining capacity for each performance parameter of each link. Then, it sorts the links according to their remaining capacity under different performance parameters, obtaining a sorting result for the remaining capacity of each link under different performance parameters. This sorting result indicates the relative magnitudes of the remaining capacity of each link under different performance parameters. Finally, it compares the sorting result of each data packet under different performance parameters with the sorting result of the remaining capacity of each link under different performance parameters to obtain the transmission capacity result of each link. Finally, it allocates each data packet, according to its priority, to the links sorted in descending order of transmission capacity for data transmission. The above scheme, by sorting the remaining capacity of each data packet and each link under multiple performance parameters, can comprehensively consider the performance parameters of each link in the software-defined wide area network and the performance parameters of the data packets to be transmitted. It can also perform targeted and orderly matching of the remaining capacity of data packets and links, ensuring the accuracy and reliability of load balancing. Moreover, the scheme is simple and easy to implement, improving the efficiency of load balancing.
[0100] This embodiment also provides a load balancing device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0101] This embodiment provides a load balancing device, such as... Figure 5 As shown, this device is used as a server-side load balancer in a software-defined wide area network (SDW). The SWD also includes clients; the server-side load balancer communicates with the clients via multiple links. The device includes:
[0102] The data packet acquisition module 501 is used to acquire each data packet to be transmitted, as well as the priority and multiple performance parameters corresponding to each data packet;
[0103] The data packet sorting module 502 is used to sort each data packet according to performance parameters to obtain the sorting results of each data packet under different performance parameters; the sorting results of each data packet under different performance parameters are used to indicate the size relationship of the performance parameter corresponding to each data packet.
[0104] The link acquisition module 503 is used to acquire multiple performance parameters corresponding to each of the multiple links and calculate the remaining capacity of each performance parameter of each link.
[0105] The link sorting module 504 is used to sort each link according to the remaining capacity of the performance parameters to obtain the sorting result of the remaining capacity of each link under different performance parameters; the sorting result of the remaining capacity of each link under different performance parameters is used to indicate the size relationship of the remaining capacity of each link corresponding to the performance parameter.
[0106] The transmission capacity module 505 is used to compare the sorting results of each data packet under different performance parameters with the sorting results of the remaining capacity of each link under different performance parameters to obtain the transmission capacity results of each link.
[0107] The data transmission module 506 is used to distribute the data packets in order of priority to each link with transmission capacity sorted from high to low, so as to carry out data transmission.
[0108] In an optional implementation, the data packet sorting module is further configured to: sort each data packet under different performance parameters using a bubble sort algorithm; after obtaining the sorting results of each data packet under different performance parameters, the data packet sorting module is further configured to: assign scores to each data packet under different performance parameters according to the sorting results of each data packet under different performance parameters, thereby obtaining the score results of each data packet under different performance parameters.
[0109] In an optional implementation, the link sorting module is further configured to: sort the remaining capacity of each link under different performance parameters using a bubble sort algorithm; after obtaining the sorting results of the remaining capacity of each link under different performance parameters, the link sorting module is further configured to: assign scores to each link under different performance parameters according to the sorting results of the remaining capacity of each link under different performance parameters, obtain the score results of the remaining capacity of each link under different performance parameters, and record them in the link remaining capacity score table.
[0110] In an optional implementation, the transmission capability module is further configured to: assign a score to the transmission capability of each link based on the scoring results of each data packet under different performance parameters and the score results of the remaining capability of each link under different performance parameters in the link remaining capability score table, obtain the transmission capability score results of each link, and record them in the link transmission score table; the data transmission module is further configured to: assign each data packet to each link in the transmission capability score table in descending order of priority according to the transmission capability score results in the transmission capability score table.
[0111] In an optional implementation, the method further includes: assigning corresponding weight ratios to different performance parameters; assigning scores to each data packet under different performance parameters to obtain the score results of each data packet under different performance parameters, including: assigning scores to each data packet under different performance parameters and multiplying them by the corresponding weight ratios to obtain the score results of each data packet under different performance parameters; assigning scores to each link under different performance parameters to obtain the remaining capacity score results of each link under different performance parameters, including: assigning scores to each link under different performance parameters and multiplying them by the corresponding weight ratios to obtain the remaining capacity score results of each link under different performance parameters.
[0112] In one alternative implementation, the plurality of performance parameters include bandwidth, latency, throughput, and packet loss rate.
[0113] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0114] In this embodiment, the load balancing device is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0115] This invention also provides a computer device having the above-described features. Figure 5 The load balancing device shown.
[0116] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 6As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 6 Take a processor 10 as an example.
[0117] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0118] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.
[0119] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0120] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0121] The computer device also includes an input device 30 and an output device 40. The processor 10, memory 20, input device 30, and output device 40 can be connected via a bus or other means. Figure 6 Taking the example of a connection between China and Israel via a bus.
[0122] Input device 30 can receive input numerical or character information, and generate key signal inputs related to user settings and function control of the computer device, such as a touchscreen, keypad, mouse, trackpad, touchpad, joystick, one or more mouse buttons, trackball, joystick, etc. Output device 40 may include display devices, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration motors). The aforementioned display devices include, but are not limited to, liquid crystal displays, light-emitting diodes, displays, and plasma displays. In some alternative embodiments, the display device may be a touchscreen.
[0123] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.
[0124] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0125] Although embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present invention, and all such modifications and variations fall within the protection scope of the present invention.
Claims
1. A load balancing method, characterized in that, The method is applied to a server-side load balancer in a software-defined wide area network (SDWN); the SWDN also includes clients; the server-side load balancer communicates with the clients via multiple links; the method includes: Obtain each data packet to be transmitted, as well as the priority and multiple performance parameters of each data packet; The data packets are sorted according to performance parameters to obtain the sorting results of each data packet under different performance parameters; the sorting results of each data packet under different performance parameters are used to indicate the size relationship of the performance parameters corresponding to each data packet. Obtain multiple performance parameters corresponding to each of the multiple links, and calculate the remaining capacity of each performance parameter of each link; The remaining capacity of each link is sorted according to the performance parameters to obtain the remaining capacity sorting results of each link under different performance parameters; the remaining capacity sorting results of each link under different performance parameters are used to indicate the size relationship of the remaining capacity of each link corresponding to the performance parameters. The sorting results of each data packet under different performance parameters are compared with the sorting results of the remaining capacity of each link under different performance parameters to obtain the transmission capacity results of each link. The data packets are then distributed to the links in descending order of their transmission capacity, according to their priority, for data transmission.
2. The method according to claim 1, characterized in that, The process of sorting the data packets according to performance parameters includes: The bubble sort algorithm is used to sort the data packets under different performance parameters; After obtaining the sorting results of each data packet under different performance parameters, the method further includes: Based on the sorting results of each data packet under different performance parameters, each data packet is scored under different performance parameters to obtain the score results of each data packet under different performance parameters.
3. The method according to claim 2, characterized in that, The process of sorting the links according to their remaining capacity based on performance parameters includes: The bubble sort algorithm is used to sort the remaining capacity of each link under different performance parameters; After obtaining the ranking results of the remaining capabilities of each link under different performance parameters, the method further includes: Based on the ranking of the remaining capacity of each link under different performance parameters, each link is scored under different performance parameters to obtain the remaining capacity score of each link under different performance parameters, and recorded in the link remaining capacity score table.
4. The method according to claim 3, characterized in that The step of comparing the sorting results of each data packet under different performance parameters with the sorting results of the remaining capacity of each link under different performance parameters to obtain the transmission capacity result of each link includes: Based on the scoring results of each data packet under different performance parameters and the scoring results of the remaining capacity of each link under different performance parameters in the link remaining capacity score table, the transmission capacity of each link is scored, and the transmission capacity scoring results of each link are obtained and recorded in the link transmission score table. The step of allocating the data packets sequentially to each link, ranked by transmission capacity from high to low, according to priority includes: The data packets are then assigned to the links in the transmission capability score table, sorted from highest to lowest according to their priority.
5. The method according to claim 4, characterized in that, The method further includes: Assign corresponding weight ratios to different performance parameters; The process of assigning scores to each data packet under different performance parameters to obtain the score results of each data packet under different performance parameters includes: Each data packet is scored under different performance parameters and multiplied by the corresponding weight ratio to obtain the score results of each data packet under different performance parameters; The process of assigning scores to each link under different performance parameters to obtain the remaining capacity score results of each link under different performance parameters includes: Each link is scored under different performance parameters and multiplied by the corresponding weight ratio to obtain the remaining capacity score of each link under different performance parameters.
6. The method according to any one of claims 1 to 5, characterized in that, The performance parameters include bandwidth, latency, throughput, and packet loss rate.
7. A load balancing device, characterized in that, The device is used as a server-side load balancer in a software-defined wide area network (SDWN); the SWDN also includes a client; the server-side load balancer communicates with the client via multiple links; the device includes: The data packet acquisition module is used to acquire each data packet to be transmitted, as well as the priority and multiple performance parameters of each data packet; The data packet sorting module is used to sort each data packet according to performance parameters to obtain the sorting results of each data packet under different performance parameters; the sorting results of each data packet under different performance parameters are used to indicate the size relationship of the performance parameters corresponding to each data packet. The link acquisition module is used to acquire multiple performance parameters corresponding to each of the multiple links and calculate the remaining capacity of each performance parameter of each link. The link sorting module is used to sort each link according to the remaining capacity of performance parameters, and obtain the sorting result of the remaining capacity of each link under different performance parameters; the sorting result of the remaining capacity of each link under different performance parameters is used to indicate the size relationship of the remaining capacity of each link corresponding to the performance parameters respectively. The transmission capacity module is used to compare the sorting results of each data packet under different performance parameters with the sorting results of the remaining capacity of each link under different performance parameters to obtain the transmission capacity result of each link. The data transmission module is used to distribute the data packets in order of priority to each link with transmission capacity sorted from high to low, so as to carry out data transmission.
8. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform the load balancing method of any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the load balancing method according to any one of claims 1 to 6.
10. A computer program product, characterized in that, Includes computer instructions for causing a computer to perform the load balancing method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Energy storage system data transmission method and device, electronic equipment and storage medium
CN116800788A
Method and system for changing path and controller thereof
US20160087894A1