Congestion control method and apparatus, electronic device, storage medium, and program product
By collaboratively generating and transmitting timestamp-encapsulated probe messages through the network interface cards on both the requesting and responding sides, the problem of poor device compatibility in congestion control methods is solved, achieving high-precision, low-interference congestion control suitable for standard data center networks.
Patent Information
- Application Number
- CN202610289199.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-10
- Publication Date
- 2026-06-09
AI Technical Summary
In existing technologies, congestion control methods have poor device compatibility, are difficult to deploy and maintain, and have low RTT measurement accuracy, which is easily affected by switch function limitations and differences in message length.
By having the request and response network cards work together, timestamp-encapsulated probe request and response messages are generated and captured. These messages are transmitted using dedicated traffic category channels, round-trip time is calculated, and congestion control strategies are generated, thus avoiding reliance on special functions of the switch.
It achieves high-precision, low-interference congestion control, improves measurement accuracy and equipment compatibility, and facilitates seamless deployment in standard data center networks.
Smart Images

Figure CN122179386A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network communication technology, and more specifically to congestion control methods, devices, electronic devices, storage media, and program products. Background Technology
[0002] TIMELY congestion control protocol is a data center network congestion algorithm based on RDMA (Remote Direct Memory Access) that measures and regulates the end-to-end RTT (Round Trip Time). It relies on the sending end to regulate the transmission rate and performs congestion control by measuring RTT and based on RTT.
[0003] In related technologies, when calculating RTT (Real-Time Tolerance), a probe packet is sent by the sending end. After reaching its destination, the probe packet returns to the sending end, and the RTT is calculated by the time difference between sending and receiving the probe packet. Specifically, as the probe packet passes through each switch, the switch calculates the time difference from the packet's entry to its exit, i.e., its dwell time within the switch, and adds this dwell time to the dwell times of all previously passed switches, recording it in the probe packet. Therefore, this method requires the switch to have the ability to identify probe packets, calculate dwell times, and rewrite probe packets. However, most switches lack these capabilities, leading to poor device compatibility and increased deployment and maintenance costs. Summary of the Invention
[0004] This invention provides a congestion control method, apparatus, electronic device, storage medium, and program product to solve the problems of poor device compatibility, difficulty in deployment and maintenance of congestion control methods in related technologies.
[0005] In a first aspect, the present invention provides a congestion control method, the method comprising:
[0006] The requesting network interface card periodically generates round-trip latency detection requests, encapsulates the round-trip latency detection requests with the recorded request sending timestamps, generates a detection request message, and sends it to the responding network interface card. The probe request message is captured by the response-side network card and the request reception timestamp is recorded. The request sending timestamp, the request receiving timestamp, and the recorded response sending timestamp are encapsulated to generate a probe response message. The probe response message is then sent to the request-side network card through a dedicated traffic category channel. The probe response message is captured by the network card on the requesting side, the response reception timestamp is recorded and parsed, and the round-trip time is calculated based on the request sending timestamp, the request receiving timestamp, the response sending timestamp, and the response receiving timestamp. The requesting network interface card generates a congestion control strategy based on the round-trip time to adjust the data transmission rate.
[0007] In one optional implementation, the request-side network interface card (NIC) includes a congestion calculation module, a queue management module, and a sending engine; the step of periodically generating round-trip delay (RTD) probe requests through the request-side NIC, encapsulating the RTD probe requests with a recorded request sending timestamp, generating probe request packets, and sending them to the response-side NIC includes: The congestion calculation module periodically generates round-trip delay detection requests; The round-trip delay detection request is sent to the transmission queue through the queue management module, and a dequeue operation is performed when the round-trip delay detection request is scheduled. The round-trip delay detection request is encapsulated with the recorded request sending timestamp by the sending engine, and a detection request message is generated and sent to the response-side network card.
[0008] In one optional implementation, the response-side network interface card (NIC) includes a receiving engine, a queue management module, and a sending engine; the step of capturing the probe request message and recording the request reception timestamp through the response-side NIC, encapsulating the request sending timestamp, the request reception timestamp, and the recorded response sending timestamp to generate a probe response message includes: The probe request message is captured by the receiving engine, the request receiving timestamp is recorded, and the request sending timestamp is extracted from the probe request message. The receiving engine sends a probe response request to the queue management module, carrying the request sending timestamp and the request receiving timestamp. The queue management module sends the probe response request into the transmission queue and performs a dequeue operation when the probe response request is scheduled. The engine records the response sending timestamp, and encapsulates the request sending timestamp, the request receiving timestamp, and the response sending timestamp to generate a probe response message.
[0009] In an optional implementation, the requesting-side network interface card (NIC) further includes a receiving engine; the step of capturing the probe response message through the requesting-side NIC, recording the response reception timestamp, and parsing it includes: The probe response message is captured by the receiving engine, the response reception timestamp is recorded, and the probe response message is parsed to obtain the request sending timestamp, the request receiving timestamp, and the response sending timestamp.
[0010] In one optional implementation, calculating the round-trip time based on the request sending timestamp, the request receiving timestamp, the response sending timestamp, and the response receiving timestamp includes: Subtract the timestamp of the response received from the timestamp of the request sent to obtain the first intermediate value; Subtract the timestamp of the response sent from the timestamp of the request received to obtain the second intermediate value; Subtracting the first intermediate value from the second intermediate value yields the round-trip time delay.
[0011] In one optional implementation, generating a congestion control strategy based on the round-trip delay to adjust the data transmission rate includes: When the gradient change of the round-trip delay exceeds a first threshold, the data transmission rate is increased; When the gradient change of the round-trip delay is lower than the second threshold, the data transmission rate is reduced.
[0012] In a second aspect, the present invention provides a congestion control device, the device comprising: The probe request module is used to periodically generate round-trip latency probe requests through the requesting side network card, encapsulate the round-trip latency probe requests with the recorded request sending timestamp, generate probe request messages and send them to the responding side network card; The probe response module is used to capture the probe request message and record the request reception timestamp through the response-side network card, encapsulate the request sending timestamp, the request receiving timestamp and the recorded response sending timestamp, generate a probe response message, and send the probe response message to the request-side network card through a dedicated traffic category channel; The latency calculation module is used to capture the probe response message through the requesting side network card, record and parse the response reception timestamp, and calculate the round-trip latency based on the request sending timestamp, the request receiving timestamp, the response sending timestamp, and the response receiving timestamp; The congestion control module is used to generate a congestion control strategy based on the round-trip time using the requesting network interface card to adjust the data transmission rate.
[0013] Thirdly, the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the congestion control method of the first aspect or any corresponding embodiment described above.
[0014] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform the congestion control method of the first aspect or any corresponding embodiment thereof.
[0015] Fifthly, the present invention provides a computer program product, including computer instructions for causing a computer to execute the congestion control method of the first aspect or any corresponding embodiment thereof.
[0016] The technical solution provided by this invention may include the following beneficial effects: The congestion control method provided by this invention effectively eliminates the impact of message length differences and response-side scheduling time fluctuations on round-trip time calculation by only calculating propagation delay and using dedicated probe request and response messages with fixed message lengths, thus significantly improving measurement accuracy. Furthermore, the use of dedicated traffic category channels for transmitting probe response messages achieves logical isolation between probe traffic and service traffic, greatly reducing the interference of response path congestion on measurement results and improving the accuracy of subsequent congestion control. Since all timestamps are recorded by the network interface card hardware, not only is the accuracy and real-time nature of time recording guaranteed, but dependence on special switch functions is also avoided, enabling seamless deployment in standard data center network environments with excellent compatibility and practicality. Therefore, the above solution provides a high-precision, low-interference, and easily deployable congestion control solution. Attached Figure Description
[0017] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0018] Figure 1 This is a schematic diagram of a first type of congestion control method according to an embodiment of the present invention; Figure 2 This is a schematic diagram of a second flow of the congestion control method according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the transmission process of the congestion control method according to an embodiment of the present invention; Figure 4 This is a structural block diagram of a congestion control device according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] It is understood that before using the technical solutions disclosed in the various embodiments of the present invention, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in the present invention and their authorization should be obtained in accordance with relevant laws and regulations through appropriate means.
[0021] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0022] TIMELY congestion control protocol is a data center network congestion algorithm based on RDMA (Remote Direct Memory Access) that measures and regulates end-to-end RTT (Round Trip Time). It relies on the sending end to regulate the transmission rate and captures changes in RTT gradient to determine the congestion situation. An increase in RTT indicates that the congestion is worsening, and vice versa.
[0023] In related technologies, RTT consists of propagation delay, queuing delay, and processing delay. The sending end sends a probe packet and records the sending timestamp, and records the receiving timestamp upon receiving an ACK response. Since large packets may be split into multiple packets, and there is a transmission delay in the data packets being transmitted from the network card, this time needs to be removed. The formula is as follows: RTT = Receive timestamp - Send timestamp - Packet segment size / Network interface card line speed It is evident that RTT calculation encompasses queuing delay, which is closely related to the number of active QPs (standard RDMA queue pairs) on the response side. Large fluctuations in the number of active QPs significantly impact RTT and can easily lead to misjudgments of congestion. Furthermore, the network interface card (NIC) line rate in the formula is not a constant, making it difficult to accurately calculate the real-time rate. If the maximum NIC line rate is used to calculate the transmission delay, the actual NIC line rate will be lower when congestion occurs, and the difference in message length will introduce errors in RTT calculation.
[0024] In related technologies, RTT (Real-Time To See) is also calculated using switches. A probe packet is sent from the sending end, and returns to the sending end after reaching its destination. The RTT is calculated by measuring the time difference between sending and receiving the probe packet. Specifically, as the probe packet passes through each switch, the switch calculates the time difference from the packet's entry to its exit, i.e., its dwell time within the switch, and adds this dwell time to the dwell times of all previously passed switches, recording it in the probe packet. Therefore, this method requires switches to have the ability to identify probe packets, calculate dwell times, and rewrite probe packets. However, most switches lack these capabilities, leading to poor device compatibility and increased deployment and maintenance costs.
[0025] According to an embodiment of the present invention, a congestion control method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0026] This embodiment provides a congestion control method, which is jointly executed by the requesting-side network interface card (NIC) and the responding-side NIC. Figure 1 This is a flowchart of a congestion control method according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps: Step S101: Periodically generate round-trip latency detection requests through the requesting side network card, encapsulate the round-trip latency detection request with the recorded request sending timestamp, generate a detection request message and send it to the responding side network card.
[0027] This congestion control method is executed collaboratively by the requesting-side network interface card (NIC) and the responding-side NIC. The requesting-side NIC acts as the master controller, while the responding-side NIC acts as the cooperating party, ultimately controlling congestion on the requesting-side NIC. First, the requesting-side NIC periodically generates round-trip time delay (RTD) probe requests. When preparing to send a probe request packet, it records the request sending timestamp. Then, it encapsulates the RTD probe request with the recorded request sending timestamp to generate a probe request packet carrying the request sending timestamp, and sends this probe request packet to the responding-side NIC.
[0028] Step S102: The probe request message is captured by the response-side network card and the request reception timestamp is recorded. The request sending timestamp, the request receiving timestamp, and the recorded response sending timestamp are encapsulated to generate a probe response message. The probe response message is then sent to the request-side network card through a dedicated traffic category channel.
[0029] When the responding network interface card (NIC) captures the probe request packet, it records the request reception timestamp and parses the packet to obtain the request sending timestamp. The responding NIC also responds to the probe request packet. Before sending the probe response packet, it records the response sending timestamp, encapsulates the request sending timestamp, the request reception timestamp, and the recorded response sending timestamp to generate a probe response packet. This packet is then sent to the requesting NIC via a dedicated traffic category channel (dedicated TC). This dedicated traffic category channel is isolated from the service traffic category channel (service TC), preventing congestion on the response path from interfering with round-trip time (RTT) calculations, resulting in a more accurate RTT and improving the accuracy of subsequent congestion control based on RTT.
[0030] Step S103: Capture the probe response message through the network card on the requesting side, record and parse the response reception timestamp, and calculate the round-trip time based on the request sending timestamp, the request receiving timestamp, the response sending timestamp, and the response receiving timestamp.
[0031] When the requesting network interface card (NIC) captures the probe response message, it records the response reception timestamp and parses the probe response message to obtain the request sending timestamp, request receiving timestamp, and response sending timestamp. Then, based on the request sending timestamp, request receiving timestamp, response sending timestamp, and response receiving timestamp, it calculates the round-trip time.
[0032] Step S104: The requesting network card generates a congestion control strategy based on the round-trip time to adjust the data transmission rate.
[0033] Once the round-trip time is obtained, a corresponding congestion control strategy can be generated based on the gradient change of the round-trip time. For example, the data transmission rate can be reduced when the gradient change is high, and the data transmission rate can be increased when the gradient change is low.
[0034] The congestion control method provided in this embodiment effectively eliminates the impact of message length differences and response-side scheduling time fluctuations on round-trip time calculation by only calculating propagation delay and using dedicated probe request and response messages with fixed message lengths, thus significantly improving measurement accuracy. Furthermore, the use of dedicated traffic category channels for transmitting probe response messages achieves logical isolation between probe traffic and service traffic, greatly reducing the interference of response path congestion on measurement results and improving the accuracy of subsequent congestion control. Since all timestamps are recorded by the network interface card hardware, not only is the accuracy and real-time nature of time recording guaranteed, but dependence on special switch functions is also avoided, enabling seamless deployment in standard data center network environments with excellent compatibility and practicality. Therefore, the above solution provides a high-precision, low-interference, and easily deployable congestion control solution.
[0035] This embodiment provides a congestion control method, which is jointly executed by the requesting-side network interface card (NIC) and the responding-side NIC. Figure 2 This is a flowchart of a congestion control method according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps: Step S201: The requesting network card periodically generates round-trip delay detection requests.
[0036] Figure 3 This is a schematic diagram of the transmission process of a congestion control method according to an embodiment of the present invention. It should be noted that the requesting-side network interface card (NIC) and the responding-side NIC can be of the same model. The NIC that needs to calculate the round-trip time (RTD) for congestion control is the requesting-side NIC, and the NIC that cooperates with the requesting-side NIC in calculating the RTD is the responding-side NIC.
[0037] Optionally, the requesting network interface card (NIC) includes a congestion calculation module, a queue management module, and a transmission engine. The requesting NIC first periodically generates round-trip delay (RTD) probe requests through the congestion calculation module. In other words, congestion control of the requesting NIC in this embodiment is an automatic and dynamic process. After each RTD probe request is generated and the corresponding RTD is calculated, the data transmission rate is adjusted based on the RTD, i.e., steps S201 to S209 are executed cyclically.
[0038] Next, the round-trip delay detection request is sent to the transmission queue through the queue management module. The queue management module schedules the data according to the data order in the transmission queue, and performs a dequeue operation when the round-trip delay detection request is scheduled, thus removing the round-trip delay detection request.
[0039] Step S202: The requesting network card encapsulates the round-trip delay detection request with the recorded request sending timestamp.
[0040] After the round-trip delay detection request is retrieved, when preparing to send the detection request message corresponding to the round-trip delay detection request, the request sending timestamp is first recorded by the sending engine.
[0041] Step S203: The requesting network card generates a probe request message and sends the probe request message to the responding network card.
[0042] The requesting network interface card (NIC) encapsulates the round-trip latency probe request with the recorded request sending timestamp through the sending engine, generates a probe request message, and sends the probe request message to the responding NIC.
[0043] Step S204: The responding network card captures the probe request message and records the request reception timestamp.
[0044] The response-side network interface card includes a receive engine, a queue management module, and a send engine.
[0045] The responding network card captures the probe request message through the receiving engine, records the request reception timestamp when the probe request message is captured, and parses the probe request message to extract the request sending timestamp from the probe request message.
[0046] Next, the responding network card needs to respond to the probe request message. Specifically, the responding network card sends a probe response request carrying the request sending timestamp and request receiving timestamp to the queue management module through the receiving engine.
[0047] Then, the network card on the response side sends the probe response request into the transmission queue through the queue management module. The queue management module schedules each data according to the data order in the transmission queue, and performs a dequeue operation when the probe response request is scheduled, thus removing the probe response request.
[0048] In step S205, the network card on the response side encapsulates the request sending timestamp, the request receiving timestamp, and the recorded response sending timestamp to generate a probe response message.
[0049] After the probe response request is retrieved, when preparing to send the probe response message corresponding to the probe response request, the responding network card first records the response sending timestamp through the sending engine, and encapsulates the request sending timestamp, the request receiving timestamp, and the response sending timestamp to generate the probe response message.
[0050] In step S206, the responding network card sends the probe response message to the requesting network card through a dedicated traffic category channel.
[0051] Next, the responding network interface card (NIC) sends the probe response message to the requesting NIC via a dedicated traffic category channel. This dedicated traffic category channel is logically isolated from the service traffic category channel (sharing the same physical link), has an independent virtual channel, and transmits data through a dedicated queue. By setting up a dedicated traffic category channel, the impact of queuing delay on round-trip delay calculation is eliminated, avoiding the problem of being unable to distinguish queuing delay in related technologies.
[0052] Optionally, the priority of the dedicated traffic category channel can be set to the highest for congestion control, the priority of the critical business traffic category channel can be set to the second highest, and the priority of the regular business traffic category channel can be set to normal, thus forming a multi-priority transmission mechanism to ensure the real-time performance of round-trip delay calculation and congestion control, while optimizing the service quality of critical businesses.
[0053] Step S207: The requesting network card captures the probe response message, records the response reception timestamp, and parses it.
[0054] The requesting network interface card (NIC) also includes a receiving engine. The requesting NIC captures the probe response message through the receiving engine, records the response reception timestamp when the probe response message is captured, and parses the probe response message to obtain the request sending timestamp, the request receiving timestamp, and the response sending timestamp.
[0055] Step S208: The requesting network card calculates the round-trip delay based on the request sending timestamp, the request receiving timestamp, the response sending timestamp, and the response receiving timestamp.
[0056] After receiving the request sending timestamp, request receiving timestamp, response sending timestamp, and response receiving timestamp, the requesting network interface card (NIC) calculates the round-trip time based on these four timestamps. Specifically, it subtracts the request sending timestamp from the response receiving timestamp to obtain a first intermediate value; it then subtracts the request receiving timestamp from the response sending timestamp to obtain a second intermediate value used to indicate the message processing delay; finally, it subtracts the second intermediate value from the first intermediate value to eliminate the message processing delay, thus obtaining the round-trip time.
[0057] For example, with the request sending timestamp as T1, the request receiving timestamp as T2, the response sending timestamp as T3, and the response receiving timestamp as T4, the formula for calculating the round-trip time (RTT) is as follows: RTT=(T4-T1)-(T3-T2) Step S209: The requesting network card generates a congestion control policy based on the round-trip time to adjust the data transmission rate.
[0058] Optionally, the gradient change of the round-trip delay is calculated. When the gradient change of the round-trip delay exceeds a first threshold, the data transmission rate is increased; when the gradient change of the round-trip delay is lower than a second threshold, the data transmission rate is decreased. The first and second thresholds can be selected according to actual needs, with the first threshold being greater than the second threshold.
[0059] For example, the difference between the current round-trip time (RTT) and the previous RTT, as well as the time interval between the two RTTs, are calculated. The result of dividing the difference by the time interval is taken as the gradient change of the RTT, i.e., the gradient change of the RTT = the difference between two adjacent RTTs / the time interval between two adjacent RTTs. A positive gradient change of the RTT indicates an increase in RTT and worsening network congestion; a negative gradient change indicates a decrease in RTT and reduced network congestion.
[0060] Optionally, both the request-side network interface card (NIC) and the response-side NIC are configured with a dedicated cache area to store historical round-trip latency. Based on the historical round-trip latency, a sliding window smoothing process is performed, and a congestion control strategy is generated according to the processing result to eliminate the impact of instantaneous jitter on round-trip latency calculation, improve the stability of round-trip latency calculation, and avoid misjudgment.
[0061] Optionally, a cross-NIC time synchronization mechanism can be set up. This cross-NIC time synchronization mechanism is decoupled from the round-trip delay calculation process and runs independently. It is used to perform periodic time synchronization operations on the requesting NIC and the responding NIC to solve the clock drift problem between NICs and further improve the accuracy of timestamp recording.
[0062] Optionally, when there are multiple physical paths between the requesting network card and the responding network card, an independent probe message (including probe request message and probe response message) sequence number is assigned to each physical path; then, the round-trip time of each physical path is calculated through steps S201 to S208 respectively, and the physical path with the optimal round-trip time is selected to transmit service data, thereby realizing congestion control in a multi-path network environment and improving the flexibility of the solution.
[0063] The congestion control method provided in this embodiment calculates round-trip time (RTD) by using the queue management module, congestion module, sending engine, and receiving engine in the request-side NIC and response-side NIC, eliminating the need for a switch and reducing the deployment difficulty of RTD calculation. By subtracting the response sending timestamp from the request receiving timestamp, the impact of message processing delay on RTD is eliminated, improving the accuracy of the calculation. A congestion control strategy is generated based on the gradient change of RTD, and a sliding window smoothing process, a cross-NIC time synchronization mechanism, and a congestion control scheme in a multi-path network environment are provided, improving the flexibility of the solution.
[0064] This embodiment also provides a congestion control device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0065] This embodiment provides a congestion control device, such as... Figure 4 As shown, it includes: The probe request module 401 is used to periodically generate round-trip latency probe requests through the requesting side network card, encapsulate the round-trip latency probe request with the recorded request sending timestamp, generate a probe request message and send it to the responding side network card; The probe response module 402 is used to capture the probe request message through the response-side network card and record the request reception timestamp, encapsulate the request sending timestamp, the request receiving timestamp and the recorded response sending timestamp, generate a probe response message, and send the probe response message to the request-side network card through a dedicated traffic category channel; The latency calculation module 403 is used to capture the probe response message through the network card on the requesting side, record and parse the response reception timestamp, and calculate the round-trip latency based on the request sending timestamp, the request receiving timestamp, the response sending timestamp, and the response receiving timestamp. The congestion control module 404 is used to generate a congestion control policy based on the round-trip time delay through the requesting network card in order to adjust the data transmission rate.
[0066] In one optional implementation, the requesting network interface card (NIC) includes a congestion calculation module, a queue management module, and a sending engine; the probe request module is further configured to: periodically generate round-trip delay probe requests through the congestion calculation module; send the round-trip delay probe requests into the transmission queue through the queue management module, and perform a dequeue operation when the round-trip delay probe requests are scheduled; and encapsulate the round-trip delay probe requests with the recorded request sending timestamps through the sending engine to generate probe request packets and send them to the responding NIC.
[0067] In one optional implementation, the response-side network interface card includes a receiving engine, a queue management module, and a sending engine; the probe response module is further configured to: capture the probe request message through the receiving engine, record the request reception timestamp, and extract the request sending timestamp from the probe request message; initiate a probe response request carrying the request sending timestamp and the request reception timestamp to the queue management module through the receiving engine; send the probe response request into the transmission queue through the queue management module, and perform a dequeue operation when the probe response request is scheduled; record the response sending timestamp through the sending engine, and encapsulate the request sending timestamp, the request reception timestamp, and the response sending timestamp to generate a probe response message.
[0068] In one optional implementation, the requesting network interface card further includes a receiving engine; the latency calculation module is also used to: capture the probe response message through the receiving engine, record the response reception timestamp, and parse the probe response message to obtain the request sending timestamp, the request receiving timestamp, and the response sending timestamp.
[0069] In an optional implementation, the delay calculation module is further configured to: subtract the response reception timestamp from the request sending timestamp to obtain a first intermediate value; subtract the response sending timestamp from the request reception timestamp to obtain a second intermediate value; and subtract the first intermediate value from the second intermediate value to obtain the round-trip delay.
[0070] In one alternative implementation, the congestion control module is further configured to: increase the data transmission rate when the gradient change of the round-trip delay exceeds a first threshold; and decrease the data transmission rate when the gradient change of the round-trip delay is below a second threshold.
[0071] The congestion control device provided in this embodiment of the invention can execute the congestion control method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects for executing the method. Further functional descriptions of the various modules and units described above are the same as in the corresponding embodiments described above, and will not be repeated here.
[0072] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.
[0073] The following is a detailed reference. Figure 5 This diagram illustrates a suitable structural schematic for implementing an electronic device according to embodiments of the present invention. The electronic device may include a processor (e.g., a central processing unit, graphics processor, etc.) 501, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 502 or a program loaded from memory 508 into random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of the electronic device. The processor 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0074] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; memory devices 508 including, for example, magnetic tapes, hard disks, etc.; and communication devices 509. Communication device 509 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.
[0075] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 509, or installed from a memory 508, or installed from a ROM 502. When the computer program is executed by the processor 501, it performs the functions defined in the congestion control method of the embodiments of the present invention.
[0076] Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.
[0077] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the congestion control method shown in the above embodiments is implemented.
[0078] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0079] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the invention.
Claims
1. A congestion control method, characterized in that, The method includes: The requesting network interface card periodically generates round-trip latency detection requests, encapsulates the round-trip latency detection requests with the recorded request sending timestamps, generates a detection request message, and sends it to the responding network interface card. The probe request message is captured by the response-side network card and the request reception timestamp is recorded. The request sending timestamp, the request receiving timestamp, and the recorded response sending timestamp are encapsulated to generate a probe response message. The probe response message is then sent to the request-side network card through a dedicated traffic category channel. The probe response message is captured by the network card on the requesting side, the response reception timestamp is recorded and parsed, and the round-trip time is calculated based on the request sending timestamp, the request receiving timestamp, the response sending timestamp, and the response receiving timestamp. The requesting network interface card generates a congestion control strategy based on the round-trip time to adjust the data transmission rate.
2. The method according to claim 1, characterized in that, The request-side network interface card (NIC) includes a congestion calculation module, a queue management module, and a sending engine; the step of periodically generating round-trip delay (RTD) probe requests through the request-side NIC, encapsulating the RTD probe requests with a recorded request sending timestamp, generating probe request packets, and sending them to the response-side NIC includes: The congestion calculation module periodically generates round-trip delay detection requests; The round-trip delay detection request is sent to the transmission queue through the queue management module, and a dequeue operation is performed when the round-trip delay detection request is scheduled. The round-trip delay detection request is encapsulated with the recorded request sending timestamp by the sending engine, and a detection request message is generated and sent to the response-side network card.
3. The method according to claim 2, characterized in that, The response-side network interface card (NIC) includes a receiving engine, a queue management module, and a sending engine; the process of capturing the probe request message and recording the request reception timestamp through the response-side NIC, encapsulating the request sending timestamp, the request reception timestamp, and the recorded response sending timestamp to generate a probe response message includes: The probe request message is captured by the receiving engine, the request receiving timestamp is recorded, and the request sending timestamp is extracted from the probe request message. The receiving engine sends a probe response request to the queue management module, carrying the request sending timestamp and the request receiving timestamp. The queue management module sends the probe response request into the transmission queue and performs a dequeue operation when the probe response request is scheduled. The engine records the response sending timestamp, and encapsulates the request sending timestamp, the request receiving timestamp, and the response sending timestamp to generate a probe response message.
4. The method according to claim 3, characterized in that, The requesting network interface card (NIC) further includes a receiving engine; the step of capturing the probe response message through the requesting NIC, recording the response reception timestamp, and parsing it includes: The probe response message is captured by the receiving engine, the response reception timestamp is recorded, and the probe response message is parsed to obtain the request sending timestamp, the request receiving timestamp, and the response sending timestamp.
5. The method according to any one of claims 1 to 4, characterized in that, The calculation of round-trip time based on the request sending timestamp, the request receiving timestamp, the response sending timestamp, and the response receiving timestamp includes: Subtract the timestamp of the response received from the timestamp of the request sent to obtain the first intermediate value; Subtract the timestamp of the response sent from the timestamp of the request received to obtain the second intermediate value; Subtracting the first intermediate value from the second intermediate value yields the round-trip time delay.
6. The method according to any one of claims 1 to 4, characterized in that, The congestion control strategy generated based on the round-trip delay to adjust the data transmission rate includes: When the gradient change of the round-trip delay exceeds a first threshold, the data transmission rate is increased; When the gradient change of the round-trip delay is lower than the second threshold, the data transmission rate is reduced.
7. A congestion control device, characterized in that, The device includes: The probe request module is used to periodically generate round-trip latency probe requests through the requesting side network card, encapsulate the round-trip latency probe requests with the recorded request sending timestamp, generate probe request messages and send them to the responding side network card; The probe response module is used to capture the probe request message and record the request reception timestamp through the response-side network card, encapsulate the request sending timestamp, the request receiving timestamp and the recorded response sending timestamp, generate a probe response message, and send the probe response message to the request-side network card through a dedicated traffic category channel; The latency calculation module is used to capture the probe response message through the requesting side network card, record and parse the response reception timestamp, and calculate the round-trip latency based on the request sending timestamp, the request receiving timestamp, the response sending timestamp, and the response receiving timestamp; The congestion control module is used to generate a congestion control strategy based on the round-trip time using the requesting network interface card to adjust the data transmission rate.
8. An electronic device, characterized in that, include: A memory and a processor are communicatively connected, the memory storing computer instructions, and the processor executing the computer instructions to perform the congestion control method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the congestion control method according to any one of claims 1 to 6.
10. A computer program product, characterized in that, Includes computer instructions for causing a computer to perform the congestion control method according to any one of claims 1 to 6.
