CN115277556A - Congestion control method, electronic device and readable storage medium - Google Patents

Congestion control method, electronic device and readable storage medium Download PDF

Info

Publication number
CN115277556A
CN115277556A CN202210705865.2A CN202210705865A CN115277556A CN 115277556 A CN115277556 A CN 115277556A CN 202210705865 A CN202210705865 A CN 202210705865A CN 115277556 A CN115277556 A CN 115277556A
Authority
CN
China
Prior art keywords
time
packet
sending
data
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210705865.2A
Other languages
Chinese (zh)
Inventor
陈伟龙
陈文生
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wangsu Science and Technology Co Ltd
Original Assignee
Wangsu Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wangsu Science and Technology Co Ltd filed Critical Wangsu Science and Technology Co Ltd
Priority to CN202210705865.2A priority Critical patent/CN115277556A/en
Publication of CN115277556A publication Critical patent/CN115277556A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control

Abstract

The application discloses a congestion control method, electronic equipment and a readable storage medium. And then, when the current time reaches a second moment, sending the data packets according to the data volume at a constant speed according to the sending rate, so that the data packets can be sent smoothly. By adopting the scheme, the sending terminal equipment does not need to support a high-precision timer, but only supports a millisecond-level timer to ensure the stable sending of the data packet, and the cost of the sending equipment for supporting the stable sending is reduced. Moreover, compared with burst transmission, the method can reduce network jitter and packet loss, and can reduce the queuing time of data packets. In addition, the electronic equipment is not required to process high-precision timing tasks, the power consumption of the electronic equipment is reduced, and the cruising ability of the electronic equipment is improved.

Description

