Network rate control method and device, chip, network interface card, computer device, readable storage medium and program product
By adjusting the rate control method according to the congestion contribution ratio of each flow, the problems of low bandwidth utilization and poor fairness under multi-flow conditions are solved, achieving more efficient bandwidth utilization and faster convergence speed.
Patent Information
- Application Number
- CN202510602307.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-12
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2045-05-12
AI Technical Summary
Under multi-flow conditions, the multiplicative rate reduction of different rate flows in traditional congestion control algorithms uses the same coefficient, resulting in low bandwidth utilization, slow convergence, large bandwidth waste, and poor bandwidth fairness.
By calculating the congestion contribution ratio of different flows, it is determined that the flow with a high speed will slow down more significantly, while the flow with a low speed will slow down less significantly. The network speed can be adjusted to reduce bandwidth waste and improve utilization.
It improved bandwidth utilization, shortened convergence time, and enhanced bandwidth fairness and stability.
Smart Images

Figure CN120186091B_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] In traditional technologies, when receiving an ECN (Explicit Congestion Notification) marker or a CNP (Congestion Notification Packet), the sender will multiplicatively reduce the sending rate, usually at a more gradual rate rather than directly halving it. The formula is r_c = r_c × (1–α / 2), where α is a quantification of the current flow congestion state and ranges from 0 to 1, with a maximum rate reduction of half.
[0004] However, under multi-flow conditions, when a congestion signal is received, the multiplicative rate reduction of different rate flows uses the same coefficient. In this case, there is a large waste of bandwidth and low utilization in the speed increase interval from the speed reduction to the full bandwidth. 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 bandwidth 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] Determining a target speed reduction coefficient based on the current network rate, wherein the target speed reduction coefficient decreases as the current network rate decreases;
[0009] Determine a first target network rate based on the current network rate and the target speed reduction factor;
[0010] The current network rate is adjusted to a first target network rate.
[0011] In one embodiment, determining a target speed reduction coefficient based on the current network rate includes:
[0012] Determining an extended speed reduction coefficient based on the network card line speed or bottleneck bandwidth and the current network rate, wherein the extended speed reduction coefficient decreases as the current network rate decreases;
[0013] A target deceleration coefficient is determined based on the extended deceleration coefficient and the basic deceleration coefficient.
[0014] In one embodiment, determining the extended speed reduction coefficient based on the network card line speed or bottleneck bandwidth and the current network rate includes:
[0015] The extended speed reduction coefficient is obtained based on the following formula:
[0016]
[0017] in, is the network speed after the last round of speed reduction, that is, the current network speed. is the extended speed reduction coefficient, L is the network card line speed or bottleneck bandwidth, k is the extended speed reduction order, and k ≥ 0; or
[0018] The extended speed reduction coefficient is obtained based on the following formula:
[0019]
[0020] in, The value is in the interval [0,1] and is used to limit the minimum expansion speed reduction range.
[0021] In one embodiment, the method further comprises:
[0022] Check whether the cumulative speed reduction rounds are less than the round threshold;
[0023] If the cumulative number of speed reduction rounds is less than the round threshold, continue to perform the step of determining the current network rate;
[0024] When the cumulative number of speed reduction rounds is greater than or equal to the round threshold, obtaining a second target network rate based on the current network rate and a basic speed reduction coefficient;
[0025] The current network rate is adjusted to a second target network rate.
[0026] In one embodiment, the method further comprises:
[0027] Receive congestion notification messages;
[0028] Determine a time difference between a current timestamp of receiving the congestion notification message and a timestamp of a previous speed reduction;
[0029] When the time difference is not greater than a time window threshold, filtering the congestion notification message;
[0030] When the time difference is greater than the time window threshold, the step of detecting whether the accumulated speed reduction rounds are less than the round threshold is continued.
[0031] In one embodiment, after adjusting the current network rate to the first target network rate and adjusting the current network rate to the second target network rate, the method further includes:
[0032] Update the last speed reduction timestamp and the cumulative speed reduction rounds.
[0033] In a second aspect, the present application further provides a network rate control device, the device comprising:
[0034] A current network rate determination module is used to determine the current network rate;
[0035] a target speed reduction coefficient determining module, configured to determine a target speed reduction coefficient based on the current network rate, wherein the target speed reduction coefficient decreases as the current network rate decreases;
[0036] A first target network rate determining module, configured to determine a first target network rate based on the current network rate and the target speed reduction coefficient;
[0037] The adjustment module is configured to adjust the current network rate to a first 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 performs 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 the 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 a network interface card according to any one of the above embodiments, wherein the network interface card is used for processing data or external communication.
[0041] In a sixth aspect, the present application also provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the method in any one of the above-mentioned embodiments when executed by a processor.
[0042] In a seventh aspect, the present application also provides a computer program product, comprising a computer program, which implements the steps of the method in any one of the above embodiments when executed by a processor.
[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 a target speed reduction coefficient based on the current network rate, and the target speed reduction coefficient decreases as the current network rate decreases; determine a first target network rate based on the current network rate and the target speed reduction coefficient; adjust the current network rate to the first target network rate, so that the speed of high-speed flows (fast flows) is reduced by a larger amplitude, and the speed of low-speed flows (slow flows) is reduced by a smaller amplitude, thereby reducing bandwidth waste from the time of speed reduction to reaching full bandwidth conditions and achieving higher bandwidth utilization. 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 diagram illustrating 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 A comparison chart of bandwidth changes between a standard AIMD algorithm and the network rate control method of the present application in one embodiment;
[0050] Figure 6 1 is a flow chart of a network rate control method according to another embodiment;
[0051] Figure 7 is a structural block diagram of a network rate control device in one embodiment;
[0052] Figure 8 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0053] 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.
[0054] 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.
[0055] 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:
[0056] Slow start: The primary purpose of slow start is to gradually detect available network bandwidth during the initial connection establishment phase to prevent sudden network 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, meaning the congestion window doubles with each round (R_TT), where 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.
[0057] 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 changes from exponential to linear. Specifically, with each ACK received, the congestion window increases by only MSS / cwnd. At the end of 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 sender receiving the acknowledgment from the receiver), the congestion window increases by approximately one MSS, i.e., cwnd = cwnd + MSS. This linear growth allows for a more gradual detection of available network bandwidth, reducing the risk of congestion. The congestion avoidance phase increases much more slowly than slow start, making it more robust and helping to maintain network stability.
[0058] 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 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 was lost but the subsequent packet arrived successfully), it will immediately retransmit the lost data packet instead of waiting for a timeout. This mechanism speeds up the recovery process for packet loss. Fast recovery: After a fast retransmission, TCP does not directly enter the slow start phase, but enters 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.
[0059] Figure 2The rate change process of the DCQCN algorithm is shown in Figure 2. 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) according to the AIMD method. When an ECN marking is received, the sender decreases the sending rate multiplicatively, typically at a more gradual rate rather than halving it. Here, r_c = r_c × (1–α / 2), where α is a quantified value of the current flow congestion state, ranging from 0 to 1, with a maximum rate reduction of half. The speed-up determination 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 of T and BC is greater than 0 and less than F, the fast recovery rate increase algorithm is used: r_c = (r_c + r_t) / 2, where r_c is the current rate and r_t is the target rate. If the larger of T and BC is greater than or equal to F and the smaller of T and BC is less than or equal to F, the proactive rate increase algorithm is used: r_t = r_t + AI, r_c = (r_c + r_t) / 2, where AI is the statically configured single rate increase. If the smaller of T and BC is greater than F, the excess proactive rate increase algorithm is used: r_t = r_t + HAI, r_c = (r_c + r_t) / 2, where HAI is the statically configured single rate increase, and HAI > AI.
[0060] In summary, the above AIMD congestion control method has at least the following problems:
[0061] (1) Slow convergence: Under multi-stream conditions, when a congestion signal is received, the multiplicative rate reduction of different rate flows uses the same coefficient. This leads to a long time and slow convergence when converging to the next close to full bandwidth.
[0062] (2) Low bandwidth utilization: Under multi-stream conditions, when a congestion signal is received, the multiplicative rates of different rate flows are reduced using the same coefficient. In this case, there is a large amount of bandwidth waste and low utilization in the speed increase interval from the speed reduction to the full bandwidth.
[0063] (3) Bandwidth fairness issue: Under multi-stream conditions, the initial rates of different streams may be different. When a congestion signal is received, the multiplicative rates of different rate streams are reduced using the same coefficient, which will take a long time to achieve fair bandwidth and low efficiency.
[0064] In order to solve at least one of the above technical problems, the present application proposes a network rate control method. In the case of congestion, the speed reduction range is determined by calculating the congestion contribution ratio of different flows, so that the speed reduction range of high-speed flows (fast flows) is larger, and the speed reduction range of low-speed flows (slow flows) is smaller.
[0065] 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; determines a target rate reduction factor based on the current network rate, where the target rate reduction factor decreases as the current network rate decreases; determines a first target network rate based on the current network rate and the target rate reduction factor; and adjusts the current network rate to the first target network rate. This allows higher-rate flows (fast flows) to experience a greater rate reduction, while lower-rate flows (slow flows) experience a smaller rate reduction. This reduces bandwidth waste from the time of rate reduction until full bandwidth is reached, resulting in higher bandwidth utilization.
[0066] 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 method includes the following steps S402 to S408.
[0067] S402: Determine the current network rate.
[0068] 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 reduction round or the network rate before the network rate reduction.
[0069] S404: Determine a target speed reduction coefficient based on the current network rate, where the target speed reduction coefficient decreases as the current network rate decreases.
[0070] S406: Determine a first target network rate based on the current network rate and the target speed reduction coefficient.
[0071] Among them, in order to achieve a larger speed reduction for flows with high network rates and a smaller speed reduction for flows with low network rates, the target speed reduction coefficient is determined based on the current network rate, wherein the target speed reduction coefficient decreases as the current network rate decreases, and the target speed reduction coefficient increases as the current network rate increases. In this way, the first target network rate will be slower when the current network rate decreases, and slower when the current network rate increases.
[0072] In some optional embodiments, ,in is the rate value or window value after the current nth speed reduction, that is, the first target network rate. The rate value or window value after the last speed reduction, that is, the current network rate. is the target speed reduction coefficient, and its value range is [0,1].
[0073] S408: Adjust the current network rate to the first target network rate.
[0074] After the first target network rate is determined, the current network rate is adjusted to the first target network rate, and the next round of rate adjustment is performed.
[0075] The above-mentioned network rate control method, device, computer equipment, computer-readable storage medium and computer program product determine the current network rate; determine a target speed reduction coefficient based on the current network rate, and the target speed reduction coefficient decreases as the current network rate decreases; determine a first target network rate based on the current network rate and the target speed reduction coefficient; adjust the current network rate to the first target network rate, so that the speed of high-speed flows (fast flows) is reduced by a larger margin, and the speed of low-speed flows (slow flows) is reduced by a smaller margin, thereby reducing bandwidth waste from the time of speed reduction to reaching full bandwidth conditions and achieving higher bandwidth utilization.
[0076] In one of the optional embodiments, the target speed reduction coefficient is determined based on the current network rate, including: determining the extended speed reduction coefficient based on the network card line speed or bottleneck bandwidth, the current network rate and the extended speed reduction order, wherein the extended speed reduction coefficient decreases as the current network rate decreases; determining the target speed reduction coefficient based on the extended speed reduction coefficient and the basic speed reduction coefficient.
[0077] To calculate the congestion contribution of different flows, the ideal solution is to calculate the ratio of the individual flow rates to the total bandwidth at the congested link ingress. However, from the perspective of a single flow, it is impossible to obtain the total bandwidth at the congested link ingress from a global perspective. For this reason, this application uses a normalized reference value, such as the network card line rate or bottleneck bandwidth size (assuming its value is LineRate), to replace the total bandwidth at the congested link ingress.
[0078] Determine the expansion reduction factor based on the network card line speed or bottleneck bandwidth and the current network rate.
[0079] The network card line speed, or bottleneck bandwidth, refers to the maximum data transmission rate a network card can achieve under ideal conditions. This is typically determined by the card's hardware specifications and the network environment. The line speed is the card's theoretical maximum transmission rate. In actual network transmission, data flow may be limited by various factors, preventing it from reaching the line speed. These limitations are called bottleneck bandwidth.
[0080] In some optional embodiments, the extended speed reduction coefficient is determined based on the network card line speed or bottleneck bandwidth and the current network rate, including:
[0081] The extended speed reduction coefficient is obtained based on the following formula:
[0082]
[0083] in, is the network speed after the last round of speed reduction, that is, the current network speed. is the extended speed reduction coefficient, L is the network card line speed or bottleneck bandwidth, k is the extended speed reduction order, and k ≥ 0; or
[0084] The extended speed reduction coefficient is obtained based on the following formula:
[0085]
[0086] in, The value is in the interval [0,1] and is used to limit the minimum expansion speed reduction range.
[0087] One thing that needs to be explained is that you can also choose other specific rate coupling speed reduction methods, and only the extended speed reduction coefficient of the speed reduction is needed. It is sufficient to ensure that the range of r(n) on the domain [0, L] is monotonically increasing or monotonically non-decreasing between [0, 1].
[0088] After determining the extended deceleration coefficient, determine the target deceleration coefficient based on the extended deceleration coefficient and the basic deceleration coefficient:
[0089]
[0090] in, Is the basic speed reduction coefficient, in the TCP speed reduction algorithm The value is 0.5. In the DCQCN deceleration algorithm, its value is determined by the recursive formula when it increases or decreases the speed.
[0091] After obtaining the target speed reduction coefficient, the first target network rate can be obtained based on the current network rate and the target speed reduction coefficient:
[0092]
[0093] Among them, based on the above restrictions, the following relationship holds:
[0094]
[0095] By observing the above speed reduction recursive formula, we can get the following main conclusions:
[0096] (1) The calculated expansion deceleration coefficient for a flow with a high rate is higher, and the actual deceleration coefficient is also larger.
[0097] (2) As the velocity of a flow continues to decrease, its extended deceleration coefficient gradually becomes lower, and the actual deceleration coefficient will also decrease.
[0098] See also Figure 5 , Figure 5 FIG is a comparison diagram of bandwidth changes between the standard AIMD algorithm and the network rate control method of the present application in an embodiment, wherein Figure 5 (a) shows the bandwidth change of the standard AIMD algorithm with round n. Figure 5 (b) in ~ Figure 5 (e) shows the network rate control algorithm of this application when k takes different values (such as, Figure 5 In (b), k is set to 0.5. Figure 5 In (c), k is 1. Figure 5 In (d), k is 2. Figure 5 Bandwidth changes over n rounds for k (e) (3). F1 and F2 represent the changes in the normalized bandwidth / rate (relative to the bottleneck bandwidth) of the two flows causing the congestion, respectively, and 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. Convergence to full bandwidth requires observing the sum of F1+F2. The change from the previous sum of 1.0 to the next sum of 1.0 is represented by the number of rounds elapsed.
[0099] It can be seen that under the premise of the same speed-up method, changing the speed-down algorithm can significantly change the flow bandwidth. The specific differences are summarized as follows:
[0100] (1) Compared with the standard AIMD algorithm, the network rate control algorithm of this application converges to full bandwidth in fewer rounds after multi-flow speed reduction and is more efficient. Figure 5 In (a), the standard AIMD algorithm requires nearly 25 rounds to converge to the full bandwidth after the second round of speed reduction, while the network rate control algorithm of the present application only requires close to or less than 20 rounds to converge to the full bandwidth.
[0101] (2) Compared with the standard AIMD algorithm, the network rate control algorithm of this application has less bandwidth loss and higher bandwidth utilization. For example Figure 5 The standard AIMD algorithm (a) has an average bandwidth utilization of only 74.6% within 200 rounds, while the network rate control algorithm of this application has an average bandwidth utilization of 82.2%~94.7%.
[0102] (3) Compared with the standard AIMD algorithm, the network rate control algorithm of this application has better bandwidth fairness and faster fairness convergence. Figure 5 The standard AIMD algorithm in (a) converges to the fair bandwidth after nearly 110 rounds, while the network rate control algorithm of this application only needs 70 to 90 rounds to converge to the fair bandwidth, and the bandwidth stability is higher.
[0103] In one of the optional embodiments, the above method also includes: detecting whether the cumulative number of speed reduction rounds is less than the round threshold; if the cumulative number of speed reduction rounds is less than the round threshold, continuing to execute the step of determining the current network rate; if the cumulative number of speed reduction rounds is greater than or equal to the round threshold, obtaining a second target network rate based on the current network rate and the basic speed reduction coefficient; adjusting the current network rate to the second target network rate.
[0104] In a multi-flow scenario, the fair bandwidth of each flow may be very low (for example, if there is more than one congestion among 1000 flows, the fair convergence bandwidth is LineRate / 1000), k=1, = 1, the actual speed reduction coefficient calculated by the above formula will be . In this case, congestion may not be able to achieve the goal of quickly suppressing congestion. In order to avoid this situation, the present application detects whether the cumulative speed reduction rounds are less than the round threshold. When the cumulative speed reduction rounds are less than the round threshold, the optimized speed reduction algorithm of the present application is used to obtain the first target network rate. When the cumulative speed reduction rounds are greater than or equal to the round threshold, the second target network rate is obtained based on the current network rate and the basic speed reduction coefficient, which is the normal speed reduction mode. That is to say, after observing R (where R is the round threshold, and the recommended value range is 3~5 to support fast response) consecutive speed reductions (satisfying n≥R), it can fall back to the normal speed reduction mode, that is, , to ensure rapid congestion suppression in multi-QP scenarios.
[0105] In one of the optional embodiments, the method further includes: receiving a congestion notification message; determining a time difference between a current timestamp of receiving the congestion notification message and a timestamp of a previous speed reduction; filtering the congestion notification message when the time difference is not greater than a time window threshold; and continuing to execute the step of detecting whether the cumulative number of speed reduction rounds is less than a round threshold when the time difference is greater than the time window threshold.
[0106] Among them, when the data sender receives the congestion notification message, it needs to determine whether to filter the congestion notification message based on the time setting. If the time difference is not greater than the time window threshold, the congestion notification message is filtered, otherwise the speed reduction logic is executed.
[0107] The selection of the speed reduction logic is determined based on the cumulative number of speed reduction rounds. When the cumulative number of speed reduction rounds is less than the round threshold, the optimized speed reduction logic is executed, that is, the target speed reduction coefficient is determined based on the current network rate, and the target speed reduction coefficient decreases as the current network rate decreases; the first target network rate is determined based on the current network rate and the target speed reduction coefficient; when the cumulative number of speed reduction rounds is greater than or equal to the round threshold, the basic speed reduction logic is executed, that is, the second target network rate is obtained based on the current network rate and the basic speed reduction coefficient.
[0108] In one optional embodiment, after adjusting the current network rate to the first target network rate and adjusting the current network rate to the second target network rate, the method further includes: updating the last speed reduction timestamp and the accumulated speed reduction rounds.
[0109] Among them, after adjusting the current network rate, it is necessary to update the cumulative speed reduction rounds, that is, n=n+1, and in addition, it is necessary to update the last speed reduction timestamp to the current timestamp.
[0110] For ease of understanding, combined Figure 6 As shown, Figure 6 This is a flowchart of a network rate control method in another embodiment. In this embodiment, when congestion occurs in the network, packets that have passed through the congestion point (typically a switch node) are marked with ECN CE (Congestion Experienced). The data receiver that receives the ECN CE-marked packets filters the ECN packets based on a time window setting and generates CNP packets, which are then returned to the data sender.
[0111] After receiving a CNP message, the data sender first determines whether to filter this CNP message (i.e., the speed reduction logic) based on the time window threshold (T). If the current timestamp (cur_timestamp) minus the last speed reduction timestamp (last_decrease_timestamp) is less than the time window threshold (i.e., T value), the CNP message is filtered and the speed reduction logic is not executed. Otherwise, the subsequent speed reduction process is carried out normally.
[0112] When performing a speed reduction, the data sender must first determine which speed reduction mode to use. If the cumulative number of consecutive speed reductions, n, is less than R, the optimized speed reduction mode is selected; otherwise, the normal speed reduction mode is used.
[0113] When executing normal speed reduction mode, execute speed reduction logic .
[0114] When executing the optimized speed reduction mode, execute the speed reduction logic ,in ,in .
[0115] After the speed reduction is completed, the cumulative speed reduction round n=n+1 is updated, and the last speed reduction timestamp (last_decrease_timestamp) is updated to the current timestamp (cur_timestamp). At this point, the speed reduction processing logic is completed.
[0116] It should be noted that when performing a speed increase, the data sender needs to reset the cumulative speed reduction rounds n to 0.
[0117] In the above embodiment, the fast flow and the slow flow are decelerated simultaneously, with the slow flow decelerating at a smaller rate. Under the condition that the speed-up algorithm remains unchanged, the time to reach full bandwidth again is shorter and the convergence speed is faster compared to the existing speed-down algorithm. The fast flow and the slow flow are decelerated simultaneously, with the slow flow decelerating at a smaller rate. Under the condition that the speed-up algorithm remains unchanged, less bandwidth is wasted from the time of deceleration to reaching full bandwidth, and bandwidth utilization is higher. The fast flow and the slow flow are decelerated simultaneously, with the fast flow decelerating at a larger rate and the slow flow decelerating at a smaller rate. Under the condition that the speed-up algorithm remains unchanged, the time to reach fair bandwidth is shorter, bandwidth fairness converges faster, and stability is higher compared to the existing speed-down algorithm.
[0118] 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.
[0119] 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.
[0120] In an exemplary embodiment, Figure 7 As shown, a network rate control device is provided, comprising: a current network rate determining module 701, a target speed reduction coefficient determining module 702, a first target network rate determining module 703 and an adjustment module 704, wherein:
[0121] Current network rate determination module 701, used to determine the current network rate;
[0122] A target speed reduction coefficient determination module 702 is configured to determine a target speed reduction coefficient based on the current network rate, wherein the target speed reduction coefficient decreases as the current network rate decreases;
[0123] A first target network rate determination module 703 is configured to determine a first target network rate based on the current network rate and a target speed reduction coefficient;
[0124] The adjustment module 704 is configured to adjust the current network rate to a first target network rate.
[0125] In one optional embodiment, the target speed reduction coefficient determination module 702 is specifically configured to determine an extended speed reduction coefficient based on the network card line speed or bottleneck bandwidth and the current network rate, wherein the extended speed reduction coefficient decreases as the current network rate decreases;
[0126] The target deceleration coefficient is determined based on the extended deceleration coefficient and the basic deceleration coefficient.
[0127] In one optional embodiment, the target deceleration coefficient determination module 702 is specifically configured to obtain the extended deceleration coefficient based on the following formula:
[0128]
[0129] in, is the network speed after the last round of speed reduction, that is, the current network speed. is the extended speed reduction coefficient, L is the network card line speed or bottleneck bandwidth, k is the extended speed reduction order, and k ≥ 0; or
[0130] The extended speed reduction coefficient is obtained based on the following formula:
[0131]
[0132] in, The value is in the interval [0,1] and is used to limit the minimum expansion speed reduction range.
[0133] In one of the optional embodiments, the above device further includes:
[0134] A detection module is used to detect whether the cumulative number of speed reduction rounds is less than the round threshold; if the cumulative number of speed reduction rounds is less than the round threshold, continue to execute the step of determining the current network rate; if the cumulative number of speed reduction rounds is greater than or equal to the round threshold, obtain a second target network rate based on the current network rate and the basic speed reduction coefficient; and adjust the current network rate to the second target network rate.
[0135] In one of the optional embodiments, the above device further includes:
[0136] The congestion judgment module is used to receive congestion notification messages; determine the time difference between the current timestamp of the received congestion notification message and the timestamp of the last speed reduction; if the time difference is not greater than the time window threshold, filter the congestion notification message; if the time difference is greater than the time window threshold, continue to execute the step of detecting whether the cumulative speed reduction rounds are less than the round threshold.
[0137] In one of the optional embodiments, the above-mentioned device further includes: a parameter updating module, configured to update the last speed reduction timestamp and the accumulated speed reduction rounds.
[0138] 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.
[0139] In an exemplary embodiment, the present application further provides a chip comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the steps of the method described in any of the above embodiments when executing the computer program. The chip may be a data processing unit (DPU) chip or other chip for processing data.
[0140] In an exemplary embodiment, the present application also provides a network interface card, comprising the chip and multiple interfaces as described in any of the above embodiments, wherein the interface may include a PCI / PCIE interface, a UART / USB / I2C / SPI / GPIO and other I / O interfaces, etc., and the chip processes data or communicates externally through the interface.
[0141] 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 8As 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.
[0142] Those skilled in the art will understand that Figure 8 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.
[0143] 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.
[0144] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: determining a current network rate; determining a target speed reduction coefficient based on the current network rate, wherein the target speed reduction coefficient decreases as the current network rate decreases; determining a first target network rate based on the current network rate and the target speed reduction coefficient; and adjusting the current network rate to the first target network rate.
[0145] In one embodiment, the target speed reduction coefficient is determined based on the current network rate when the processor executes a computer program, including: determining an extended speed reduction coefficient based on the network card line speed or bottleneck bandwidth and the current network rate, wherein the extended speed reduction coefficient decreases as the current network rate decreases; determining a target speed reduction coefficient based on the extended speed reduction coefficient and the basic speed reduction coefficient.
[0146] In one embodiment, the processor, when executing a computer program, determines the extended speed reduction coefficient based on the network card line speed or bottleneck bandwidth and the current network rate, including:
[0147] The extended speed reduction coefficient is obtained based on the following formula:
[0148]
[0149] in, is the network speed after the last round of speed reduction, that is, the current network speed. is the extended speed reduction coefficient, L is the network card line speed or bottleneck bandwidth, k is the extended speed reduction order, and k ≥ 0; or
[0150] The extended speed reduction coefficient is obtained based on the following formula:
[0151]
[0152] in, The value is in the interval [0,1] and is used to limit the minimum expansion speed reduction range.
[0153] In one embodiment, when the processor executes the computer program, it also implements the following steps: detecting whether the cumulative number of speed reduction rounds is less than the round threshold; if the cumulative number of speed reduction rounds is less than the round threshold, continuing to execute the step of determining the current network rate; if the cumulative number of speed reduction rounds is greater than or equal to the round threshold, obtaining a second target network rate based on the current network rate and the basic speed reduction coefficient; and adjusting the current network rate to the second target network rate.
[0154] In one embodiment, when the processor executes the computer program, it further implements the following steps: receiving a congestion notification message; determining the time difference between the current timestamp of receiving the congestion notification message and the timestamp of the last speed reduction; filtering the congestion notification message when the time difference is not greater than the time window threshold; and continuing to execute the step of detecting whether the cumulative number of speed reduction rounds is less than the round threshold when the time difference is greater than the time window threshold.
[0155] In one embodiment, after adjusting the current network rate to the first target network rate and adjusting the current network rate to the second target network rate when the processor executes the computer program, the process further includes: updating the last speed reduction timestamp and accumulating the speed reduction rounds.
[0156] 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 following steps are implemented: determining the current network rate; determining a target speed reduction coefficient based on the current network rate, the target speed reduction coefficient decreasing as the current network rate decreases; determining a first target network rate based on the current network rate and the target speed reduction coefficient; and adjusting the current network rate to the first target network rate.
[0157] In one embodiment, the computer program implemented when executed by the processor determines the target speed reduction coefficient based on the current network rate, including: determining the extended speed reduction coefficient based on the network card line speed or bottleneck bandwidth and the current network rate, wherein the extended speed reduction coefficient decreases as the current network rate decreases; determining the target speed reduction coefficient based on the extended speed reduction coefficient and the basic speed reduction coefficient.
[0158] In one embodiment, the computer program, when executed by the processor, determines the extended speed reduction coefficient based on the network card line speed or bottleneck bandwidth and the current network rate, including:
[0159] The extended speed reduction coefficient is obtained based on the following formula:
[0160]
[0161] in, is the network speed after the last round of speed reduction, that is, the current network speed. is the extended speed reduction coefficient, L is the network card line speed or bottleneck bandwidth, k is the extended speed reduction order, and k ≥ 0; or
[0162] The extended speed reduction coefficient is obtained based on the following formula:
[0163]
[0164] in, The value is in the interval [0,1] and is used to limit the minimum expansion speed reduction range.
[0165] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: detecting whether the cumulative number of speed reduction rounds is less than the round threshold; if the cumulative number of speed reduction rounds is less than the round threshold, continuing to execute the step of determining the current network rate; if the cumulative number of speed reduction rounds is greater than or equal to the round threshold, obtaining a second target network rate based on the current network rate and the basic speed reduction coefficient; and adjusting the current network rate to the second target network rate.
[0166] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: receiving a congestion notification message; determining the time difference between the current timestamp of receiving the congestion notification message and the timestamp of the last speed reduction; filtering the congestion notification message when the time difference is not greater than the time window threshold; and continuing to execute the step of detecting whether the cumulative number of speed reduction rounds is less than the round threshold when the time difference is greater than the time window threshold.
[0167] In one embodiment, after adjusting the current network rate to the first target network rate and adjusting the current network rate to the second target network rate when the computer program is executed by the processor, it also includes: updating the last speed reduction timestamp and the accumulated speed reduction rounds.
[0168] In one embodiment, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the following steps: determining a current network rate; determining a target speed reduction coefficient based on the current network rate, the target speed reduction coefficient decreasing as the current network rate decreases; determining a first target network rate based on the current network rate and the target speed reduction coefficient; and adjusting the current network rate to the first target network rate.
[0169] In one embodiment, the computer program implemented when executed by the processor determines the target speed reduction coefficient based on the current network rate, including: determining the extended speed reduction coefficient based on the network card line speed or bottleneck bandwidth and the current network rate, wherein the extended speed reduction coefficient decreases as the current network rate decreases; determining the target speed reduction coefficient based on the extended speed reduction coefficient and the basic speed reduction coefficient.
[0170] In one embodiment, the computer program, when executed by the processor, determines the extended speed reduction coefficient based on the network card line speed or bottleneck bandwidth and the current network rate, including:
[0171] The extended speed reduction coefficient is obtained based on the following formula:
[0172]
[0173] in, is the network speed after the last round of speed reduction, that is, the current network speed. is the extended speed reduction coefficient, L is the network card line speed or bottleneck bandwidth, k is the extended speed reduction order, and k ≥ 0; or
[0174] The extended speed reduction coefficient is obtained based on the following formula:
[0175]
[0176] in, The value is in the interval [0,1] and is used to limit the minimum expansion speed reduction range.
[0177] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: detecting whether the cumulative number of speed reduction rounds is less than the round threshold; if the cumulative number of speed reduction rounds is less than the round threshold, continuing to execute the step of determining the current network rate; if the cumulative number of speed reduction rounds is greater than or equal to the round threshold, obtaining a second target network rate based on the current network rate and the basic speed reduction coefficient; and adjusting the current network rate to the second target network rate.
[0178] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: receiving a congestion notification message; determining the time difference between the current timestamp of receiving the congestion notification message and the timestamp of the last speed reduction; filtering the congestion notification message when the time difference is not greater than the time window threshold; and continuing to execute the step of detecting whether the cumulative number of speed reduction rounds is less than the round threshold when the time difference is greater than the time window threshold.
[0179] In one embodiment, after adjusting the current network rate to the first target network rate and adjusting the current network rate to the second target network rate when the computer program is executed by the processor, it also includes: updating the last speed reduction timestamp and the accumulated speed reduction rounds.
[0180] 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.
[0181] 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, distributed databases based on blockchains. 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), data processing logic based on quantum computing, artificial intelligence (AI) processors, and the like.
[0182] 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.
[0183] 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; Based on the network card line speed or bottleneck bandwidth and the current network rate, the extended speed reduction factor is determined by the following formula: ; in, is the network speed after the last round of speed reduction, that is, the current network speed. is the extended speed reduction coefficient, L is the network card line speed or bottleneck bandwidth, k is the extended speed reduction order, and k ≥ 0; or The extended speed reduction coefficient is obtained based on the following formula: ; in, The value is in the range [0,1], which is used to limit the minimum expansion speed reduction. is the network speed after the last round of speed reduction, that is, the current network speed. is the extended speed reduction coefficient, L is the network card line speed or bottleneck bandwidth; wherein the extended speed reduction coefficient decreases as the current network rate decreases; Based on the product of the extended speed reduction coefficient and the basic speed reduction coefficient, a target speed reduction coefficient is determined. The target speed reduction coefficient decreases as the current network rate decreases. The target speed reduction coefficient corresponding to the flow with a high current network rate is large, and the target speed reduction coefficient corresponding to the flow with a low current network rate is small. In the TCP speed reduction algorithm, the basic speed reduction coefficient is 0.
5. In the DCQCN speed reduction algorithm, the basic speed reduction coefficient is determined by the recursive formula when increasing or decreasing the speed. The first target network rate is determined based on the current network rate and the target speed reduction coefficient using the following formula: ; in is the rate value or window value after the current nth speed reduction, that is, the first target network rate. The rate value or window value after the last speed reduction, that is, the current network rate. is the target speed reduction coefficient, and its value range is [0,1]; The current network rate is adjusted to a first target network rate.
2. The method according to claim 1, characterized in that The method further comprises: Check whether the cumulative speed reduction rounds are less than the round threshold; If the cumulative number of speed reduction rounds is less than the round threshold, continue to perform the step of determining the current network rate; When the cumulative number of speed reduction rounds is greater than or equal to the round threshold, obtaining a second target network rate based on the current network rate and a basic speed reduction coefficient; The current network rate is adjusted to a second target network rate.
3. The method according to claim 2, characterized in that The method further comprises: Receive congestion notification messages; Determine a time difference between a current timestamp of receiving the congestion notification message and a timestamp of a previous speed reduction; When the time difference is not greater than a time window threshold, filtering the congestion notification message; When the time difference is greater than the time window threshold, the step of detecting whether the accumulated speed reduction rounds are less than the round threshold is continued.
4. The method according to claim 3, characterized in that After adjusting the current network rate to the first target network rate and adjusting the current network rate to the second target network rate, the method further includes: Update the last speed reduction timestamp and the cumulative speed reduction rounds.
5. 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; The target speed reduction coefficient determination module is used to determine the extended speed reduction coefficient based on the network card line speed or bottleneck bandwidth and the current network rate using the following formula: ; in, is the network speed after the last round of speed reduction, that is, the current network speed. is the extended speed reduction coefficient, L is the network card line speed or bottleneck bandwidth, k is the extended speed reduction order, and k ≥ 0; or The extended speed reduction coefficient is obtained based on the following formula: ; in, The value is in the range [0,1], which is used to limit the minimum expansion speed reduction. is the network speed after the last round of speed reduction, that is, the current network speed. is the extended speed reduction coefficient, L is the network card line speed or bottleneck bandwidth; wherein the extended speed reduction coefficient decreases as the current network rate decreases; Based on the product of the extended speed reduction coefficient and the basic speed reduction coefficient, a target speed reduction coefficient is determined. The target speed reduction coefficient decreases as the current network rate decreases. The target speed reduction coefficient corresponding to the flow with a high current network rate is large, and the target speed reduction coefficient corresponding to the flow with a low current network rate is small. In the TCP speed reduction algorithm, the basic speed reduction coefficient is 0.
5. In the DCQCN speed reduction algorithm, the basic speed reduction coefficient is determined by the recursive formula when increasing or decreasing the speed. The first target network rate determination module is configured to determine a first target network rate based on the current network rate and the target speed reduction coefficient using the following formula: ; in is the rate value or window value after the current nth speed reduction, that is, the first target network rate. The rate value or window value after the last speed reduction, that is, the current network rate. is the target speed reduction coefficient, and its value range is [0,1]; The adjustment module is configured to adjust the current network rate to a first target network rate.
6. 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 4 are implemented.
7. A network interface card, characterized in that: The device comprises the chip as claimed in claim 6 and a plurality of interfaces, wherein the chip processes data or communicates externally through the interfaces.
8. A computer device, characterized in that: The network interface card according to claim 7 is used for processing data or external communication.
9. 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 4 are implemented.
10. 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 4 are implemented.
Citation Information
Patent Citations
Network rate control method and device, chip, network interface card, computer equipment, readable storage medium and program product
CN119788620A