CN120455373B - A TCP acknowledgment number splitting method - Google Patents
A TCP acknowledgment number splitting methodInfo
- Publication number
- CN120455373B CN120455373B CN202510846945.3A CN202510846945A CN120455373B CN 120455373 B CN120455373 B CN 120455373B CN 202510846945 A CN202510846945 A CN 202510846945A CN 120455373 B CN120455373 B CN 120455373B
- Authority
- CN
- China
- Prior art keywords
- confirmation
- split
- bytes
- acknowledgement
- size
- 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.)
- Active
Links
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a TCP acknowledgement number splitting method, which belongs to the communication field, and comprises the steps of comparing the number of currently received bytes of a receiving end with the number of currently acknowledged bytes, splitting the acknowledgement number to be sent into a plurality of acknowledgement numbers according to the current network condition when the number of currently received bytes and the number of currently acknowledged bytes are unequal, sequentially sending the acknowledgement numbers to a sending end, removing the acknowledged byte numbers from a sending window after the sending end receives the acknowledgement numbers, and releasing corresponding buffer zone resources. Through the mechanism, the method provided by the invention can effectively reduce data loss and network congestion caused by ACK loss in the switching process of the base station, optimize the congestion control mechanism of TCP connection, improve the stability and reliability of TCP transmission, reduce transmission delay and retransmission caused by unstable network, further improve the overall network performance, and is particularly suitable for optimizing data transmission in a mobile network environment.
Description
Technical Field
The invention belongs to the field of communication, and particularly relates to a TCP acknowledgement number splitting method.
Background
In the transmission control protocol ( Transmission Control Protocol , TCP), the acknowledgement mechanism is an important mechanism to ensure reliable transmission of data. Each time the receiving end receives data, it sends an acknowledgement number (Acknowledgecharacter, ACK) to the transmitting end informing the transmitting end which data has been successfully received. However, as network conditions change, especially in high latency and unstable networks, such as satellite communication networks, high speed mobile scenarios in 5G mobile communication networks, network congestion in public Wi-Fi networks, network resource bottlenecks in high congestion networks, etc., transmission of ACKs may be affected, resulting in acknowledgement delays or losses, which directly affect the performance of TCP.
Disclosure of Invention
In view of the above drawbacks or improvements of the prior art, the present invention provides a TCP acknowledgement number splitting method, which aims to reduce network congestion caused by ACK loss.
In order to achieve the above object, according to a first aspect of the present invention, there is provided a TCP acknowledgement number splitting method, applied to a receiving end, including:
S1, receiving a data packet sent by a sending end, and updating the number of bytes currently received;
S2, judging whether the number of the currently received bytes is equal to the number of the currently confirmed bytes, if so, sending the confirmation number to the sending end, otherwise, splitting the confirmation number according to the current network condition and then sequentially sending the split confirmation number to the sending end;
The network condition is characterized by network delay and packet loss rate, if the current network delay and packet loss rate are both greater than the corresponding threshold values, the acknowledgement number is split into b, otherwise, the acknowledgement number is split into a number, a and b are integers greater than 1, a is less than b, the size of the split acknowledgement number is greater than the current number N of confirmed bytes, the size of the last transmitted split acknowledgement number is equal to the current number M of received bytes, and the sizes of other split acknowledgement numbers are all less than M.
According to a second aspect of the present invention, there is provided a receiving end comprising:
The first processing module is used for receiving the data packet sent by the sending end and updating the number of bytes currently received;
The second processing module is used for judging whether the number of the currently received bytes is equal to the number of the currently confirmed bytes, if so, sending the confirmation number to the sending end, otherwise, splitting the confirmation number according to the current network condition and then sequentially sending the split confirmation number to the sending end;
The network condition is characterized by network delay and packet loss rate, if the current network delay and packet loss rate are both greater than the corresponding threshold values, the acknowledgement number is split into b, otherwise, the acknowledgement number is split into a number, a and b are integers greater than 1, a is less than b, the size of the split acknowledgement number is greater than the current number N of confirmed bytes, the size of the last transmitted split acknowledgement number is equal to the current number M of received bytes, and the sizes of other split acknowledgement numbers are all less than M.
According to a third aspect of the present invention, there is provided a receiving end comprising a computer readable storage medium and a processor;
the computer-readable storage medium is for storing executable instructions;
The processor is configured to read executable instructions stored in the computer readable storage medium and perform the method according to the first aspect.
According to a fourth aspect of the present invention there is provided a computer readable storage medium storing computer instructions for causing a processor to perform the method of the first aspect.
According to a fifth aspect of the present invention there is provided a computer program product comprising a computer program or instructions which, when executed by a processor, carries out the method according to the first aspect.
According to a sixth aspect of the present invention, there is provided a data transmission system comprising a transmitting end and a receiving end as described in the second or third aspect.
In general, the above technical solutions conceived by the present invention, compared with the prior art, enable the following beneficial effects to be obtained:
The method provided by the invention divides the confirmation number to be sent into a plurality of confirmation numbers according to the current network condition when the current received byte number and the current confirmed byte number of the receiving end are unequal by comparing the current received byte number and the current confirmed byte number, and the confirmation numbers are sequentially sent to the sending end, and after the sending end receives the confirmation numbers, the confirmed byte numbers are removed from the sending window, and corresponding buffer zone resources are released. Through the mechanism, the method provided by the invention can effectively optimize the acknowledgement mechanism of the TCP, and reduce the loss probability of the ACK when the network condition is poor, thereby reducing the data loss, retransmission and network congestion caused by the ACK loss, reducing the retransmission caused by the network congestion, optimizing the data transmission efficiency and improving the stability and reliability of the data transmission.
Drawings
Fig. 1 is a flowchart of a method for splitting a TCP acknowledgement number according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention. In addition, the technical features of the embodiments of the present invention described below may be combined with each other as long as they do not collide with each other.
In the conventional TCP mechanism, the sender typically relies on a single acknowledgement number to acknowledge the received data segment, which can effectively guarantee the reliability of data transmission under normal network conditions. However, when the network condition is unstable, the manner of a single acknowledgement number may not reflect the receiving situation of the receiving end in time. When the acknowledgement number is lost or delayed, the transmitting end cannot obtain the correct acknowledgement information, so that the transmitting window cannot be adjusted in time, and even the data retransmission can be triggered erroneously. Such unnecessary retransmissions not only waste valuable bandwidth resources, but also exacerbate network congestion, affecting the efficiency and stability of data transmission.
Based on this, an embodiment of the present invention provides a method for splitting a TCP acknowledgement number, as shown in fig. 1, including:
s1, receiving a data packet sent by a sending end, and updating the number of currently received bytes.
The sender first prepares the data to be sent, and the data is divided into a plurality of small data packets (TCP segments), each data packet includes an independent Sequence Number (Sequence Number), and necessary TCP header information, such as an acknowledgement Number, a window size, a checksum, etc., is added to each data packet to ensure the integrity and correctness of data transmission. When the receiving end receives the data packet sent by the sending end from the network, the checksum is verified first, and after verification, the data packet is sequenced and recombined according to the serial number of the data packet.
And simultaneously, based on the confirmation number sent before, recording the current confirmed byte number, and after the corresponding confirmation number is sent, updating the current confirmed byte number.
The number of bytes currently received, i.e. the number of bytes received by the receiving end, and the number of bytes currently acknowledged, i.e. the number of bytes represented by the acknowledgement number contained in the acknowledgement packet already sent before the current time.
S2, judging whether the number of the currently received bytes is equal to the number of the currently confirmed bytes, if so, sending the confirmation number to the sending end, otherwise, splitting the confirmation number according to the current network condition and then sequentially sending the split confirmation number to the sending end;
The network condition is characterized by network delay and packet loss rate, if the current network delay and packet loss rate are both greater than the corresponding threshold values, dividing the acknowledgement number into b, otherwise dividing the acknowledgement number into a, wherein a and b are integers greater than 1, a < b, the size of the divided acknowledgement number (namely the numerical value of the divided acknowledgement number) is greater than the current number N of confirmed bytes, the size of the last transmitted divided acknowledgement number is equal to the current number M of received bytes, and the sizes of other divided acknowledgement numbers are all smaller than M.
The receiving end compares the received byte count with the confirmed byte count after receiving the data packet and updating the two byte counts. If the two are equal, the receiving end confirms all the received data, the receiving end does not need to split further confirmation numbers, the receiving end can send the confirmation numbers in a conventional mode, and if the two are unequal, the receiving end confirms that the receiving end has the data which are not confirmed yet, and at the moment, the receiving end needs to split the confirmation numbers according to the processing operation.
The receiving end splits the acknowledgement number to be sent into a plurality of acknowledgement numbers smaller than the number of received bytes, in order to ensure the data integrity, the last acknowledgement number is equal to the number of received bytes, wherein most of acknowledgement numbers are close to the number of received bytes, so that the acknowledgement numbers can gradually cover the received and unacknowledged data segments, each split acknowledgement number represents the data before the acknowledgement number has been received by the receiving end (for example, 800 is received and acknowledged by the receiving end, 1000 is currently received and acknowledged, the received and unacknowledged data segment is 800-1000, each split acknowledgement number, such as 900 and 950, respectively represents the bytes of the data segments [800,900] and [900,950] which are received and unacknowledged, and represents the acknowledged related data of the receiving end), so that the acknowledgement information can be gradually transferred to the sending end when network congestion occurs, the risk that a single acknowledgement number may be lost or delayed is effectively reduced, and the transmission efficiency of the acknowledgement information is improved.
The receiving end dynamically adjusts the splitting strategy of the confirmation number according to the network condition, and judges the network condition according to key parameters such as delay, packet loss rate and the like of the network. If the network state is good, the receiving end can choose to split the acknowledgement number into a, and under the condition of poor network, for example, when the network delay reaches 100ms and the packet loss rate exceeds 10%, the transmission of the data packet is obviously affected, the receiving end can split the acknowledgement number into b so as to improve the reliability of the data and avoid network congestion, wherein a and b are integers larger than 1, and a is less than b.
In consideration of the need to reduce redundancy of ACK acknowledgement numbers, unnecessary network overhead is prevented from being increased by splitting excessive acknowledgement numbers when the network is good, and simultaneously, the data reception state is fed back quickly by more acknowledgement number splitting when the network state is deteriorated. Preferably, the following constraints are placed on a and b:, Represents rounding down b/2, b≤10. If the value of b is too small, the high packet loss rate cannot be effectively applied, so that the throughput is reduced, and if the value of b is too large, the network load is increased, the transmission efficiency is reduced, and the test proves that b is preferably less than or equal to 10. Thus, the constraint achieves a balance between reliability and efficiency of data transmission under different network conditions.
Preferably, the size of the split acknowledgement number gradually increases with the transmission sequence.
Specifically, the gradually increased confirmation number can ensure that the sending end confirms the received data in sequence, prevent the sending end from misjudging the data to be lost or disordered, be beneficial to maintaining the data transmission order, and improve the network reliability.
Preferably, the difference between the split acknowledgement numbers gradually decreases with the transmission sequence.
Specifically, after the receiving end splits the acknowledgement numbers, the receiving end sequentially sends the split acknowledgement numbers, the difference between the acknowledgement numbers sent each time and the acknowledgement numbers before is gradually reduced, and the receiving end can more accurately convey the received data range by gradually reducing the difference, so that the sending end can be ensured to timely obtain feedback and make corresponding transmission adjustment, network congestion and unnecessary retransmission are avoided, and the efficiency and stability of overall data transmission are improved.
The receiving end splits the acknowledgement number to be sent into a plurality of acknowledgement numbers smaller than the number of received bytes, and the size of the last acknowledgement number to be sent is equal to the number of received bytes, and most of the acknowledgement numbers are close to the number of received bytes so as to reduce redundant acknowledgement information as much as possible. The split acknowledgement number can cover the data interval actually received by the receiving end, and most of the acknowledgement numbers are very close to the number of data bytes actually required to be acknowledged, rather than just relying on a single acknowledgement number for acknowledgement. Based on this, preferably, the calculation formula of the size of the class number sent by the ith after splitting is:
the value interval of k is (0, 1), i=1, 2 when the confirmation number is split into b, the size of the b-th confirmation number is M, and i=1, 2 when the confirmation number is split into a, the size of the a-th confirmation number is M.
That is, in the split acknowledgement numbers, the 1 st acknowledgement number has the following size:
The size of the 2 nd acknowledgement number is:
The size of the ith acknowledgement number is:
The last acknowledgement number sent has a size of M.
M represents the number of received bytes, N represents the number of confirmed bytes, k is a parameter between (0, 1) and is used for controlling the splitting amplitude of the confirmation number, when k is close to 1, the size of the confirmation number is changed greatly, the split confirmation number is less and is more suitable for the condition of a network to be stable, when k is close to 0, the split confirmation number is more, the condition of network congestion or packet loss can be effectively treated, but k cannot be too small, otherwise, the excessive number of the confirmation number can cause extra bandwidth overhead to influence the transmission efficiency, k=0.5 is recommended to be preferentially selected, and if the calculation result of the size of the confirmation number is not an integer, the calculation result is rounded up.
After receiving the confirmation number, the sending end removes the confirmed bytes from the sending window, and releases the corresponding buffer zone resources, thereby avoiding unnecessary data backlog. The transmission window is a buffer area for the transmitting end to manage the transmitted but unacknowledged data, and the transmitting end will remove the data from the window only after receiving the corresponding acknowledgement number, so as to make room for new data transmission. After receiving the confirmation number, the transmitting end adjusts the size of the transmitting window according to the byte number represented by the confirmation number, and removes the confirmed bytes. The buffer resource is the memory space reserved by the transmitting end for storing the data to be transmitted and already transmitted. And the buffer zone resource of the confirmed data is released in time, the sending end can manage the network resource more effectively, and the data loss or transmission blockage caused by buffer overflow is avoided.
An embodiment of the present invention provides a receiving end, including:
The first processing module is used for receiving the data packet sent by the sending end and updating the number of bytes currently received;
The second processing module is used for judging whether the number of the currently received bytes is equal to the number of the currently confirmed bytes, if so, sending the confirmation number to the sending end, otherwise, splitting the confirmation number according to the current network condition and then sequentially sending the split confirmation number to the sending end;
The network condition is characterized by network delay and packet loss rate, if the current network delay and packet loss rate are both greater than the corresponding threshold values, the acknowledgement number is split into b, otherwise, the acknowledgement number is split into a number, a and b are integers greater than 1, a is less than b, the size of the split acknowledgement number is greater than the current number N of confirmed bytes, the size of the last transmitted split acknowledgement number is equal to the current number M of received bytes, and the sizes of other split acknowledgement numbers are all less than M.
The embodiment of the invention provides a receiving end, which comprises a computer readable storage medium and a processor;
the computer-readable storage medium is for storing executable instructions;
The processor is configured to read executable instructions stored in the computer readable storage medium and perform a method as in any of the embodiments described above.
Embodiments of the present invention provide a computer readable storage medium storing computer instructions for causing a processor to perform a method as described in any of the embodiments above.
Embodiments of the present invention provide a computer program product comprising a computer program or instructions which, when executed by a processor, implement a method as in any of the embodiments above.
The embodiment of the invention provides a data transmission system, which comprises a transmitting end and a receiving end as described in any one of the embodiments.
It will be readily appreciated by those skilled in the art that the foregoing description is merely a preferred embodiment of the invention and is not intended to limit the invention, but any modifications, equivalents, improvements or alternatives falling within the spirit and principles of the invention are intended to be included within the scope of the invention.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202510846945.3A CN120455373B (en) | 2025-06-24 | 2025-06-24 | A TCP acknowledgment number splitting method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202510846945.3A CN120455373B (en) | 2025-06-24 | 2025-06-24 | A TCP acknowledgment number splitting method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN120455373A CN120455373A (en) | 2025-08-08 |
| CN120455373B true CN120455373B (en) | 2025-09-19 |
Family
ID=96618645
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202510846945.3A Active CN120455373B (en) | 2025-06-24 | 2025-06-24 | A TCP acknowledgment number splitting method |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN120455373B (en) |
Family Cites Families (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8369348B2 (en) * | 2008-01-28 | 2013-02-05 | Broadcom Corporation | Method, and system, and computer program product for dynamically adjusting acknowledgement filtering for high-latency environments |
| US20130013731A1 (en) * | 2011-07-08 | 2013-01-10 | Bradley Richard Ree | Devices, systems, and methods for transmitting a message |
| CN102413503B (en) * | 2011-12-27 | 2014-06-25 | 上海海事大学 | A Method for Delayed Transmission of Adaptive Acknowledgment Packet for Quasi-TCP, namely Semi-TCP |
| WO2014194515A1 (en) * | 2013-06-07 | 2014-12-11 | Apple Inc. | Managing pending acknowledgement packets in a communication device |
| GB2520536B (en) * | 2013-11-25 | 2017-05-03 | Canon Kk | Method and device for data communication in a communication network |
| CN108028832A (en) * | 2016-05-10 | 2018-05-11 | 华为技术有限公司 | Detect the method and apparatus of network attack |
| CN111181697B (en) * | 2018-11-13 | 2025-09-09 | 三星电子株式会社 | Method and system for transmission of TCP ACK packets |
| US11916840B2 (en) * | 2019-02-15 | 2024-02-27 | Qualcomm Incorporated | Methods and apparatus for transport protocol ACK aggregation |
| US20240333461A1 (en) * | 2023-03-28 | 2024-10-03 | Samsung Electronics Co., Ltd. | Communication device, electronic device including the same, and method of transmitting ack packet |
| KR20240145858A (en) * | 2023-03-28 | 2024-10-07 | 삼성전자주식회사 | Communication device, electronic device including the same, and method of transmitting ack packet |
-
2025
- 2025-06-24 CN CN202510846945.3A patent/CN120455373B/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| CN120455373A (en) | 2025-08-08 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9043486B2 (en) | Data transfer method, system and protocol | |
| US9467390B2 (en) | Method and device for data transmission | |
| JP4016387B2 (en) | Data flow control method | |
| KR100787294B1 (en) | TPC performance improving device of mobile communication base station | |
| EP1691526A1 (en) | Transmission control protocol (TCP) congestion control using multiple TCP acknowledgements (ACKs) | |
| US8085669B2 (en) | Session relay device and session relay method | |
| US20040052234A1 (en) | Method and system for dispatching multiple TCP packets from communication systems | |
| JP4546542B2 (en) | Data flow control using duplicate receipt confirmation | |
| CN104137495B (en) | Method, device and system for confirming package processing | |
| US10439940B2 (en) | Latency correction between transport layer host and deterministic interface circuit | |
| JPWO2008044653A1 (en) | COMMUNICATION SYSTEM, COMMUNICATION DEVICE, COMMUNICATION METHOD | |
| WO2013159516A1 (en) | Wireless side tcp data retransmission method and device | |
| EP2912879B1 (en) | Introducing simple rlc functionality to node b | |
| US20030128672A1 (en) | Transmission and flow control | |
| WO2016201904A1 (en) | Tcp-based data transmission method and device | |
| US20190349308A1 (en) | Data Transmission Method And Apparatus, And Customer-Premises Equipment | |
| US9887925B2 (en) | Network performance enhancement | |
| US11258721B2 (en) | Radio link control (RLC) acknowledged mode (AM) data reception | |
| CN103152278A (en) | Congestion determination method, congestion determination device and congestion determination network equipment | |
| CN120455373B (en) | A TCP acknowledgment number splitting method | |
| CN101141393A (en) | Communication terminal, communication control method, and communication control program | |
| EP3031159B1 (en) | Retransmission control network node and related method | |
| CN119728030B (en) | RDMA storage network optimization method based on Go-Back-N retransmission mechanism | |
| CN119996533B (en) | Gradient bounded loss tolerant transmission optimization method for distributed transducer training | |
| JP7701335B2 (en) | TCP communication device, method and program |
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 | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |