Method and device for implementing TCP transmission, computing equipment and storage medium

By setting a TCP window switching timer and simplifying the TCP connection process in the TSN network, the burden caused by ACK confirmation messages is resolved, thereby improving network transmission rate and TCP connection efficiency.

CN121603575APending Publication Date: 2026-03-03BEIJING KEYIN JINGCHENG TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511866589.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-11
Publication Date
2026-03-03

Smart Images

  • Figure CN121603575A_ABST
    Figure CN121603575A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a TCP transmission implementation method and device, computing equipment and a storage medium. The transmission method comprises the steps that the duration of a TCP window switching timer is set as TCP end-to-end total delay; after the data sender sends the TCP packet, the data sender does not need to wait for an acknowledgement (ACK) of the data receiver to the sent TCP packet, and continues to send the TCP packet to be sent; when the duration that the data receiving party does not receive the TCP packet needing to be received reaches the duration of the TCP window switching timer, the data receiving party sends a NACK message to require retransmission of the TCP packet; and when the data sender receives the NACK message before the TCP window switching timer is overtime, the data sender sends the TCP packet required to be retransmitted by the NACK message. According to the TCP transmission technical scheme, TCP transmission is achieved on a deterministic network, the received TCP packet does not need to be confirmed through frequent ACK confirmation messages of a TCP layer, the influence of the frequent ACK confirmation messages on the network bandwidth and the CPU load is reduced, and the network transmission rate is increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network communication technology, and in particular to a method for implementing TCP transmission, a method for establishing a TCP connection, and a method for closing a TCP connection. Background Technology

[0002] TCP (Transmission Control Protocol), as the cornerstone of the Internet protocol suite, is designed with the core goal of providing a reliable, connection-oriented byte stream service for the application layer over an inherently unreliable IP network through complex state machines and sophisticated flow and congestion control mechanisms. This design perfectly complements the traditional, best-effort Ethernet.

[0003] However, if this protocol, designed for a "chaotic" world, is simply transplanted to the "orderly" deterministic environment built by Time-Sensitive Networks (TSN), its inherent complexity transforms from an advantage into a heavy burden. This manifests itself in the following ways:

[0004] Mechanism Redundancy: TSN fundamentally provides end-to-end, predictable, low-latency, low-jitter, and zero-congestion transmission through Layer 2 mechanisms such as time synchronization, gated scheduling (Qbv), and credit shaping (Qav). In this "worry-free" network environment, the retransmission, reordering, and congestion window mechanisms designed by TCP to cope with packet loss, out-of-order delivery, and congestion are almost entirely redundant.

[0005] Furthermore, establishing and closing TCP connections incurs significant performance overhead: TCP reliability is not free, requiring the generation of numerous ACK control messages. These control messages not only significantly increase the CPU's protocol processing load but also consume valuable network bandwidth that could be used to transmit valid data, directly reducing bandwidth utilization. Summary of the Invention

[0006] In view of this, embodiments of this application provide a method, apparatus, computing device, and storage medium for implementing TCP transmission. The TCP transmission technology solution of this application implements TCP transmission on a deterministic network, eliminating the need for frequent ACK confirmation messages from the TCP layer to acknowledge received TCP packets. This reduces the impact of frequent ACK confirmation messages on network bandwidth and CPU load, thereby improving network transmission speed.

[0007] In a first aspect, embodiments of this application provide a method for implementing TCP transmission, comprising: setting the duration of a TCP window switching timer to the total end-to-end TCP latency; after sending a TCP packet, the data sender continues to send the TCP packet to be sent without waiting for an ACK message from the data receiver for the sent TCP packet; when the duration for which the data receiver has not received the TCP packet to be received reaches the duration of the TCP window switching timer, the data receiver sends a NACK message to request the retransmission of the TCP packet; when the data sender receives the NACK message before the TCP window switching timer expires, the data sender sends the NACK message to request the retransmission of the TCP packet.

[0008] As described above, TCP transmission can be implemented on a deterministic network without the need for frequent ACK confirmation messages from the TCP layer to acknowledge received TCP packets. This reduces the impact of frequent ACK confirmation messages on network bandwidth and CPU load, and improves network transmission speed.

[0009] In one possible implementation of the first aspect, it further includes: the data sender sending TCP packets using a fixed TCP sliding window.

[0010] As shown above, there is no network congestion, the TCP sliding window tends to a constant value, and the data sender does not need to frequently wait for ACK messages from the other end to adjust the TCP sliding window in order to improve the data transmission rate.

[0011] In one possible implementation of the first aspect, the data sender further includes determining whether to continue sending TCP packets to be sent based on the TCP receive window width sent by the receiver.

[0012] Therefore, the data sender abandons the TCP receive window probe timer and determines the TCP receive window width based on the window size replied by the other end, in order to determine whether to continue sending the TCP packets to be sent.

[0013] In one possible implementation of the first aspect, it further includes: the initiator of the TCP connection establishment enters the ESTABLISHED state from the SYN_SENT state after receiving the SYN_ACK message; and the responder of the TCP connection establishment enters the ESTABLISHED state from the LISTEN state after sending the SYN_ACK message.

[0014] As described above, establishing a TCP connection on a deterministic network reduces the three-way handshake to a two-way handshake, thereby reducing CPU load, increasing the speed of TCP connection establishment, and enabling timely data transmission.

[0015] In one possible implementation of the first aspect, the method further includes: setting the TCP window switching timer duration to the total TCP end-to-end latency; after the responder of the TCP connection establishment enters the ESTABLISHED state from the LISTEN state, the keep-alive duration of the ESTABLISHED state is the TCP window switching timer duration, and after the initiator of the TCP connection establishment enters the ESTABLISHED state, the keep-alive timer duration is modified to the TCP window switching timer duration * N.

[0016] Therefore, the initial keep-alive timer duration after transitioning from the LISTEN state to the ESTABLISHED state will be configured to the total end-to-end TCP latency in order to maintain the TCP connection.

[0017] In one possible implementation of the first aspect, it further includes: the responder of the TCP connection closure enters the CLOSE_WAIT state from the ESTABLISHED state after receiving the FIN packet, then sends a FIN+ACK message, and then enters the LAST_ACK state; the initiator of the TCP connection closure enters the FIN_WAIT state from the ESTABLISHED state after sending the FIN packet, and enters the TIME_WAIT state after sending an ACK message for the FIN+ACK message to the peer.

[0018] As described above, on deterministic networks, the four-way handshake for closing a TCP connection is changed to a three-way handshake, which reduces CPU load, improves the speed of closing TCP connections, and releases transmission resources in a timely manner.

[0019] In one possible implementation of the first aspect, the method further includes: setting the TCP window switching timer duration to the total TCP end-to-end latency; after the initiator of the TCP connection closure enters the FIN_WAIT state from the ESTABLISHED state, if it does not receive a FIN+ACK message from the peer after twice the TCP window switching timer duration, it retransmits the FIN packet; after receiving the FIN packet, the responder of the TCP connection closure delays by one TCP window switching timer duration before sending the FIN+ACK message, and if it does not receive an ACK message from the peer after twice the TCP window switching timer duration, it retransmits the FIN+ACK message.

[0020] Therefore, the responding party in a TCP connection closure process delays for one TCP window switching timer duration after receiving the FIN packet before sending a FIN+ACK message to ensure that its own TCP packet transmission is complete. If, after sending the FIN+ACK message, the responding party does not receive an ACK message from the other end after twice the TCP window switching timer duration, it resends the FIN+ACK message to improve the reliability of the TCP connection closure.

[0021] Secondly, embodiments of this application provide a TCP transmission implementation apparatus, comprising: a time configuration module, configured to set the TCP window switching timer duration to the total TCP end-to-end delay; a data sending module, configured to allow the data sender to continue sending TCP packets to be sent without waiting for an ACK message from the data receiver after sending a TCP packet; further configured to allow the data sender to send a NACK message requesting retransmission of the TCP packet when it receives a NACK message before the TCP window switching timer expires; and a data receiving module, configured to allow the data receiver to send a NACK message requesting retransmission of the TCP packet when the duration of not receiving the required TCP packet reaches the TCP window switching timer duration.

[0022] As described above, TCP transmission can be implemented on a deterministic network using the aforementioned device, eliminating the need for frequent ACK confirmation messages from the TCP layer to acknowledge received TCP packets. This reduces the impact of frequent ACK confirmation messages on network bandwidth and CPU load, thereby improving network transmission speed.

[0023] In one possible implementation of the second aspect, the data sending module is used by the data sender to send TCP packets with a fixed TCP sliding window.

[0024] As shown above, there is no network congestion, the TCP sliding window tends to a constant value, and the data sender does not need to frequently wait for ACK messages from the other end to adjust the TCP sliding window in order to improve the data transmission rate.

[0025] In one possible implementation of the second aspect, the data sending module is used by the data sender to determine whether to continue sending TCP packets to be sent based on the TCP receive window width sent by the receiver.

[0026] Therefore, the data sender abandons the TCP receive window probe timer and determines the TCP receive window width based on the window size replied by the other end, in order to determine whether to continue sending the TCP packets to be sent.

[0027] One possible implementation of the second aspect further includes: a connection initiation module, used by the initiator of the TCP connection establishment to enter the ESTABLISHED state from the SYN_SENT state after receiving the SYN_ACK message; and a connection response module, used by the responder of the TCP connection establishment to enter the ESTABLISHED state from the LISTEN state after sending the SYN_ACK message.

[0028] As described above, establishing a TCP connection on a deterministic network reduces the three-way handshake to a two-way handshake, thereby reducing CPU load, increasing the speed of TCP connection establishment, and enabling timely data transmission.

[0029] In one possible implementation of the second aspect, a time configuration module is further included, which sets the TCP window switching timer duration to the total TCP end-to-end latency; after the responder of the TCP connection establishment enters the ESTABLISHED state from the LISTEN state, the keep-alive duration of the ESTABLISHED state is the TCP window switching timer duration, and after the initiator of the TCP connection establishment enters the ESTABLISHED state, the keep-alive timer duration is modified to the TCP window switching timer duration * N.

[0030] Therefore, the initial keep-alive timer duration after transitioning from the LISTEN state to the ESTABLISHED state will be configured to the total end-to-end TCP latency in order to maintain the TCP connection.

[0031] One possible implementation of the second aspect further includes: a shutdown response module, for the responder of TCP connection closure to enter the CLOSE_WAIT state from the ESTABLISHED state after receiving the FIN packet, then send a FIN+ACK message, and then enter the LAST_ACK state; and a shutdown initiation module, for the initiator of TCP connection closure to enter the FIN_WAIT state from the ESTABLISHED state after sending the FIN packet, and enter the TIME_WAIT state after sending an ACK message for the FIN+ACK message to the peer.

[0032] As described above, on deterministic networks, the four-way handshake for closing a TCP connection is changed to a three-way handshake, which reduces CPU load, improves the speed of closing TCP connections, and releases transmission resources in a timely manner.

[0033] In one possible implementation of the second aspect, a time configuration module is further included, used to set the TCP window switching timer duration to the total TCP end-to-end latency; the close initiation module is further used to, after the initiator of the TCP connection close enters the FIN_WAIT state from the ESTABLISHED state, repeatedly send FIN packets if no FIN+ACK message is received from the peer after twice the TCP window switching timer duration; the close response module is further used to, after receiving the FIN packet, the responder of the TCP connection close sends a FIN+ACK message after a delay of one TCP window switching timer duration, and repeatedly sends the FIN+ACK message if no ACK message is received from the peer after twice the TCP window switching timer duration.

[0034] Therefore, the responding party in a TCP connection closure process delays for one TCP window switching timer duration after receiving the FIN packet before sending a FIN+ACK message to ensure that its own TCP packet transmission is complete. If, after sending the FIN+ACK message, the responding party does not receive an ACK message from the other end after twice the TCP window switching timer duration, it resends the FIN+ACK message to improve the reliability of the TCP connection closure.

[0035] Thirdly, embodiments of this application provide a computing device, including,

[0036] bus;

[0037] A communication interface, which is connected to the bus;

[0038] At least one processor connected to the bus; and

[0039] At least one memory is connected to the bus and stores program instructions that, when executed by the at least one processor, cause the at least one processor to perform the method described in any embodiment of the first aspect of this application.

[0040] Fourthly, embodiments of this application provide a computer-readable storage medium having program instructions stored thereon, which, when executed by a computer, cause the computer to perform the method described in any embodiment of the first aspect. Attached Figure Description

[0041] Figure 1 This is a flowchart illustrating an embodiment of the TCP transmission method in one of the implementation methods of this application.

[0042] Figure 2 This is a flowchart illustrating the TCP connection establishment method embodiment in one of the TCP transmission implementation methods of this application.

[0043] Figure 3 This is a flowchart illustrating the TCP connection closing method embodiment in one of the TCP transmission implementation methods of this application;

[0044] Figure 4A A schematic diagram of a standard TCP state machine;

[0045] Figure 4B This is a schematic diagram of the TCP state machine for a second embodiment of the TCP transmission implementation method of this application;

[0046] Figure 5 This is a schematic diagram of the TSN network structure in Embodiment 2 of a TCP transmission implementation method of this application;

[0047] Figure 6A This is a schematic diagram of the socket communication process of the server based on TCP communication in Embodiment 2 of the TCP transmission implementation method of this application;

[0048] Figure 6B This is a schematic diagram of the client-side socket communication process based on TCP communication in Embodiment 2 of the TCP transmission implementation method of this application.

[0049] Figure 7A This is a flowchart illustrating the TCP connection establishment method in Embodiment 2 of the TCP transmission implementation method of this application;

[0050] Figure 7B This is a flowchart illustrating the TCP transmission method in Embodiment 2 of the TCP transmission implementation method of this application;

[0051] Figure 7C This is a flowchart illustrating the TCP connection closing method in Embodiment 2 of the TCP transmission implementation method of this application;

[0052] Figure 8A This is a schematic diagram of the TCP transmission device structure in one embodiment of the TCP transmission implementation device of this application;

[0053] Figure 8B This is a schematic diagram of the TCP connection establishment device structure in one embodiment of the TCP transmission implementation device of this application;

[0054] Figure 8C This is a schematic diagram of the TCP connection closing device structure in one embodiment of the TCP transmission implementation apparatus of this application;

[0055] Figure 9 This is a schematic diagram of the structure of an embodiment of a TCP transmission implementation device according to this application;

[0056] Figure 10 This is a schematic diagram of the computing device of this application. Detailed Implementation

[0057] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0058] In the following description, the terms “first, second, third, etc.” or module A, module B, module C, etc. are used not only to distinguish similar objects or different embodiments, but also do not represent a specific ordering of objects. It is understood that a specific order or sequence may be interchanged where permitted so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0059] In the following description, the labels of the steps, such as S110, S120, etc., do not necessarily mean that the steps will be executed in this way. The order of the steps can be interchanged or executed simultaneously if permitted.

[0060] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0061] This application provides a method, apparatus, computing device, and storage medium for implementing TCP transmission. The method includes: setting the TCP window switching timer duration to the total TCP end-to-end delay; after sending a TCP packet, the data sender continues to send TCP packets without waiting for an ACK message from the data receiver; if the data receiver fails to receive the required TCP packet for more than the TCP window switching timer duration, it sends a NACK message to request retransmission of the TCP packet; if the data sender receives the NACK message before the TCP window switching timer expires, it sends the NACK message requesting retransmission of the TCP packet. This application also correspondingly provides a TCP transmission apparatus, a TCP connection establishment apparatus, a TCP connection closure apparatus, a computing device, and a storage medium.

[0062] The TCP transmission implementation solution of this application achieves lightweight TCP transmission on deterministic networks, eliminating the need for frequent ACK confirmation messages from the TCP layer to acknowledge received TCP packets. This reduces the impact of frequent ACK confirmation messages on network bandwidth, lowers CPU load, and improves network transmission rate.

[0063] The embodiments of this application are described below with reference to the accompanying drawings. The embodiments of this application are implemented on a deterministic network. The deterministic network achieves end-to-end determinism based on deterministic communication, deterministic scheduling, and deterministic computation. According to this principle, the end-to-end delays of all tasks and service flows in the distributed nodes are globally orchestrated, and finally a time scheduling table is generated. The scheduling, computation, and communication are then performed uniformly based on the TSN network time.

[0064] First, combine Figures 1 to 3This application introduces an implementation method for TCP transmission, specifically Example 1.

[0065] One embodiment of a TCP transmission implementation method includes: an embodiment of a TCP transmission method, an embodiment of a TCP connection establishment method, and an embodiment of a TCP connection closure method.

[0066] Figure 1 The flowchart of an embodiment of a TCP transmission method is shown, including steps S110 to S140.

[0067] S110: Set the TCP window switching timer duration to the total TCP end-to-end latency.

[0068] The total TCP end-to-end latency includes the server's task computation and transmission time, the time spent forwarding through the switch, and the client's task computation and transmission time. This switch is a deterministic network switch, implementing deterministic forwarding.

[0069] The TSN switch performs deterministic forwarding based on the real-time requirements of the packets. For example, the switch is a TSN switch, and the server node, switch and client all support the TSN QBV, QBU and CB protocols.

[0070] S120: After sending a TCP packet, the data sender does not need to wait for the data receiver to acknowledge the sent TCP packet with an ACK message, and can continue to send the TCP packets to be sent.

