Transmission control protocol optimization method, network equipment and readable storage medium
The intermediate network element quickly senses packet loss and sends repeated confirmation messages, triggering the fast retransmission mechanism of the first device, solving the problem of high latency caused by packet loss when the network connection is short, and improving TCP transmission performance.
Patent Information
- Application Number
- CN202311204656.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-15
- Publication Date
- 2025-03-18
AI Technical Summary
In the case of short network connections, packet loss during data transmission usually leads to invalidation of the fast retransmission mechanism. You must wait until the retransmission timeout is triggered before retransmission is resent, resulting in a high delay and affecting TCP transmission performance.
The packet loss is quickly sensed through the intermediate network element, and a plurality of repeated acknowledgements are sent to the first device according to the acknowledgement message sent by the second device that is cached in advance, so as to trigger the fast retransmission mechanism of the first device and avoid triggering timeout retransmission.
It realizes the fast retransmission mechanism triggering without triggering the timeout retransmission mechanism, reducing delay, reducing flow completion time, and improving TCP transmission performance.
Smart Images

Figure CN119652475A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a transmission control protocol optimization method, a network device, and a readable storage medium. Background Art
[0002] In the case of a short network connection, packet loss during data transmission is usually tail packet loss, which results in insufficient new data transmission to enable the receiving device to generate enough acknowledgment (ACK) messages to trigger the fast retransmission mechanism of the sending device. Therefore, the fast retransmission mechanism is invalid and can only wait until the retransmission timeout (RTO) is triggered to resend the lost message according to the timeout retransmission mechanism. In addition, in the case of weak network or sudden packet loss, the sending window does not grow large enough and cannot generate enough ACK messages. Similarly, the timeout retransmission mechanism can only be used for recovery.
[0003] Currently, the method of using a timeout retransmission mechanism to recover most of the lost packets results in high latency, and frequent triggering of RTO seriously affects the transmission performance based on the transmission control protocol (TCP). Summary of the invention
[0004] The present application provides a transmission control protocol optimization method, a network device and a readable storage medium, which realizes the effect of triggering a fast retransmission mechanism without triggering RTO by quickly sensing packet loss through an intermediate network element and sending an ACK message to a first device according to a pre-cached acknowledgment (ACK) message sent by a second device, thereby reducing latency, reducing flow completion time, and improving transmission performance based on the transmission control protocol (TCP).
[0005] In the first aspect, the present application provides a transmission control protocol optimization method, which is applied to a transmission system including a first device, a second device and an intermediate network element, the intermediate network element is connected to the first device and the second device, respectively, and a communication connection is established between the first device and the second device based on the transmission control protocol, the method comprising: the intermediate network element receives and stores a first confirmation message sent by the second device to the first device, the first confirmation message is used to enable the first device to send first data; after sending the first data, the intermediate network element sends a second confirmation message to the first device if it determines that the second device has not received the first data, so that the first device resends the first data when the number of times the second confirmation message is received reaches a message number threshold, wherein the second confirmation message is the same as the first confirmation message.
[0006] To summarize, the present application provides a transmission control protocol optimization method, which, after quickly sensing the loss of the first data, sends multiple repeated second confirmation messages to the first device based on the pre-stored first confirmation message sent by the second device to trigger the fast retransmission mechanism of the first device. This method can trigger the fast retransmission mechanism without triggering the timeout retransmission mechanism, thereby reducing latency and stream completion time. Moreover, the above process does not require changes to the existing mechanisms of the first device and the second device, which is conducive to maintaining the stability of the Internet.
[0007] In a possible implementation, after sending the first data, the intermediate network element determines that the second device has not received the first data, and the specific process of sending the second confirmation message to the first device is as follows. After sending the first data, the intermediate network element determines that the second device has not received the first data according to the bitmap of the second device; the intermediate network element performs an automatic repeat request (ARQ) on the first data at the link layer; when the number of times the intermediate network element performs the automatic repeat request at the link layer reaches the number threshold, the intermediate network element sends the second confirmation message to the first device; or, when the time for the intermediate network element to perform the automatic repeat request at the link layer reaches the first time threshold, the intermediate network element sends the second confirmation message to the first device, wherein the first time threshold is the minimum value of the time for the last round of automatic repeat request execution and the first time experience threshold. In the above process, the intermediate network element can quickly perceive the packet loss according to the bitmap of the second device, and when it is determined that no new confirmation message has arrived according to the automatic repeat request of the link layer, the intermediate network element does not need to forge a confirmation message, and can send the second confirmation message that is the same as the first confirmation message to the first device, thereby avoiding triggering RTO and triggering the fast retransmission mechanism in time.
[0008] In a possible implementation, after the intermediate network element sends a second confirmation message to the first device when the number of times the automatic retransmission request is executed reaches the number threshold, the method further includes: the intermediate network element updates the time of the previous round of automatic retransmission request execution and the first time experience threshold according to the time of executing the automatic retransmission request, and updates the first time threshold to the second time threshold; the intermediate network element sends a new second confirmation message to the first device according to the number threshold and the second time threshold. In the case where the number threshold is triggered in this round of automatic retransmission request, the number threshold remains unchanged, the first time threshold is updated, and the time required for the current round of link layer automatic retransmission is estimated by updating the previous statistical experience value and the time of the previous round of automatic retransmission request execution, so as to avoid waiting too long and send the second confirmation message to the first device in time to trigger fast retransmission and avoid triggering RTO.
[0009] In a possible implementation, when the time for the intermediate network element to execute the automatic retransmission request reaches the first time threshold, after sending the second confirmation message to the first device, the method further includes: the intermediate network element updates the first time threshold to a third time threshold, and the third time threshold is greater than the first time threshold; the intermediate network element sends a new second confirmation message to the first device according to the number threshold and the third time threshold. When the first time threshold is triggered by the current round of automatic retransmission request, an additive increase operation can be performed according to the first time threshold to determine the time threshold for the next round of automatic retransmission request, the newly generated time threshold is greater than the first time threshold, and the number threshold remains unchanged, thereby avoiding excessive false triggering of retransmissions in the next round of automatic retransmission request execution, and sending a new second confirmation message to the first device in a timely manner to trigger the fast retransmission mechanism.
[0010] In a possible implementation, after the intermediate network element sends the first data, and after determining according to the bitmap of the second device that the second device has not received the first data, the method further includes: when the intermediate network element is a wired router, when the time for not receiving the confirmation message sent by the second device reaches a fourth time threshold, the intermediate network element sends a second confirmation message to the first device, wherein the fourth time threshold is determined based on the round-trip time of the link between the intermediate network element and the second device. After triggering the fourth time threshold, the intermediate network element can also reset the timer by methods such as additive increase, and update the fourth time threshold to a fifth time threshold, wherein the fifth time threshold is greater than the fourth time threshold. When the intermediate network element is a wired router, the intermediate network element does not perform ARQ, and sends a second confirmation message to the first device by triggering the fourth time threshold to trigger the fast retransmission mechanism of the first device.
[0011] In a possible implementation, after sending the second confirmation message to the first device, the method further includes: when the second device receives the first data resent by the first device and sends the third confirmation message, the intermediate network element receives the third confirmation message and replaces the stored first confirmation message with the third confirmation message. The intermediate network element stores the latest confirmation message received, and is used to send the correct confirmation message to the first device in the event of packet loss, so as to trigger the first device to quickly retransmit, so that the first device resends the correct lost packet data.
[0012] In a possible implementation, before the intermediate network element receives and stores the first confirmation message sent by the second device to the first device, the method also includes: when the intermediate network element establishes a communication connection between the first device and the second device, the intermediate network element stores flow data, the flow data including a flow identifier, a flow life cycle threshold, a newly received confirmation message, a time threshold, and the number of times a false confirmation message is sent.
[0013] In a possible implementation, the method further includes: when the intermediate network element receives a termination message or a termination confirmation message, or when the time of receiving a message sent by the first device or the second device triggers the flow life cycle threshold, the intermediate network element deletes the termination message, the termination confirmation message, or the flow data corresponding to the flow life cycle. In the above process, when the intermediate network element receives a termination message or a termination confirmation message, it determines that the first device and the second device are to disconnect the communication connection, thereby deleting the corresponding flow data. When the flow life cycle reaches the life cycle threshold, the flow is determined to be a long flow, and the intermediate network element only maintains the flow data of the short flow. Deleting the flow data of the long flow can save computing overhead.
[0014] In a second aspect, the present application provides a network device, which includes a processor and a memory; the processor of the network device is used to execute instructions stored in the memory of the network device, so that the network device executes the method provided in the first aspect.
[0015] In a third aspect, the present application provides a computer program product comprising instructions, which, when executed by a network device, causes the network device to execute the method provided in the first aspect.
[0016] In a fourth aspect, the present application provides a computer-readable storage medium, which includes computer program instructions. When the computer program instructions are executed by a network device, the network device executes the method provided in the first aspect.
[0017] Based on the implementations provided in the above aspects, the present application can also be further combined to provide more implementations. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments.
[0019] Figure 1 It is a structural schematic diagram of a transmission system provided in an embodiment of the present application;
[0020] Figure 2 is a flow chart of a transmission control protocol optimization method provided by an embodiment of the present application;
[0021] Figure 3 It is a schematic diagram of a process in which an intermediate network element sends a second confirmation message to a first device provided in an embodiment of the present application;
[0022] Figure 4 It is a schematic diagram of another process of an intermediate network element sending a second confirmation message to a first device provided in an embodiment of the present application;
[0023] Figure 5This is a flowchart of triggering fast retransmission of a first device provided by an embodiment of the present application;
[0024] Figure 6 It is a structural diagram of a network device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] like Figure 1 As shown, Figure 1 It is a structural diagram of a transmission system provided in an embodiment of the present application. The transmission system includes a first device 110, a second device 120 and an intermediate network element 130. The intermediate network element 130 is connected to the first device 110 and the second device 120 respectively.
[0026] In a specific implementation, the first device 110 may be a bare metal server (BMS), a virtual machine or a container. Among them, BMS refers to a general physical server, such as an ARM server or an X86 server; a virtual machine refers to a complete computer system with complete hardware system functions implemented by network function virtualization (NFV) technology and simulated by software, running in a completely isolated environment; a container refers to a group of processes that are isolated from each other and are subject to resource constraints.
[0027] In a specific implementation, the second device 120 may be a device with wireless transceiver function, and may be a handheld device, vehicle-mounted device, wearable device or computing device with wireless communication function. Exemplarily, the second device may be a cellular or other communication device, which has a single-line display or a multi-line display or other communication device; a PCS (personal communications service), which may combine voice, data processing, fax and / or data communication capabilities; a PDA (personal digital assistant), which may include Internet / intranet access, a web browser, a notepad, a calendar; various types of user equipment (UE), mobile phones, tablet computers (pad), desktop computers, etc., and may also include wearable devices such as smart watches, etc.; it may also be a communication terminal, an Internet terminal, a music / video playback terminal, such as a PDA, a MID (mobile internet device) and / or a mobile phone with music / video playback function, etc. The present application does not specifically limit the type and quantity of the second device.
[0028] In a specific implementation, the system further includes one or more routers, and the routers are connected to the first device and the intermediate network element respectively.
[0029] In a specific implementation, the intermediate network element 130 is located upstream of the wireless air interface, and may be a network device such as a wireless access point (AP), a base station (BS) or a gateway, which is not specifically limited in this application. In the transmission system, the intermediate network element is connected to the first device via a router and is connected to the second device via a wireless network or a wired network.
[0030] In a possible implementation, the first device sends a connection establishment request including a synchronization sequence number (SYN) to the second device through a router and an intermediate network element. Upon receiving an acknowledgment (ACK) message of the connection establishment request and a new request including SYN sent by the second device, the first device sends an ACK message to the second device to confirm receipt of the new request. The above process enables establishment of a communication connection between the first device and the second device based on a transmission control protocol (TCP). After the communication connection is established, the first device and the second device can transmit data through the router and the intermediate network element.
[0031] At present, in the scenario of cloud service requests (video, music, cloud storage, etc.), in the above-mentioned transmission system, the last hop of the network is usually WiFi. Due to the instability of the channel, data packets are often lost. Under weak network conditions, after the first data is lost, it is difficult for the first device to obtain enough repeated ACK messages sent by the second device, and the fast retransmission mechanism cannot be triggered. The lost first data can only be resent when the retransmission timeout (RTO) is triggered when the ACK message corresponding to the first data sent by the second device is not received. The timeout retransmission mechanism is used for recovery after packet loss, resulting in frequent RTO in the transmission system. Since the RTO time threshold increases exponentially when the RTO is triggered, the delay increases, affecting the overall data transmission completion time and other issues.
[0032] Therefore, the present application provides a transmission control protocol optimization method, which quickly senses packet loss through an intermediate network element, and sends multiple ACK messages to a first device based on a pre-stored ACK message sent by a second device to trigger the first device to perform a fast retransmission. This method can achieve the effect of triggering the fast retransmission mechanism of the first device when the RTO is not reached, avoid the effect of the timeout retransmission mechanism, reduce latency, and shorten the flow completion time.
[0033] like Figure 2 As shown, Figure 2 is a flow chart of a transmission control protocol optimization method provided by an embodiment of the present application, the method is applied to Figure 1 In the transmission system shown, the method includes the following steps.
[0034] Step S210: the intermediate network element obtains and stores flow data during the process of establishing a communication connection between the first device and the second device.
[0035] In the process of establishing a communication connection between the first device and the second device based on the TCP protocol, the first device sends a SYN message to the second device through an intermediate network element, and the intermediate network element obtains the SYN message and generates a corresponding flow ID to distinguish it from other flows, wherein the flow ID is obtained by the intermediate network element through hash calculation based on a four-tuple including a source IP address, a source layer 4 port, a destination IP address, and a destination layer 4 port. In addition to the flow ID, the intermediate network element also stores other flow data, including but not limited to the flow ID, the flow life cycle threshold (life timer), the newly received confirmation message (latest ACK), the time threshold (timer), and the number of times a false confirmation message is sent (phony-acknowledge times, PACK times). Among them, the flow life cycle threshold is used to limit the maximum flow table maintenance time to save overhead; the newly received confirmation message is the confirmation message sent by the second device that the intermediate network element has recently received; the time threshold is the time threshold of the timer corresponding to the automatic retransmission request executed by the intermediate network element. When the time for the intermediate network element to execute the automatic retransmission request reaches the time threshold, the intermediate network element determines that the data sent to the second device may be lost, and needs to request the first device to retransmit the data to avoid triggering RTO timeout; the number of false confirmation messages sent is the number of times the intermediate network element sends the same confirmation message as the newly received confirmation message to the first device after determining that the data sent to the second device is lost. In a possible implementation, the flow data can also include more types of data, which are not specifically limited here.
[0036] In a possible implementation, the intermediate network element constructs a flow table entry including the above-mentioned flow data and maintains the data of the flow table entry, as shown in Table 1. Table 1 is a schematic diagram of a flow table entry constructed by an intermediate network element provided in an embodiment of the present application.
[0037] Table 1 Flow table entry
[0038] Flow id Latest ACK Timer PACK times Life timer F1 Ack-x T 1 L1
[0039] The intermediate network element may also store and maintain the above-mentioned flow data in other forms, which is not specifically limited in this application.
[0040] Step S220: the intermediate network element receives and stores the first confirmation message sent by the second device, and sends the first confirmation message to the first device, so that the first device sends the first data to the second device.
[0041] After the communication connection between the first device and the second device is established, data transmission is performed, the intermediate network element receives and stores the first confirmation message sent by the second device to the first device, and the intermediate network element replaces the newly received confirmation message with the first confirmation message while maintaining the flow table entry shown in Table 1, wherein the first confirmation message is used to enable the first device to send the first data to the second device. Finally, the intermediate network element sends the first confirmation message to the first device.
[0042] In the above process, the intermediate network element stores the first confirmation message newly sent by the second device. When the first data expected by the subsequent first confirmation message is lost, the intermediate network element can send sufficient confirmation messages of the expected first data to the first device according to the stored first confirmation message to trigger the first device to quickly retransmit. Without triggering RTO, the first data can be resent, thereby reducing latency and improving transmission performance.
[0043] Step S230: After sending the first data sent by the first device to the second device, the intermediate network element performs an automatic retransmission request on the first data at the link layer if it is determined that the second device has not received the first data.
[0044] After the intermediate network element sends the first data sent by the first device to the second device, if it determines according to the bitmap of the second device that the second device has not received the first data, it performs an automatic repeat request (ARQ) on the first data at the wireless link layer. The intermediate network element in the above process is a wireless router (for example, AP).
[0045] The process of the intermediate network element executing the automatic retransmission request at the wireless link layer is relatively simple, and when the number of times the ARQ is executed reaches the number threshold, or when the time for executing the ARQ reaches the time threshold and no new confirmation message is received, the intermediate network element can promptly determine that the first data is lost, or may be lost, and thus execute subsequent steps to avoid triggering an RTO timeout, and also avoid excessive erroneous triggering of retransmissions.
[0046] Step S240: When the number of times the intermediate network element executes ARQ at the link layer reaches a number threshold, or the time for executing ARQ triggers a first time threshold, the intermediate network element sends a second confirmation message to the first device.
[0047] When the number of times the intermediate network element executes ARQ reaches a number threshold, or the time for executing ARQ triggers a first time threshold, the intermediate network element sends a second confirmation message to the first device, so that the first device resends the first data when the number of times the first device receives the second confirmation message reaches a message number threshold, wherein the second confirmation message is the same as the first confirmation message.
[0048] like Figure 3 As shown, Figure 3 It is a schematic diagram of a process of an intermediate network element sending a second confirmation message provided by an embodiment of the present application. The embodiment provided by the present application is described with the number threshold of the link layer automatic retransmission request being 8. In a possible implementation, the number threshold of the link layer automatic retransmission request can also be 32, 64, etc., which is not specifically limited by the present application. When the intermediate network element executes eight automatic retransmission requests, does not trigger the first time threshold, and still does not receive a new confirmation message, it sends a second confirmation message to the first device, wherein the second confirmation message is the same as the first confirmation message. When the number of times the intermediate network element executes the automatic retransmission request reaches the number threshold, it determines that the first data is lost, and informs the transport layer of the loss of the block through the link layer, so that the intermediate network element sends the second confirmation message that is the same as the first confirmation message to the first device according to the pre-stored first confirmation message. The above process does not require forging confirmation messages, and triggers fast retransmission by sending repeated confirmation messages to avoid triggering RTO.
[0049] In a possible implementation, after sending the second confirmation message to the first device, the intermediate network element resets the ARQ timer according to the first ARQ time corresponding to this round, and updates the first time threshold in the flow table entry to the second time threshold. The first time threshold is determined based on the statistical value of the historical time threshold and the time required for the previous round of ARQ. The intermediate network element updates the statistical value of the historical time threshold based on the first ARQ time, and replaces the time required for the previous round of ARQ with the first ARQ time, and selects the minimum value from the statistical value of the updated historical time threshold and the time required for the previous round of ARQ as the second time threshold. When the intermediate network element updates the time threshold, when packet loss is determined by triggering the time threshold, it can avoid waiting too long, and send the second confirmation message in time to trigger fast retransmission and avoid triggering RTO. In a possible implementation, the intermediate network element can also update the first time threshold by other calculation methods, which are not specifically limited here.
[0050] like Figure 4 As shown, Figure 4It is another schematic diagram of the process of sending a second confirmation message by an intermediate network element provided in an embodiment of the present application. In a possible implementation, when the time for executing an automatic retransmission request triggers a first time threshold, but the number of times the automatic retransmission request is executed does not reach the number threshold, the intermediate network element sends a second confirmation message identical to the first confirmation message to the first device according to a pre-stored first confirmation message. When the time for executing an automatic retransmission request triggers the first time threshold, the intermediate network element infers that the first data may be lost, and sends a second confirmation message identical to the first confirmation message to the first device according to a pre-stored first confirmation message.
[0051] In a possible implementation, when the time for executing an automatic retransmission request triggers the first time threshold, the intermediate network element resets the timer and updates the first time threshold to a third time threshold, wherein the third time threshold is greater than the first time threshold. In a possible implementation, the intermediate network element may generate a third time threshold greater than the first time threshold by a method of additive increase according to the first time threshold, for example, the third time threshold is obtained by adding two first time thresholds. The intermediate network element may also update the first time threshold by other calculation methods to generate the third time threshold, which is not specifically limited here.
[0052] In a possible implementation, the second confirmation message in the above process may be obtained based on the first confirmation message when the intermediate network element stores the first confirmation message, or may be newly generated when the intermediate network element does not store the first confirmation message. This application does not make any specific limitation.
[0053] In a possible implementation, when the first device and the second device negotiate to enable selective retransmission (SACK), the intermediate network element generates a new confirmation message by tampering with the SACK-related fields in the confirmation message sent to the first device, so that the first device determines the packet loss information and performs fast retransmission. For example, the intermediate network element generates a confirmation message including a non-continuous ACK sequence number indicating the received data, and sends it to the first device to trigger the forward acknowledgment (FACK) mechanism of the first device, so that the first device determines the received data and one or more data that need to be retransmitted, so as to more accurately retransmit the lost data. Alternatively, the intermediate network element generates a confirmation message including an ACK sequence number indicating the data that needs to be retransmitted, and sends it to the first device to trigger the early retransmit (ER) mechanism of the first device to quickly retransmit the corresponding data. The intermediate network element triggers the FACK mechanism or the ER mechanism by tampering with the SACK-related fields in the confirmation message, which can also avoid triggering RTO, reduce latency, and improve transmission performance.
[0054] In the above process, after sending the second notification message to the first device, the intermediate network element adds 1 to the PACKtimes in the flow table entry and replaces the Timer stored in the flow table entry with the second time threshold or the third time threshold updated after the intermediate network element resets the timer.
[0055] In a possible implementation, the intermediate network element is different from the above process. When the intermediate network element is a wired router, after sending the first data, after determining according to the bitmap of the second device that the second device has not received the first data, the intermediate network element does not perform ARQ, but sends a second confirmation message to the first device when the time for not receiving the confirmation message sent by the second device reaches a fourth time threshold, wherein the fourth time threshold is determined based on the round-trip time of the link between the intermediate network element and the second device.
[0056] After triggering the fourth time threshold, the intermediate network element may reset the timer and update the fourth time threshold to a fifth time threshold, wherein the fifth time threshold is greater than the fourth time threshold. In a possible implementation, the intermediate network element may generate a fifth time threshold greater than the fourth time threshold by a method of additive increase according to the fourth time threshold, and the intermediate network element may also update the fourth time threshold by other calculation methods to generate the fifth time threshold, which is not specifically limited here. In the case where the intermediate network element is a wired router, the intermediate network element does not perform ARQ, and by triggering the fourth time threshold, promptly sends a second confirmation message to the first device to trigger the fast retransmission mechanism of the first device to avoid triggering an RTO timeout.
[0057] The intermediate network element repeats the step shown in S240 until the number of second confirmation messages arriving at the first device reaches the message number threshold, triggering the fast retransmission mechanism of the first device, so that the first device resends the first data.
[0058] like Figure 5 As shown, Figure 5 This is a schematic diagram of the process of a second confirmation message triggering fast retransmission provided by an embodiment of the present application. The present application is illustrated by using the message number threshold for triggering the fast retransmission mechanism of the first device as 3. In a possible implementation, the message number threshold can also be a larger integer, which is not specifically limited in the present application. The intermediate network element repeatedly executes the automatic retransmission request for the first data, and sends repeated second confirmation messages to the first device according to the number threshold and the continuously updated time threshold until the number of second confirmation messages received by the first device reaches the message number threshold, triggering fast retransmission, and the first device resends the first data. By triggering the first device to retransmit quickly and resending the first data, the triggering of RTO can be avoided, the transmission performance can be improved, and the delay can be reduced.
[0059] After fast retransmission is triggered and the first device resends the first data, the intermediate network element executes step S250.
[0060] Step S250: the intermediate network element receives the first data resent by the first device, and sends the first data to the second device.
[0061] When the second confirmation message received by the first device reaches the message number threshold, fast retransmission is triggered. After resending the first data, the intermediate network element receives the first data resent by the first device and sends the first data to the second device. After receiving the first data, the second device generates a new third confirmation message and sends the third confirmation message to the first device through the intermediate network element to obtain new data.
[0062] In the above process, when the intermediate network element receives the new third confirmation message, it replaces the stored first confirmation message with the third confirmation message, so as to trigger fast retransmission when data loss occurs in the subsequent process.
[0063] In a possible implementation, when the intermediate network element obtains a termination message or a termination confirmation message sent by the first device or the second device, it determines that the communication between the first device and the second device is terminated, and deletes the corresponding stored flow data.
[0064] In another possible implementation, when the time of receiving the message sent by the first device or the second device reaches the corresponding flow life cycle threshold, the intermediate network element deletes the corresponding flow data and retains the flow data corresponding to other short flows. The intermediate network element only maintains the short flow state and deletes the long flow data that reaches the flow life cycle threshold, which can save computing overhead.
[0065] In summary, the present application provides a transmission control protocol optimization method, which can trigger the fast retransmission mechanism of the first device without triggering the timeout retransmission mechanism by sending multiple repeated second confirmation messages to the first device according to the pre-stored first confirmation message most recently sent by the second device after the intermediate network element quickly senses the loss of the first data, thereby reducing the delay, reducing the flow completion time, and improving the transmission performance. The above method does not require changes to the first device and the second device, ensuring the stability of the network, and the intermediate network element executing the above method has the effect of being lightweight and not changing the TCP end-to-end semantics.
[0066] In a specific implementation, the link layer automatic retransmission request number threshold is 8, the message number threshold that triggers the first device to quickly retransmit is 3, and the intermediate network element in the transmission system is an AP. The first device sends a SYN message to the second device in the handshake phase to establish a communication connection, and the AP generates and maintains a flow table entry including a flow identifier, a flow life cycle threshold, a newly received confirmation message, a time threshold, and the number of times a false confirmation message is sent based on the obtained SYN message.
[0067] After the communication connection between the first device and the second device is established, the first device sends five data from P1 to P5 to the second device in sequence. None of the five data are lost and are received by the second device. During this process, the AP continuously updates the newly received confirmation message in the flow table entry. After receiving the data P5, the second device generates a new ACK message, ACK-for6, so that the first device sends the data P6 when the message reaches the first device. In the process of the second device sending ACK-for6 to the first device, the AP replaces the newly received confirmation message ACK-for5 stored in the current flow table entry with the received ACK-for6 confirmation message. After receiving the ACK-for6 confirmation message, the first device sends the data P6 to the second device. After the AP sends the data P6 to the second device, it determines that the data P6 is lost according to the bitmap of the second device, and the AP performs an automatic retransmission request for the data P6. When the number of times the AP performs the automatic retransmission request first reaches the number threshold of 8, the AP sends the same confirmation message as the confirmation message ACK-for6 to the first device and updates the time threshold in the flow table entry. After that, the AP continues to send automatic retransmission requests to determine whether the number threshold or the time threshold for triggering the update in the flow table entry is reached. If the conditions are met, it continues to send confirmation messages identical to the confirmation message ACK-for6 to the first device until the first device receives three repeated confirmation messages, triggering fast retransmission and resending P6 to the second device. After receiving P6, the second device sends a termination message to the first device, and the intermediate network element deletes the corresponding flow table entry after receiving the termination message.
[0068] like Figure 6 As shown, Figure 6 is a schematic diagram of a network device provided in an embodiment of the present application, which can be used as an intermediate network element in Figure 1 In the system shown, execution Figure 2 The transmission control protocol optimization method shown includes the following steps: The network device 600 includes at least: a processor 610, a memory 620, a communication interface 630 and a bus 640. The processor, the memory and the communication interface may be connected via a bus.
[0069] The processor 610 may be composed of at least one general-purpose processor, such as a central processing unit (CPU), or a combination of a CPU and a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. The processor 610 is used to execute the corresponding steps to implement the corresponding functions.
[0070] The memory 620 may be a volatile memory, such as a random access memory (RAM), a dynamic RAM (DRAM), a static RAM (SRAM), a synchronous dynamic RAM (SDRAM), a double data rate RAM (DDR), a cache, etc. The memory may also include a combination of the above types. The memory 620 stores intermediate network elements for executing Figure 2 The instructions of the transmission control protocol optimization method may also store flow data such as confirmation messages, flow life cycle, and flow identification, which is not specifically limited in this application.
[0071] The communication interface 630 uses a transceiver module such as, but not limited to, a network interface card or a transceiver, and supports the TCP protocol, which is not specifically limited in this application.
[0072] The bus 640 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3The bus 640 is represented by only one line, but it does not mean that there is only one bus or one type of bus. The bus 640 may include a path for transmitting information between various components of the network device (for example, the processor 610, the memory 620, and the communication interface 630).
[0073] Need to explain, Figure 6 This is only one possible implementation of the embodiment of the present application. In actual applications, the network device may also include more or fewer components, which is not limited here.
[0074] The present application also provides a computer program product including instructions. The computer program product may be a software or program product including instructions that can be run on a network device or stored in any available medium. When the computer program product is run on a network device, the network device is enabled to execute Figure 2 The transmission control protocol optimization method shown.
[0075] The present application also provides a computer-readable storage medium. The computer-readable storage medium may be any available medium that the network device can store or a data storage device such as a data center that contains one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk). The computer-readable storage medium includes instructions that instruct the network device to execute Figure 2 The transmission control protocol optimization method shown.
[0076] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.
Claims
1. A transmission control protocol optimization method, applied to a transmission system including a first device, a second device and an intermediate network element, wherein the intermediate network element is connected to the first device and the second device respectively, and a communication connection is established between the first device and the second device based on the transmission control protocol, characterized in that: The method comprises: The intermediate network element receives and stores a first confirmation message sent by the second device to the first device, where the first confirmation message is used to enable the first device to send first data; After sending the first data, the intermediate network element sends a second confirmation message to the first device if it determines that the second device has not received the first data, so that the first device resends the first data when the number of times the first device receives the second confirmation message reaches a message number threshold, wherein the second confirmation message is the same as the first confirmation message.
2. The method according to claim 1, characterized in that After sending the first data, if the intermediate network element determines that the second device has not received the first data, sending a second confirmation message to the first device includes: After sending the first data, the intermediate network element determines, according to the bitmap of the second device, that the second device has not received the first data; The intermediate network element performs an automatic repeat request ARQ on the first data at a link layer; When the number of times that the intermediate network element executes the automatic retransmission request at the link layer reaches a number threshold, the intermediate network element sends the second confirmation message to the first device; or When the time for the intermediate network element to execute the automatic retransmission request at the link layer reaches a first time threshold, the intermediate network element sends the second confirmation message to the first device, wherein the first time threshold is the minimum value between the time for executing the automatic retransmission request in the previous round and the first time experience threshold.
3. The method according to claim 2, characterized in that When the number of times that the intermediate network element executes the automatic retransmission request at the link layer reaches a number threshold, after sending the second confirmation message to the first device, the method further includes: The intermediate network element updates the time of executing the automatic retransmission request in the previous round and the first time experience threshold according to the time of executing the automatic retransmission request, and updates the first time threshold to a second time threshold; The intermediate network element sends a new second confirmation message to the first device according to the number threshold and the second time threshold.
4. The method according to claim 2, characterized in that: When the time for the intermediate network element to execute the automatic retransmission request at the link layer reaches a first time threshold, after sending the second confirmation message to the first device, the method further includes: The intermediate network element updates the first time threshold to a third time threshold, where the third time threshold is greater than the first time threshold; The intermediate network element sends a new second confirmation message to the first device according to the number threshold and the third time threshold.
5. The method according to claim 2, characterized in that: After the intermediate network element sends the first data, after determining according to the bitmap of the second device that the second device has not received the first data, the method further includes: In the case where the intermediate network element is a wired router, the intermediate network element sends the second confirmation message to the first device if the time for not receiving the confirmation message sent by the second device reaches a fourth time threshold, wherein the fourth time threshold is determined based on the round-trip time of the link between the intermediate network element and the second device.
6. The method according to any one of claims 1 to 5, characterized in that: After sending the second confirmation message to the first device, the method further includes: When the second device receives the first data resent by the first device and sends a third confirmation message, the intermediate network element receives the third confirmation message and replaces the stored first confirmation message with the third confirmation message.
7. The method according to claim 6, characterized in that Before the intermediate network element receives and stores the first confirmation message sent by the second device to the first device, the method further includes: When the first device and the second device establish a communication connection, the intermediate network element stores flow data, where the flow data includes a flow identifier, a flow life cycle threshold, a newly received confirmation message, a time threshold, and a number of times a false confirmation message is sent.
8. The method according to claim 7, characterized in that The method further comprises: When the intermediate network element receives a termination message or a termination confirmation message, or when the time of receiving the message sent by the first device or the second device triggers the flow life cycle threshold, the intermediate network element deletes the termination message, the termination confirmation message or the flow data corresponding to the flow life cycle.
9. A network device, characterized in that: The network device comprises a processor and a memory, wherein the processor is configured to execute instructions stored in the memory of the network device, so that the network device executes the method according to claims 1 to 7.
10. A computer program product comprising instructions, characterized in that When the instructions are executed by a network device, the network device executes the method according to claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The method comprises computer program instructions. When the computer program instructions are executed by a network device, the network device performs the method according to claims 1 to 8.
Citation Information
Cited By
Multi-path data retransmission method, device, chip, network interface card, equipment, medium and program product
CN121907414A