Load balancing method and device, computer equipment, storage medium and program product
By sorting and scoring data packets and links in a software-defined wide area network, the problems of low efficiency and poor accuracy of traditional load balancing methods are solved, and efficient and accurate load balancing is achieved.
Patent Information
- Application Number
- CN202411708418.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2044-11-26
AI Technical Summary
In software-defined wide area networks, traditional load balancing methods are inefficient and have poor accuracy, and cannot effectively balance the load of each link.
By obtaining the data packets to be transmitted, their priority and performance parameters, as well as the performance parameters of each link, the data packets and links are sorted and assigned to the links under multiple performance parameters, the transmission capability results of the data packets and links are compared, and the packets are allocated to the links with higher transmission capabilities in turn.
The comprehensive consideration of the performance parameters of each link in the software-defined wide area network and the performance parameters of the data packet to be transmitted is achieved, ensuring the accuracy and reliability of load balancing, and improving the efficiency of load balancing.
Smart Images

Figure CN119835223A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network communication technology, and in particular to a load balancing method, device, computer equipment, storage medium and program product. Background Art
[0002] SD-WAN (Software-Defined Wide Area Network) is a network technology that uses the principles of software-defined networking (SDN) to manage and optimize the performance of wide area networks (WANs). As the scale and complexity of networks expand, the problem of link load balancing becomes particularly prominent, and how to balance the load of each link becomes an urgent problem to be solved.
[0003] Traditional technologies use methods such as polling, weighted polling, and minimum number of connections for load balancing. However, polling and weighted polling methods cannot perceive the status of the server and cannot guarantee the efficiency of network performance. The minimum number of connections method is highly complex. Related technologies use methods based on delay or link and device status for load balancing. However, these methods are not comprehensive and have poor accuracy in load balancing. Summary of the invention
[0004] In view of this, an object 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, which is applied to a server-side load balancer in a software-defined wide area network; the software-defined wide area network also includes a client; the server-side load balancer is connected to the client through multiple links; the method includes:
[0006] Obtaining each data packet to be transmitted and the priority and multiple performance parameters corresponding to each data packet;
[0007] Sorting each data packet according to the performance parameter 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] Acquire multiple performance parameters corresponding to each link of the multiple links, and calculate the remaining capacity of each performance parameter of each link;
[0009] Sorting each link according to the remaining capacity of the performance parameter 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 the performance parameters corresponding to each link;
[0010] Compare the ranking results of each data packet under different performance parameters with the ranking results of the remaining capacity of each link under different performance parameters to obtain the transmission capacity result of each link;
[0011] The data packets are allocated to the links whose transmission capabilities are ranked from high to low in order of priority for data transmission.
[0012] In an optional implementation manner, sorting the data packets according to the performance parameters includes:
[0013] Use the bubble sort algorithm to sort each data packet under different performance parameters;
[0014] After obtaining the sorting results of the data packets under different performance parameters, the method further includes:
[0015] According to the ranking results of each data packet under different performance parameters, each data packet is scored under different performance parameters to obtain the scoring results of each data packet under different performance parameters.
[0016] In an optional implementation manner, sorting the links according to the remaining capacity of the performance parameters includes:
[0017] The bubble sort algorithm is used to sort the remaining capacity of the performance parameters 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] According to the ranking results of the remaining capacity of each link under different performance parameters, each link is scored under different performance parameters to obtain the remaining capacity scoring results of each link under different performance parameters, and record them in the link remaining capacity score table.
[0020] In an 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 residual capacity scoring results of each link under different performance parameters in the link residual capacity scoring 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 allocating the data packets in order of priority to the links whose transmission capabilities are ranked from high to low includes:
[0023] The data packets are allocated in order of priority to the links whose transmission capacity scoring results are ranked from high to low in the transmission capacity scoring table.
[0024] In an optional embodiment, the method further includes:
[0025] Assign corresponding weight ratios to different performance parameters respectively;
[0026] The scoring of each data packet under different performance parameters to obtain the scoring 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 scoring results of each data packet under different performance parameters;
[0028] The scoring of each link under different performance parameters to obtain the residual capacity scoring 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 residual capacity scoring results of each link under different performance parameters.
[0030] In an optional implementation, the multiple performance parameters include bandwidth, delay, 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; the software-defined wide area network also includes a client; the server-side load balancer is connected to the client through multiple links; the device includes:
[0032] A data packet acquisition module, used to acquire each data packet to be transmitted and the priority and multiple performance parameters corresponding to each data packet;
[0033] A data packet sorting module, used to sort each data packet according to the performance parameter 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] A link acquisition module, used to acquire a plurality of performance parameters corresponding to each of the plurality of links, and calculate a remaining capacity of each performance parameter of each link;
[0035] A link sorting module is used to sort each link according to the remaining capacity of the performance parameter to obtain the sorting results of the remaining capacity of each link under different performance parameters; the sorting results of the remaining capacity of each link under different performance parameters are used to indicate the size relationship of the remaining capacity of the performance parameters corresponding to each link;
[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 results of each link;
[0037] The data transmission module is used to allocate the data packets to the links whose transmission capabilities are ranked from high to low in order of priority for data transmission.
[0038] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the load balancing method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0039] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the load balancing method of the first aspect or any corresponding embodiment thereof.
[0040] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions, wherein the computer instructions are used to enable a computer to execute the load balancing method of the first aspect or any corresponding embodiment thereof.
[0041] The technical solution provided by the present invention may include the following beneficial effects:
[0042] The load balancing method provided by the present invention is applied to a server-side load balancer in a software-defined wide area network, wherein the software-defined wide area network also includes a client, and the server-side load balancer is connected to the client through multiple links. When performing load balancing, firstly, each data packet to be transmitted and the priority and multiple performance parameters corresponding to each data packet are obtained, then each data packet is sorted according to the performance parameters, and the sorting results of each data packet under different performance parameters are obtained, and 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, then multiple performance parameters corresponding to each link in multiple links are obtained, and the remaining capacity of each performance parameter of each link is calculated, then each link is sorted according to the remaining capacity of the performance parameter, and the sorting results of the remaining capacity of each link under different performance parameters are obtained, and the sorting results of the remaining capacity of each link under different performance parameters are used to indicate the size relationship of the remaining capacity of the performance parameters corresponding to each link, and then 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, and the transmission capacity results of each link are obtained, and finally each data packet is allocated to each link whose transmission capacity is sorted from high to low in order of priority to perform data transmission. The above scheme, by sorting the remaining capacity of each data packet and each link under multiple performance parameters respectively, can comprehensively consider the performance parameters of each link in the software-defined wide area network and the performance parameters of the data packet to be transmitted, and carry out targeted and orderly matching of the remaining capacity of the data packet and the link, thereby ensuring the accuracy and reliability of load balancing. The scheme is simple and easy to implement, which improves the efficiency of load balancing. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0044] Figure 1 is a flow chart of a load balancing method according to an embodiment of the present invention;
[0045] Figure 2 is a flow chart of another load balancing method according to an embodiment of the present invention;
[0046] Figure 3 is a schematic diagram of the structure of a software defined wide area network according to an embodiment of the present invention;
[0047] Figure 4is a schematic diagram of a bubble sort algorithm according to an embodiment of the present invention;
[0048] Figure 5 is a structural block diagram of a load balancing device according to an embodiment of the present invention;
[0049] Figure 6 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0051] WAN (Wide Area Network) is a large network that spans cities, provinces or countries, usually composed of multiple local area networks connected by routers, switches and other devices. SDN (Software Defined Network) is an innovative network architecture that separates the control plane from the data plane of network devices to achieve flexible control and optimization of network traffic. SD-WAN (Software-Defined Wide Area Network) is a network technology that uses the principles of software-defined networking (SDN) to manage and optimize the performance of wide area networks (WANs). As the scale and complexity of networks expand, the problem of link load balancing becomes particularly prominent, and how to balance the load of each link has become an urgent problem to be solved.
[0052] Traditional technologies use methods such as polling, weighted polling, and minimum number of connections for load balancing. However, due to the dynamic changes in network traffic and differences in server performance, polling and weighted polling methods cannot perceive the status of the server and cannot guarantee the efficiency of network performance. The minimum number of connections method is highly complex. Related technologies use methods based on latency or link and device status for load balancing. However, these methods do not take into account comprehensive link information and have poor accuracy in load balancing.
[0053] Therefore, an embodiment of the present invention provides a load balancing method, which achieves the effect of ensuring the accuracy, reliability and efficiency of load balancing by sorting the remaining capacity of each data packet and each link under multiple performance parameters.
[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 of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0055] In this embodiment, a load balancing method is provided, which is applied to a server-side load balancer in a software-defined wide area network. The software-defined wide area network also includes a client. The server-side load balancer is connected to the client through multiple links. The server can be a desktop computer, a laptop computer, a server, etc. Figure 1 is a flow chart of a load balancing method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0056] Step S101, obtaining each data packet to be transmitted and the priority and multiple performance parameters corresponding to each data packet.
[0057] Each data packet to be transmitted is a data packet generated by the client to provide various services to the user and transmitted to the server according to the user's needs and instructions. The priority corresponding to the data packet is based on the service type to which the data packet belongs. For example, the priority of the data packet of the real-time transmission service is higher than the priority of the data packet of the download task. The performance parameter is the performance parameter of the multiple links for data transmission, such as bandwidth, delay, throughput, packet loss rate, jitter, response time, mean opinion score, etc., and appropriate performance parameters can be selected according to actual needs.
[0058] Optionally, each data packet to be transmitted is a data packet that the client needs to transmit to the server within a transmission cycle. That is to say, within each transmission cycle, the server load balancer allocates a suitable link for each data packet to be transmitted sent by the client through the load balancing method provided by the present invention to perform load balancing.
[0059] Step S102, sorting each data packet according to the performance parameter to obtain the sorting result 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 size relationship of the performance parameters corresponding to each data packet. For each performance parameter, each data packet is sorted according to the size of the performance parameter of each data packet to obtain the sorting results of each data packet under each performance parameter.
[0061] Step S103: acquiring a plurality of performance parameters corresponding to each of the plurality of links, and calculating a 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 correspond one to one. For example, the performance parameters of the data packet include bandwidth, which indicates the bandwidth required to transmit the data packet. The performance parameters of the link also include bandwidth, which indicates the bandwidth capability of the link during data transmission.
[0063] When calculating the remaining capacity of performance parameters, the method of calculating the remaining capacity in related technologies can be used, such as calculating the proportion of the current available resources of the link to the total resources under different performance parameters. For example, if the current available bandwidth accounts for 80% of the total bandwidth, the remaining capacity of the bandwidth is 80%.
[0064] Step S104: sort the remaining capacity of each link according to the performance parameter to obtain the sorting result of the remaining capacity of each link under different performance parameters.
[0065] The ranking results of the remaining capacity 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 parameter. For each performance parameter, the links are sorted according to the size of the remaining capacity of the performance parameter of each link to obtain the ranking results of each link under each performance parameter.
[0066] Step S105 , comparing the ranking results of each data packet under different performance parameters with the ranking results of the remaining capacity of each link under different performance parameters, to obtain the transmission capacity result of each link.
[0067] For each performance parameter, the ranking results of each data packet under the performance parameter and the ranking results of the remaining capacity of each link under the performance parameter are compared respectively, and the transmission capacity results used to represent the data transmission capacity of each link are obtained. Exemplarily, if more than half of the ranking results of the target data packet under different performance parameters are less than the ranking results of the target link under the corresponding performance parameter, it means that the target link has sufficient transmission capacity to transmit the target data packet. Similarly, the transmission capacity of each link for each data packet to be transmitted is determined, and then counted or scored as the transmission capacity results of each link, wherein each link must be compared with all data packets under all performance parameters. For example, there are a total of 5 performance parameters, and the ranking of the target data packet under 3 of the performance parameters is less than the ranking of the target link, which means that the target link has sufficient transmission capacity to transmit the target data packet; there are a total of 7 data packets, and the target link has sufficient transmission capacity for 4 of them. When the transmission capacity result is determined by counting, the transmission capacity result of the target link is 4. When the transmission capacity result is determined by scoring, the scoring is performed according to the preset scoring rules, and the scoring result is used as the transmission capacity result.
[0068] Step S106: Allocate the data packets in order of priority to the links whose transmission capabilities are ranked from high to low, for data transmission.
[0069] When data transmission is in progress, packets with higher priorities are allocated links first according to their priority order. When allocating links, packets with higher transmission capacity are allocated first, that is, links with higher transmission capacity. Finally, packets with higher priority are allocated to links with higher transmission capacity to ensure load balance 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, and the software-defined wide area network also includes a client, and the server-side load balancer is connected to the client through multiple links. When performing load balancing, first obtain each data packet to be transmitted and the priority and multiple performance parameters corresponding to each data packet, then sort each data packet according to the performance parameter, obtain the sorting result of each data packet under different performance parameters, and the sorting result of each data packet under different performance parameters is used to indicate the size relationship of the performance parameters corresponding to each data packet, then obtain multiple performance parameters corresponding to each link in multiple links, calculate the remaining capacity of each performance parameter of each link, then sort each link according to the remaining capacity of the performance parameter, obtain the sorting result of the remaining capacity of each link under different performance parameters, and 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 the performance parameters corresponding to each link, then compare 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, and obtain the transmission capacity result of each link, and finally allocate each data packet to each link whose transmission capacity is sorted from high to low in order of priority for data transmission. The above scheme, by sorting the remaining capacity of each data packet and each link under multiple performance parameters respectively, can comprehensively consider the performance parameters of each link in the software-defined wide area network and the performance parameters of the data packet to be transmitted, and carry out targeted and orderly matching of the remaining capacity of the data packet and the link, thereby ensuring the accuracy and reliability of load balancing. The scheme is simple and easy to implement, which improves the efficiency of load balancing.
[0071] In this embodiment, a load balancing method is provided, which is applied to a server-side load balancer in a software-defined wide area network. The software-defined wide area network also includes a client. The server-side load balancer is connected to the client through multiple links. The server can be a desktop computer, a laptop computer, a server, etc. Figure 2 is a flow chart of a load balancing method according to an embodiment of the present invention. Figure 2As shown, the process includes the following steps:
[0072] Step S201, obtaining each data packet to be transmitted and the priority and multiple performance parameters corresponding to each data packet.
[0073] Figure 3 is a schematic diagram of the structure of a software defined wide area network according to an embodiment of the present invention. Figure 3 As shown, the load balancer on the server side is connected to the client through multiple links.
[0074] Optionally, the multiple performance parameters include bandwidth, delay, throughput, and packet loss rate, that is, obtaining each data packet to be transmitted and the priority corresponding to each data packet as well as the bandwidth, delay, throughput, and packet loss rate.
[0075] Step S202: sort the data packets according to the performance parameters to obtain sorting results of the data packets under different performance parameters.
[0076] The sorting results of the data packets under different performance parameters are used to indicate the size relationship of the performance parameters corresponding to the data packets.
[0077] Optionally, when sorting each data packet according to performance parameters, a bubble sort algorithm can be used to sort each data packet under different performance parameters. Specifically, under different performance parameters, queues of corresponding performance parameters of each data packet are created respectively, and then the corresponding performance parameters of each data packet are arranged in order from large to small using a bubble sort algorithm to obtain the sorting results of each data packet under the corresponding performance parameters. Exemplarily, the bandwidth / delay / throughput / packet loss rate of each data packet is obtained, and a bandwidth / delay / throughput / packet loss rate queue is created for each data packet respectively, and then the bandwidth / delay / throughput / packet loss rate of each data packet is arranged in order from large to small using a bubble sort algorithm to obtain the sorting results of each data packet under bandwidth / delay / throughput / packet loss rate.
[0078] Step S203, according to the sorting results of each data packet under different performance parameters, each data packet is scored under different performance parameters to obtain the scoring results of each data packet under different performance parameters.
[0079] When scoring data packets, points are assigned separately for each performance parameter. Scoring rules can be preset as needed. For example, points are assigned in ascending order according to the sorting results. For example, if there are 4 data packets, they are scored 1 point, 2 points, 3 points, and 4 points respectively according to the sorting results from small to large. After each performance parameter is assigned a separate point, the scoring result 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, each data packet is scored under different performance parameters and multiplied by the corresponding weight ratio to obtain the scoring results of each data packet under different performance parameters. For example, if the priority of preset bandwidth and throughput is higher than that of delay and packet loss rate, a higher weight ratio is assigned to bandwidth and throughput, such as a weight ratio of 2 for bandwidth and throughput, and a weight ratio of 1 for delay and packet loss rate. When scoring, the bandwidth and throughput are scored in ascending order according to the sorting results, multiplied by the weight ratio of 2, such as 2 points, 4 points, 6 points, and 8 points. The delay and packet loss rate are scored in ascending order according to the sorting results, multiplied by the weight ratio of 1, such as 1 point, 2 points, 3 points, and 4 points.
[0081] Step S204: acquiring a plurality of performance parameters corresponding to each link in the plurality of links, and calculating a remaining capacity of each performance parameter of each link.
[0082] Specifically, the bandwidth, delay, throughput, and packet loss rate corresponding to each link in the multiple links are obtained, and the remaining capacity of the bandwidth, delay, throughput, and packet loss rate of each link is calculated.
[0083] Step S205 , sorting the remaining capacity of each link according to the performance parameter, and obtaining the sorting result of the remaining capacity of each link under different performance parameters.
[0084] The ranking results of the remaining capacities of the links under different performance parameters are used to indicate the magnitude relationship of the remaining capacities of the performance parameters respectively corresponding to the links.
[0085] Optionally, when sorting the links according to the remaining capacity of the performance parameters, a bubble sort algorithm can be used to sort the remaining capacity of the performance parameters of each link under different performance parameters. Specifically, under different performance parameters, queues of corresponding performance parameters of each link are created respectively, and then the bubble sort algorithm is used to arrange the corresponding performance parameters of each link in order from large to small, and the sorting results of each link under the corresponding performance parameters are obtained. Exemplarily, the bandwidth / delay / throughput / packet loss rate of each link is obtained, and the bandwidth / delay / throughput / packet loss rate queues of each link are created respectively, and then the bubble sort algorithm is used to arrange the bandwidth / delay / throughput / packet loss rate of each link in order from large to small, and the sorting results of each link under bandwidth / delay / throughput / packet loss rate are obtained.
[0086] Figure 4 Schematic diagram of a bubble sort algorithm according to an embodiment of the present invention. Figure 4As shown, assuming that there are 6 links in total, and the scores of link 1 to link 6 decrease in sequence, if the original arrangement order is link 2, link 1, link 4, link 6, link 3, link 5, after being arranged by the bubble sort algorithm, the arrangement order becomes link 1 to link 6.
[0087] Step S206, according to the ranking results of the remaining capacity of each link under different performance parameters, each link is scored under different performance parameters, and the remaining capacity scoring results of each link under different performance parameters are obtained and recorded in the link remaining capacity score table.
[0088] When assigning points to links, points are assigned separately for each performance parameter, and scoring rules can be preset as needed. For example, points are assigned in ascending order according to the sorting results. For example, if there are 6 links, they are assigned 1 point, 2 points, 3 points, 4 points, 5 points, and 6 points respectively according to the sorting results. After each performance parameter is assigned separately, the scoring results of each link under each performance parameter are obtained.
[0089] Optionally, corresponding weight ratios are assigned to different performance parameters according to preset priorities. When scoring each link, each link is scored under different performance parameters and multiplied by the corresponding weight ratio to obtain the residual capacity scoring results of each link under different performance parameters. The specific method is similar to scoring each data packet according to the weight ratio in step S203, which will not be repeated here.
[0090] After assigning scores to the residual capacity of each link under different performance parameters, the residual capacity scoring results under different performance parameters are recorded in the link residual capacity score tables corresponding to the different performance parameters.
[0091] Step S207 : Compare the ranking results of each data packet under different performance parameters with the ranking results of the remaining capacity of each link under different performance parameters to obtain the transmission capacity result of each link.
[0092] Specifically, based on the scoring results of each data packet under different performance parameters and the remaining capacity scoring results of each link under different performance parameters in the link remaining capacity score table, the transmission capacity scoring results of each link are scored, and the transmission capacity scoring results of each link are obtained and recorded in the link transmission score table.
[0093] Optionally, the transmission capacity of each link is scored using a preset scoring rule. For example, when the ratio of the scoring result of the target data packet under the target performance parameter to the residual capacity scoring result of the target link under the target performance parameter is less than a first threshold, it means that the actual transmission capacity of the target link is much greater than the transmission capacity required for transmitting the target data packet, and the target link is scored 1 point; when the ratio of the scoring result of the target data packet under the target performance parameter to the residual capacity scoring result of the target link under the target performance parameter is greater than the first threshold and does not exceed 100%, it means that the actual transmission capacity of the target link is equivalent to the transmission capacity required for transmitting the target data packet, and the target link is scored 0 points; when the scoring result of the target data packet under the target performance parameter is greater than the residual capacity scoring result of the target link under the target performance parameter, it means that the actual transmission capacity of the target link is less than the transmission capacity required for transmitting the target data packet, and the target link is scored -1 point.
[0094] Optionally, the transmission capacity scoring results of each link under different performance parameters are added together to obtain the transmission capacity scoring result of each link, and the result is recorded in the link transmission score table.
[0095] Step S208: Allocate each data packet, in order of priority, to each link whose transmission capacity is ranked from high to low, for data transmission.
[0096] Specifically, each data packet is allocated, in order of priority, to each link whose transmission capacity scoring results are ranked from high to low in the transmission capacity score table. In other words, a data packet with a higher priority order is allocated to a link with a higher transmission capacity scoring result. For example, the target data packet with the highest priority among the data packets is allocated to the target link with the highest transmission capacity among the links.
[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 link after one round of data packets are allocated, and links are allocated to the remaining unallocated data packets until links for 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 method returns to step S201 and restarts execution of steps S201 to S208. That is, at the beginning of each transmission cycle, new data packets to be transmitted are re-acquired, and the remaining capacity of each link after the previous transmission cycle is updated, and links are allocated to new data packets to be transmitted 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, and the software-defined wide area network also includes a client, and the server-side load balancer is connected to the client through multiple links. When performing load balancing, first obtain each data packet to be transmitted and the priority and multiple performance parameters corresponding to each data packet, then sort each data packet according to the performance parameter, obtain the sorting result of each data packet under different performance parameters, and the sorting result of each data packet under different performance parameters is used to indicate the size relationship of the performance parameters corresponding to each data packet, then obtain multiple performance parameters corresponding to each link in multiple links, calculate the remaining capacity of each performance parameter of each link, then sort each link according to the remaining capacity of the performance parameter, obtain the sorting result of the remaining capacity of each link under different performance parameters, and 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 the performance parameters corresponding to each link, then compare 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, and obtain the transmission capacity result of each link, and finally allocate each data packet to each link whose transmission capacity is sorted from high to low in order of priority for data transmission. The above scheme, by sorting the remaining capacity of each data packet and each link under multiple performance parameters respectively, can comprehensively consider the performance parameters of each link in the software-defined wide area network and the performance parameters of the data packet to be transmitted, and carry out targeted and orderly matching of the remaining capacity of the data packet and the link, thereby ensuring the accuracy and reliability of load balancing. The scheme is simple and easy to implement, which improves the efficiency of load balancing.
[0100] In this embodiment, a load balancing device is also provided, which is used to implement the above embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0101] This embodiment provides a load balancing device, such as Figure 5 As shown, the device is applied to a server-side load balancer in a software-defined wide area network; the software-defined wide area network also includes a client; the server-side load balancer is connected to the client through multiple links; the device includes:
[0102] The data packet acquisition module 501 is used to acquire each data packet to be transmitted and 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 the performance parameter 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;
[0104] The link acquisition module 503 is used to acquire multiple performance parameters corresponding to each link 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 the links according to the remaining capacity of the performance parameters to obtain the sorting results of the remaining capacity of each link under different performance parameters; the sorting results of the remaining capacity of each link under different performance parameters are used to indicate the size relationship of the remaining capacity of the performance parameters corresponding to each link;
[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 allocate the data packets to the links whose transmission capabilities are ranked from high to low in order of priority for data transmission.
[0108] In an optional embodiment, the data packet sorting module is also used to: use a bubble sort algorithm to sort each data packet under different performance parameters; after obtaining the sorting results of each data packet under different performance parameters, the data packet sorting module is also used to: according to the sorting results of each data packet under different performance parameters, score each data packet under different performance parameters to obtain the scoring results of each data packet under different performance parameters.
[0109] In an optional embodiment, the link sorting module is also used to: use a bubble sort algorithm to sort the remaining capacity of the performance parameters of each link under different performance parameters; after obtaining the remaining capacity sorting results of each link under different performance parameters, the link sorting module is also used to: according to the remaining capacity sorting results of each link under different performance parameters, score each link under different performance parameters, obtain the remaining capacity scoring results of each link under different performance parameters, and record them in the link remaining capacity score table.
[0110] In an optional embodiment, the transmission capacity module is also used to: assign points to the transmission capacity of each link based on the scoring results of each data packet under different performance parameters and the remaining capacity scoring results of each link under different performance parameters in the link remaining capacity score table, obtain the transmission capacity scoring results of each link, and record them in the link transmission score table; the data transmission module is also used to: assign each data packet in order of priority to each link whose transmission capacity scoring results in the transmission capacity score table are sorted from high to low.
[0111] In an optional embodiment, the method further includes: respectively allocating corresponding weight ratios for different performance parameters; scoring each data packet under different performance parameters to obtain scoring results for each data packet under different performance parameters, including: scoring each data packet under different performance parameters, and multiplying the scores by the corresponding weight ratios to obtain scoring results for each data packet under different performance parameters; scoring each link under different performance parameters to obtain residual capacity scoring results for each link under different performance parameters, including: scoring each link under different performance parameters, and multiplying the scores by the corresponding weight ratios to obtain residual capacity scoring results for each link under different performance parameters.
[0112] In an optional implementation, the multiple performance parameters include bandwidth, delay, throughput, and packet loss rate.
[0113] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0114] The load balancing device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0115] The embodiment of the present invention also provides a computer device having the above Figure 5 The load balancing device shown.
[0116] See also Figure 6 , Figure 6 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 6As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 10 is taken as an example.
[0117] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0118] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0119] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0120] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a 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, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 6 The example of connecting through bus is taken in the following.
[0122] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.
[0123] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0124] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0125] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations shall all 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; the software-defined wide area network also includes a client; the server-side load balancer is connected to the client through multiple links; the method includes: Obtaining each data packet to be transmitted and the priority and multiple performance parameters corresponding to each data packet; Sorting each data packet according to the performance parameter 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; Acquire multiple performance parameters corresponding to each link of the multiple links, and calculate the remaining capacity of each performance parameter of each link; Sorting each link according to the remaining capacity of the performance parameter 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 the performance parameters corresponding to each link; Compare the ranking results of each data packet under different performance parameters with the ranking results of the remaining capacity of each link under different performance parameters to obtain the transmission capacity result of each link; The data packets are allocated to the links whose transmission capabilities are ranked from high to low in order of priority for data transmission.
2. The method according to claim 1, characterized in that The step of sorting the data packets according to the performance parameters includes: Use the bubble sort algorithm to sort each data packet under different performance parameters; After obtaining the sorting results of the data packets under different performance parameters, the method further includes: According to the ranking results of each data packet under different performance parameters, each data packet is scored under different performance parameters to obtain the scoring results of each data packet under different performance parameters.
3. The method according to claim 2, characterized in that The step of sorting the links according to the remaining capacity of the performance parameters includes: The bubble sort algorithm is used to sort the remaining capacity of the performance parameters 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: According to the ranking results of the remaining capacity of each link under different performance parameters, each link is scored under different performance parameters to obtain the remaining capacity scoring results of each link under different performance parameters, and record them 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 residual capacity scoring results of each link under different performance parameters in the link residual capacity scoring 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 allocating the data packets, in order of priority, to the links whose transmission capabilities are ranked in descending order comprises: The data packets are allocated in order of priority to the links whose transmission capacity scoring results are ranked from high to low in the transmission capacity scoring table.
5. The method according to claim 4, characterized in that The method further comprises: Assign corresponding weight ratios to different performance parameters respectively; The scoring of each data packet under different performance parameters to obtain the scoring 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 scoring results of each data packet under different performance parameters; The scoring of each link under different performance parameters to obtain the residual capacity scoring 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 residual capacity scoring results of each link under different performance parameters.
6. The method according to any one of claims 1 to 5, characterized in that: The multiple performance parameters include bandwidth, delay, throughput, and packet loss rate.
7. A load balancing device, characterized in that: The device is applied to a server-side load balancer in a software-defined wide area network; the software-defined wide area network also includes a client; the server-side load balancer is connected to the client through multiple links; the device includes: A data packet acquisition module, used to acquire each data packet to be transmitted and the priority and multiple performance parameters corresponding to each data packet; A data packet sorting module, used to sort each data packet according to the performance parameter 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; A link acquisition module, used to acquire a plurality of performance parameters corresponding to each of the plurality of links, and calculate a remaining capacity of each performance parameter of each link; A link sorting module is used to sort each link according to the remaining capacity of the performance parameter to obtain the sorting results of the remaining capacity of each link under different performance parameters; the sorting results of the remaining capacity of each link under different performance parameters are used to indicate the size relationship of the remaining capacity of the performance parameters corresponding to each link; 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 results of each link; The data transmission module is used to allocate the data packets to the links whose transmission capabilities are ranked from high to low in order of priority for data transmission.
8. A computer device, characterized in that: include: 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 load balancing method according to any one of claims 1 to 6 by executing the computer instructions.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the load balancing method according to any one of claims 1 to 6.
10. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to enable a computer to execute the load balancing method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Data center network link selection method and device, and electronic equipment
CN116582493A
Energy storage system data transmission method and device, electronic equipment and storage medium
CN116800788A
Method and system for changing path and controller thereof
US20160087894A1