[0071] In this configuration, after sending a TCP packet, the data sender continues to send TCP packets through the switch as long as there are pending TCP packets in the buffer. Because the switch implements deterministic forwarding, the data sender does not need to frequently wait for ACK messages from the peer, thus improving the data transmission rate.

[0072] In some embodiments, the data sender sends TCP packets with a fixed TCP sliding window. Because the switch implements deterministic forwarding, there is no network congestion, and the TCP sliding window tends to a fixed value K, which is less than the product of the switch's transmission bandwidth and the allocated time slot. Therefore, the data sender does not need to frequently wait for ACK messages from the other end to adjust the TCP sliding window, thereby improving the data transmission rate.

[0073] In some embodiments, because the switch implements deterministic forwarding and there is no network congestion, the data sender abandons the TCP receive window probe timer and determines the TCP receive window width based on the window value size replied by the other end to determine whether to continue sending the TCP packets to be sent. If the window value replied by the other end is greater than 0, data continues to be sent; if the window value replied by the other end is equal to 0, data transmission stops.

[0074] S130: When the time elapsed since the data receiver has not received the required TCP packet reaches the TCP window switching timer duration, it sends a NACK message to request the retransmission of the TCP packet.

[0075] Because the switch implements deterministic forwarding, there is no network congestion, eliminating the need for delayed ACK timers and frequent ACK acknowledgments of received TCP packets. When the data receiver needs to receive a TCP packet, it starts a TCP window switching timer. Generally, after the data receiver receives a TCP packet, the corresponding TCP window switching timer stops counting, determines the next TCP packet to be received based on the TCP packet's sequence number, and starts a corresponding TCP window switching timer to wait for the next TCP packet. If the TCP window switching timer expires and the TCP packet has not been received, a NACK message is sent to request a retransmission of the TCP packet.

[0076] In some embodiments, the time for the data receiver to wait for the TCP packet to be received is less than the duration of the TCP window switching timer, so as to send a NACK message earlier to request the retransmission of the TCP packet to be received.

[0077] S140: When the data sender receives a NACK message before the TCP window switching timer expires, it sends a NACK message to request a retransmission of the TCP packet.

[0078] Because the switch implements deterministic forwarding, there is no network congestion. For any sent TCP packet, if the sender does not receive the corresponding NACK message before the TCP window switching timer expires, it assumes that all previous TCP packets have been correctly received. If the sender receives the corresponding NACK message before the TCP window switching timer expires, it means that the peer has not received the TCP packet, and the sender retransmits the TCP packet so that the peer can receive it.

[0079] In summary, this embodiment of a TCP transmission method achieves lightweight TCP transmission on a deterministic network, eliminating the need for frequent ACK confirmation messages from the TCP layer to acknowledge received TCP packets. This reduces the impact of frequent ACK confirmation messages on network bandwidth, lowers CPU load, and improves network transmission speed.

[0080] The following is combined Figure 2 This application introduces an embodiment of a TCP connection establishment method.

[0081] An embodiment of a TCP connection establishment method establishes a lightweight TCP connection on a deterministic network. It can be based on an embodiment of a TCP transmission method or on the TCP transmission method in the TCP specification.

[0082] Figure 2 The flowchart of an embodiment of a TCP connection establishment method is shown, including steps S210 to S220.

[0083] S210: After receiving the SYN_ACK message, the initiator of the TCP connection establishment enters the ESTABLISHED state from the SYN_SENT state.

[0084] In particular, establishing a TCP connection on a deterministic network is faster because the switches in a deterministic network implement deterministic forwarding, the network is congestion-free, and the initiator of the TCP connection establishment does not need to send an ACK message for the SYN_ACK message.

[0085] S220: After sending a SYN_ACK message, the responder of the TCP connection establishment transitions from the LISTEN state to the ESTABLISHED state.

[0086] In deterministic networks, establishing a TCP connection is possible because the switches implement deterministic forwarding, resulting in no network congestion. The initiator of the TCP connection does not enter the SYN_RCVD state and does not wait for an ACK message from the peer in response to the SYN_ACK message. Instead, the SYN_RCVD state is removed from the TCP finite state machine.

[0087] In some embodiments, the TCP window switching timer duration is set to the total TCP end-to-end latency. After the responder of the TCP connection enters the ESTABLISHED state from the LISTEN state, the keep-alive timer duration of the ESTABLISHED state is the TCP window switching timer duration to maintain the TCP connection. When the keep-alive timer expires, the ESTABLISHED state is transitioned to the CLOSED state. After both the server and client enter the ESTABLISHED state, the keep-alive timer duration is modified to the TCP window switching timer duration * N, and <= 120s.

[0088] In summary, one embodiment of the TCP connection establishment method establishes a lightweight TCP connection on a deterministic network, reducing the three-way handshake of TCP connection establishment to a two-way handshake, thereby reducing CPU load, improving the TCP connection establishment speed, and enabling timely data transmission.

[0089] The following is combined Figure 3 This application introduces an embodiment of a TCP connection closing method.

[0090] An embodiment of a TCP connection closure method closes a lightweight TCP connection on a deterministic network. It can be based on an embodiment of a TCP transmission method and / or an embodiment of a TCP connection establishment method, or it can be based on the TCP transmission method and / or TCP connection establishment method in the TCP specification.

[0091] Figure 3 The flowchart of an embodiment of a TCP connection closing method is shown, including steps S310 to S330.

[0092] S310: The party that initiates the TCP connection closure sends a FIN packet, transitioning from the ESTABLISHED state to the FIN_WAIT state.

[0093] Sending a FIN packet is an active way to close a TCP connection.

[0094] S320: The party responding to the TCP connection closure transitions from the ESTABLISHED state to the CLOSE_WAIT state after receiving the FIN packet, then sends a FIN+ACK message, and finally enters the LAST_ACK state.