Congestion control method, electronic device and readable storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a congestion control method, an electronic device, and a readable storage medium.
Background
With the rapid development of internet technology, network bandwidth and user scale are increasing explosively, network data is changed from original text transmission, web browsing to audio and video transmission, game video and the like, and the network data is increasingly complex.
In the network data transmission process, network data congestion often occurs due to reasons such as too large network data amount or network transmission bandwidth limitation, and the network transmission performance is affected. In order to solve the problem of network data congestion, a Bottleneck Bandwidth and Round-trip propagation time (BBR) congestion control method is usually adopted to adjust the amount of data sent by a sending end. Based on the BBR congestion control method, the sending end device dynamically adjusts and controls a Congestion Window (CWND) and a packet sending rate (paging rate) during network transmission by measuring a bottleneck bandwidth and a round-trip propagation delay.
The BBR congestion control method has high requirement on the precision of the timer, and the precision of the timer is required to at least reach microsecond level. However, many electronic devices such as mobile phones and tablet computers cannot provide a highly accurate timer, and thus cannot perform congestion control.
Disclosure of Invention
The application provides a congestion control method, an electronic device and a readable storage medium, and the requirement on the precision of a timer is low, so that the electronic device without the high-precision timer can also support paging sending, and the application range of the paging sending method is widened.
In a first aspect, an embodiment of the present application provides a congestion control method, which is applied to a sending-end device, and the method includes:
determining a sending rate after receiving the ACK packet each time;
determining a time interval between a first time and a second time, wherein the first time and the second time are initial times of each round of transmission in two adjacent rounds of transmission, the second time is a time when the sending end equipment sends a data packet for the first time after receiving the ACK packet, and the time interval is a millisecond-level time interval;
determining the data volume according to the time interval and the sending rate;
and sending the data packet according to the data volume at the second moment.
In a second aspect, an embodiment of the present application provides a congestion control apparatus, including:
the first determining module is used for determining the sending rate after the sending terminal equipment receives the ACK packet each time;
a second determining module, configured to determine a time interval between a first time and a second time, where the first time and the second time are initial times of each round of transmission in two adjacent rounds of transmission, the second time is a time when the sending-end device sends a data packet for the first time after receiving the ACK packet, and the time interval is a millisecond-level time interval;
the processing module is used for determining the data volume according to the time interval and the sending rate;
and the transceiver module is used for transmitting the data packet according to the data volume at the second moment.
In a third aspect, an embodiment of the present application provides an electronic device, including: a processor, a memory and a computer program stored on the memory and executable on the processor, the processor when executing the computer program causing the electronic device to carry out the method according to the first aspect or the various possible implementations of the first aspect.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, in which computer instructions are stored, and when executed by a processor, the computer instructions are configured to implement the method according to the first aspect or various possible implementation manners of the first aspect.
In a fifth aspect, embodiments of the present application provide a computer program product comprising a computer program, which when executed by a processor, implements the method according to the first aspect or the various possible implementations of the first aspect.
According to the congestion control method, the electronic device and the readable storage medium provided by the embodiment of the application, after the sending end device receives the ACK packet each time, a new sending rate is determined, and the data volume required to be sent in a new round of sending is determined according to the sending rate and the time interval between two adjacent rounds of sending. And then, when the current time reaches a second moment, namely a new round of sending moment, sending the data packets according to the data volume at a constant speed according to the sending rate, so that the data packets can be sent smoothly. By adopting the scheme, the sending terminal equipment does not need to support a high-precision timer, but only supports a millisecond-level timer to ensure the stable sending of the data packet, and the cost of the sending equipment for supporting the stable sending is reduced. Moreover, compared with burst transmission, the method can reduce network jitter and packet loss, and can reduce the queuing time of data packets. In addition, the electronic equipment is not required to process high-precision timing tasks, so that the power consumption of the electronic equipment is reduced, and the cruising ability of the electronic equipment is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic network architecture diagram of a congestion control method according to an embodiment of the present application;
fig. 2 is a flowchart of a congestion control method provided in an embodiment of the present application;
fig. 3 is another flowchart of a congestion control method provided in an embodiment of the present application;
fig. 4 is a flowchart of parameter setting after each data packet is sent in the congestion control method according to the embodiment of the present application;
fig. 5 is a flowchart of determining, by a sending end device, a bandwidth according to an ACK in a congestion control method provided in an embodiment of the present application;
fig. 6 is a flowchart of determining a sending rate in a congestion control method according to an embodiment of the present application;
fig. 7 is a schematic diagram of a congestion control apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, the following detailed description of the embodiments of the present application will be made with reference to the accompanying drawings.
Paging transmission is a kind of smooth transmission compared to burst (burst) transmission. Based on paging sending, the sending end device sends data to the receiving end at a uniform rate for a period of time. Currently, many network transport protocols support paging delivery. paging sends have the following advantages:
1. network jitter and packet loss caused by burst data are reduced;
2. the queuing time of the data in the intermediate router is reduced;
3. it is more friendly to other streams transported in the network.
Obviously, the paging transmission can improve the end-to-end bandwidth utilization and the Quality of Service (QoS).
Generally, the precision requirement of the paging sending on the timer is relatively high, for example, the BBR paging sending of a Transmission Control Protocol (TCP) requires the precision of the timer to reach at least microsecond level. Therefore, the paging transmission can only be used for devices with higher hardware performance, such as linux devices, the linux device kernel uses a high-precision hardware timer to perform paging transmission, and the precision of the timer is in the nanosecond level.
However, at present, hardware performance of many devices is poor, and a nanosecond-level timer cannot be provided, so that the devices with poor hardware performance cannot support paging transmission.
Moreover, even if one electronic device can provide a nanosecond-level timer, the electronic device cannot frequently run the high-precision timer because frequent processing of high-precision timing tasks consumes a large amount of battery power of the electronic device.
Furthermore, for hypertext Transfer Protocol (HTTP) or other application layer transport protocols, scheduling delay may also cause that a paging transmission cannot be performed in time.
Obviously, in the current paging sending method, due to the high requirement on the precision of the timer, some electronic devices with low precision of the timer cannot implement paging sending. Moreover, even if an electronic device supports a high-precision timer, the current paging transmission method cannot be frequently operated on a device with the high-precision timer because of the high battery power consumption caused by the frequent processing of the timer task.
Based on this, embodiments of the present application provide a congestion control method, an electronic device, and a readable storage medium, which enable an electronic device without a high-precision timer to support paging transmission due to a low requirement on the precision of the timer, thereby increasing an application range of the paging transmission method and ensuring smooth transmission of a data packet. Moreover, the electronic equipment is not required to process high-precision timing tasks, so that the power consumption of the electronic equipment is reduced, and the cruising ability of the electronic equipment is improved.
Fig. 1 is a schematic network architecture diagram of a congestion control method according to an embodiment of the present application. Referring to fig. 1, the network architecture includes a sending end device 11 and a receiving end device 12. A network connection is established between the sending end device 11 and the receiving end device 12.
The transmitting-end device 11 incorporates a low-precision timer having a precision of, for example, the order of milliseconds. The sender device 11 may be a mobile phone, a tablet computer, a personal computer, an e-book reader, a laptop, a desktop computer, etc. installed with an android operating system, a microsoft operating system, a saiban operating system, a Linux operating system, or an apple iOS operating system. Alternatively, the sending-end device 11 may be a server or the like.
The receiving device 12 has computing capability, storage capability, and the like, and is capable of responding to the transmitting device 11. For example, the receiving end device 12 is a server or the like. For another example, the receiving end device 12 is a mobile phone.
In this embodiment, the sending end device 11 and the receiving end device 12 are opposite. For example, if the device a sends a packet to the device B, the device a is a sending device and the device B is a receiving device. When device B sends data to device a, device B is a sending end device, and device a is a receiving end device.
It should be understood that the number of the transmitting-end device 11 and the receiving-end device 12 in fig. 1 is merely illustrative. In practical implementation, any number of sending end devices 11 and receiving end devices 12 are deployed according to actual requirements. Also, there may be a plurality of network nodes between the sending end device 11 and the receiving end device 12.
Next, a congestion control method provided in the embodiment of the present application is described in detail based on a network architecture shown in fig. 1. For example, please refer to fig. 2. Fig. 2 is a flowchart of a congestion control method according to an embodiment of the present application. This embodiment is described from the perspective of a sending end device, and includes:
201. and determining the sending rate after receiving the ACK packet every time.
In the embodiment of the application, the sending end device sends the data packets to the receiving end device according to the batch. One batch is also called a round, and there are multiple data packets to be sent in one batch, and in one round of sending, the sending end device sends the data packets according to the determined sending rate (paging rate). For example, if 10 data packets are sent in one round, the sending end device sends the 10 data packets to the receiving end device at a constant speed according to the paging rate.
From the perspective of the sending end device, after a packet is sent out, there may be three states:
first, an Acknowledgement (ACK) packet returned by a receiving end device is received by a sending end device within a preset time duration, and such a data packet is referred to as an acknowledged or delivered data packet, or also referred to as a correct packet.
Secondly, after the preset time length, if the receiving end device does not receive the ACK packet, packet loss occurs.
And thirdly, in the preset time length, the sending terminal device does not receive the ACK packet, and the data packet is called flight (in flight) data.
In addition, in the embodiment of the present application, one ACK packet indicates that at least one data packet is correctly received. For example, in one round of transmission, the transmitting device transmits 10 packets, i.e., packet 1 to packet 10. No ACK packet is received during the transmission of these 10 data packets. After sending the data packet 10, an ACK packet is received, the ACK packet is used to indicate a data packet that has been correctly received by the receiving end.
If the ACK packet indicates that all of the data packets 1 to 10 are received, it indicates that the flight data is 0.
If the ACK packet indicates that the data packets 1 to 5 are received, it indicates that flight data exists, and the flight data is the data packet 6 to the data packet 10.
For another example, in round 1 transmission, the sending end device sends data packets 1 to 10, and in round 2 transmission, the sending end device sends data packets 11 to 15. When transmitting the data packet 11, the transmitting end device receives an ACK packet a, which indicates that the receiving end device correctly receives the data packets 1 to 5. After transmitting the data packet 15, the transmitting device receives the ACK packet b, which instructs the receiving device to correctly receive the data packets 6 to 12.
And after the sending terminal equipment receives the ACK each time, the sending rate is determined again.
202. And determining a time interval between a first time and a second time, wherein the first time and the second time are initial times of each round of transmission in two adjacent rounds of transmission, the second time is a time when the sending end equipment receives the ACK packet and then sends a data packet for the first time, and the time interval is a millisecond-level time interval.
Illustratively, there is a time interval between two adjacent rounds of transmission, which is not necessarily connected with the reception process of the ACK packet. Assuming that the two adjacent rounds of data transmission are respectively a first round and a second round, the initial time of data packet transmission in the first round is a first time, the initial time of data packet transmission in the second round is a second time, and a time interval is formed between the first time and the second time. This time interval may be on the order of one millisecond. For example, the first time is 11:00, time interval is 30 ms, the time for next packet transmission, that is, the second time is 11. Wherein, the time interval can be represented as paging _ interval.
203. And determining the data volume according to the time interval and the sending rate.
For example, the transmitting-end device determines the amount of data from the product of the time interval and the transmission rate. This amount of data is the number of packets to be sent in the next round.
For another example, the sending end device considers the current network condition, sets some coefficients for different network conditions, and determines the data amount according to the coefficients, the time interval, the sending rate, and the like.
Since the time interval is a millisecond-level time interval, the sending end device with the millisecond-level timer can send data on time according to the data amount determined by the time interval and the sending rate.
204. And sending the data packet according to the data volume at the second moment.
And after the sending end equipment determines the time interval, counting down according to the time interval, and when the counting down is finished, indicating that the current time is the second time. At this time, the transmitting end device starts transmission of a new round of data packets at a second time.
According to the congestion control method provided by the embodiment of the application, after the sending end equipment receives the ACK packet every time, the new sending rate is determined, and the data volume needing to be sent in the new round of sending is determined according to the sending rate and the time interval of two adjacent rounds of sending. And then, when the current time reaches a second moment, namely a new round of sending moment, sending the data packets according to the data volume at a constant speed according to the sending rate, so that the data packets can be sent smoothly. By adopting the scheme, the sending terminal equipment does not need to support a high-precision timer, but only supports a millisecond-level timer to ensure the stable sending of the data packet, and the cost of the sending equipment for supporting the stable sending is reduced. Moreover, compared with burst transmission, the method can reduce network jitter and packet loss, and can reduce the queuing time of data packets. In addition, the electronic equipment is not required to process high-precision timing tasks, the power consumption of the electronic equipment is reduced, and the cruising ability of the electronic equipment is improved.
Optionally, in the above embodiment, in the process that the sending-end device determines the time interval between the first time and the second time, the network state parameter is updated according to the ACK packet. And then, determining the time interval according to the updated network state parameters. The network state parameters include bandwidth, congestion window, round-Trip Time (RTT), packet loss rate, and the like.
In the embodiment of the application, the updated network state parameter reflects the current network state to a certain extent. The sending end device may determine the time interval based on one or more network status parameters.
For example, the updated network status parameter includes Bandwidth (BW) and Maximum Segment Size (MSS), and the sending end device determines Packet Per Second (PPS) according to the bandwidth and the MSS. Thereafter, a time interval is determined from the PPS. For example BW =200kbps, MSS =1400, PPS = BW/MSS =146. The sending terminal device stores a mapping table in advance, and the mapping table stores the corresponding relation between the PPS and the time interval. The sending end equipment can know according to the PPS table look-up: the time interval is 10 milliseconds.
If the RTT is larger, the time interval is increased; if the RTT is relatively small, the time interval is decreased.
For another example, the updated network state parameter includes a packet loss rate, if the packet loss rate is relatively high, the time interval is increased, and if the packet loss rate is relatively low, the time interval is decreased.
For another example, the updated network state parameter includes RTT and bandwidth, and if both RTT and bandwidth are relatively large, the time interval is reduced; if both RTT and bandwidth are small, the time interval is increased.
Although in the above examples, the sending end device determines the time interval according to one or two network status parameters of bandwidth, RTT or packet loss rate. However, the embodiment of the present application is not limited, and in other possible implementations, the sending end device may determine the time interval according to three or more network status parameters.
By adopting the scheme, the sending terminal equipment determines the time interval according to the updated network state parameters, and further determines the time for sending the data packet next time, and the method has high accuracy and high speed.
Optionally, in the above embodiment, during the process that the sending end device sends the data packet according to the data amount at the second time, first, the size of the congestion window is determined according to the ACK packet. And then determining whether the flight data volume is smaller than a congestion window, wherein the flight data volume is determined after the sending end equipment receives the ACK packet. And if the flight data volume is smaller than the congestion window, setting a timer according to the timeout interval. And then, when the timer is overtime, sending a data packet according to the data volume.
Illustratively, after receiving an ACK packet, the sending end device updates the network status parameter each time, determines a sending rate according to the updated network status parameter, sets a timer according to a time interval, and calculates a data volume according to the sending rate and the time interval. Meanwhile, the sending terminal equipment determines whether the flight data volume after the ACK packet is processed is smaller than the updated congestion window. If the flight data volume is smaller than the congestion window, the network is not congested, and data can be sent. Therefore, after the timer is overtime, the sending end device sends the data packet according to the data volume. If the flight data volume is larger than or equal to the congestion window, the network is congested, and the data can not be sent again. Therefore, the packet is not transmitted even if the timer times out.
By adopting the scheme, the sending end equipment needs to judge whether the network is congested or not every time when the timer is started according to the time interval. Only under the condition that the network is not congested, the data packet is sent when the timer is overtime, so that the network congestion can be effectively avoided, and the network quality is ensured.
Fig. 3 is another flowchart of a congestion control method according to an embodiment of the present application. The embodiment comprises the following steps:
301. the transmitting end device receives the ACK packet.
302. And the sending end equipment updates the network state parameters according to the ACK packet.
The network state parameters include bandwidth, CWND, RTT, etc.
303. And the sending end equipment determines the sending rate according to the updated network state parameters.
304. The sending end device determines a time interval between the first time and the second time.
The first time and the second time are initial times of each round of transmission in two adjacent rounds of transmission, the second time is a time when the sending end device sends a data packet for the first time after receiving the ACK packet, and the time interval is a millisecond-level time interval.
305. The amount of data is determined based on the time interval and the transmission rate.
306. The sending end device determines whether the flight data volume after processing the ACK packet is smaller than a congestion window, and if the flight data volume is smaller than the congestion window, step 306 is executed; and if the first flight data volume is larger than or equal to the congestion window, ending the process.
The congestion window is updated according to the ACK packet after the sending end device receives the ACK packet.
307. A timer is set according to the time interval.
308. And when the timer is overtime, sending the data packet according to the data volume. And the overtime moment of the timer is the second moment.
For example, the first time is 11:00, the sending end device determines that the flying data amount is less than CWND after processing the ACK packet, and if the time interval is 30 milliseconds, that is, the second time is 11.
Optionally, in the above embodiment, after the sending end device sends the data packet according to the data amount at the second time, after each time of sending the data packet, the sending end device needs to set parameters such as a timestamp. For example, please refer to fig. 4.
Fig. 4 is a flowchart of parameter setting after each data packet is sent in the congestion control method according to the embodiment of the present application. The embodiment comprises the following steps:
401. the transmitting end device transmits a data packet P at a second time.
And the sending end equipment determines the data volume according to the sending rate and the time interval. And after the timer is overtime, namely at the second moment, the sending end equipment sends the data packet according to the data volume. Assuming that the data amount is 10, 10 packets need to be transmitted, and the packet P is any one of the 10 packets.
402. The sending end device determines whether the flight data volume before the second time is 0, and if the flight data volume is 0, step 403 is executed; if the flight data amount is not 0, step 404 is executed.
For example, after the sending-end device sends the data packet P each time, it is determined whether the flight data amount before sending the data packet P, that is, before the second time is 0.
In the embodiment of the application, the flight data volume is represented by a variable, such as inflight. The value of inflight differs at different times. In general, as data transmission progresses, the inflight value increases after the sending end device sends a data packet. After the sending end device processes the ACK, the inflight value is reduced. And after the sending end equipment judges that the packet is lost, the inflight value is also reduced.
403. And setting the global reference sending time and the global reference ACK time as the sending time of the data packet. Thereafter, step 404 is performed.
Exemplarily, assuming that the transmission time of the packet P is p.send.time, the global reference transmission time is cn.first _ tx _ time, and the global reference ACK time is cn.delayed _ time, then cn.first _ tx _ time = p.send.time, cn.delayed _ time = p.send.time.
For example, if the transmission time p.send.time of the packet P is 11 points, cn.first _ tx _ time = p.send.time =11 points, and cn.delayed _ time = p.send.time =11 points.
404. For each packet P, a reference transmission time of the packet P and a reference ACK time of the packet P are set.
A reference transmission time p.first _ tx _ time = cn.first _ tx _ time of the packet P;
the reference ACK time of the packet P is P. Delayed _ time = cn.
Continuing with the above example, since the global reference transmission time cn.first _ tx _ time is 11 points and the global reference ACK time cn.delayed _ time is also 11 points, the reference transmission time p.first _ tx _ time = cn.first _ tx _ time =11 points of the packet P and the reference ACK time p.delayed _ time = cn.delayed _ time =11 points of the packet P.
For each packet P, it has a reference transmission time of packet P and a reference ACK time of packet P, which are collectively referred to as a time stamp of packet P. The time stamp of every data packet P of sending end equipment record, sending end equipment receives the ACK package at the second moment after, confirms the correct package that has been received by receiving end equipment correctly according to the ACK package, just can confirm the round that the correct package corresponds according to the time stamp of correct package, and the correct package is the data packet that sending end equipment sent in which round of sending promptly.
In the embodiment of the present application, from the perspective of the sending end device, the sending of the data packet and the processing of the ACK packet are serial. The transmission modes include the following two:
first transmission mode: the second flight data volume is 0 per round of transmission.
For example, in the first round of transmission, the sending-end device sequentially performs the following 2 steps:
step a, sending a data packet 1-a data packet 10;
step b, receiving and processing an ACK packet, wherein the ACK packet indicates the receiving terminal equipment to correctly receive the data packets 1-10;
in the second round of transmission, the sending end device sequentially executes the following 2 steps:
step c, sending data packets 11-20;
step d, receiving and processing an ACK packet, wherein the ACK packet indicates the receiving end equipment to correctly receive the data packets 11-20;
in the third round and the subsequent rounds of transmission, the second flight data volume is 0 before each round of transmission, that is, inflight =0, and no flight data exists.
Second transmission mode: from the second round, there is a case where the second flight data amount is not 0.
For example, in the first round of transmission, the sending-end device sequentially performs the following 2 steps:
step e, sending data packets 1-10;
step f, receiving and processing an ACK packet, wherein the ACK packet indicates the receiving end equipment to correctly receive the data packets 1-5;
in the second round of transmission, the sending end device sequentially executes the following 2 steps:
step e, sending data packets 11 to 15;
step f, receiving and processing an ACK packet, wherein the ACK packet indicates the receiving end equipment to correctly receive the data packets 6-13;
obviously, the second flight data amount is not 0 from the second round, and the following rounds may also occur in which the second flight data amount is 0 or not 0.
In a second transmission mode, the correct packet indicated by the ACK packet includes a partial data packet sent by the sending end device in a turn corresponding to the first time. Since the first transmission mode is an ideal mode, the second transmission mode is a common mode. Therefore, the universality of the congestion control method provided by the embodiment of the application can be ensured.
After each data packet is sent, the sending end device sets some timestamps, such as global reference sending time, global reference ACK time, reference sending time of the data packet P, reference ACK time of the data packet P, and the like, according to the second flight data amount before the data packet is sent. Thus, the transmitting device can determine which round of transmission a data packet P is transmitted after receiving the ACK packet. Further, the sampling bandwidth is calculated based on the round when the transmitting-end device processes the ACK packet.
By adopting the scheme, after the sending end equipment sends the data packet P each time, some parameters are set, so that the correct packet turn indicated by the ACK packet can be conveniently determined, and the bandwidth can be conveniently and accurately calculated subsequently.
Optionally, in the above embodiment, in the process of determining the sending rate after the sending-end device receives the ACK packet each time, a correct packet is determined according to the ACK packet, where the correct packet is a data packet that is indicated by the ACK packet and that has been correctly received by the receiving-end device, and the number of the correct packets is at least one. Then, the bandwidth is determined according to the correct inclusion, and then the sending rate is determined according to the bandwidth.
Illustratively, one ACK packet indicates one or more data packets that the receiving device correctly received. For example, in one round of transmission, the sending end device sends data packets 1 to 10, and then receives an ACK packet, and the sending end device determines that the receiving end device correctly receives data packets 1 to 5 according to the ACK packet.
And after the sending end equipment determines the data packets which are correctly received by the receiving end equipment according to the ACK packets, the data packets are used as correct packets. For each correct packet, the sending end device updates the transmission information according to the correct packet. The transmission information includes, but is not limited to, a rate sample parameter including a sample size (rs.prior _ delayed _ size), a sample time (rs.prior _ delayed _ time), a global reference transmission time (cn.delayed _ time), etc.
After the transmission information is updated by the sending end equipment, the bandwidth is determined according to the updated transmission information, and then the sending rate can be determined according to the bandwidth.
By adopting the scheme, the bandwidth is updated after the sending terminal equipment receives the ACK every time, and the purpose of accurately determining the sending rate is further realized.
Fig. 5 is a flowchart of determining, by a sending end device, a bandwidth according to an ACK in a congestion control method provided in an embodiment of the present application. The embodiment comprises the following steps:
501. and the sending end equipment receives the ACK packet and initializes the rate sample parameters.
The rate sample (rate sample) parameters include sample size (rs. Prior _ delayed _ size), and sample time (rs. Prior _ delayed _ time). After initialization, the sample size (rs.prior _ delayed _ size) is 0 and the sample time (rs.prior _ delayed _ time) is 0.
502. According to each correct packet, the transmission parameters are updated.
The sending end equipment can determine the data packets correctly received by the receiving end equipment according to the ACK packets, and the data packets are called as correct packets. For example, the sending end device sends data packets 1 to 10, receives an ACK packet after sending the data packet 10, and determines, according to the ACK packet, that the data packets that have been correctly received by the receiving end device include data packets 1 to 5, and then these 5 data packets are correct packets.
For each correct packet, the process of updating the transmission parameters by the sending end device includes step 5021, step 5022, and step 5023.
5021. The global acknowledged data volume is updated.
Global acknowledged data amount cn. Delayed _ size = cn. Delayed _ size + p.
Continuing with the example above, before receiving the ACK packet, the global acknowledged data amount cn. Delayed _ size =0, and after receiving the ACK packet, the sending-end device receives the global acknowledged data amount cn. Delayed _ size = cn. Delayed _ size +1=1. Obviously, since the sending end device determines that the receiving end device has correctly received the data packets 1 to 5 according to the ACK packet, after the sending end device performs steps 5021 to 5023 on each data packet of the 5 data packets, the global acknowledged data volume cn.
5022. The sending end device determines whether the global confirmed data size (p.delayed _ size) is greater than the sample size (rs.prior _ delayed _ size) when sending the data packet P, if p.delayed _ size > rs.prior _ delayed _ size, step 5023 is executed, and if p.delayed _ size is less than or equal to rs.prior _ delayed _ size, step 503 is executed.
Illustratively, the delivered _ size represents the global acknowledged data amount at the time of transmitting the packet P.
5023. And the sending terminal equipment updates the transmission information of the round.
The updating of the transmission information includes:
A. sample size rs.prior _ delayed _ size = p.delayed _ size;
B. sample time rs.prior _ delayed _ time = p.delayed _ time;
C. global reference transmission time cn.first _ tx _ time = p.send _ time;
D. delivered _ time = now, which represents the current time;
E. sending interval duration send _ interval = global reference sending time cn.first _ tx _ time-reference sending time p.first _ tx _ time of data packet p;
F. ACK interval duration ACK _ interval = global reference ACK time cn. Delayed _ time-sample time rs. Prior _ delayed _ time.
503. The sending end device determines whether there is an unprocessed correct packet, if so, it returns to step 5021, and if there is no unprocessed correct packet, it executes step 504.
Illustratively, for each correct packet, for example, one ACK packet indicates that the data packet is correctly received 1 times to 5 times the data packet, the sending end device performs the above-mentioned steps 5021 to 5023 on each of the 5 correct packets.
504. The sending end device determines whether the sample size (rs.prior _ delayed _ size) is greater than 0, and if the sample size (rs.prior _ delayed _ size) is greater than 0, step 505 is executed; if the sample size (rs. Prior _ delayed _ size) is less than or equal to 0, this is ended.
505. The sending end device calculates the bandwidth.
The specific determination process is as follows:
first, the sender device calculates the confirmed data amount rs.delayed _ size of the round.
Exemplary, rs.delayed _ size = global acknowledged data volume cn.delayed _ size-sample size (rs.prior _ delayed _ size).
Next, the sending end device determines a sampling interval rs.interval.
Sampling interval rs.interval = max (sending interval duration send _ interval, ACK interval duration ACK _ interval)
Finally, the sending end device determines the bandwidth rs.bw _ sample.
Bandwidth rs.bw _ sample = confirmed data amount of this round rs.deliveredsize/sampling interval rs.interval.
By adopting the scheme, the sending end equipment determines the bandwidth according to the confirmed data volume and the sampling interval in the current round, and the purpose of accurately determining the bandwidth is achieved.
Fig. 6 is a flowchart for determining a sending rate in a congestion control method according to an embodiment of the present application. The embodiment comprises the following steps:
601. the sending end device determines whether there is bandwidth, if there is bandwidth, step 602 is executed; if no bandwidth exists, go to step 603.
Illustratively, the sending end device determines whether the bandwidth can be calculated according to the ACK packet after receiving the ACK packet each time.
The embodiment of the application is applicable to all wireless communication systems using paging technology, the transmission protocol may be replaced by a TCP protocol using paging, and the network may be replaced by a Universal Mobile Telecommunications System (UMTS), a High Speed Downlink Packet Access (HSDPA), a Wireless Local Area Network (WLAN), and the like. The transport protocol may employ different congestion control algorithms. For example, for the linux TCP protocol, if the BBR algorithm is adopted, the bandwidth will be calculated. If the CUBIC algorithm is adopted, the bandwidth cannot be calculated.
602. And the sending end equipment determines the sending rate according to the bandwidth.
For example, a transmission rate (paging rate) = bw × gain. Bw is, for example, the bandwidth determined by the scheme shown in fig. 5, and is the bandwidth currently measured and estimated. gain identifies the sending rate gain.
603. The sending terminal device determines the sending rate according to at least one of the congestion window CWND, the maximum message segment length MSS, the connection RTT after smooth processing or the sending rate gain.
For example, the transmission rate (paging rate) = (CWND × MSS/srtt) × gain. Wherein cwnd indicates a congestion window obtained by receiving and processing the ACK packet by the sending end device, MSS indicates a Maximum message Segment length (Maximum Segment Size), srtt indicates a connection RTT after smoothing, and gain indicates a sending rate gain.
By adopting the mode, when the sending end equipment cannot determine the bandwidth according to the ACK packet, the sending rate is determined according to other parameters, so that the flexibility is high, and the accuracy is high.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Fig. 7 is a schematic diagram of a congestion control device according to an embodiment of the present application. The congestion control device 700 includes: a first determining module 71, a second determining module 72, a processing module 73 and a transceiving module 74.
A first determining module 71, configured to determine a sending rate after the sending end device receives the ACK packet each time;
a second determining module 72, configured to determine a time interval between a first time and a second time, where the first time and the second time are initial times of each round of transmission in two adjacent rounds of transmission, the second time is a time when the sending end device sends a data packet for the first time after receiving the ACK packet, and the time interval is a millisecond-level time interval;
a processing module 73, configured to determine a data amount according to the time interval and the sending rate;
and the transceiver module 74 is configured to transmit a data packet according to the data amount at the second time.
In a possible implementation manner, the second determining module 72 is configured to update a network status parameter according to the ACK packet, where the network status parameter includes at least one of the following parameters: bandwidth, congestion window CWND, round trip time RTT and packet loss rate; determining the time interval according to the network state parameter.
In a possible implementation manner, the processing module 73 is further configured to determine a size of a congestion window according to the ACK packet; if the flight data volume is smaller than the congestion window, setting a timer according to the time interval, wherein the flight data volume is the flight data volume of the sending end equipment after the sending end equipment processes the ACK packet;
the transceiver module 74 is configured to send a data packet according to the data amount when the timer times out.
In a possible implementation manner, after the transceiver module 74 sends the data packet according to the data amount at the second time, the processing module 73 is further configured to record a timestamp for each data packet sent from the second time, where the timestamp is used by the sending-end device to determine a round of receiving the data packet indicated by the ACK packet after the second time.
In a possible implementation manner, the first determining module 71 is configured to determine, after the transceiver module 74 receives an ACK packet each time, a correct packet according to the ACK packet, where the correct packet is a data packet that is indicated by the ACK packet and has been correctly received by a receiving end device, and the number of the correct packets is at least one; determining a bandwidth according to each correct packet; and determining the sending rate according to the bandwidth.
In a possible implementation manner, when determining the bandwidth according to each correct packet, the first determining module 71 is configured to determine, according to each correct packet, a round to which the correct packet belongs; determining the number of the confirmed number of the turns to which the correct packet belongs and a sampling interval; determining the bandwidth based on the number of acknowledged packets and the sampling interval.
In a possible implementation manner, the first determining module 71 is further configured to determine the sending rate according to at least one of the congestion window CWND, the maximum segment length MSS, the smoothed connection RTT, or a sending rate gain when the bandwidth cannot be determined.
In a feasible implementation manner, the correct packet indicated by the ACK packet includes a partial data packet that is sent by the sending end device in a turn corresponding to the first time.
The congestion control apparatus provided in this embodiment of the present application may perform the actions of the sending end device in the foregoing embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 8, the electronic device 800 is, for example, the sending-end device, and the electronic device 800 includes:
a processor 81 and a memory 82;
the memory 82 stores computer instructions;
the processor 81 executes the computer instructions stored by the memory 82, so that the processor 81 executes the congestion control method implemented by the sending end device as described above.
For a specific implementation process of the processor 81, reference may be made to the above method embodiments, which implement the principle and the technical effect similarly, and details of this embodiment are not described herein again.
Optionally, the electronic device 800 further comprises a communication component 83. The processor 81, the memory 82, and the communication section 83 may be connected by a bus 84.
An embodiment of the present application further provides a computer-readable storage medium, in which computer instructions are stored, and when the computer instructions are executed by a processor, the computer instructions are used to implement the congestion control method implemented by the sending-end device.
An embodiment of the present application further provides a computer program product, where the computer program product includes a computer program, and when executed by a processor, the computer program implements the congestion control method implemented by the sending-end device.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. A congestion control method is applied to a sending end device, and the method comprises the following steps:
determining a sending rate after receiving the ACK packet each time;
determining a time interval between a first time and a second time, wherein the first time and the second time are initial times of each round of transmission in two adjacent rounds of transmission, the second time is a time when the sending end equipment sends a data packet for the first time after receiving the ACK packet, and the time interval is a millisecond-level time interval;
determining the data volume according to the time interval and the sending rate;
and sending the data packet according to the data volume at the second moment.
2. The method of claim 1, wherein determining the time interval between the first time and the second time comprises:
updating network state parameters according to the ACK packet, wherein the network state parameters comprise at least one of the following parameters: bandwidth, congestion window CWND, round trip time RTT and packet loss rate;
determining the time interval according to the network state parameter.
3. The method of claim 1, wherein the sending a packet according to the data amount at the second time comprises:
determining the size of a congestion window according to the ACK packet;
if the flight data volume is smaller than the congestion window, setting a timer according to the time interval, wherein the flight data volume is the flight data volume after the sending end equipment processes the ACK packet;
and when the timer is overtime, sending a data packet according to the data volume.
4. The method according to any one of claims 1-3, wherein after sending the data packet according to the data volume at the second time, further comprising:
and recording a timestamp for each data packet sent from the second time, wherein the timestamp is used for determining the turn of receiving the data packet indicated by the ACK packet after the second time by the sending end equipment.
5. The method according to any of claims 1-3, wherein determining the sending rate after each ACK packet is received comprises:
after an ACK packet is received each time, determining a correct packet according to the ACK packet, wherein the correct packet is a data packet which is indicated by the ACK packet and is correctly received by receiving end equipment, and the number of the correct packets is at least one;
determining a bandwidth according to each correct packet;
and determining the sending rate according to the bandwidth.
6. The method of claim 5, wherein determining a bandwidth based on each of the correct packets comprises:
determining the turn to which the correct packet belongs according to each correct packet;
determining the number of the confirmed number of packets in the turn to which the correct packet belongs and the sampling interval;
determining the bandwidth based on the number of acknowledged packets and the sampling interval.
7. The method of claim 5, further comprising:
and when the bandwidth cannot be determined, determining the sending rate according to at least one of the congestion window CWND, the maximum message segment length MSS, the connection RTT after smooth processing or the sending rate gain.
8. The method according to any one of claims 1 to 3,
and the correct packet indicated by the ACK packet includes a partial data packet sent by the sending end device in the corresponding turn at the first time.
9. An electronic device comprising a processor, a memory, and a computer program stored on the memory and executable on the processor, wherein the processor, when executing the computer program, causes the electronic device to carry out the method of any one of claims 1 to 8.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1 to 8.
CN202210705865.2A 2022-06-21 2022-06-21 Congestion control method, electronic device and readable storage medium Pending CN115277556A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210705865.2A CN115277556A (en) 2022-06-21 2022-06-21 Congestion control method, electronic device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210705865.2A CN115277556A (en) 2022-06-21 2022-06-21 Congestion control method, electronic device and readable storage medium

