Network congestion control method, apparatus, chip, electronic device and storage medium
By using multiple timestamps in network transmission to distinguish transmission time and processing time, accurately judge network status and adjust the transmission rate, the problem of poor network congestion control effect in the prior art is solved, and more precise congestion control is achieved.
Patent Information
- Application Number
- PCT/CN2024/089605
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-05-08
- Filing Date
- 2024-04-24
- Publication Date
- 2024-11-14
AI Technical Summary
The existing network congestion control methods rely on RTT to determine the network congestion state, which is easily affected by jitter during the processing time of the receiver, resulting in distortion in the judgment of the congestion state, and the degree of congestion cannot be accurately judged, resulting in poor network congestion control effect.
By carrying multiple timestamps in the request message and the response message, the network transmission time is calculated and determined, and compared with the historical time, the network status is judged, thereby adjusting the transmission rate to control network congestion.
It realizes a more accurate judgment of the network congestion state, distinguishes the transmission time and processing time, and can determine whether the congestion exists and the degree of congestion, reasonably adjusts the transmission rate, and effectively controls network congestion.
Smart Images

Figure CN2024089605_14112024_PF_FP_ABST
Abstract
Description
Network congestion control method, device, chip, electronic device and storage medium
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on May 8, 2023, with application number 202310514423.4, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of computer technology, and in particular to a network congestion control method, device, chip, electronic device, and storage medium. Background Art
[0003] In related technologies, network congestion control methods typically use RTT (Round Trip Time) as a congestion signal to determine the network's congestion status. This in turn adjusts the rate at which messages are sent from the sender to the receiver to control network congestion. RTT refers to the round-trip time of a message, or the difference between the time a request message is sent and the time a response message is received.
[0004] However, the current network congestion control method that uses RTT as a congestion signal, on the one hand, does not distinguish between the network propagation time of a message and the processing time of the message at the receiving end, and is easily affected by the jitter of the processing time at the receiving end, resulting in distorted judgment of the network congestion status; on the other hand, relying solely on a single RTT signal to judge the network congestion status, although it can only determine whether congestion exists, but cannot determine the degree of congestion, which will also result in distorted judgment of the network congestion status, resulting in the inability to reasonably adjust the sending rate of the request message, resulting in poor network congestion control effect.
[0005] Summary of the Invention
[0006] The present application provides a network congestion control method, device, chip, electronic device and storage medium to more accurately determine the network congestion status and more reasonably adjust the sending rate of request messages, thereby effectively controlling network congestion.
[0007] According to a first aspect of the present application, a network congestion control method is provided, which is applied to a sending end. The method includes:
[0008] Sending a first request message to a receiving end, wherein the first request message carries a first timestamp, and the first timestamp is used to indicate the time when the sending end sends the first request message;
[0009] Receive a first response message corresponding to the first request message sent by the receiving end, and record a second timestamp, wherein the first response message carries a first timestamp, a third timestamp, and a fourth timestamp, the second timestamp is used to indicate the time when the sending end receives the first response message, the third timestamp is used to indicate the time when the receiving end receives the first request message, and the fourth timestamp is used to indicate the time when the receiving end sends the first response message;
[0010] Determine a first network transmission duration of the first request message based on the first timestamp, the second timestamp, the third timestamp, and the fourth timestamp;
[0011] Obtain a second network transmission duration and a reference network transmission duration, wherein the second network transmission duration is the network transmission duration of the previous first request message of the current first request message, and the reference transmission duration is the historical minimum network transmission duration of the request message of the data flow to which the first request message belongs;
[0012] Determining a network status for transmitting the first request message based on a comparison relationship between the first network transmission time, the second network transmission time, and the reference network transmission time;
[0013] Based on the network status, a sending rate of a next request message of the first request message is adjusted.
[0014] According to a second aspect of the present application, a network congestion control method is provided, which is applied to a receiving end. The method includes:
[0015] Receive a first request message sent by a sending end, wherein the first request message carries a first timestamp, and the first timestamp is used to indicate the time when the sending end sends the first request message;
[0016] Send a first response message corresponding to the first request message to the sending end, wherein the first response message carries a first timestamp, a third timestamp and a fourth timestamp, the third timestamp is used to represent the time when the receiving end receives the first request message, and the fourth timestamp is used to represent the time when the receiving end sends the first response message.
[0017] According to a third aspect of the present application, a network congestion control device is provided, which is configured at a transmitting end and includes: a first message sending module, a first message receiving module, a duration determination module, a duration acquisition module, a network status determination module, and a rate adjustment module.
[0018] A first message sending module is configured to send a first request message to a receiving end, wherein the first request message carries a first timestamp, and the first timestamp is used to indicate the time when the sending end sends the first request message;
[0019] a first message receiving module, configured to receive a first response message corresponding to the first request message sent by the receiving end, and record a second timestamp, wherein the first response message carries a first timestamp, a third timestamp, and a fourth timestamp, the second timestamp is used to indicate the time when the sending end receives the first response message, the third timestamp is used to indicate the time when the receiving end receives the first request message, and the fourth timestamp is used to indicate the time when the receiving end sends the first response message;
[0020] a duration determination module, configured to determine a first network transmission duration of the first request message based on the first timestamp, the second timestamp, the third timestamp, and the fourth timestamp;
[0021] a duration acquisition module, configured to acquire a second network transmission duration and a reference network transmission duration, wherein the second network transmission duration is the network transmission duration of a previous first request message before the current first request message, and the reference transmission duration is the historical minimum network transmission duration of a request message of the data flow to which the first request message belongs;
[0022] a network status determination module configured to determine a network status for transmitting the first request message based on a comparison relationship between the first network transmission duration, the second network transmission duration, and the reference network transmission duration;
[0023] The rate adjustment module is configured to adjust the sending rate of the next request message of the first request message based on the network state.
[0024] According to a fourth aspect of the present application, a network congestion control device is provided, which is configured at a receiving end and includes: a second message receiving module and a second message sending module.
[0025] a second message receiving module, configured to receive a first request message sent by a sending end, wherein the first request message carries a first timestamp, and the first timestamp is used to indicate the time when the sending end sends the first request message;
[0026] The second message sending module is configured to send a first response message corresponding to the first request message to the sending end, wherein the first response message carries a first timestamp, a third timestamp and a fourth timestamp, the third timestamp is used to represent the time when the receiving end receives the first request message, and the fourth timestamp is used to represent the time when the receiving end sends the first response message.
[0027] According to a fifth aspect of the present application, a chip is provided, comprising:
[0028] A processor is configured to execute computer program instructions stored in a memory, wherein, when the computer program instructions are executed by the processor, the chip is triggered to execute the network congestion control method provided in the first aspect or the second aspect of the present application.
[0029] According to a sixth aspect of the present application, an electronic device is provided, comprising the chip provided in the fifth aspect of the present application, and a memory;
[0030] The memory is used to store computer program instructions;
[0031] When the computer program instructions are executed by the processor in the chip, the processor implements the network congestion control method provided in the first aspect or the second aspect of the present application.
[0032] According to the seventh aspect of the present application, a computer-readable storage medium is provided, which stores computer program instructions, and the computer program instructions are used to enable a processor to implement the network congestion control method provided in the first aspect or the second aspect of the present application when executed. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] FIG1 is a schematic diagram of an application scenario of a network congestion control method provided by the present application;
[0034] FIG2 is a flow chart of a network congestion control method provided in an embodiment of the present application applied to a sending end;
[0035] FIG3 is a flow chart of a network congestion control method provided by an embodiment of the present application applied to a receiving end;
[0036] FIG4 is a schematic structural diagram of a network congestion control device configured at a transmitting end provided by an embodiment of the present application;
[0037] FIG5 is a schematic structural diagram of a network congestion control device configured at a receiving end provided by an embodiment of the present application. DETAILED DESCRIPTION
[0038] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0039] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.
[0040] The network congestion control method provided by the present application can perform congestion control on messages transmitted between a sending end and a receiving end. For example, the application scenario of the network congestion control method can be seen in Figure 1. Figure 1 is a schematic diagram of an application scenario of the network congestion control method provided by the present application.
[0041] As shown in Figure 1, when sender A and sender B send request packets to the receiver, the request packets from sender A and sender B pass through the switch to reach the receiver. The response packet from the receiver to sender A, based on sender A's request packet, passes through the switch and returns to sender A. The response packet from the receiver to sender B, based on sender B's request packet, passes through the switch and returns to sender B. If the rate of data flowing into the switch is greater than the rate of data flowing out of the switch, packets may accumulate in the switch's buffer queue, causing packet congestion within the switch.
[0042] It should be noted that in this application, messages include request messages and response messages. Based on a service request, the message sent by the sender to the receiver is a request message, and several request messages flowing from the sender to the receiver form a data flow. The message returned by the receiver to the sender based on the request message is a response message, and several response messages flowing from the receiver to the sender also form a data flow.
[0043] Defined by the flow direction of the request message, the sender is the source and the receiver is the destination. For example, both the sender and the receiver can be a NIC (Network Interface Card) or a DPU (Data Processing Unit), or they can be software or hardware modules configured in the NIC or DPU, or they can be electronic devices configured with the NIC or DPU, or they can be software or hardware modules in the electronic devices, where the software or hardware modules can implement at least one service function alone or in combination with other software or hardware modules. The electronic devices can be computers or servers, etc.
[0044] In order to avoid network congestion that may occur when transmitting messages between a sending end and a receiving end, the present application provides a network congestion control method. The network congestion control method is applied to the sending end and the receiving end.
[0045] For a network congestion control method applied to a transmitter, please refer to FIG2 , which is a flowchart of a network congestion control method applied to a transmitter according to an embodiment of the present application. As shown in FIG2 , the network congestion control method may include the following steps:
[0046] Step S210: Send a first request message to the receiving end, wherein the first request message carries a first timestamp, and the first timestamp is used to represent the time when the sending end sends the first request message.
[0047] In one embodiment, upon receiving a service request, the sending end parses the service request and then sends a request message to the receiving end based on the service request. The service request may be an instruction instructing the sending end to send data to the receiving end. The service request includes at least five-tuple information of the receiving end.
[0048] In one embodiment, when sending a first request message to a receiving end, the sending end constructs the first request message. During the process of constructing the first request message, the sending end records the time when the first request message is about to be sent to the receiving end, and places the time as a first timestamp in a message header of the first request message. The first request message is a data message with an RTT (Round Trip Time) request. The first request message includes an RTT extension message header, and the RTT extension message header of the first request message carries the first timestamp.
[0049] For example, in the present application, the request message includes two types of request messages. One is a first request message, and the other is a second request message. For the first request message, the sending end sends the first request message to the receiving end in two situations. The first situation: in order to detect the network congestion state, the sending end sends the first request message to the receiving end when sending the request message for the first time. The second situation: when the sending end receives a response message to the first request message (i.e., the first response message), it sends the first request message to the receiving end.
[0050] For the second request message, the transmitting end sends the second request message to the receiving end in addition to sending the first request message to the receiving end. Furthermore, upon receiving a second response message to the second request message, the transmitting end sends the second request message to the receiving end. The second request message is a normal data message and does not carry the first timestamp. The second response message does not carry the first timestamp, the third timestamp, or the fourth timestamp.
[0051] Step S220: Receive a first response message corresponding to the first request message sent by the receiving end, and record a second timestamp, wherein the first response message carries a first timestamp, a third timestamp, and a fourth timestamp.
[0052] In one embodiment, when the sending end receives a first response message corresponding to the first request message returned by the receiving end, the sending end records the time when the first request message is received as a second timestamp. The second timestamp can be used to indicate the time when the sending end receives the first response message. The first response message includes an RTT message header, and the first response message carries a first timestamp, a third timestamp, and a fourth timestamp in the RTT message header. The third timestamp can be used to indicate the time when the receiving end receives the first request message. The fourth timestamp can be used to indicate the time when the receiving end sends the first response message.
[0053] Step S230: Determine a first network transmission duration of the first request message based on the first timestamp, the second timestamp, the third timestamp, and the fourth timestamp.
[0054] In one embodiment, the first network transmission duration of the first request message can be understood as the duration from when the sending end sends the first request message to when it receives the first response message corresponding to the first request message, minus the processing duration from when the receiving end receives the first request message to when it sends the first response message corresponding to the first request message.
[0055] In a variation of one embodiment, after determining the first network transmission duration of the current first request message each time, the sending end stores the first network transmission duration of the current first request message in a storage module.
[0056] The present application determines the first network transmission time of the first request message by calculation, and can distinguish the network transmission time of the first request message and the processing time of the first request message at the receiving end, thereby avoiding the influence of the jitter of the processing time of the first request message at the receiving end, which leads to distorted judgment of the network congestion status.
[0057] Step S240: Acquire the second network transmission duration and the reference network transmission duration.
[0058] In one embodiment, the second network transmission duration is the first network transmission duration of the first request message preceding the current first request message. The sending end may obtain the first network transmission duration of the first request message preceding the current first request message from a storage module. The reference transmission duration is the historical minimum first network transmission duration of the first request message. The sending end may select the historical minimum first network transmission duration of the first request message from the storage module.
[0059] Step S250: Determine the network status for transmitting the first request message based on a comparison relationship between the first network transmission duration, the second network transmission duration, and the reference network transmission duration.
[0060] In one embodiment, after obtaining the first network transmission time, the second network transmission time, and the reference network transmission time, the sending end can compare the first network transmission time with the second network transmission time and the reference network transmission time, respectively, thereby obtaining a first comparison result of the first network transmission time and the second network transmission time, and obtaining a second comparison result of the first network transmission time and the reference network transmission time, and then determining the network status of transmitting the first request message based on the first comparison result and the second comparison result.
[0061] For example, determining the network status for transmitting the first request message based on the comparison relationship between the first network transmission time, the second network transmission time, and the reference network transmission time may include at least the following situations:
[0062] Case 1: When the first network transmission time is less than the second network transmission time and greater than the reference network transmission time, the network status may be determined as congestion existing and tending to ease.
[0063] Case 2: When the first network transmission duration is less than the second network transmission duration and is equal to or less than the reference network transmission duration, the network status may be determined as possible congestion and the congestion is tending to ease.
[0064] Case 3: When the first network transmission duration is equal to the second network transmission duration and is greater than the reference network transmission duration, the network status may be determined as congestion existing and the congestion remaining stable.
[0065] Case 4: When the first network transmission duration is equal to the second network transmission duration and equal to the reference network transmission duration, the network status may be determined as possible congestion and the congestion remains stable.
[0066] Case 5: When the first network transmission time is greater than the second network transmission time and greater than the reference network transmission time, the network status may be determined as congestion existing and tending to be severe.
[0067] It should be noted that the first network transmission duration is equal to the second network transmission duration and is less than the reference network transmission duration. The first network transmission duration is greater than the second network transmission duration and is equal to or less than the reference network transmission duration.
[0068] The present application performs a dual judgment of the network status through the first network transmission time and the two derived signals of the second network transmission time and the reference network transmission time. It can not only judge whether congestion exists, but also judge the degree of congestion and the congestion trend, making the judgment of network congestion more accurate.
[0069] Step S260: Based on the network status, adjust the sending rate of the next request message of the first request message.
[0070] In a modified embodiment of an embodiment, adjusting the sending rate of the next request message of the first request message based on the network status may include: obtaining the sending rate of the first request message, and adjusting the sending rate of the next request message of the first request message based on the network status and the sending rate of the first request message.
[0071] Adjusting the sending rate of the next request message of the first request message based on the network state and the sending rate of the first request message may include at least the following situations:
[0072] Case 1: When the network status is congestion existing and tending to ease, or congestion possibly existing and tending to ease, the sending rate of the next request message of the first request message may be maintained at the sending rate of the first request message.
[0073] Case 2: When the network status is congestion that exists and remains stable, or congestion that exists and tends to be serious, the sending rate of the first request message can be reduced to serve as the sending rate of the next request message of the first request message.
[0074] Case 3: When the network status indicates that congestion may exist and the congestion remains stable, the sending rate of the first request message may be increased to serve as the sending rate of the next request message after the first request message.
[0075] The network congestion control method provided in the present application can distinguish the network transmission time of the first request message from the processing time of the first request message at the receiving end by recording the first timestamp, the second timestamp, the third timestamp, and the fourth timestamp, and calculating and determining the first network transmission time of the first request message, thereby avoiding the influence of the jitter of the processing time of the first request message at the receiving end, which leads to the distortion of the judgment of the network congestion state. In addition, by performing a double judgment of the network state by combining the first network transmission time with the two derivative signals of the second network transmission time and the reference network transmission time, it is possible to judge not only whether congestion exists, but also the degree of congestion, making the judgment of network congestion more accurate. In this way, the sending rate of the next request message of the first request message can be adjusted more reasonably, effectively controlling network congestion.
[0076] For a network congestion control method applied to a receiving end, please refer to FIG3 , which is a flowchart of a network congestion control method applied to a receiving end provided by an embodiment of the present application. As shown in FIG3 , the network congestion control method may include the following steps:
[0077] S310: Receive a first request message sent by a sending end, wherein the first request message carries a first timestamp, and the first timestamp is used to indicate the time when the sending end sends the first request message.
[0078] In one embodiment, upon receiving the first request message, the receiving end parses the first request message. The receiving end obtains a first timestamp from parsing the first request message to determine that the first request message is a data message with an RTT request. After determining that the first request message is a data message with an RTT request, the receiving end records the time at which the first request message was received and uses the time as the third timestamp.
[0079] Step S320: Send a first response message corresponding to the first request message to the sending end, wherein the first response message carries a first timestamp, a third timestamp, and a fourth timestamp.
[0080] In one embodiment, when sending a first response message to a sending end, a receiving end constructs a first response message. In the process of constructing the first response message, the receiving end records the time when the first response message is to be sent to the sending end, and uses the time as the fourth timestamp. Furthermore, the receiving end places the first timestamp, the third timestamp, and the fourth timestamp in a message header of the first response message. The first response message is a response message with an RTT request, the first response message includes an RTT extension message header, and the RTT extension message header of the first response message carries the first timestamp, the third timestamp, and the fourth timestamp.
[0081] In one embodiment, the network congestion control method applied to the receiving end may further include: receiving a second request message sent by the sending end, wherein the second request message does not carry the first timestamp, and sending a second response message corresponding to the second request message to the sending end, wherein the second response message does not carry the first timestamp, the third timestamp, and the fourth timestamp.
[0082] The network congestion control method provided in the present application can distinguish the network transmission time of the first request message from the processing time of the first request message at the receiving end by recording the first timestamp, the second timestamp, the third timestamp, and the fourth timestamp, and calculating and determining the first network transmission time of the first request message, thereby avoiding the influence of the jitter of the processing time of the first request message at the receiving end, which leads to the distortion of the judgment of the network congestion state. In addition, by performing a double judgment of the network state by combining the first network transmission time with the two derivative signals of the second network transmission time and the reference network transmission time, it is possible to judge not only whether congestion exists, but also the degree of congestion, making the judgment of network congestion more accurate. In this way, the sending rate of the next request message of the first request message can be adjusted more reasonably, effectively controlling network congestion.
[0083] An embodiment of the present application also provides a network congestion control device configured at the sending end. Please refer to Figure 4, which is a structural diagram of a network congestion control device configured at the sending end provided by an embodiment of the present application. As shown in Figure 4, the device includes: a first message sending module 410, a first message receiving module 420, a duration determination module 430, a duration acquisition module 440, a network status determination module 450 and a rate adjustment module 460. Among them,
[0084] The first message sending module 410 is configured to send a first request message to the receiving end, wherein the first request message carries a first timestamp, and the first timestamp is used to indicate the time when the sending end sends the first request message.
[0085] In the present application, the request message includes two types of request messages. One is a first request message, and the other is a second request message. For the first request message, the sending end sends the first request message to the receiving end in two situations. The first situation: in order to detect the network congestion state, the sending end sends the first request message to the receiving end when sending the request message for the first time. The second situation: when the sending end receives the response message to the first request message (i.e., the first response message), it sends the first request message to the receiving end.
[0086] For the second request message, the transmitting end sends the second request message to the receiving end in addition to sending the first request message to the receiving end. Furthermore, upon receiving a second response message to the second request message, the transmitting end sends the second request message to the receiving end. The second request message is a normal data message and does not carry the first timestamp. The second response message does not carry the first timestamp, the third timestamp, or the fourth timestamp.
[0087] The first message receiving module 420 is configured to receive a first response message corresponding to the first request message sent by the receiving end, and record a second timestamp. The first response message carries a first timestamp, a third timestamp, and a fourth timestamp. The second timestamp is used to indicate the time when the sending end receives the first response message. The third timestamp is used to indicate the time when the receiving end receives the first request message. The fourth timestamp is used to indicate the time when the receiving end sends the first response message.
[0088] In the present application, the first response message includes an RTT message header, and the first response message carries a first timestamp, a third timestamp, and a fourth timestamp in the RTT message header.
[0089] The duration determination module 430 is configured to determine a first network transmission duration of the first request message based on the first timestamp, the second timestamp, the third timestamp, and the fourth timestamp.
[0090] In the present application, the first network transmission duration of the first request message can be understood as the duration from when the sending end sends the first request message to when it receives the first response message corresponding to the first request message, minus the processing duration from when the receiving end receives the first request message to when it sends the first response message corresponding to the first request message. Each time the sending end determines the first network transmission duration of the current first request message, it stores the first network transmission duration of the current first request message in the storage module.
[0091] The present application determines the first network transmission time of the first request message by calculation, and can distinguish the network transmission time of the first request message and the processing time of the first request message at the receiving end, thereby avoiding the influence of the jitter of the processing time of the first request message at the receiving end, which leads to distorted judgment of the network congestion status.
[0092] Duration acquisition module 440 is configured to acquire a second network transmission duration and a reference network transmission duration, wherein the second network transmission duration is the first network transmission duration of the first request message preceding the current first request message, and the reference transmission duration is the historical minimum first network transmission duration of the first request message.
[0093] In the present application, the sending end may select the historical minimum first network transmission duration of the first request message from the storage module.
[0094] The network status determination module 450 is configured to determine the network status of transmitting the first request message based on a comparison relationship between the first network transmission duration, the second network transmission duration, and the reference network transmission duration.
[0095] For example, the network status determination module 450 may be configured to determine at least the following situations:
[0096] Case 1: When the first network transmission time is less than the second network transmission time and greater than the reference network transmission time, the network status may be determined as congestion existing and tending to ease.
[0097] Case 2: When the first network transmission duration is less than the second network transmission duration and is equal to or less than the reference network transmission duration, the network status may be determined as possible congestion and the congestion is tending to ease.
[0098] Case 3: When the first network transmission duration is equal to the second network transmission duration and is greater than the reference network transmission duration, the network status may be determined as congestion existing and the congestion remaining stable.
[0099] Case 4: When the first network transmission duration is equal to the second network transmission duration and equal to the reference network transmission duration, the network status may be determined as possible congestion and the congestion remains stable.
[0100] Case 5: When the first network transmission time is greater than the second network transmission time and greater than the reference network transmission time, the network status may be determined as congestion existing and tending to be severe.
[0101] The present application performs a dual judgment of the network status through the first network transmission time and the two derived signals of the second network transmission time and the reference network transmission time. It can not only judge whether congestion exists, but also judge the degree of congestion, making the judgment of network congestion more accurate.
[0102] The rate adjustment module 460 is configured to adjust the sending rate of the next request message of the first request message based on the network status.
[0103] For example, the rate adjustment module 460 is configured to obtain a sending rate of the first request message, and adjust a sending rate of a next request message of the first request message based on the network state and the sending rate of the first request message.
[0104] For example, the rate adjustment module 460 may be configured to adjust the transmission rate in at least the following situations:
[0105] Case 1: When the network status is congestion existing and tending to ease, or congestion possibly existing and tending to ease, the sending rate of the next request message of the first request message may be maintained at the sending rate of the first request message.
[0106] Case 2: When the network status is congestion that exists and remains stable, or congestion that exists and tends to be serious, the sending rate of the first request message can be reduced to serve as the sending rate of the next request message of the first request message.
[0107] Case 3: When the network status indicates that congestion may exist and the congestion remains stable, the sending rate of the first request message may be increased to serve as the sending rate of the next request message after the first request message.
[0108] The network congestion control device provided in the present application is configured at the sending end. By recording the first timestamp, the second timestamp, the third timestamp, and the fourth timestamp, and calculating and determining the first network transmission time of the first request message, it can distinguish the network transmission time of the first request message from the processing time of the first request message at the receiving end, thereby avoiding the influence of the jitter of the processing time of the first request message at the receiving end, which leads to the distortion of the judgment of the network congestion state. In addition, by performing a double judgment of the network state by combining the first network transmission time with the two derivative signals of the second network transmission time and the reference network transmission time, it can not only judge whether congestion exists, but also judge the degree of congestion, and make the judgment of network congestion more accurate. Therefore, the sending rate of the next request message of the first request message can be adjusted more reasonably, effectively controlling network congestion.
[0109] It should be noted that the network congestion control device configured at the sending end provided in the embodiment of the present application can execute the network congestion control method provided in the embodiment of the present application, and has the corresponding functional modules and beneficial effects of the execution method.
[0110] An embodiment of the present application also provides a network congestion control device configured at a receiving end. Please refer to Figure 5, which is a structural diagram of a network congestion control device configured at a receiving end provided by an embodiment of the present application. As shown in Figure 5, the device includes: a second message receiving module 510 and a second message sending module 520. Among them,
[0111] The second message receiving module 510 is configured to receive a first request message sent by a sending end, wherein the first request message carries a first timestamp, and the first timestamp is used to indicate the time when the sending end sends the first request message.
[0112] In the present application, the first request message is a data message with an RTT request. The first request message includes an RTT extension message header, and the RTT extension message header of the first request message carries a first timestamp.
[0113] The second message sending module 520 is configured to send a first response message corresponding to the first request message to the sending end. The first response message carries a first timestamp, a third timestamp, and a fourth timestamp. The third timestamp indicates the time when the receiving end received the first request message. The fourth timestamp indicates the time when the receiving end sent the first response message.
[0114] In the present application, the first response message is a response message with an RTT request, the first response message includes an RTT extension message header, and the RTT extension message header of the first response message carries a first timestamp, a third timestamp and a fourth timestamp.
[0115] In one embodiment, the network congestion control device configured at the receiving end may further include: a third message receiving module and a third message sending module.
[0116] The third message receiving module is configured to receive a second request message sent by the sending end, wherein the second request message does not carry the first timestamp.
[0117] The third message sending module is configured to send a second response message corresponding to the second request message to the sending end, wherein the second response message does not carry the first timestamp, the third timestamp and the fourth timestamp.
[0118] According to the technical solution of the embodiment of the present application, the receiving end receives the first request message sent by the sending end, wherein the first request message carries a first timestamp. After receiving the first request message, a first response message corresponding to the first request message is generated, and a first response message corresponding to the first request message is sent to the sending end, wherein the first response message carries a first timestamp, a third timestamp, and a fourth timestamp. In the technical solution of the embodiment of the present application, the receiving end records the first timestamp, the third timestamp, and the fourth timestamp in the first response message, which not only makes it easier for the sending end to distinguish between the network propagation delay and the data processing delay, so as to avoid the influence of the data processing delay on the judgment of the network status, thereby facilitating more accurate acquisition of the delay of the request message in the network propagation, but also can achieve the technical effect of the receiving end and the sending end collaboratively controlling network congestion.
[0119] It should be noted that the network congestion control device configured at the receiving end provided in the embodiment of the present application can execute the network congestion control method provided in the embodiment of the present application, and has the corresponding functional modules and beneficial effects of the execution method.
[0120] The present application also provides a chip. The chip includes a processor configured to execute computer program instructions stored in a memory, wherein when the computer program instructions are executed by the processor, the chip is triggered to execute the network congestion control method provided in the embodiments of the present application. For example, the chip can be a DPU chip.
[0121] The present application also provides an electronic device. The electronic device includes the chip and a memory; the memory is used to store computer program instructions; when the computer program instructions are executed by a processor in the chip, the processor implements the network congestion control method provided in the embodiment of the present application.
[0122] For example, electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or claimed herein.
[0123] The present application also provides a computer-readable storage medium, which stores computer program instructions. The computer program instructions are used to enable a processor to implement the network congestion control method provided in an embodiment of the present application when executed.
[0124] For example, the computer program instructions for implementing the methods of the present application can be written in any combination of one or more programming languages. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program instructions are executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program instructions can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0125] For example, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. A computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. A computer-readable storage medium can be a machine-readable signal medium. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. A computer-readable storage medium can be a non-transient computer-readable storage medium.
[0126] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the multiple steps described in this application can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of this application can be achieved. This is not limited herein.
Claims
1. A network congestion control method, applied to a sending end, comprising: Sending a first request message to a receiving end, wherein the first request message carries a first timestamp, and the first timestamp is used to indicate the time when the sending end sends the first request message; Receive a first response message corresponding to the first request message sent by the receiving end, and record a second timestamp, wherein the first response message carries the first timestamp, a third timestamp and a fourth timestamp, the second timestamp is used to represent the time when the sending end receives the first response message, the third timestamp is used to represent the time when the receiving end receives the first request message, and the fourth timestamp is used to represent the time when the receiving end sends the first response message; Determine a first network transmission duration of the first request message based on the first timestamp, the second timestamp, the third timestamp, and the fourth timestamp; Obtain a second network transmission duration and a reference network transmission duration, wherein the second network transmission duration is the first network transmission duration of the previous first request message of the current first request message, and the reference transmission duration is the historical minimum first network transmission duration of the first request message; Determine a network state for transmitting the first request message based on a comparison relationship between the first network transmission duration, the second network transmission duration, and the reference network transmission duration; Based on the network status, a sending rate of a next request message of the first request message is adjusted.
2. The method according to claim 1, further comprising: When sending the request message for the first time or receiving the first response message, sending the first request message to the receiving end; When receiving the second response message, sending a second request message to the receiving end; The request message includes the first request message and the second request message, the second request message does not carry the first timestamp, and the second response message does not carry the first timestamp, the third timestamp and the fourth timestamp.
3. The method according to claim 1, wherein: The determining, based on the comparison relationship between the first network transmission duration, the second network transmission duration, and the reference network transmission duration, a network state for transmitting the first request message includes: When the first network transmission time is less than the second network transmission time and greater than the reference network transmission time, determining the network state as congestion exists and the congestion tends to be alleviated; When the first network transmission time is less than the second network transmission time and is equal to or less than the reference network transmission time, determining the network state as congestion may exist and the congestion tends to be alleviated; When the first network transmission duration is equal to the second network transmission duration and is greater than the reference network transmission duration, determining the network state as congestion exists and the congestion remains stable; When the first network transmission duration is equal to the second network transmission duration and equal to the reference network transmission duration, determining the network state as congestion may exist and the congestion remains stable; The first network transmission time is longer than the second network transmission time and longer than the reference network transmission time. In the case of congestion, the network status is determined as congestion exists and the congestion tends to be serious.
4. The method according to claim 3, wherein: The adjusting, based on the network state, a sending rate of a next request message of the first request message includes: Obtaining a sending rate of the first request message; When the network state is that congestion exists and the congestion tends to be relieved, or when the network state is that congestion may exist and the congestion tends to be relieved, maintaining a sending rate of a next request message of the first request message at a sending rate of the first request message; When the network state is that congestion exists and the congestion remains stable, or when the network state is that congestion exists and the congestion tends to be serious, reducing the sending rate of the first request message to serve as the sending rate of the next request message of the first request message; When the network status indicates that congestion may exist and the congestion remains stable, the sending rate of the first request message is increased to serve as the sending rate of the next request message of the first request message.
5. A network congestion control method, applied to a receiving end, comprising: Receive a first request message sent by a sending end, wherein the first request message carries a first timestamp, and the first timestamp is used to indicate the time when the sending end sends the first request message; A first response message corresponding to the first request message is sent to a sending end, wherein the first response message carries the first timestamp, a third timestamp and a fourth timestamp, the third timestamp is used to represent the time when the receiving end receives the first request message, and the fourth timestamp is used to represent the time when the receiving end sends the first response message.
6. The method according to claim 5, further comprising: Receive a second request message sent by the sending end, wherein the second request message does not carry the first timestamp; Send a second response message corresponding to the second request message to the sending end, wherein the second response message does not carry the first timestamp, the third timestamp and the fourth timestamp.
7. A network congestion control device, configured at a transmitting end, comprising: A first message sending module, a first message receiving module, a transmission duration determining module, a duration obtaining module, a network status determining module and a rate adjusting module; wherein, A first message sending module, configured to send a first request message to a receiving end, wherein the first request message carries a first timestamp, and the first timestamp is used to indicate the time when the sending end sends the first request message; A first message receiving module, configured to receive a first response message corresponding to the first request message sent by the receiving end, and record a second timestamp, wherein the first response message carries the first timestamp, a third timestamp and a fourth timestamp, the second timestamp is used to indicate the time when the sending end receives the first response message, the third timestamp is used to indicate the time when the receiving end receives the first request message, and the fourth timestamp is used to indicate the time when the receiving end sends the first response message; a transmission duration determining module, configured to determine a first network transmission duration of the first request message based on the first timestamp, the second timestamp, the third timestamp, and the fourth timestamp; A duration acquisition module is configured to acquire a second network transmission duration and a reference network transmission duration, wherein the second network transmission duration is the network transmission duration of the previous first request message of the current first request message, and the reference transmission duration is The historical minimum network transmission duration of the request message of the data flow to which the first request message belongs; a network status determination module, configured to determine a network status for transmitting the first request message based on a comparison relationship between the first network transmission duration, the second network transmission duration, and the reference network transmission duration; The rate adjustment module is configured to adjust the sending rate of the next request message of the first request message based on the network state.
8. A network congestion control device, configured at a receiving end, comprising: A second message receiving module and a second message sending module; wherein, A second message receiving module, configured to receive a first request message sent by a sending end, wherein the first request message carries a first timestamp, and the first timestamp is used to indicate the time when the sending end sends the first request message; A second message sending module is configured to send a first response message corresponding to the first request message to a sending end, wherein the first response message carries the first timestamp, a third timestamp and a fourth timestamp, the third timestamp is used to represent the time when the receiving end receives the first request message, and the fourth timestamp is used to represent the time when the receiving end sends the first response message.
9. A chip, comprising: A processor, configured to execute computer program instructions stored in a memory, wherein, when the computer program instructions are executed by the processor, the chip is triggered to execute the network congestion control method described in any one of claims 1-4; or, the network congestion control method described in any one of claims 5-6.
10. An electronic device comprising the chip as claimed in claim 9, and a memory; The memory is used to store computer program instructions; When the computer program instructions are executed by the processor in the chip, the processor implements the network congestion control method as described in any one of claims 1-4; or the network congestion control method as described in any one of claims 5-6.
11. A computer-readable storage medium storing computer program instructions, wherein the computer program instructions are used to enable a processor to implement the network congestion control method according to any one of claims 1 to 4 when executed; or the network congestion control method according to any one of claims 5 to 6.
Citation Information
Patent Citations
Network congestion control method and device, chip, electronic equipment and storage medium
CN118921323A
Data sending method and data sending device
CN105407411A
Time synchronization method and system
CN111385048A
Network information storage method and device
CN111585834A
Method and system for controlling data delivery and reception based on timestamps of data records
US6339790B1