[0095] Specifically, the FIN_WAIT_1, FIN_WAIT_2, and CLOSING states are merged into a single CLOSE_WAIT state to reduce TCP connection closure time. Furthermore, the ACK message for the local FIN packet and the FIN packet from the initiator closing the TCP connection is sent simultaneously in a single packet, further reducing closure time.

[0096] S330: The party that initiates the TCP connection closure sends an ACK message after receiving the FIN+ACK message from the other end and enters the TIME_WAIT state.

[0097] In some embodiments, the TCP window switching timer duration is set to the total TCP end-to-end latency; after the initiator of TCP connection closure enters the FIN_WAIT state from the ESTABLISHED state, if it does not receive the FIN+ACK message from the other end after twice the TCP window switching timer duration, it repeatedly sends FIN packets to improve the reliability of TCP closure.

[0098] In some embodiments, the responder of a closed TCP connection delays for one TCP window switching timer duration after receiving a FIN packet before sending a FIN+ACK message to ensure that its own TCP packet transmission is complete.

[0099] In some embodiments, if the responding party that closes the TCP connection sends a FIN+ACK message and does not receive an ACK message from the other end after twice the TCP window switching timer duration, it may repeatedly send the FIN+ACK message to improve the reliability of TCP closure.

[0100] In some embodiments, the initiator of closing the TCP connection waits in the TIMED_WAIT state for three times the duration of a TCP window switching timer before actively closing the connection to avoid losing the ACK message that it sends to acknowledge the received FIN+ACK message.

[0101] In summary, one embodiment of a TCP connection closing method closes lightweight TCP connections on a deterministic network, reducing the four-way handshake to a three-way handshake, thereby reducing CPU load, improving the speed of TCP connection closing, and releasing transmission resources in a timely manner.

[0102] The following is combined Figures 4A to 7C This document introduces a second example of a TCP transmission implementation method.

[0103] Embodiment 2 of a TCP transmission implementation method is a more detailed implementation of Embodiment 1 of a TCP transmission implementation method, and has all its advantages.

[0104] In a second embodiment of a TCP transmission implementation method, the number of states in the TCP finite state machine is reduced from 11 to 8. The SYN_RCVD state is removed to improve the TCP connection establishment speed. The FIN_WAIT_1 state, FIN_WAIT_2 state, and CLOSING state are merged into the CLOSE_WAIT state to reduce the TCP connection closing time.

[0105] Figure 4A The standard TCP state machine is shown, which includes 11 states: CLOSED, LISTEN, SYN_SENT, SYN_RCVD, ESTABLISHED, FIN_WAIT_1, FIN_WAIT_2, CLOSING, CLOSE_WAIT, and LAST_ACK.

[0106] Figure 4BThis paper presents a TCP state machine according to Embodiment 2 of a TCP transmission implementation method, which includes nine states: CLOSED, LISTEN, SYN_SENT, ESTABLISHED, FIN_WAIT, CLOSE_WAIT, and LAST_ACK. The SYN_RCVD state is removed during the TCP connection establishment phase to improve the TCP connection establishment speed; during the TCP connection closing phase, the FIN_WAIT_1, FIN_WAIT_2, and CLOSING states are merged into the CLOSE_WAIT state to reduce the TCP connection closing time.

[0107] Figure 5 The diagram illustrates the structure of a TSN network in Embodiment 2 of a TCP transmission implementation method. It includes two TSN nodes and two TSN switches, with one TSN node acting as a client and the other as a server. The diagram exemplifies two TSN nodes and two TSN switches; however, in actual scenarios, the number of TSN nodes and switches will vary depending on requirements.

[0108] Each TSN switch supports the TSN's QBV, QBU, and gPTP protocols, and each TSN node supports the TSN's QBV, QBU, gPTP, and CB protocols, enabling end-to-end deterministic transmission in the TSN network. The TSN network includes a TSN network configurator (not shown in the diagram) used to configure each TSN node and each TSN switch.

[0109] The TSN network configurator is used to build an end-to-end deterministic platform for the global TSN network, and it performs the following functions:

[0110] (1) Generate the time schedule table for the TSN network.

[0111] (2) Enable the gPTP, Qbv and Qbu functions of the TSN switch.

[0112] (3) Enable gPTP, Qbv, Qbu and CB functions of TSN nodes

[0113] Server-side implementation Figure 6A The TCP-based socket communication process of this embodiment is shown, including steps S4110 to S4150.

[0114] S4110: Create a socket based on TCP communication.

[0115] For example, it is created using the following function: server_fd = socket(AF_INET, SOCK_STREAM, 0), where server_fd is the descriptor of the server's TCP-based socket.

[0116] S4120: Binds the created socket to a fixed port on the server.

[0117] For example, binding is performed using the following function: bind(server_fd, (struct sockaddr *)&address,sizeof(address)), where address is the port corresponding to the socket on the server.

[0118] After binding, the TCP state machine corresponding to the socket is in the CLOSED state.

[0119] S4130: Sets the timer length for the socket.

[0120] For example, the timer duration mentioned in the state machine can be set via the socketopt interface; if the general option is not available, a custom extension can be used.

[0121] The total TCP end-to-end latency is denoted as TimeL, which includes the server's task computation and transmission time, the forwarding time through switches, and the client's task computation and transmission time, and must not be less than the sum of these three. The timers set include:

[0122] (1) Set the TCP window switching timer to TimeL;

[0123] (2) Set the initial keep-alive timer for the ESTABLISHED state to TimeL;

[0124] (3) Set the final keep-alive timer for the ESTABLISHED state (used for keep-alive when both the server and the client enter the ESTABLISHED state) to TimeL * N, and <= 120s, where N is set so that the value of the final keep-alive timer can get as close to 120s as possible.

[0125] (4) Set the FIN+ACK message waiting timer in the FIN_WAIT state to 2*TimeL;

[0126] (5) Set the retransmission timer for FIN+ACK messages in the CLOSE_WAIT state to 2*TimeL;

[0127] (6) Set the timer for sending FIN+ACK messages in the CLOSE_WAIT state to TimeL;

[0128] (7) Set the shutdown wait timer for the TIME_WAIT state to 3*TimeL.

[0129] S4140: Starts the socket and listens for socket connections.

[0130] In this embodiment, the socket is started to establish a TCP connection according to the TCP establishment method. After successful startup, the TCP state machine enters the LISTEN state. For example, the socket is started and listens for socket connections using the following function: listen(server_fd, 3).

[0131] S4150: Call the custom extended TSN interface to send a TSN stream.

[0132] In this embodiment, the TSN stream is implemented at the TCP transmission layer using the TCP transmission implementation method.

[0133] For example, a custom extended TSN interface tsn_send sends "Hello", tsn_send(new_socket, "hello", strlen("Hello"), 3, 100), where 3 and 100 represent the priority and VLAN ID, respectively.

[0134] Client-side implementation Figure 6B The TCP-based socket communication process of this embodiment is shown, including steps S4210 to S4240.

[0135] S4210: Create a socket based on TCP communication.

[0136] For example, it can be created using the following function: client_fd = socket(AF_INET, SOCK_STREAM, 0). At this point, the TCP state machine corresponding to the socket of client_fd is in the CLOSED state.

[0137] S4220: Sets the timer length for the socket.

[0138] The client sets the timer length for the socket to be the same as the server set the timer length for the socket; this will not be elaborated further here.

[0139] S4230: Connect to the server via a socket.

[0140] For example, connect to the server using the following function: connect(client_fd, (struct sockaddr *)&serv_addr, sizeof(serv_addr).

[0141] In this step, a TCP connection is established with the server according to the TCP establishment method of this embodiment.

[0142] S4240: Call the custom extended TSN interface tsn_send to send a TSN stream.

[0143] In this embodiment, the TSN stream is implemented at the TCP transmission layer using the TCP transmission implementation method.

[0144] For example, a custom extended TSN interface tsn_send sends "Hello", tsn_send(new_socket, "hello", strlen("Hello"), 3, 100), where 3 and 100 represent the priority and VLAN ID, respectively.

[0145] The following is combined Figure 7A The following describes the process of establishing a TCP connection according to Embodiment 2 of a TCP transmission implementation method, including steps S5110 to S5130.

[0146] S5110: The TCP connection initiator sends a SYN message and enters the SYN_SENT state.

[0147] In this embodiment, the TCP connection is initiated by the client and responded by the server.

[0148] The SYN message can also include the local receive window value.

[0149] S5120: The responder of the TCP connection sends a SYN_ACK message and transitions from the LISTEN state to the ESTABLISHED state.

[0150] In addition, an initial keep-alive timer for the ESTABLISHED state is started. From its start until its timeout, if no message is received from the initiator of the TCP connection, the responder of the TCP connection returns to the CLOSED state.

[0151] The SYN_ACK message can also include the local receive window value.

[0152] S5130: After receiving the SYN_ACK message, the initiator of the TCP connection transitions from the SYN_SENT state to the ESTABLISHED state.

[0153] In addition, an initial keep-alive timer for the ESTABLISHED state is started. If no message is received from the initiator of the TCP connection from the timer starts until it times out, the initiator of the TCP connection returns to the CLOSED state.

[0154] At this point, the TCP connection has been established and the TCP transmission process can begin.

[0155] The following is combined Figure 7B The following describes the TCP transmission method implementation method in Embodiment 2, including steps S5210 to S5230.

[0156] S5210: The TCP data sender continuously sends TCP packets to be sent to the TCP data receiver using a fixed sliding window.

[0157] In this context, the TCP data sender can be either a client or a server.

[0158] Specifically, TCP packets are continuously sent to the TCP receiver only if the window value of the TCP data receiver is known to be non-zero. If the TCP sender also starts a final keep-alive timer for the ESTABLISHED state when sending TCP packets for the first time, and no message is received from the TCP receiver from the start of the timer until its timeout, the TCP sender returns to the CLOSED state.

[0159] S5220: The TCP data receiver receives TCP packets.

[0160] Specifically, if the TCP data receiver starts a final keep-alive timer for the ESTABLISHED state when it receives a TCP packet for the first time, and if it does not receive any message from the TCP data sender from the start time until the timer expires, the TCP data sender returns to the CLOSED state.

[0161] When the TCP data receiver receives the TCP packet to be received according to the sequence number of the TCP packet, it restarts the TCP window switching timer and determines the next TCP packet to be received based on all the TCP packets currently received.

[0162] S5230: If the TCP data receiver determines that a TCP packet to be received has not been received, it sends a NACK message.

[0163] If the TCP data receiver does not receive the TCP packet to be received when the TCP window switching timer for receiving the TCP packet expires, it sends a NACK message, which instructs the TCP data receiver to retransmit the TCP packet to be received.

[0164] Specifically, if the TCP data receiver receives a TCP packet to be received before the TCP window switching timer expires, it restarts the TCP window switching timer and determines the next TCP packet to be received based on all the TCP packets currently received.

[0165] S5240: When the TCP data sender receives a NACK message, it retransmits the TCP packet corresponding to that NACK message.

[0166] The following is combined Figure 7C The following describes the process of TCP connection closing method in Embodiment 2 of a TCP transmission implementation method, including steps S5310 to S5330.

[0167] S5310: The initiator of the TCP connection closure sends a FIN packet, transitioning from the ESTABLISHED state to the FIN_WAIT state.

[0168] The TCP connection can be closed by either the client or the server.

[0169] In this process, the FIN packet sent by the initiator of TCP connection closure is a TCP packet including a FIN indicator, indicating that it is the last TCP packet and requesting the closure of the TCP connection. The initiator of TCP connection closure also starts a FIN+ACK message wait timer. From the start of the timer until the timeout, if no FIN+ACK message is received from the other end, the FIN packet is resent.

[0170] S5320: After receiving the FIN packet, the responder of the TCP connection closure transitions from the ESTABLISHED state to the CLOSE_WAIT state, waits for the duration of the FIN+ACK message sending timer, sends the FIN+ACK message, and then enters the LAST_ACK state.

[0171] In this process, after sending a FIN+ACK message, the responding party in a TCP connection closure operation also starts a FIN+ACK message retransmission timer. If no ACK message is received from the other end when the FIN+ACK message retransmission timer expires, the FIN+ACK message is retransmitted.

[0172] S5330: After receiving the FIN+ACK message, the initiator of the TCP connection closure sends an ACK message and enters the TIME_WAIT state.

[0173] In this process, the party that initiates the TCP connection closure also starts a closure wait timer. When the closure wait timer expires, it transitions from the TIME_WAIT state to the CLOSED state.

[0174] In summary, Embodiment 2 of a TCP transmission implementation method globally orchestrates all tasks in distributed nodes in a deterministic network. It leverages the end-to-end high reliability, low latency, and low jitter characteristics of the service flow to optimize the TCP protocol state machine, simplify the flow control process, and disable the congestion control function module, thereby reducing CPU load and improving bandwidth utilization.

[0175] The following is combined Figures 8A to 9 This document describes an embodiment of a TCP transmission implementation apparatus. The embodiment includes an embodiment of a TCP transmission device, an embodiment of a TCP connection establishment device, and an embodiment of a TCP connection closure device.

[0176] An embodiment of a TCP transmission apparatus performs the method described in an embodiment of a TCP transmission method, and has all its advantages.

[0177] Figure 8A The structure of an embodiment of a TCP transmission device is shown. The TCP transmission device 810 includes: a time configuration module 8110, a data sending module 8120, and a data receiving module 8130.

[0178] The time configuration module 8110 is used to set the TCP window switching timer duration to the total TCP end-to-end latency. For its working principle and advantages, please refer to step S110 of an embodiment of a TCP transmission method.

[0179] The data sending module 8120 is used so that after sending a TCP packet, the data sender can continue sending TCP packets without waiting for an ACK message from the data receiver; it is also used so that when the data sender receives a NACK message before the TCP window switching timer expires, it can send a TCP packet requesting retransmission via the NACK message. For its working principle and advantages, please refer to steps S120 and S140 of an embodiment of a TCP transmission method.

[0180] The data receiving module 8130 is used to send a NACK message to request retransmission of the TCP packet when the time elapsed since the data receiver has not received the required TCP packet reaches the TCP window switching timer duration. For its working principle and advantages, please refer to step S130 of an embodiment of a TCP transmission method.

[0181] The following is combined Figure 8B An embodiment of a TCP connection establishment device is introduced.

[0182] An embodiment of a TCP connection establishment apparatus performs the method described in an embodiment of a TCP connection establishment method, and has all its advantages.

[0183] An embodiment of a TCP connection establishment apparatus establishes a TCP connection on a deterministic network. It can operate based on an embodiment of a TCP transmission apparatus or on a TCP transmission apparatus as defined in the TCP specification.

[0184] Figure 8B The structure of an embodiment of a TCP connection establishment device 820 is shown. The TCP connection establishment device 820 includes: a connection initiation module 8210 and a connection response module 8220.

[0185] The connection initiation module 8210 is used by the initiator of a TCP connection establishment to enter the ESTABLISHED state from the SYN_SENT state after receiving a SYN_ACK message. For its working principle and advantages, please refer to step S210 of an embodiment of a TCP connection establishment method.

[0186] The connection response module 8220 is used by the responder in a TCP connection establishment process to transition from the LISTEN state to the ESTABLISHED state after sending a SYN_ACK message. For its working principle and advantages, please refer to step S220 of an embodiment of a TCP connection establishment method.

[0187] The following is combined Figure 8C An embodiment of a TCP connection closing device is introduced.

[0188] An embodiment of a TCP connection closing device performs the method described in an embodiment of a TCP connection closing method, and has all its advantages.

[0189] An embodiment of a TCP connection closing device establishes a TCP connection on a deterministic network. It can operate based on an embodiment of a TCP transmission device and / or an embodiment of a TCP connection establishing device, or it can operate based on the TCP transmission device and / or TCP connection establishing device in the TCP specification.

[0190] Figure 8C The structure of an embodiment of a TCP connection closing device is shown. The TCP connection closing device 830 includes a closing initiation module 8310 and a closing response module 8320.

[0191] The closing initiation module 8310 is used to send a FIN packet, transitioning from the ESTABLISHED state to the FIN_WAIT state; it is also used to send an ACK message after receiving a FIN+ACK message packet from the peer, and then enter the TIME_WAIT state. For its working principle and advantages, please refer to steps S310 and S330 of an embodiment of a TCP connection closing method.

[0192] The close response module 8320 is used by the responder in a TCP connection closure process. After receiving a FIN packet, the responder transitions from the ESTABLISHED state to the CLOSE_WAIT state, waits for a set time, sends a FIN+ACK message, and then enters the LAST_ACK state. For its working principle and advantages, please refer to step S320 of an embodiment of a TCP connection closure method.

[0193] The following is combined Figure 9 An embodiment of a TCP transmission implementation device is introduced.

[0194] Figure 9 The structure of a line-of-sight device embodiment for TCP transmission is shown, including a TCP transmission device 810, a TCP connection establishment device 820, and a TCP connection closure device 830.

[0195] For the working principle and advantages of TCP transmission device 81, please refer to an embodiment of TCP transmission device; for the working principle and advantages of TCP connection establishment device 820, please refer to an embodiment of TCP connection establishment device; for the working principle and advantages of TCP connection closure device 830, please refer to an embodiment of TCP connection closure device.

[0196] This application also provides a computing device, which will be described below in conjunction with... Figure 10 Detailed introduction.

[0197] The computing device 1000 includes a processor 1010, a memory 1020, a communication interface 1030, and a bus 1040.

[0198] It should be understood that the communication interface 1030 in the computing device 1000 shown in the figure can be used to communicate with other devices.

[0199] The processor 1010 can be connected to the memory 1020. The memory 1020 can be used to store the program code and data. Therefore, the memory 1020 can be a storage unit inside the processor 1010, an external storage unit independent of the processor 1010, or a component that includes both the storage unit inside the processor 1010 and the external storage unit independent of the processor 1010.

[0200] Optionally, the computing device 1000 may also include a bus 1040. The memory 1020 and communication interface 1030 can be connected to the processor 1010 via the bus 1040. The bus 1040 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus 1040 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one line is used in this figure, but this does not mean that there is only one bus or one type of bus.

[0201] It should be understood that in the embodiments of this application, the processor 1010 may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor. Alternatively, the processor 1010 may employ one or more integrated circuits to execute relevant programs to implement the technical solutions provided in the embodiments of this application.

[0202] The memory 1020 may include read-only memory and random access memory, and provides instructions and data to the processor 1010. A portion of the processor 1010 may also include non-volatile random access memory. For example, the processor 1010 may also store device type information.

[0203] When the computing device 1000 is running, the processor 1010 executes the computer execution instructions in the memory 1020 to perform the operation steps of each method embodiment.

[0204] It should be understood that the computing device 1000 according to the embodiments of this application can correspond to the corresponding subject in executing the methods according to the various embodiments of this application, and the above and other operations and / or functions of each module in the computing device 1000 are respectively for implementing the corresponding processes of the methods of this embodiment. For the sake of brevity, they will not be described in detail here.

[0205] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0206] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0207] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0208] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0209] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0210] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0211] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, is used to perform the operation steps of the various method embodiments.

[0212] The computer storage medium in this application embodiment can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. For example, a computer-readable storage medium can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0213] Computer-readable signal media may include data signals transmitted in baseband or as part of a carrier wave, carrying computer-readable program code. Such transmitted data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which can send, transmit, or transmit programs for use by or in connection with an instruction execution system, apparatus, or device.

[0214] The program code contained on a computer-readable medium may be transmitted using any suitable medium, including, but not limited to, wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0215] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0216] Note that the above are merely preferred embodiments and the technical principles employed in this application. Those skilled in the art will understand that this application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of this application, all of which fall within the scope of protection of this application.

Claims

1. A method for implementing TCP transmission, characterized in that, include: Set the TCP window switching timer duration to the total TCP end-to-end latency; After sending a TCP packet, the data sender does not need to wait for the data receiver to acknowledge the sent TCP packet with an ACK message, and can continue to send TCP packets to be sent. When the timeout period for not receiving the required TCP packet reaches the TCP window switching timer duration, the data receiver sends a NACK message to request the retransmission of the TCP packet. When the data sender receives a NACK message before the TCP window switching timer expires, it sends the NACK message to request a retransmission of the TCP packet.

2. The method according to claim 1, characterized in that, Also includes: The data sender sends TCP packets using a fixed TCP sliding window.

3. The method according to claim 1, characterized in that, Also includes: The data sender determines whether to continue sending TCP packets based on the TCP receive window width sent by the receiver.

4. The method according to claim 1, characterized in that, Also includes: After receiving the SYN_ACK message, the initiator of the TCP connection establishment changes from the SYN_SENT state to the ESTABLISHED state. After sending a SYN_ACK message, the responding party in a TCP connection establishment process transitions from the LISTEN state to the ESTABLISHED state.

5. The method according to claim 4, characterized in that, Also includes: After the responder of a TCP connection establishment enters the ESTABLISHED state from the LISTEN state, the keep-alive duration of the ESTABLISHED state is equal to the duration of the TCP window switching timer. After the initiator of the TCP connection establishment enters the ESTABLISHED state, the keep-alive timer duration is modified to a multiple of the TCP window switching timer duration.

6. The method according to claim 1, characterized in that, Also includes: The party responding to the TCP connection closure transitions from the ESTABLISHED state to the CLOSE_WAIT state after receiving the FIN packet, then sends a FIN+ACK message, and finally enters the LAST_ACK state. The party that initiates the closure of a TCP connection enters the FIN_WAIT state from the ESTABLISHED state after sending the FIN packet, and enters the TIME_WAIT state after sending an ACK message for the FIN+ACK message to the other end.

7. The method according to claim 6, characterized in that, Also includes: After the initiator of the TCP connection closure enters the FIN_WAIT state from the ESTABLISHED state, if it does not receive the FIN+ACK message from the other end after twice the TCP window switching timer duration, it will repeatedly send FIN packets. When a TCP connection is closed, the responding party sends a FIN+ACK message after receiving a FIN packet, delaying for one TCP window switching timer duration. If no ACK message is received from the other end after twice the TCP window switching timer duration, the FIN+ACK message is sent repeatedly.

8. An apparatus for implementing TCP transmission, characterized in that, include: The time configuration module is used to set the TCP window switching timer duration to the total TCP end-to-end latency; The data sending module is used so that after sending a TCP packet, the data sender can continue to send the TCP packet to be sent without waiting for the data receiver to acknowledge the sent TCP packet with an ACK message; it is also used so that when the data sender receives a NACK message before the TCP window switching timer expires, it can send the TCP packet requested to be retransmitted by the NACK message. The data receiving module is used to send a NACK message to request the retransmission of the TCP packet when the timeout period for not receiving the required TCP packet reaches the TCP window switching timer duration.

9. A computing device, characterized in that, include, bus; A communication interface, which is connected to the bus; At least one processor is connected to the bus; as well as At least one memory connected to the bus and storing program instructions that, when executed by the at least one processor, cause the at least one processor to perform the method of any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, It stores program instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 7.