Publications (1)

Publication Number Publication Date
CN115277556A true CN115277556A (en) 2022-11-01

Family

ID=83761018

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210705865.2A Pending CN115277556A (en) 2022-06-21 2022-06-21 Congestion control method, electronic device and readable storage medium

Country Status (1)

Country Link
CN (1) CN115277556A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116723133A (en) * 2023-06-29 2023-09-08 无锡芯光互连技术研究院有限公司 Data transmitting and receiving equipment, network state information extraction method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170118120A1 (en) * 2015-10-21 2017-04-27 Citrix Systems, Inc. System and method for rate-based packet transmission over a network
CN108011780A (en) * 2017-12-01 2018-05-08 北京百度网讯科技有限公司 A kind of message transmission rate measuring method, device, equipment and computer-readable medium
CN111356157A (en) * 2020-03-15 2020-06-30 腾讯科技(深圳)有限公司 Method for realizing network capability opening and related equipment
CN113872870A (en) * 2020-06-30 2021-12-31 华为技术有限公司 Method and related apparatus for controlling network congestion

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170118120A1 (en) * 2015-10-21 2017-04-27 Citrix Systems, Inc. System and method for rate-based packet transmission over a network
CN108011780A (en) * 2017-12-01 2018-05-08 北京百度网讯科技有限公司 A kind of message transmission rate measuring method, device, equipment and computer-readable medium
CN111356157A (en) * 2020-03-15 2020-06-30 腾讯科技(深圳)有限公司 Method for realizing network capability opening and related equipment
CN113872870A (en) * 2020-06-30 2021-12-31 华为技术有限公司 Method and related apparatus for controlling network congestion

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116723133A (en) * 2023-06-29 2023-09-08 无锡芯光互连技术研究院有限公司 Data transmitting and receiving equipment, network state information extraction method and device
CN116723133B (en) * 2023-06-29 2024-03-22 无锡芯光互连技术研究院有限公司 Data transmitting and receiving equipment, network state information extraction method and device

