A load balancing method based on adaptive adjustment and related devices

By obtaining the packet arrival time difference value and adaptive adjustment timeout value in the load balancing method, the problem of slow response in the network congestion in the prior art is solved, and the rationality of load balancing and the throughput of data transmission are improved.

CN119865461BActive Publication Date: 2025-06-24湖南工商大学
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510348114.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-24
Publication Date
2025-06-24
Estimated Expiration
2045-03-24

AI Technical Summary

Technical Problem

The existing load balancing method is difficult to respond quickly and alleviate congestion when the network is congested, resulting in impairment of transmission performance and low rationality.

Method used

By obtaining the arrival time of the target packet arrival data sending queue and the arrival time of other packets, the time difference is calculated, and the packet is rerouted when the time difference is greater than the timeout value, and when the time difference is less than or equal to the timeout value, the timeout value is adaptively adjusted according to the packet status.

Benefits of technology

The real-time and accuracy of timeout values ​​are improved. By rerouting packets with accurate timeout values, the rationality of packet allocation is improved, thereby improving the overall throughput of the data sending end and improving the rationality of load balancing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119865461B_ABST
    Figure CN119865461B_ABST
Patent Text Reader

Abstract

This application relates to the technical field of load balancing, and provides a load balancing method based on adaptive adjustment and related devices. The method includes: obtaining the arrival time of a target data packet at the data sending queue of a data sender at the current moment, and obtaining the arrival time of each other data packet in the data sending queue; calculating the time difference between the arrival time of the packet preceding the target data packet in the data sending queue and the arrival time of the target data packet; when the time difference is greater than the timeout value at the previous moment of the current moment, rerouting the target data packet to another data sending queue of the data sender; when the time difference is less than or equal to the timeout value at the previous moment of the current moment, adaptively adjusting the timeout value according to all the data packets in the data sending queue to obtain the timeout value at the current moment. The method of this application can improve the rationality of load balancing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of load balancing, and particularly relates to a load balancing method based on adaptive adjustment and related devices. Background Art

[0002] Traditional data center load balancing solutions can be classified into three categories according to the re-routing granularity: flow-level, packet-level, and flowlet-level. As the most representative flow-level load balancing solution, Equal-Cost Multi-Path Routing (ECMP) distributes data flows to different transmission paths through a hash algorithm. However, the network throughput will drop significantly when hash conflicts occur, resulting in the overall network utilization not reaching the optimal level. Packet-level related load balancing solutions take packets as units and distribute them to each path to maximize the utilization of network bandwidth. However, in a link failure or an asymmetric topology network, packet-level load balancing solutions are prone to out-of-order problems, leading to unnecessary retransmissions and longer flow completion times. Flowlet-level load balancing solutions utilize the burstiness of traffic and split a data flow into multiple flowlets by setting a sufficiently large timeout value ( , Flow Timeout Value), such as 2 times the round-trip time (RTT). Specifically, when the time interval between transmitted packets of a certain data flow exceeds the above , its subsequent packets are re-routed to other paths for transmission. Through the above method, the data flow is split into multiple flow segments (flowlets) and distributed to different paths for transmission. Since the set time is large enough, this method not only does not cause packet out-of-order problems, but also has better throughput and network utilization than the other two load balancing solutions when there are more flowlets.

[0003] Although the current flowlet-level load solutions have relatively good load balancing effects, they also have limitations. Most flowlet-level load balancing solutions use fixed , or simply decrease continuously according to the amount of data already sent (such as the solution HalfLife), and cannot actively re-route according to the transmission state of the data flow and the network congestion state. It is difficult to quickly respond and relieve congestion when the network is congested, which damages the transmission performance. It can be seen that the current load balancing methods have the problem of low rationality of load balancing. Summary of the Invention

[0004] The present application provides a load balancing method based on adaptive adjustment and related devices, which can solve the problem of low rationality of load balancing.

[0005] In a first aspect, an embodiment of the present application provides a load balancing method based on adaptive adjustment. The load balancing method includes:

[0006] Obtain the arrival time of the target data packet at the data sending queue of the data sender at the current moment, and obtain the arrival time of each other data packet in the data sending queue;

[0007] Calculate the time difference between the arrival time of the previous data packet of the target data packet in the data sending queue and the arrival time of the target data packet;

[0008] When the time difference is greater than the timeout value of the previous moment of the current moment, reroute the target data packet to another data sending queue of the data sender; the timeout value is used to describe the congestion status of the data sending queue;

[0009] When the time difference is less than or equal to the timeout value of the previous moment of the current moment, adaptively adjust the timeout value according to all the data packets in the data sending queue to obtain the timeout value of the current moment; when the next moment of the current moment arrives, perform load balancing according to the timeout value of the current moment.

[0010] Optionally, adaptively adjusting the timeout value according to all the data packets in the data sending queue to obtain the timeout value of the current moment includes:

[0011] Calculate the length change value of all the data sending queues of the data sender;

[0012] Calculate the queue growth gradient index according to the length change value;

[0013] For each of the moments respectively, if at a certain moment, the number of data packets in the data sending queue where the target data packet is located is greater than the queue congestion threshold , then regard the last data packets in the data sending queue as congested data packets; the th moment is the current moment;

[0014] Calculate the congestion index of the data sending queue for all the congested data packets corresponding to the moments;

[0015] Calculate the timeout value of the current moment according to the queue growth gradient index and the congestion index.

[0016] Optionally, calculating the length change value of all the data sending queues of the data sender includes:

[0017] Calculate the length change value through the formula:

[0018]

[0019] ; ;

[0020] Among them, represents the number of data sending queues at the data sending end, represents at the th moment, the receiving rate of the data sending queue, represents at the th moment, the sending rate of the data sending queue.

[0021] Optionally, calculate the queue growth gradient index according to the length change value, including:

[0022] Calculate the queue growth gradient index through the formula:

[0023]

[0024] ; ;

[0025] Among them, represents the maximum queue length.

[0026] Optionally, calculate the congestion index of the data sending queue based on the congestion packets corresponding to all moments, including:

[0027] Calculate the congestion index of the data sending queue through the formula:

[0028] ;

[0029]

[0030] ; ;

[0031] Among them, represents the average value of the number of congestion packets at the current moment, represents the average value of the number of congestion packets at the previous moment of the current moment, represents the weight, represents the number of congestion packets in the data sending queue at the current moment, represents the total number of packets in the data sending queue at the current moment.

[0032] Optionally, calculate the timeout value at the current moment according to the queue growth gradient index and the congestion index, including:

[0033] Calculate through the formula:

[0034]

[0035] Calculate the timeout value at the current moment ;

[0036] Wherein, represents the initial timeout value, represents the coefficient, represents the round-trip delay of the data sending queue.

[0037] Optionally, after the step of rerouting the target data packet to another data sending queue of the data sender when the time difference is greater than the timeout value of the previous moment of the current moment, the load balancing method further includes:

[0038] Set the timeout value at the current moment to the initial timeout value.

[0039] In a second aspect, an embodiment of the present application provides a load balancing device based on adaptive adjustment, including:

[0040] An acquisition module, configured to acquire the arrival time of the target data packet at the data sending queue of the data sender at the current moment, and acquire the arrival time of each other data packet in the data sending queue;

[0041] A calculation module, configured to calculate the time difference between the arrival time of the previous data packet of the target data packet in the data sending queue and the arrival time of the target data packet;

[0042] A rerouting module, configured to reroute the target data packet to another data sending queue of the data sender when the time difference is greater than the timeout value of the previous moment of the current moment; the timeout value is used to describe the congestion condition of the data sending queue;

[0043] An adaptive adjustment module, configured to adaptively adjust the timeout value according to all data packets in the data sending queue when the time difference is less than or equal to the timeout value of the previous moment of the current moment, to obtain the timeout value at the current moment; when the next moment of the current moment arrives, perform load balancing according to the timeout value at the current moment.

[0044] In a third aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the above-mentioned load balancing method based on adaptive adjustment is implemented.

[0045] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned load balancing method based on adaptive adjustment is implemented.

[0046] The above solution of the present application has the following beneficial effects:

[0047] In the embodiment of the present application, by obtaining the arrival time of the target data packet at the data sending queue of the data sending end at the current moment, and obtaining the arrival time of each other data packet in the data sending queue, then calculating the time difference between the arrival time of the previous data packet of the target data packet in the data sending queue and the arrival time of the target data packet, and then when the time difference is greater than the timeout value of the previous moment of the current moment, rerouting the target data packet to another data sending queue of the data sending end, and when the time difference is less than or equal to the timeout value of the previous moment of the current moment, adaptively adjusting the timeout value according to all the data packets in the data sending queue to obtain the timeout value of the current moment. Among them, adjusting the timeout value according to the status of the data packets in the data sending queue can improve the timeliness and accuracy of the timeout value, and rerouting the data packets according to the accurate timeout value can improve the rationality of the data packet allocation, thereby improving the overall throughput of the data sending end and effectively improving the rationality of the load balancing.

[0048] Other beneficial effects of the present application will be described in detail in the subsequent specific implementation part. Brief Description of the Drawings

[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained according to these drawings.

[0050] Figure 1 It is a flowchart of a load balancing method based on adaptive adjustment provided by an embodiment of the present application;

[0051] Figure 2 It is a timeout value curve graph provided by an embodiment of the present application;

[0052] Figure 3 It is a structural schematic diagram of a load balancing device based on adaptive adjustment provided by an embodiment of the present application;

[0053] Figure 4 It is a structural schematic diagram of a terminal device provided by an embodiment of the present application. Detailed Description of the Invention

[0054] In the following description, specific details such as specific system architectures and technologies are presented for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, those skilled in the art should clearly understand that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present application.

[0055] It should be understood that when used in the specification of the present application and the appended claims, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.

[0056] It should also be understood that the term "and / or" used in the specification of the present application and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0057] As used in the specification of the present application and the appended claims, the term "if" can be interpreted as "when", "once", "in response to determining", or "in response to detecting" depending on the context. Similarly, the phrase "if determined" or "if [the described condition or event] is detected" can be interpreted as meaning "once determined", "in response to determining", "once [the described condition or event] is detected", or "in response to detecting [the described condition or event]" depending on the context.

[0058] In addition, in the description of the specification of the present application and the appended claims, the terms "first", "second", "third", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.

[0059] The reference to "one embodiment" or "some embodiments" etc. described in the specification of the present application means that a specific feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments", etc. that appear in different places in this specification do not necessarily all refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "comprising", "including", "having", and their variants all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0060] In view of the problem of low rationality of the existing load balancing, the embodiment of the present application provides a load balancing method based on adaptive adjustment. The load balancing method obtains the arrival time of the target data packet at the data sending queue of the data sender at the current moment, and obtains the arrival time of each other data packet in the data sending queue, and then calculates the time difference between the arrival time of the previous data packet of the target data packet in the data sending queue and the arrival time of the target data packet. Then, when the time difference is greater than the timeout value of the previous moment of the current moment, the target data packet is re-routed to other data sending queues of the data sender. When the time difference is less than or equal to the timeout value of the previous moment of the current moment, the timeout value is adaptively adjusted according to all the data packets in the data sending queue to obtain the timeout value at the current moment. Among them, adjusting the timeout value according to the status of the data packets in the data sending queue can improve the timeliness and accuracy of the timeout value. Routing the data packets according to the accurate timeout value can improve the rationality of the data packet allocation, thereby improving the overall throughput of the data sender and effectively improving the rationality of the load balancing.

[0061] Next, an exemplary description is given to the load balancing method based on adaptive adjustment provided by the present application.

[0062] As Figure 1 shown, the load balancing method based on adaptive adjustment provided by the present application includes the following steps:

[0063] Step 11, obtain the arrival time of the target data packet at the data sending queue of the data sender at the current moment, and obtain the arrival time of each other data packet in the data sending queue.

[0064] The above data sender may be an upstream switch, etc. The data sender has multiple data sending queues, and each data sending queue sends data packets to the data receiver (such as a downstream switch, etc.) through the corresponding data sending link.

[0065] It should be noted that for the target data packet, the moment when it arrives at the data sending queue is the current moment, and the corresponding arrival time is the time corresponding to the current moment, such as 8 o'clock. The data packets in the data sending queue are the data packets that remain in the data sending queue and wait for transmission.

[0066] Step 12, calculate the time difference between the arrival time of the previous data packet of the target data packet in the data sending queue and the arrival time of the target data packet.

[0067] Specifically, subtract the arrival time of the previous data packet of the target data packet in the data sending queue from the arrival time of the target data packet to obtain the time difference.

[0068] Exemplarily, the arrival time of the target data packet is 8 o'clock. In this data transmission queue, the arrival time of the previous data packet of the target data packet is 8:10, so the time difference is 10 minutes.

[0069] Step 13, when the time difference is greater than the timeout value of the previous moment of the current moment, reroute the target data packet to other data transmission queues at the data sending end.

[0070] The above timeout value is used to describe the congestion status of the data transmission queue. After rerouting the target data packet, set the timeout value of the current moment to the initial timeout value.

[0071] It should be noted that when rerouting the target data packet to other data transmission queues at the data sending end, the target data packet can be rerouted according to the queue lengths of other data transmission queues, and the target data packet is rerouted to the data transmission queue with the shortest queue length at the current moment to achieve load balancing.

[0072] Step 14, when the time difference is less than or equal to the timeout value of the previous moment of the current moment, adaptively adjust the timeout value according to all the data packets in the data transmission queue to obtain the timeout value of the current moment.

[0073] When the next moment of the current moment arrives, perform load balancing according to the timeout value of the current moment.

[0074] In some embodiments of the present application, when the time difference is less than or equal to the timeout value of the previous moment of the current moment, only the timeout value of the data transmission queue needs to be adaptively adjusted, and there is no need to reroute the data packet. The data packets in the data transmission queue are transmitted in order. The step of adaptively adjusting the timeout value according to all the data packets in the data transmission queue to obtain the timeout value of the current moment includes:

[0075] The first step is to calculate the length change values of all the data transmission queues at the data sending end.

[0076] Specifically, through the formula:

[0077]

[0078] Calculate the length change value .

[0079] Among them, represents the number of data transmission queues at the data sending end, represents the receiving rate of the data transmission queue at the th moment, represents the sending rate of the data transmission queue at the th moment.

[0080] In the second step, calculate the queue growth gradient index according to the length change value.

[0081] Specifically, through the formula:

[0082]

[0083] calculate the queue growth gradient index .

[0084] Among them, represents the maximum queue length.

[0085] In the third step, for each of the moments, if at a certain moment, the number of packets in the data sending queue where the target packet is located is greater than the queue congestion threshold , then the last packets in the data sending queue are regarded as congestion packets.

[0086] The th moment is the current moment, and the value of T is set according to the actual data sending situation of the data sender, such as T = 8.

[0087] Exemplarily, at the 1st moment, there are 8 packets in the data sending queue, and the queue congestion threshold is 5, then the last 3 packets are regarded as congestion packets.

[0088] In the fourth step, calculate the congestion index of the data sending queue based on the congestion packets corresponding to all moments.

[0089] Specifically, through the formula:

[0090] ;

[0091]

[0092] calculate the congestion index of the data sending queue ;

[0093] Among them, represents the average value of the number of congestion packets at the current moment, represents the average value of the number of congestion packets at the previous moment of the current moment, represents the weight, represents the number of congestion packets in the data sending queue at the current moment, represents the total number of packets in the data sending queue at the current moment.

[0094] In the fifth step, calculate the timeout value at the current moment according to the queue growth gradient index and the congestion index.

[0095] Specifically, through the formula:

[0096]

[0097] calculate the timeout value at the current moment .

[0098] Wherein, represents the initial timeout value, represents the coefficient, represents the round-trip delay of the data sending queue.

[0099] It should be noted that at the next moment of the current moment, according to the process from step 13 to step 14, load balancing is performed based on the timeout value at the current moment . At the moment when load balancing starts, the timeout value is the initial timeout value. When the number of data packets in the data sending queue is less than or equal to the congestion threshold, it indicates that the data sending queue is not congested. At this time, emphasis is placed on ensuring the efficiency and stability of network transmission. According to the above formula, at this time, the queue growth gradient index and the congestion index are both close to 0, the timeout value decays slowly, which can reduce the rerouting frequency of the non-congested data sending queue, avoid the data sending queue from quickly switching between multiple paths and affecting the transmission stability and transmission rate, and thus can effectively reduce the overall traffic completion time.

[0100] In some embodiments of the present application, at the data sending end, relevant information of the data packets is recorded. Specifically, for each data stream at the data sending end (i.e., the data sending queue, including multiple data packets to be sent), hash calculation is performed based on its source and destination IP addresses and source and destination port numbers to obtain the data stream number, denoted as , and a data packet time table times ( , , ), a data stream timeout table FTV ( , ), and a data packet quantity table numbers ( , , ) are established at the data sending end with representing the time when the data packet arrives at the data sending end; the queue length is counted in data packets and denoted as . It should be noted that the length recorded here is the total length of all data streams in the queue, rather than the total length of a certain data stream in the queue; represents the actual number of data packets marked as congested data packets at the data sending end; and are statistically counted every other RTT.

[0101] The above formula for calculating the timeout value shows that if the queue growth gradient index is large and the congestion index is high, then the two have a significant impact on the timeout value. The weight of the attenuation ratio is greater, and the timeout value The decay speed is faster. On the contrary, if the queue growth gradient index is small and the congestion index is small, it may mean that the data sender has encountered an instantaneous incast. The data sender can absorb and restore the original state in a short time. Therefore, the frequency of rerouting can be temporarily suspended for non-congested data flows, especially short flows, so that they can maintain efficient and stable transmission on the original path. The timeout value curve of adaptive adjustment is as follows: Figure 2 As shown in the figure, the horizontal axis represents the time at every round-trip delay (RTT), and the vertical axis represents the timeout value FTV at every round-trip delay (RTT). The upper and lower limits of the threshold and the benchmark value are marked. The dots represent the changes in FTV values ​​under this scheme, and the square dots represent the changes in FTV values ​​in the existing scheme.

[0102] It is worth mentioning that adjusting the timeout value according to the status of the data packets in the data sending queue can improve the real-time and accuracy of the timeout value. Rerouting the data packets according to the accurate timeout value can improve the rationality of data packet distribution, thereby improving the overall throughput of the data sending end and effectively improving the rationality of load balancing.

[0103] In addition, the method can quickly reduce the timeout value of the data sending queue, so that the congested data sending queue can quickly obtain the rerouting opportunity. At the same time, it can ensure the basic stability of the timeout value of the high-speed non-congested data sending queue, so that the non-congested data sending queue can quickly complete the transmission on the current path, thereby improving the overall transmission efficiency.

[0104] The following is an exemplary description of the load balancing device based on adaptive adjustment provided by the present application.

[0105] like Figure 3 As shown, the embodiment of the present application provides a load balancing device based on adaptive adjustment, and the load balancing device based on adaptive adjustment 300 includes:

[0106] The acquisition module 301 is used to acquire the arrival time of the target data packet at the data transmission queue of the data transmission end at the current moment, and acquire the arrival time of each other data packet in the data transmission queue;

[0107] The calculation module 302 is used to calculate the time difference between the arrival time of the previous data packet of the target data packet in the data transmission queue and the arrival time of the target data packet;

[0108] The rerouting module 303 is configured to reroute the target data packet to another data sending queue of the data sending end when the time difference is greater than the timeout value of the previous moment of the current moment; the timeout value is used to describe the congestion status of the data sending queue;

[0109] The adaptive adjustment module 304 is configured to adaptively adjust the timeout value according to all the data packets in the data sending queue to obtain the timeout value of the current moment when the time difference is less than or equal to the timeout value of the previous moment of the current moment; when the next moment of the current moment arrives, perform load balancing according to the timeout value of the current moment.

[0110] It should be noted that, for the information interaction, execution process, etc. between the above-mentioned device / units, since they are based on the same concept as the method embodiments of the present application, for their specific functions and the technical effects brought, reference can be specifically made to the method embodiment part, and details are not described herein again.

[0111] Those skilled in the art can clearly understand that, for the convenience and conciseness of description, only the above-mentioned division of each functional unit and module is used as an example for illustration. In practical applications, the above-mentioned functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of the present application. The specific working process of the units and modules in the above system can refer to the corresponding process in the foregoing method embodiments, and details are not described herein again.

[0112] As Figure 4 shown, an embodiment of the present application provides a terminal device. The terminal device D10 in this embodiment includes: at least one processor D100 ( Figure 4 only one processor is shown in the figure), a memory D101, and a computer program D102 stored in the memory D101 and executable on the at least one processor D100. When the processor D100 executes the computer program D102, the steps in any of the above method embodiments are implemented.

[0113] Specifically, when the processor D100 executes the computer program D102, it obtains the arrival time of the target data packet at the data sending queue of the data sending end at the current moment, and obtains the arrival time of each other data packet in the data sending queue. Then it calculates the time difference between the arrival time of the previous data packet of the target data packet in the data sending queue and the arrival time of the target data packet. Then, when the time difference is greater than the timeout value of the previous moment of the current moment, it reroutes the target data packet to another data sending queue of the data sending end. When the time difference is less than or equal to the timeout value of the previous moment of the current moment, it adaptively adjusts the timeout value according to all the data packets in the data sending queue to obtain the timeout value at the current moment. Among them, adjusting the timeout value according to the status of the data packets in the data sending queue can improve the timeliness and accuracy of the timeout value. Rerouting the data packets according to the accurate timeout value can improve the rationality of data packet allocation, thereby improving the overall throughput of the data sending end and effectively improving the rationality of load balancing.

[0114] The so-called processor D100 may be a central processing unit (CPU, Central Processing Unit), and this processor D100 may also be other general-purpose processors, digital signal processors (DSP, Digital Signal Processor), application specific integrated circuits (ASIC, Application Specific Integrated Circuit), off-the-shelf programmable gate arrays (FPGA, Field-Programmable Gate Array), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or this processor may also be any conventional processor, etc.

[0115] In some embodiments, the memory D101 may be an internal storage unit of the terminal device D10, such as the hard disk or memory of the terminal device D10. In some other embodiments, the memory D101 may also be an external storage device of the terminal device D10, such as a plug-in hard disk equipped on the terminal device D10, a smart media card (SMC, SmartMedia Card), a secure digital (SD, Secure Digital) card, a flash card (Flash Card), etc. Further, the memory D101 may also include both the internal storage unit of the terminal device D10 and the external storage device. The memory D101 is used to store an operating system, application programs, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program, etc. The memory D101 may also be used to temporarily store data that has been output or will be output.

[0116] The embodiments of the present application also provide a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0117] The embodiments of the present application provide a computer program product, and when the computer program product runs on a terminal device, the terminal device can implement the steps in the above-mentioned method embodiments when executed.

[0118] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the method embodiments of the present application can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can at least include: any entity or device capable of carrying the computer program code to the load balancing method device / terminal device based on adaptive adjustment, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disc, etc.

[0119] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For the parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0120] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0121] The above is the preferred embodiment of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.

Claims

1. A load balancing method based on adaptive adjustment, characterized in that: include: Obtaining the arrival time of the target data packet at the data transmission queue of the data transmission end at the current moment, and obtaining the arrival time of each other data packet in the data transmission queue; Calculate the time difference between the arrival time of the previous data packet of the target data packet in the data transmission queue and the arrival time of the target data packet; When the time difference is greater than the timeout value of the previous moment of the current moment, the target data packet is rerouted to other data transmission queues of the data transmission end; the timeout value is used to describe the congestion status of the data transmission queue; When the time difference is less than or equal to the timeout value of the previous moment of the current moment, the timeout value is adaptively adjusted according to all the data packets in the data transmission queue to obtain the timeout value of the current moment; when the next moment of the current moment arrives, load balancing is performed according to the timeout value of the current moment; The step of adaptively adjusting the timeout value according to all the data packets in the data transmission queue to obtain the timeout value at the current moment includes: Calculate the length change value of all data sending queues of the data sending end; Calculate the queue growth gradient index according to the length change value; For At each moment of time, if at a moment, the number of data packets in the data transmission queue where the target data packet is located Greater than the queue congestion threshold , then the data is sent to the queue All packets are regarded as congested packets; The moment is the current moment; Calculate the congestion index of the data transmission queue based on the congested data packets corresponding to all times; The timeout value at the current moment is calculated according to the queue growth gradient index and the congestion index.

2. The load balancing method according to claim 1, characterized in that: The calculating the length change value of all data sending queues of the data sending end includes: By formula: Calculate the length change ; in, represents the number of data sending queues of the data sending end, Indicated in The receiving rate of the data sending queue at a certain moment, Indicated in The sending rate of the data sending queue at a certain moment.

3. The load balancing method according to claim 2, characterized in that: The calculating the queue growth gradient index according to the length change value includes: By formula: Calculate the queue growth gradient index ; in, Indicates the maximum queue length.

4. The load balancing method according to claim 3, characterized in that: The calculating the congestion index of the data transmission queue based on the congested data packets corresponding to all times includes: By formula: ; Calculate the congestion index of the data sending queue ; in, Indicates the mean number of congested packets at the current moment, Indicates the average number of congested packets at the previous moment of the current moment, represents the weight, Indicates the number of congested data packets in the data transmission queue at the current moment, Indicates the total number of data packets in the data sending queue at the current moment.

5. The load balancing method according to claim 4, characterized in that: The calculating the timeout value at the current moment according to the queue growth gradient index and the congestion index includes: By formula: Calculate the timeout value at the current moment ; in, Indicates the initial timeout value, represents the coefficient, Indicates the round-trip latency of the data sending queue.

6. The load balancing method according to claim 1, characterized in that: After the step of rerouting the target data packet to other data transmission queues of the data transmission end when the time difference is greater than the timeout value of the previous moment of the current moment, the load balancing method further includes: Set the current timeout value as the initial timeout value.

7. A load balancing device based on adaptive adjustment, characterized in that: include: An acquisition module, used to acquire the arrival time of the target data packet at the data transmission queue of the data transmission end at the current moment, and acquire the arrival time of each other data packet in the data transmission queue; A calculation module, used for calculating the time difference between the arrival time of the previous data packet of the target data packet in the data transmission queue and the arrival time of the target data packet; A rerouting module, used for rerouting the target data packet to other data transmission queues of the data transmission end when the time difference is greater than the timeout value of the previous moment of the current moment; the timeout value is used to describe the congestion status of the data transmission queue; An adaptive adjustment module, for adaptively adjusting the timeout value according to all the data packets in the data transmission queue to obtain the timeout value at the current moment when the time difference is less than or equal to the timeout value at the previous moment of the current moment; and performing load balancing according to the timeout value at the current moment when the next moment of the current moment arrives; The adaptive adjustment module is specifically used to implement: Calculate the length change value of all data sending queues of the data sending end; Calculate the queue growth gradient index according to the length change value; For At each moment of time, if at a moment, the number of data packets in the data transmission queue where the target data packet is located Greater than the queue congestion threshold , then the data is sent to the queue All packets are regarded as congested packets; The moment is the current moment; Calculate the congestion index of the data transmission queue based on the congested data packets corresponding to all times; The timeout value at the current moment is calculated according to the queue growth gradient index and the congestion index.

8. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the load balancing method based on adaptive adjustment as described in any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the load balancing method based on adaptive adjustment as described in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Load balancing method applied to data center network and capable of adaptively adjusting flolowlet interval

    CN118368250A