Network rate control method, device, chip, network interface card, computer equipment, readable storage medium and program product
By adjusting the network rate control method through the concave function law, the problems of low bandwidth utilization and jitter in traditional congestion control algorithms are solved, more efficient bandwidth utilization and fairness are achieved, and the number of congestion triggers is reduced.
Patent Information
- Application Number
- CN202510281448.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2045-03-11
AI Technical Summary
Traditional TCP Reno and DCQCN congestion control algorithms grow slowly when away from congestion, have low bandwidth utilization, and are prone to sudden congestion and bandwidth jitter, which has bandwidth fairness problems.
The network rate control method is used to adjust the concave function law. The network rate changes follow the concave function law. The curve grows fast first and then slow. The speed rises fast when away from congestion and slow when approaching congestion. By determining the relationship between the current network rate and the target network rate as the concave function, the network rate is adjusted to improve bandwidth utilization.
It improves bandwidth utilization, reduces bandwidth jitter, improves bandwidth fairness and flow rate convergence efficiency, supports the rapid convergence of flow rate to the fair bandwidth upper limit, and reduces the number of bandwidth jitter and congestion triggers.
Smart Images

Figure CN119788620B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a network rate control method, apparatus, chip, network interface card, computer equipment, computer-readable storage medium, and computer program product. Background Art
[0002] The primary purpose of a congestion control algorithm is to manage network traffic, prevent congestion, and ensure efficient data packet transmission. By adjusting the transmission rate, congestion control algorithms can avoid wasting network resources, reduce packet loss and latency, and improve overall network throughput and stability, thereby ensuring quality of service.
[0003] Traditional technologies, such as TCP Reno (Transmission Control Protocol Reno) and DCQCN (Data Center Quantized Congestion Notification), use convex functions (TCP slow start process, DCQCN BC event-based speed-up process) or linear functions (TCP congestion avoidance process, DCQCN T event-based speed-up process) to accelerate their speed-up curves. Their main characteristic is that they start slow and then accelerate (slow-rate flows have a small speed-up, while high-rate flows have a large speed-up).
[0004] However, the speed-up curves based on convex functions and linear functions have a small increase in rate / window at low rates far from congestion, and require multiple rounds to reach the target value close to congestion. In non-congested conditions, the bandwidth increases slowly and the bandwidth utilization is low. Summary of the Invention
[0005] Based on this, it is necessary to provide a network rate control method, device, chip, network interface card, computer equipment, computer-readable storage medium and computer program product that can improve broadband utilization in response to the above technical problems.
[0006] In a first aspect, the present application provides a network rate control method, the method comprising:
[0007] Determine the current network speed;
[0008] Determine a target network rate based on the current network rate, wherein the relationship between the target network rate and the rate increase round is a concave function;
[0009] Adjust the current network rate to the target network rate.
[0010] In one embodiment, determining the target network rate based on the current network rate includes:
[0011] determining a rate increase based on the current network rate, wherein the rate increase decreases as the current network rate increases, and the current network rate increases as the number of rate increase rounds increases;
[0012] The target network rate is determined based on the current network rate and the rate increase; wherein, when the number of rate increase rounds is less, the current network rate is lower and the target network rate increases faster; and when the number of rate increase rounds is more, the current network rate is higher and the target network rate increases slower.
[0013] In one embodiment, determining the rate increase based on the current network rate includes:
[0014] Get the preset single-cycle increment size and the upper limit of the single rate increment;
[0015] Determine the network card line speed and bottleneck bandwidth;
[0016] Determining the range of each rate increase based on the preset single-cycle increase size and the upper limit of the multiple of limiting the single rate increase;
[0017] The rate increase is determined based on the network card line speed and bottleneck bandwidth, the range of each rate increase, and the current network rate.
[0018] In one embodiment, determining the rate increase based on the network card line speed or bottleneck bandwidth, the range of each rate increase, and the current network rate includes:
[0019] The rate increase is calculated based on the following formula:
[0020]
[0021] in, is the current network rate, Indicates the rate increase, L is the network card line speed and bottleneck bandwidth, and L ≥ r(n) is always true. is the target network rate, AI represents the single-cycle rate increase, and K is the upper bound of the single rate increase, where K ≥ 1.
[0022] In one embodiment, the method further comprises:
[0023] Detect whether the network speed needs to be increased;
[0024] If it is determined that the current network rate needs to be increased, continue with the step of determining the current network rate.
[0025] In one embodiment, detecting whether the network rate needs to be increased includes at least one of the following:
[0026] Obtain the time difference between the current timestamp of the message being sent and the last time-based speed-up timestamp; detect whether the time difference is greater than the speed-up time configuration threshold; if the time difference is greater than the speed-up time configuration threshold, determine that the current network rate needs to be increased; or
[0027] It is detected whether the current cumulative number of sent bytes is greater than the speed-up byte number configuration threshold. If the current cumulative number of sent bytes is greater than the speed-up byte number configuration threshold, it is determined that the current network speed needs to be increased.
[0028] In one embodiment, the method further comprises:
[0029] When the time difference is greater than the speed-up time configuration threshold, updating the last speed-up timestamp set based on time as the current timestamp;
[0030] When the current cumulative number of sent bytes is greater than the rate-increase byte number configuration threshold, resetting the current cumulative number of sent bytes;
[0031] When the current cumulative number of sent bytes is less than or equal to the rate-increase byte number configuration threshold, the current cumulative number of sent bytes is updated based on the number of bytes corresponding to the currently sent message.
[0032] In one embodiment, the method further comprises:
[0033] When a congestion notification message is received, the timestamp of the last time-based speed increase is set is set as the timestamp of the receipt of the congestion notification message, and the current accumulated number of sent bytes is reset.
[0034] In a second aspect, the present application further provides a network rate control device, the device comprising:
[0035] A current network rate determination module is used to determine the current network rate;
[0036] a target network rate determination module, configured to determine a target network rate based on the current network rate, wherein the relationship between the target network rate and the rate increase round is a concave function;
[0037] The control module is configured to adjust the current network rate to the target network rate.
[0038] In a third aspect, the present application further provides a chip comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described in any one of the above embodiments when executing the computer program.
[0039] In a fourth aspect, the present application also provides a network interface card, comprising a chip and multiple interfaces as described in any one of the above embodiments, wherein the chip processes data or communicates externally through the interfaces.
[0040] In a fifth aspect, the present application also provides a computer device, comprising the network interface card described in any one of the above embodiments, wherein the network interface card is used to process data or communicate externally.
[0041] In a sixth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any one of the above embodiments.
[0042] In a seventh aspect, the present application also provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the method described in any one of the above embodiments.
[0043] The above-mentioned network rate control method, device, chip, network interface card, computer equipment, computer-readable storage medium and computer program product determine the current network rate; determine the target network rate based on the current network rate, and the relationship between the target network rate and the rate increase round is a concave function; adjust the current network rate to the target network rate. Since the characteristic of the concave function is that the function curve is convex downward, the curve growth is fast at first and then slow: the smaller the value, the faster the growth, and the larger the value, the slower the growth. Therefore, the target network rate obtained increases quickly when it is far away from congestion and increases slowly when it is close to congestion. This can enable the flow rate to be maintained in an interval close to the congestion bottleneck bandwidth without triggering for a longer period of time, and the bandwidth utilization is higher. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.
[0045] Figure 1 This is a schematic diagram of the typical TCP congestion control algorithm Reno congestion window change process;
[0046] Figure 2 Schematic diagram of the rate change process of the DCQCN algorithm;
[0047] Figure 3 A schematic diagram of an application environment of a network rate control method according to an embodiment;
[0048] Figure 4 1 is a flow chart of a network rate control method according to an embodiment;
[0049] Figure 5 Schematic diagram of a comparison between a rate increase function in a network rate control method of the present application and DCQCN and TCP rate increase functions in one embodiment;
[0050] Figure 6 A schematic diagram showing the comparison of bandwidth changes between the algorithm of this application and DCQCN and TCP;
[0051] Figure 7 1 is a flow chart of a network rate control method according to another embodiment;
[0052] Figure 8 is a schematic block diagram of the structure of a network rate control device in one embodiment;
[0053] Figure 9 Schematic diagram of the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0055] In traditional technologies, whether it is the TCP (Transmission Control Protocol) protocol or RDMA (Remote Direct Memory Access) technology, the mainstream congestion control algorithms are based on the AIMD (additive increase, multiplicative decrease) mechanism.
[0056] TCP CC (Congestion Control), such as the Reno algorithm, consists of four main stages: slow start, congestion avoidance, and congestion signal processing (including timeout retransmission, fast retransmission, and fast recovery). Figure 1 As shown, Figure 1 Schematic diagram of a typical TCP congestion control algorithm Reno congestion window change process, wherein the TCP congestion control algorithm Reno congestion window change process includes:
[0057] Slow start: The primary purpose of slow start is to gradually detect available network bandwidth during the initial connection establishment phase, thereby preventing sudden congestion. When a TCP connection begins transmitting data, the initial congestion window (cwnd) is typically set to a small value, such as one or two maximum segment sizes (MSS). Each time an acknowledgment (ACK) packet is received, the congestion window increases by 1 MSS. This means that the congestion window size doubles with each round (each round is considered a round-trip time (RTT). The round-trip delay represents the total delay from the sender sending data to the receiver receiving the acknowledgment), i.e., cwnd = 2*cwnd. This exponential growth continues until packet loss occurs (indicating network congestion) or a pre-set threshold, called the slow start threshold (ssthresh), is reached. Because the window size increases exponentially, the slow start phase can quickly reach the network's maximum transmission capacity, but it can also be too rapid, leading to network congestion.
[0058] Congestion Avoidance: After reaching the slow start threshold (ssthresh), TCP enters the congestion avoidance phase, gradually increasing the sending rate to prevent network congestion. When cwnd reaches or exceeds the slow start threshold, the congestion window growth rate changes from exponential to linear. Specifically, with each ACK received, the congestion window increases by only MSS / cwnd. At the end of each round (RTT), the congestion window increases by approximately one MSS, i.e., cwnd = cwnd + MSS. This linear growth rate allows for a more gradual detection of available network bandwidth, reducing the risk of congestion. The congestion avoidance phase's growth rate is much slower than slow start, making it more robust and helping maintain network stability.
[0059] Congestion signal processing: timeout retransmission, fast retransmission and fast recovery. TCP mainly detects network congestion through packet loss events and takes corresponding measures. Timeout Retransmission: If a data packet does not receive an ACK within a certain period of time, TCP assumes that the data packet is lost. At this time, TCP will set the slow start threshold (ssthresh) to half of the current window size and reset the congestion window (cwnd) to the initial value (usually 1MSS), that is, cwnd=MSS, and then enter the slow start phase. Fast Retransmit: When TCP receives three consecutive duplicate ACKs (usually indicating that a data packet is lost but the subsequent packet arrives successfully), it will immediately retransmit the lost data packet instead of waiting for a timeout. This mechanism speeds up the recovery process of packet loss. Fast Recovery: After fast retransmission, TCP will not directly enter the slow start phase, but will enter the fast recovery phase. At this point, TCP sets the slow start threshold (ssthresh) to half the current congestion window (ssthresh = cwnd / 2). It also sets the congestion window to the slow start threshold plus three MSSs (because three duplicate ACKs have been received). After fast recovery completes, the congestion window is set back to the slow start threshold, meaning cwnd = ssthresh. TCP then enters the congestion avoidance phase instead of slow start. This ensures a rapid return to the pre-packet loss transmission rate, avoiding unnecessary slowdowns. Fast retransmit and recovery effectively reduce delays caused by waiting for timeout retransmissions, improving network transmission efficiency and overall performance.
[0060] Figure 2This is the rate change process of the DCQCN algorithm. DCQCN (Data Center Quantized Congestion Notification) is a congestion control algorithm for data center networks (such as RDMA networks). It combines the principles of AIMD with a feedback mechanism based on ECN (Explicit Congestion Notification). In DCQCN, the sender determines network congestion based on the received ECN marking. When there is no ECN marking, the sender increases the sending rate linearly (i.e., additively) using the AIMD method. When an ECN marking is received, the sender reduces the sending rate multiplicatively, typically at a more gradual rate rather than halving it. The speed-up judgment of DCQCN and the speed-up mode it is in depend on the following three factors: (1) whether the T event occurs, that is, whether the CNP message is not received within the timer (T event time period parameter), if it occurs, the T value is increased by 1; (2) whether the BC event occurs, that is, whether more than ByteCounter bytes are sent without receiving the CNP message, if it occurs, the BC value is increased by 1; (3) the numerical relationship between the T value, the BC value and the speed-up state threshold value F. If the larger value between the T value and the BC value is greater than 0 and less than F, the fast recovery speed-up algorithm is executed: r c =(r c +r t ) / 2, where r c is the current rate, r t is the target rate; if the larger value between T and BC is greater than or equal to F, and the smaller value is less than or equal to F, the active speed increase algorithm is executed: r t =r t +AI,r c =(r c +r t ) / 2, where AI is the statically configured single rate increase; if the smaller value between T and BC is greater than F, the excess active rate increase algorithm is executed: r t =r t +HAI,r c =(r c +r t ) / 2, where HAI is the statically configured single rate increase, and HAI>AI.
[0061] The speed-up curves of the AIMD congestion control methods mentioned above, such as TCP Reno and DCQCN, are convex functions (TCP slow start process, DCQCN speed-up process based on BC events) or linear functions (TCP congestion avoidance process, DCQCN speed-up process based on T events). Their main feature is that they start slow and then speed up (slow-rate flows have a small speed-up, while high-rate flows have a large speed-up).
[0062] In summary, the above AIMD congestion control method has at least the following problems:
[0063] (1) Burst congestion and bandwidth jitter: Under multi-flow conditions, the higher the single-flow rate, the more likely congestion will occur. However, the speed-up curves based on convex functions and linear functions still significantly increase the rate / window at high rates close to congestion, which can easily cause sudden congestion accumulation and jagged bandwidth jitter caused by repeated speed increases and decreases.
[0064] (2) Low bandwidth utilization: The speed-up curves based on convex functions and linear functions have a small increase in rate / window at low rates far from congestion. Multiple rounds are required to reach the target value close to congestion. In non-congested conditions, the bandwidth increases slowly and the bandwidth utilization is low.
[0065] (3) Bandwidth fairness issue: The speed-up curve based on the convex function has the characteristic of being slow at first and then fast, that is, the increase is small when the rate / window is small, and the increase is large when the rate / window is large, which can easily cause the problem of uneven bandwidth distribution or the disadvantage of long bandwidth fairness convergence time.
[0066] In order to solve the above technical problems, the present application provides a network rate control method, wherein in the network rate control method, the law followed by the network rate change is the concave function law. The characteristic of the concave function is that the function curve is convex downward, and the curve growth is fast at first and then slow: the smaller the value, the faster the growth, and the larger the value, the slower the growth. In this way, the network rate in the present application increases quickly when the network rate is slow, and increases slowly when the network rate is fast. This can maintain the flow rate in an interval close to the congestion bottleneck bandwidth without triggering for a longer period of time, and achieve higher bandwidth utilization.
[0067] The network rate control method provided in the embodiment of the present application can be applied to Figure 3 In the application environment shown, data sender 102 communicates with data receiver 104 via a network. Data sender 102 determines the current network rate; based on the current network rate, it determines a target network rate, where the relationship between the target network rate and the rate increase rounds is a concave function; the current network rate is adjusted to the target network rate. Because a concave function is characterized by a downward-convex function curve, the curve grows faster first and then slower: smaller values increase faster, while larger values increase slower. Therefore, the target network rate increases faster when away from congestion and slower when close to congestion. This allows the flow rate to remain close to the congestion bottleneck bandwidth for a longer period of time without triggering, resulting in higher bandwidth utilization.
[0068] In an exemplary embodiment, Figure 4 As shown, a network rate control method is provided, which is applied to Figure 3 Taking the data sender in the example as an example, the following steps are included from step S402 to step S406.
[0069] S402: Determine the current network rate.
[0070] The current network rate is the rate at which the data sender currently sends messages, that is, the network rate adjusted in the previous rate increase round.
[0071] S404: Determine a target network rate based on the current network rate, where the relationship between the target network rate and the rate increase round is a concave function.
[0072] S406: Adjust the current network rate to the target network rate.
[0073] A concave function is characterized by a downward-convex curve, with growth initially fast and then slowing down: smaller values increase faster, while larger values increase slower. Therefore, with fewer rate increase rounds, the network rate increases faster, while with more rate increase rounds, the network rate increases slower.
[0074] Since the network rate increases from small to large, the fewer the rate increase rounds, the slower the network rate is, and the further away from network congestion; the more the rate increase rounds, the faster the network rate is, and the closer to network congestion; and the change in network rate follows the characteristics of a concave function. Therefore, when away from congestion, the network rate increases quickly, which allows the flow rate to utilize the bandwidth faster, that is, it quickly converges to the allocable bandwidth upper limit when increasing the speed, improves bandwidth utilization, and improves bandwidth fairness, supporting the flow rate to quickly converge to the fair bandwidth upper limit; when approaching congestion, the network rate increases slowly, which allows the flow rate to remain in the range close to the congestion bottleneck bandwidth without triggering for a longer period of time, higher bandwidth utilization, and can reduce bandwidth jitter and smooth the performance change curve.
[0075] After the target network rate is determined, the current network rate is adjusted to the target network rate, and the next round of rate adjustment is performed.
[0076] The above network rate control method determines the current network rate; determines the target network rate based on the current network rate, and the relationship between the target network rate and the rate increase round is a concave function; adjusts the current network rate to the target network rate. Since the characteristic of a concave function is that the function curve is convex, the curve growth is fast at first and then slows down: the smaller the value, the faster the growth, and the larger the value, the slower the growth. Therefore, the target network rate increases quickly when it is far away from congestion and increases slowly when it is close to congestion. This can maintain the flow rate in the range close to the congestion bottleneck bandwidth without triggering for a longer period of time, and improve bandwidth utilization.
[0077] In one optional embodiment, the target network rate is determined based on the current network rate, including: determining a rate increase based on the current network rate, wherein the rate increase decreases as the current network rate increases, and the current network rate increases as the number of rate increase rounds increases; determining the target network rate based on the current network rate and the rate increase; wherein, when the number of rate increase rounds is less, the current network rate is lower, and the target network rate increases faster, and when the number of rate increase rounds is more, the current network rate is higher, and the target network rate increases slower.
[0078] The relationship between the target network rate and the number of rate increase rounds is a concave function. This means that with fewer rate increase rounds, the current network rate is lower and the target network rate increases faster. With more rate increase rounds, the current network rate is higher and the target network rate increases slower. Therefore, it can be determined that with fewer rate increase rounds, the rate increase is greater, while with more rate increase rounds, the rate increase is smaller.
[0079] Therefore, in this application, the rate increase is first determined based on the current network rate, where the rate increase decreases as the current network rate increases, and the current network rate increases as the number of rate increase rounds increases. Subsequently, the target network rate is determined based on the rate increase and the current network rate.
[0080] In one optional embodiment, determining the target network rate according to the rate increase and the current network rate may include:
[0081]
[0082] in, The current rate value or window value after the nth speed increase, that is, the target network rate, The rate value or window value after the last speed increase, that is, the current network rate. Indicates the current rate increase.
[0083] In one optional embodiment, determining the target network rate according to the rate increase and the current network rate may include:
[0084] Get the target reference network rate based on the current reference network rate and rate increase:
[0085] t(n)=t(n-1)+AI'
[0086] Determine the target network rate based on the target reference network rate and the current network rate:
[0087] r(n)=[r(n-1)+t(n)] / 2
[0088] Where t(n) is the target reference network rate, and t(n-1) is the current reference network rate. In the above embodiment, when increasing the network rate, the AI' parameter is not directly added to the current network rate r(n-1). Instead, it is added to the current reference network rate t(n-1). Then, r(n) is updated by r(n) = [r(n-1) + t(n)] / 2, where t(n) is the target reference network rate and r(n) is the target network rate.
[0089] In other embodiments, the target network rate may be determined according to the rate increase and the current network rate in other ways, which are not specifically limited here.
[0090] In one of the optional embodiments, the rate increase is determined based on the current network rate, including: obtaining a preset single-cycle increase size and an upper limit on the multiple of the single rate increase; determining the network card line speed or bottleneck bandwidth; determining the range of each rate increase based on the preset single-cycle increase size and the upper limit on the multiple of the single rate increase; determining the rate increase based on the network card line speed or bottleneck bandwidth, the range of each rate increase and the current network rate.
[0091] Among them, the rate increase is the rate increased compared to the current network rate. In order to ensure that the concave function is a bounded function, this application determines the range of each rate increase based on the pre-set single-cycle increase size and the upper limit of the multiple of limiting the single rate increase. The range is [AI, K*AI], where AI is the pre-set single-cycle increase size, K is the upper limit of the multiple of limiting the single rate increase, and K≥1. It should be noted that the target network rate must be less than or equal to the network card line speed and the bottleneck bandwidth, that is, L is the network card line speed and the bottleneck bandwidth LineRate and L≥r(n) is always true.
[0092] Therefore, the rate increase in this embodiment decreases as the current network rate increases, and on the other hand, the rate increase must meet the range of each rate increase, and the target network rate obtained must be less than or equal to the network card line speed and bottleneck bandwidth.
[0093] In one optional embodiment, determining the rate increase based on the network card line speed or bottleneck bandwidth, the range of each rate increase, and the current network rate includes:
[0094] The rate increase is calculated based on the following formula:
[0095]
[0096] in, is the current network rate, Indicates the rate increase, L is the network card line speed and bottleneck bandwidth, and L ≥ r(n) is always true. is the target network rate, AI represents the single-cycle rate increase, and K is the upper bound of the single rate increase, where K ≥ 1.
[0097] For ease of understanding, the following speed-up function is used as an example for explanation. Those skilled in the art will appreciate that the target network rate may also be determined by rate increase based on other methods.
[0098]
[0099] in The current rate value or window value after the nth speed increase, that is, the target network rate, The rate value or window value after the last speed increase, that is, the current network rate. Represents the rate increase. Specifically, L is the network card line rate and bottleneck bandwidth LineRate, and L ≥ r(n). AI represents the single-cycle rate increase in the AIMD algorithm (its value may differ from that in the TCP Reno algorithm and DCQCN algorithm). K is the upper bound of the single rate increase (based on AI), and K ≥ 1. The following relationship holds:
[0100]
[0101] Therefore, each time The speed increase and The size is inversely proportional, the minimum is AI and the maximum is K*AI.
[0102] The following recursive formula is used to Make a concave function proof:
[0103] To judge To determine the convexity and concavity of , we need to calculate the second-order difference. First, we calculate the first-order difference:
[0104]
[0105] Since L>0, AI>0, K≥1, the range of r(n) is greater than or equal to 0, it is obvious that It is a monotonically increasing function on its domain.
[0106] Then calculate the second-order difference using the scaling method:
[0107]
[0108] because The second-order difference is less than 0, so is a concave function.
[0109] For ease of understanding, combined Figure 5 and Figure 6 As shown, Figure 5 Schematic diagram of a comparison between the speed-up function in the network rate control method of the present application and the speed-up functions of DCQCN and TCP in one embodiment, wherein Figure 5 (a) is a schematic diagram comparing the concave function speed-up algorithm (the speed-up function in the network rate control method of this application) and the DCQCN convex function speed-up algorithm. Figure 5 (b) is a schematic diagram showing the comparison between the concave function speed-up algorithm (the speed-up function in the network rate control method of this application) and the TCP linear function speed-up. Figure 6 Comparison of bandwidth changes between the algorithm of this application and DCQCN and TCP, where Figure 6 (a) shows the bandwidth change of the concave function speed-up algorithm in this application. Figure 6 (b) shows the bandwidth change of the DCQCN convex function speed-up algorithm in this application. Figure 6 (c) in the figure shows the bandwidth change of the TCP linear speed-up algorithm in this application, where Figure 6 In the graph, F1 and F2 represent the changes in the normalized bandwidth / rate (relative to the bottleneck bandwidth) of the two flows causing the congestion, respectively. F1+F2 represents the sum of the normalized bandwidths of the two flows. Each point in the line graph represents the normalized rate value of the two flows in a particular round.
[0110] pass Figure 5 and Figure 6 Comparing the various speed-up functions, we can see that the concave function speed-up curve corresponding to the speed-up formula constructed in this application has the characteristics of first fast and then slow, and slow flow and fast increase. Compared with the convex function / linear function algorithm, it has the following advantages:
[0111] (1) In the same time period, the number of speed reduction triggers is less, the jitter is smaller, and the performance smoothing effect is better.
[0112] (2) When the same rounds or time increases to the same rate, the average bandwidth is higher and the bandwidth utilization is high.
[0113] (3) The time / rounds required to converge to a fair allocation of bandwidth are shorter, and the convergence efficiency is higher.
[0114] In one of the optional embodiments, the method further includes: detecting whether the network rate needs to be increased; and if it is determined that the current network rate needs to be increased, continuing to perform the step of determining the current network rate.
[0115] Whether the network rate needs to be increased is determined based on whether a congestion notification packet (CNP) is received. If a congestion notification packet is received, the speed must be reduced. If no congestion notification packet is received, the speed must be increased. Whether a speed increase is required can be determined by checking at least one of the time setting and the number of bytes sent.
[0116] In one of the optional embodiments, detecting whether the network rate needs to be increased includes at least one of the following: obtaining the time difference between the current timestamp of the message sent this time and the time stamp of the last speed-up setting based on time; detecting whether the time difference is greater than the speed-up time configuration threshold; if the time difference is greater than the speed-up time configuration threshold, determining that the current network rate needs to be increased; or detecting whether the current cumulative number of bytes sent is greater than the speed-up byte number configuration threshold, and if the current cumulative number of bytes sent is greater than the speed-up byte number configuration threshold, determining that the current network speed needs to be increased.
[0117] The time setting check may include executing the speed increase logic if the current timestamp (cur_timestamp) minus the last speed increase timestamp (last_t_increase_timestamp) based on the time setting is greater than the speed increase time configuration threshold (T_thr).
[0118] The check on the number of bytes sent may include executing the rate increase logic if the current cumulative number of bytes sent (bytes_sent) is greater than the rate increase byte number configuration threshold (B_thr).
[0119] In some optional embodiments, the aforementioned checking of the time setting and the setting of the number of bytes to be sent may be sequential. Specifically, after sending a message (assuming the number of bytes to be sent is cur_sent), the data sender first checks the time setting to determine whether to enter the speed-up processing logic. If the current timestamp (cur_timestamp) minus the last time-based speed-up timestamp (last_t_increase_timestamp) is greater than the speed-up time configuration threshold (T_thr), the speed-up logic is executed; otherwise, the speed-up logic is not executed.
[0120] The data sender then checks the number of bytes sent to determine whether to enter the speed-up process. If the current cumulative number of bytes sent (bytes_sent) is greater than the speed-up byte count threshold (B_thr), the speed-up process is executed.
[0121] In one of the optional embodiments, the method also includes: when the time difference is greater than the speed-up time configuration threshold, updating the last time-based speed-up timestamp to the current timestamp; when the current cumulative number of sent bytes is greater than the speed-up byte configuration threshold, resetting the current cumulative number of sent bytes; when the current cumulative number of sent bytes is less than or equal to the speed-up byte configuration threshold, updating the current cumulative number of sent bytes based on the number of bytes corresponding to the message sent this time.
[0122] Among them, in order to ensure that the judgment of whether to execute the speed-up logic in each round is accurate, when the current timestamp (cur_timestamp) minus the last time-based speed-up timestamp (last_t_increase_timestamp) is greater than the speed-up time configuration threshold (T_thr), the last_t_increase_timestamp is also updated to the current timestamp, that is, the last time-based speed-up timestamp is updated to the current timestamp.
[0123] When the current cumulative number of sent bytes is greater than the rate-increasing byte count configuration threshold, the current cumulative number of sent bytes is reset, that is, the current cumulative number of sent bytes is reset to 0.
[0124] If the current cumulative number of sent bytes is less than or equal to the rate-increasing byte count threshold, the current cumulative number of sent bytes is updated based on the number of bytes corresponding to the currently sent message, that is, the current cumulative number of sent bytes is updated to bytes_sent = bytes_sent + cur_sent.
[0125] Specifically, combined Figure 7 As shown, Figure 7 This is a flow chart of a network rate control method in another embodiment. In this embodiment, the data sender (sender) sends a cur_sent byte message, and then determines whether the current timestamp (cur_timestamp) minus the last time-based speed increase timestamp (last_t_increase_timestamp) is greater than the speed increase time configuration threshold (T_thr). If so, the speed increase logic is executed and the last_t_increase_timestamp is updated to the current timestamp; otherwise, the speed increase logic is not executed.
[0126] The sender then checks the sent bytes setting to determine whether to enter the rate-up process. If the current cumulative sent bytes (bytes_sent) is greater than the rate-up byte count threshold (B_thr), the rate-up process is executed and the current cumulative sent bytes are reset to 0. Otherwise, the rate-up process is not executed and the current cumulative sent bytes are updated to bytes_sent = bytes_sent + cur_sent.
[0127] The specific speed-up processing logic executed by the sending end can be found in the network rate control method mentioned above, which will not be repeated here.
[0128] In one of the optional embodiments, the method further includes: upon receiving a congestion notification message, setting the timestamp of the last time-based speed increase to the timestamp of receiving the congestion notification message, and resetting the current accumulated number of sent bytes.
[0129] It should be noted that if the sender receives a CNP message, it needs to reset the time-based rate increase timestamp (last_t_increase_timestamp) to the current timestamp of receiving the CNP (cnp_cur_timestamp) and reset the cumulative number of bytes sent (bytes_sent) to 0.
[0130] In the above embodiment, the speed increase is slower when close to congestion than when far from congestion. Compared with the AIMD speed increase algorithm based on convex functions or linear functions, it can effectively reduce the number of congestion triggers and smooth bandwidth jitter. The speed increase is fast when far from congestion and slow when close to congestion. Compared with the AIMD speed increase algorithm based on convex functions or linear functions, the flow rate can be maintained in the range close to the congestion bottleneck bandwidth without triggering for a longer period of time, and the bandwidth utilization rate is higher. This is because it has the characteristics of slow increase for fast flows and fast increase for slow flows. Compared with the AIMD speed increase algorithm based on convex functions or linear functions, it is easier to reach the equilibrium point of the fair occupation of the total bandwidth by multiple flows, and the bandwidth fairness converges faster.
[0131] It should be understood that, although the steps in the flowcharts of the above embodiments are shown in sequence as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the flowcharts of the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily to be performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0132] Based on the same inventive concept, embodiments of the present application also provide a network rate control device for implementing the aforementioned network rate control method. The implementation solution provided by this device is similar to the implementation solution described in the aforementioned method. Therefore, the specific limitations of one or more network rate control device embodiments provided below can be found in the above-mentioned limitations of the network rate control method and will not be repeated here.
[0133] In an exemplary embodiment, Figure 8 As shown, a network rate control device is provided, comprising: a current network rate determination module 801, a target network rate determination module 802 and an adjustment module 803, wherein:
[0134] The current network rate determination module 801 is used to determine the current network rate;
[0135] A target network rate determination module 802 is configured to determine a target network rate based on a current network rate, wherein the relationship between the target network rate and the rate increase round is a concave function;
[0136] The adjustment module 803 is configured to adjust the current network rate to the target network rate.
[0137] In one of the optional embodiments, the above-mentioned target network rate determination module 802 is specifically used to determine the rate increase based on the current network rate, wherein the rate increase decreases as the current network rate increases, and the current network rate increases as the number of rate increase rounds increases; the target network rate is determined based on the current network rate and the rate increase; wherein, when the number of rate increase rounds is fewer, the current network rate is lower, and the target network rate increases faster, and when the number of rate increase rounds is more, the current network rate is higher, and the target network rate increases slower.
[0138] In one of the optional embodiments, the above-mentioned target network rate determination module 802 is specifically used to obtain a preset single-cycle increase size and an upper limit on the multiple of limiting the single rate increase; determine the network card line speed and bottleneck bandwidth; determine the range of each rate increase based on the preset single-cycle increase size and the upper limit on the multiple of limiting the single rate increase; determine the rate increase based on the network card line speed and bottleneck bandwidth, the range of each rate increase and the current network rate.
[0139] In one optional embodiment, the target network rate determination module 802 is specifically configured to calculate the rate increase based on the following formula:
[0140]
[0141] in, is the current network rate, Indicates the rate increase, L is the network card line speed and bottleneck bandwidth, and L ≥ r(n) is always true. is the target network rate, AI represents the single-cycle rate increase, and K is the upper bound of the single rate increase, where K ≥ 1.
[0142] In one of the optional embodiments, the above-mentioned device further includes: a detection module for detecting whether the network rate needs to be increased; if it is determined that the current network rate needs to be increased, continuing to perform the step of determining the current network rate.
[0143] In one of the optional embodiments, the above-mentioned detection module is specifically used to determine whether the network rate needs to be increased based on at least one of the following: obtaining the time difference between the current timestamp of the message sent this time and the time stamp of the last speed-up setting based on time; detecting whether the time difference is greater than the speed-up time configuration threshold; when the time difference is greater than the speed-up time configuration threshold, determining that the current network rate needs to be increased; or detecting whether the current cumulative number of bytes sent is greater than the speed-up byte number configuration threshold, and when the current cumulative number of bytes sent is greater than the speed-up byte number configuration threshold, determining that the current network speed needs to be increased.
[0144] In one of the optional embodiments, the above-mentioned device also includes: a first parameter update module, which is used to update the last time-based speed-up timestamp to the current timestamp when the time difference is greater than the speed-up time configuration threshold; reset the current cumulative number of sent bytes when the current cumulative number of sent bytes is greater than the speed-up byte configuration threshold; and update the current cumulative number of sent bytes based on the number of bytes corresponding to the message sent this time when the current cumulative number of sent bytes is less than or equal to the speed-up byte configuration threshold.
[0145] In one of the optional embodiments, the above-mentioned device also includes: a second parameter updating module, which is used to set the last time-based speed increase timestamp to the timestamp of receiving the congestion notification message when a congestion notification message is received, and reset the current accumulated number of bytes sent.
[0146] Each module in the aforementioned network rate control device may be implemented in whole or in part through software, hardware, or a combination thereof. Each module may be embedded in or independent of a processor in a computer device in the form of hardware, or may be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0147] This application also provides a chip including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described in any of the above embodiments. The chip can be a data processing unit (DPU) chip or other chip for processing data.
[0148] The present application also provides a network interface card, comprising a chip and multiple interfaces as described in any of the above embodiments, wherein the interface may include a PCI / PCIE interface, an I / O interface such as UART / USB / I2C / SPI / GPIO, etc., and the chip processes data or communicates externally through the interface.
[0149] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 9 As shown. The computer device includes a processor, memory, an input / output interface, a network interface card, a display unit, and an input device. The processor, memory, and input / output interface are connected via a system bus, and the network interface card, display unit, and input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The network interface card of the computer device is used to process data or communicate with external terminals via wired or wireless means. The wireless means can be implemented via Wi-Fi, a mobile cellular network, near field communication (NFC), or other technologies. When executed by the processor, the computer program implements a network rate control method. The display unit of the computer device is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse.
[0150] Those skilled in the art will understand that Figure 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0151] In an exemplary embodiment, the computer device described in the above embodiment may be as follows: Figure 3 The data sender or data receiver is shown.
[0152] In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.
[0153] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0154] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0155] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0156] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), quantum computing-based data processing logic devices, artificial intelligence (AI) processors, and the like.
[0157] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0158] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A network rate control method, characterized in that: The method comprises: Determine the current network speed; Determine a target network rate based on the current network rate, wherein the relationship between the target network rate and the rate increase round is a concave function; Adjust the current network rate to the target network rate; Determining the target network rate based on the current network rate includes calculating a rate increase based on the following formula: in, is the current network rate, Indicates the rate increase, L is the network card line speed and bottleneck bandwidth, and L ≥ r(n) is always true. is the target network rate, AI represents the single-cycle rate increase, and K is the upper bound of the single rate increase, where K ≥ 1. A target network rate is determined based on the current network rate and the rate increase.
2. The method according to claim 1, characterized in that The rate increase decreases as the current network rate increases, and the current network rate increases as the number of rate increase rounds increases; When the number of rate increase rounds is less, the current network rate is lower and the target network rate increases faster. When the number of rate increase rounds is more, the current network rate is higher and the target network rate increases slower.
3. The method according to claim 1 or 2, characterized in that The method further comprises: Detect whether the network speed needs to be increased; If it is determined that the current network rate needs to be increased, continue with the step of determining the current network rate.
4. The method according to claim 3, characterized in that Detecting whether the network rate needs to be increased includes at least one of the following: Obtain the time difference between the current timestamp of the currently sent message and the timestamp of the last speed-up setting based on time; detect whether the time difference is greater than the speed-up time configuration threshold; if the time difference is greater than the speed-up time configuration threshold, determine that the current network rate needs to be increased; or It is detected whether the current cumulative number of sent bytes is greater than the speed-up byte number configuration threshold. If the current cumulative number of sent bytes is greater than the speed-up byte number configuration threshold, it is determined that the current network speed needs to be increased.
5. The method according to claim 4, characterized in that The method further comprises: When the time difference is greater than the speed-up time configuration threshold, updating the last speed-up timestamp set based on time as the current timestamp; When the current cumulative number of sent bytes is greater than the rate-increase byte number configuration threshold, resetting the current cumulative number of sent bytes; When the current cumulative number of sent bytes is less than or equal to the rate-increase byte number configuration threshold, the current cumulative number of sent bytes is updated based on the number of bytes corresponding to the currently sent message.
6. The method according to claim 4, characterized in that The method further comprises: When a congestion notification message is received, the timestamp of the last time-based speed increase is set is set as the timestamp of the receipt of the congestion notification message, and the current accumulated number of sent bytes is reset.
7. A network rate control device, characterized in that: The device comprises: A current network rate determination module is used to determine the current network rate; a target network rate determination module, configured to determine a target network rate based on the current network rate, wherein the relationship between the target network rate and the rate increase round is a concave function; A control module, configured to adjust the current network rate to the target network rate; The target network rate determination module is specifically configured to calculate the rate increase based on the following formula: in, is the current network rate, Indicates the rate increase, L is the network card line speed and bottleneck bandwidth, and L ≥ r(n) is always true. is the target network rate, AI represents the single-cycle increase size, K is the upper limit of the multiple limiting the single rate increase, K≥1, and the target network rate is determined based on the current network rate and the rate increase.
8. A chip comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A network interface card, characterized in that: The device comprises the chip as claimed in claim 8 and a plurality of interfaces, wherein the chip processes data or communicates externally through the interfaces.
10. A computer device, characterized in that: The network interface card according to claim 9 is used for processing data or external communication.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
12. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.