Similar Documents

Publication Publication Date Title
Zhang et al. Will TCP work in mmWave 5G cellular networks?
US7898958B2 (en) Communication system
US8509067B2 (en) System and method for controlling network congestion
US8787378B2 (en) Systems and methods to improve performance of TCP over large bandwidth-delay-product networks
CN110266605B (en) Method and apparatus for rate control
CN111683019B (en) Managing acknowledgement data packets to be transmitted in a communication device
CN107624232B (en) Apparatus and method for controlling downlink throughput in communication system
CN110677221B (en) Retransmission control method, communication interface and electronic equipment
EP2232791B1 (en) Tcp packet spacing
EP4156766A1 (en) Data packet sending method and apparatus
US10448329B2 (en) Apparatus and method for controlling TCP connections in a wireless communication system
US20180176136A1 (en) TCP Bufferbloat Resolution
CN102469028A (en) Apparatus and method for ensuring fairness of UDP data transmission in Ethernet environment
CN110072254B (en) Data transmission method and related equipment thereof
CN115277556A (en) Congestion control method, electronic device and readable storage medium
JP2008104018A (en) Communication system, communication equipment, and transmission control method
CN117676695A (en) TCP transmission method, device and system
CN113542215B (en) Method and related device for improving streaming media transmission performance
EP3314970B1 (en) Method and apparatus for managing uplink traffic from a client device in a communication network
CN112020078B (en) Data transmission method and device
EP1744495B1 (en) Round trip time estimation
EP1191764A1 (en) A method of controlling the time-out in a wireless data TCP transmission
JP6897769B2 (en) Data transmitters, methods and programs
Sebopetse et al. Measuring with JPerf and PsPing: Throughput and estimated packet delivery delay vs TCP window size & parallel streams
WO2023119511A1 (en) Communication device, communication system, and communication method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination