Communication method and related apparatus and system
By marking IP packets of different QoS priority tags in the communication device and selecting low-latency transmission channels, network jitter and performance degradation caused by packet loss in session connections are solved, and lower retransmission delay and higher network performance are achieved.
Patent Information
- Application Number
- PCT/CN2025/070065
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-01-31
- Filing Date
- 2025-01-02
- Publication Date
- 2025-08-07
AI Technical Summary
In the session connection between communication devices, packet loss leads to network jitter and network performance degradation, and the prior art cannot effectively reduce the blocking waiting time and delay of retransmitted packets in the queue.
By tagging IP packets with different quality of service (QoS) priority tags, the differentiated service mechanism of the forwarding device is used to avoid retransmission packets entering the congestion queue, select low-latency transmission channels for transmission, and optimize the transmission path by measuring round trip delay.
Reduces the blocking waiting time of retransmission packets in the queue, reduces the jitter and delay of session connections, and improves network performance.
Smart Images

Figure CN2025070065_07082025_PF_FP_ABST
Abstract
Description
Communication method and related device and system
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on January 31, 2024, with application number CN202410150717.8 and invention name “Communication Method and Related Devices and Systems”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of communication technology, and in particular to a communication method and related devices and systems. Background Art
[0003] Different communication devices can establish a session connection based on a reliable transport protocol, such as the Transmission Control Protocol (TCP). Data segments and acknowledgement (ACK) messages over this session connection are then sent via Internet Protocol (IP) messages. Reliable transport protocols typically include a retransmission mechanism. For example, when a TCP data segment sent by the sender is lost, the receiver receives out-of-order TCP data segments and sends a duplicate ACK to the sender, instructing it to resend the lost TCP data segment.
[0004] Reliable transport protocols can ensure reliable data transmission over session connections by confirming and retransmitting data. However, if a data segment sent by the sender is lost, the session connection will experience significant network jitter, significantly degrading network performance. Summary of the Invention
[0005] The present application provides a communication method and related devices and systems for reducing network jitter of a session connection and improving network performance after packet loss occurs in the session connection.
[0006] In the first aspect, the present application provides a communication method, which is applied to a communication system, wherein the communication system includes a first communication device, one or more forwarding devices, and a second communication device, wherein the one or more forwarding devices are used to forward data between the first communication device and the second communication device, and the method includes: the first communication device can establish a session connection with the second communication device, and then the first communication device can send one or more data segments on the session connection through one or more IP packets marked with a quality of service QoS priority tag with a first value, and based on the loss of a first data segment among the one or more data segments, send the first data segment through an IP packet marked with a QoS priority tag with a second value.
[0007] The forwarding device generally supports providing differentiated services for IP packets marked with QoS priority tags of different values. For example, each output port of the forwarding device is generally provided with multiple queues, and different queues correspond to QoS priority tags of different values. The forwarding device usually sends the IP packet to the corresponding queue according to the value of the priority tag. When the IP packet sent by the first communication device and marked with a QoS priority tag of the first value is lost, it indicates that the queue corresponding to the QoS priority tag of the first value in the forwarding device is congested. The first communication device marks the QoS priority tag of the second value in the retransmission message carrying the lost first data segment, which helps to avoid the forwarding device from continuing to put the retransmission message into the congested queue, thereby helping to reduce the blocking waiting time of the retransmission message in the queue, reduce the delay of the second communication device receiving the retransmission message, reduce the jitter on the session connection, and improve the network performance of the session connection.
[0008] Optionally, based on the packet loss of the first data segment among the one or more data segments, the first communication device can not only send the first data segment through an IP packet marked with a QoS priority tag with a second value, but also send other data segments on the session connection through an IP packet marked with a QoS priority tag with a second value. The other data segments can be a preset number of data segments after the first data segment. This is not only conducive to compensating for the bandwidth reduction caused by the retransmission, thereby reducing jitter, but also, by limiting the number of data segments sent at an accelerated rate, it is conducive to avoiding each session connection from competing for transmission resources.
[0009] This application does not limit the type of QoS priority label marked by the IP message. For example, the QoS priority label is the service type TOS field in the IP message header, or the differentiated services code point DSCP field, or the differentiated services DS field, etc.
[0010] Based on the above analysis, the forwarding device can be used to provide differentiated forwarding services for IP packets marked with QoS priority tags with different values, for example, placing IP packets with QoS priority tags with different values into different queues of the output port. Accordingly, it can be considered that the first communication device and the second communication device use different transmission channels to transmit IP packets with QoS priority tags with different values. For example, for n values of the QoS priority tag, there are n transmission channels between the first communication device and the second communication device, and the n transmission channels are used to transmit IP packets with n different values of the QoS priority tags. n is a positive integer greater than 1, and for any positive integer i less than or equal to n, it can be considered that the i-th transmission channel among the n transmission channels is used to transmit the i-th value among the n values.
[0011] Because the states of the queues used by forwarding devices in different transmission channels generally vary, transmission delays across different transmission channels generally differ. For example, for two QoS priority labels with different values, if the queue corresponding to a certain QoS priority label is more congested, the corresponding transmission channel's delay will generally be greater. Conversely, if the queue corresponding to a certain QoS priority label is less congested, the corresponding transmission channel's delay will generally be less.
[0012] For ease of description, this application refers to the transmission channel corresponding to the QoS priority label of the first value as the first transmission channel. Optionally, the first communication device can also measure the round-trip delay RTT of the n transmission channels respectively. Since the transition of the queue state in the forwarding device usually takes a certain period of time, the first communication device can predict a transmission channel with a smaller RTT than the RTT of the first transmission channel based on the measurement results. Afterwards, the first communication device determines the second value from the n different values based on the measurement results of the RTT of the n transmission channels, which is conducive to using the value of the QoS priority label corresponding to the transmission channel with a smaller RTT as the second value, and is conducive to using the transmission channel with a smaller RTT to send retransmission messages, thereby helping to reduce the delay of the second communication device in receiving the retransmission message, reduce the jitter on the session connection, and improve the network performance of the session connection.
[0013] In this application, the transmission channel corresponding to the QoS priority tag with the second value is referred to as the second transmission channel. Optionally, among the RTT values of the n transmission channels, the RTT value of the second transmission channel is the smallest. This facilitates the transmission of retransmitted messages on the transmission channel with the smallest RTT, thereby further reducing the delay in the second communication device receiving the retransmitted messages, reducing jitter on the session connection, and improving the network performance of the session connection.
[0014] This application does not limit the specific method by which the first communication device measures the RTT of the n transmission channels. The following example describes a method by which the first communication device measures the RTT of the i-th transmission channel. The first communication device may send probe data for the session connection via an IP packet marked with a QoS priority tag having the i-th value, receive an ACK for the probe data sent by the second communication device, and then determine the RTT of the i-th transmission channel based on the time information of sending the probe data and the time information of receiving the ACK.
[0015] Based on the ACK mechanism of the session connection, the first communication device can send an IP message carrying the data on the session connection, so that the second communication device can respond with an IP message to the first communication device after receiving the IP message to calculate the RTT of the transmission channel, which is conducive to reducing the complexity of measuring RTT.
[0016] Through analysis, it was found that after receiving the data on the session connection, the second communication device may not reply with an ACK immediately. It may reply with an ACK after receiving several data on the session connection based on the algorithm or after the timer times out. As the RTT of the data center network becomes smaller and smaller, the ACK algorithm of the protocol stack in the second communication device will reduce the accuracy of the RTT measurement results. After receiving the keep-alive message, the second communication device generally does not perform ACK aggregation, but replies with an ACK in response to receiving the keep-alive message. In order to improve the accuracy of the RTT measurement result of the i-th transmission channel, the detection data can be a keep-alive message (or heartbeat packet) on the session connection.
[0017] In addition, since reliable transmission protocols are generally designed with a keep-alive mechanism and support sending keep-alive messages, the first communication device sends multiple keep-alive messages during the process of measuring the RTT of the n transmission channels without affecting the function and compatibility of the reliable transmission protocol.
[0018] This application does not limit the way in which the first communication device identifies the loss of the first data segment. Optionally, the first communication device may start a timer after sending the first data segment, and if no ACK for the first data segment is received before the timer times out, it is determined that the first data segment is lost. Or, optionally, after the first communication device sends the first data segment, if a preset number of ACKs for expecting to receive the first data segment are received, it may be determined that the first data segment is lost. In this way, the first communication device can retransmit the lost first data segment without waiting for the timer to time out, and has better network performance in a large bandwidth scenario, reducing the jitter on the session connection and improving the network performance of the session connection.
[0019] This application does not limit the type of session connection established between the first communication device and the second communication device. For example, the first communication device and the second communication device may establish the session connection based on a reliable transmission protocol with a retransmission mechanism, where the reliable transmission protocol is based on the IP layer. For example, the reliable transmission protocol may be the Transmission Control Protocol (TCP), or the Remote Memory Converged Ethernet (RoCE) protocol, or the Fast User Datagram Protocol (QUIC) network connection protocol.
[0020] In the above, the method provided in the first aspect is performed by a first communication device as an example. Optionally, the first communication device can be replaced with a communication module installed in or used in conjunction with the first communication device. The communication module can be a hardware module, such as a network card or chip. Alternatively, the communication module can be a software virtual module.
[0021] In a second aspect, the present application provides a communication method, which is applied to a communication system, wherein the communication system includes a first communication device, one or more forwarding devices, and a second communication device, wherein the one or more forwarding devices are used to forward data between the first communication device and the second communication device, and the method includes: the second communication device establishes a session connection with the first communication device, and receives one or more data segments sent by the first communication device through one or more IP packets marked with a quality of service QoS priority tag of a first value, wherein the one or more data segments are out-of-order data segments on the session connection, and the second communication device can send one or more acknowledgments ACK through one or more IP packets marked with a QoS priority tag of a second value, and the one or more ACKs are respectively used to indicate the expectation of receiving the lost data segments on the session connection. The one or more ACKs can also be called duplicate ACKs.
[0022] Through analysis, it is found that two communication devices that have established a session connection generally transmit data and ACK through IP packets marked with QoS priority tags of the same value. When the queue that caches the data segment of a session connection in the forwarding device is congested, the blocking waiting time of the queue that caches the ACK of the session connection in the forwarding device is generally longer. The port that outputs the data segment to the second communication device in the forwarding device is called the first port, and the port that outputs the ACK to the first communication device in the forwarding device is called the second port. As analyzed above, when the IP packet sent by the first communication device and marked with a QoS priority tag of the first value is lost, it indicates that the queue corresponding to the QoS priority tag of the first value in the multiple queues of the first port in the forwarding device is congested. Then, the queue corresponding to the QoS priority tag of the first value in the multiple queues of the second port in the forwarding device usually also has a longer blocking waiting time. After receiving the out-of-order data segment, the second communication device can mark the QoS priority tag of the second value in the message carrying the duplicate ACK (called the duplicate confirmation message), which is helpful in preventing the forwarding device from continuing to put the duplicate confirmation message into the congestion queue of the second port, thereby helping to reduce the blocking waiting time of the duplicate confirmation message in the queue, reducing the delay of the first communication device in receiving the duplicate confirmation message, reducing the jitter on the session connection, and improving the network performance of the session connection.
[0023] Optionally, based on the fact that the one or more data segments are out-of-order data segments on the session connection, the second communication device can not only send duplicate ACKs via IP packets marked with a QoS priority tag with a second value, but can also send ACKs via IP packets marked with a QoS priority tag with a second value after receiving a retransmitted message sent by the first communication device, to instruct the first communication device to continue sending normal messages, for example, at least one data segment after the one or more data segments. This helps compensate for the bandwidth reduction caused by the retransmission, thereby reducing jitter. By limiting the number of data segments sent at an accelerated rate, it helps prevent each session connection from preempting transmission resources.
[0024] Similar to the optional method executed by the first communication device introduced in the first aspect, optionally, the present application does not limit the type of QoS priority label marked by the IP message; optionally, the second communication device can also measure the round-trip time RTT of n transmission channels respectively, and determine the second value from the n different values according to the measurement results of the RTT of the n transmission channels; optionally, among the RTT values of the n transmission channels, the RTT value of the second transmission channel is the smallest; optionally, in the process of measuring the RTT of the i-th transmission channel, the second communication device can send a keep-alive message for the session connection through an IP message marked with the QoS priority label of the i-th value, receive an ACK for the keep-alive message sent by the first communication device, and determine the RTT of the i-th transmission channel by the time information of sending the detection data and the time information of receiving the ACK; the first communication device and the second communication device can establish the session connection based on a reliable transmission protocol with a retransmission mechanism, which reliable transmission protocol can be the Transmission Control Protocol TCP, or the Remote Memory Direct Access Protocol RoCE of Converged Ethernet, or the Fast User Datagram Protocol Internet Connection Protocol QUIC.
[0025] In the above, the method provided in the second aspect is performed by a second communication device as an example. Optionally, the second communication device can be replaced with a communication module installed in or used in conjunction with the second communication device. The communication module can be a hardware module, such as a network card or chip. Alternatively, the communication module can be a software virtual module.
[0026] In a third aspect, the present application provides a communication device, which is used to communicate with other communication devices other than the communication device through one or more forwarding devices, and the communication device includes a connection establishment module and a sending module; the connection establishment module is used to establish a session connection with the other communication device; the sending module is used to send one or more data segments on the session connection through one or more IP packets marked with a quality of service QoS priority tag with a first value; the sending module is also used to send at least one data segment on the session connection through at least one IP packet marked with a QoS priority tag with a second value based on the loss of the first data segment in the one or more data segments, and the at least one data segment includes the first data segment.
[0027] Optionally, the communication device further includes a receiving module, which is used to receive ACKs sent by the other communication devices, and when a preset number of repeated ACKs are received, determines that the first data segment is lost, wherein the repeated ACKs are used to indicate that the first data segment is expected to be received.
[0028] In a fourth aspect, the present application provides a communication device, which is used to communicate with other communication devices other than the communication device through one or more forwarding devices, and the communication device includes a connection establishment module, a receiving module and a sending module; the connection establishment module is used to establish a session connection with the other communication device; the receiving module is used to receive one or more data segments sent by the other communication device through one or more IP packets marked with a quality of service QoS priority tag with a first value, and the one or more data segments are out-of-order data segments on the session connection; the sending module is used to send one or more confirmation responses ACK through one or more IP packets marked with a QoS priority tag with a second value, and the one or more ACKs are respectively used to indicate the expectation of receiving the lost data segments on the session connection.
[0029] Based on the communication device provided in the third aspect or the fourth aspect, the present application also provides an optional solution.
[0030] Optionally, the QoS priority tag is a Type of Service (TOS) field or a Differentiated Services Code Point (DSCP) field in an IP packet header.
[0031] Optionally, the communication device also includes a measurement module, which is used to measure the round-trip time RTT of n transmission channels between the communication device and the other communication devices respectively, wherein the n transmission channels are used to transmit IP packets with n different values of the QoS priority labels, and n is a positive integer greater than 1; and the second value is determined from the n different values based on the measurement results of the RTT of the n transmission channels.
[0032] Optionally, the i-th transmission channel among the n transmission channels is used to transmit the IP packet with the QoS priority tag with the i-th value among the n different values. In the process of measuring the RTT of the i-th transmission channel, the measurement module sends the keep-alive message of the session connection through the IP packet marked with the QoS priority tag with the i-th value; receives the ACK for the keep-alive message sent by the other communication device; and determines the RTT of the i-th transmission channel through the time information of sending the detection data and the time information of receiving the ACK.
[0033] Optionally, the measurement result of the RTT of the n transmission channels indicates that the RTT of the transmission channel used to transmit the IP packet with the QoS priority label of the second value among the n transmission channels is the smallest.
[0034] Optionally, the session connection is a connection established based on the Transmission Control Protocol TCP, or a connection established based on the Remote Memory Direct Access Protocol RoCE of Converged Ethernet, or a connection established based on the Fast User Datagram Protocol Internet Connection Protocol QUIC.
[0035] The communication device provided in the third aspect may be a communication device, or a communication module installed in or used in conjunction with a communication device. The communication module may be a hardware module, such as a network card or chip. Alternatively, the communication module may be a software virtual module.
[0036] Similarly, the communication device provided in the fourth aspect may be a communication device, or a communication module installed in or used in conjunction with a communication device. The communication module may be a hardware module, such as a network card or chip. Alternatively, the communication module may be a software virtual module.
[0037] The present application does not limit the type of communication device. For example, the communication device may be a computing device, a storage device, or a network device, etc. For example, the communication device may be a terminal or a server, etc.
[0038] Both the communication device and the network card can be considered as computer devices. Optionally, the computer device may include a processor and a memory, the memory being coupled to the processor, and the processor being configured to execute the method described in the first aspect or any optional embodiment of the first aspect or the second aspect or any optional embodiment of the second aspect. The software virtualization module may be generated by the processor executing the method.
[0039] Optionally, these instructions are stored in a memory external to the computer device. When these instructions are decoded and executed by the processor of the computer device, part or all of the contents of the above instructions are temporarily stored in the memory inside the computer device. Optionally, part of the contents of these instructions are stored in a memory external to the computer device, and the other part of the contents of these instructions are stored in the memory inside the computer device. In one possible implementation, the computer device may be a server or a device in a server (e.g., a device implemented by software or hardware or a combination of software and hardware). Alternatively, in one possible implementation, the computer device may be a terminal or a device in a terminal (e.g., a device implemented by software or hardware or a combination of software and hardware). In one possible implementation, the computer device may refer to a computer device.
[0040] The chip or chip system may include one or more logic circuits to implement the method described in the first aspect or any optional embodiment of the first aspect or the second aspect or any optional embodiment of the second aspect.
[0041] In a fifth aspect, the present application provides a computer-readable storage medium storing program codes. When these program codes are executed on a computing device, the computing device executes a method as described in the first aspect or any optional method of the first aspect or the second aspect or any optional method of the second aspect of the present application.
[0042] The sixth aspect of the present application provides a computer program product, which, when the program code contained in the computer program product is executed by a computing device, implements the method described in the first aspect or any optional manner of the first aspect or the second aspect or any optional manner of the second aspect of the present application.
[0043] The above is an example analysis of the beneficial effects of the methods of the embodiments of the present application. Since the various devices provided in the embodiments of the present application can be used to execute the aforementioned corresponding method embodiments, the technical effects that can be obtained by the various device embodiments of the present application can refer to the technical effects obtained by the aforementioned corresponding method embodiments, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] FIG1 schematically illustrates a data encapsulation structure;
[0045] Figures 2-1 through 2-7 schematically illustrate the process of TCP packet transmission between the sender and receiver.
[0046] FIG3 schematically illustrates the structure of an Ethernet message;
[0047] FIG4 schematically illustrates the process shown in FIG2-1 and FIG2-4 to FIG2-7;
[0048] Figures 5-1 to 5-3 schematically illustrate the possible processes of a switch forwarding a packet.
[0049] Figures 6-1 and 6-2 schematically illustrate another possible process for a switch to forward packets.
[0050] FIG7 schematically illustrates the RTT measurement process;
[0051] FIG8-1 and FIG8-2 schematically illustrate possible structures of communication device 1 and communication device 2, respectively;
[0052] FIG9 schematically illustrates a possible structure of a communication system;
[0053] FIG10 schematically shows a possible structure of a computer device. DETAILED DESCRIPTION
[0054] TCP is a connection-oriented, reliable, byte-stream-based transport layer communication protocol. Based on the unreliable IP protocol, TCP provides stable and reliable data transmission services. As shown in Figure 1, at the sending end, data is transmitted from the application layer downwards, with a header added to the data at each layer, resulting in an Ethernet message. Conversely, at the receiving end, the Ethernet message must be decapsulated layer by layer before the application layer can retrieve the data (i.e., the data in the TCP message).
[0055] As shown in Figure 2-1, a sender and receiver with an established TCP connection can communicate through a switch. The sender typically sends TCP packets in the sender's buffer to the receiver based on the TCP window. For example, the sender can determine the next TCP packet to be sent based on the send pointer (SND_NXT), where SND_NXT indicates the next TCP packet to be sent. If the next TCP packet to be sent indicated by SND_NXT is within the TCP window, the sender can send the TCP packet. If the next TCP packet to be sent indicated by SND_NXT is outside the TCP window, the sender does not send the TCP packet.
[0056] TCP's sending capacity depends on the size of the TCP window. This window size is generally the minimum of the congestion window size and the peer's advertised window size. The congestion window size is generally algorithm-dependent, while the advertised window size is generally a relatively fixed value notified by the receiver. The TCP window is a buffer located on both the sender and receiver sides of a TCP connection. On the receiver side, this buffer temporarily stores data received over the TCP connection. Data in this buffer is then sent to the application to make room for new data. If the receiver's buffer is full, the receiver warns the sender that it cannot receive more data until the buffer is cleared. For example, the receiver notifies the sender of the current TCP window size (i.e., the advertised window size) in the TCP packet header.
[0057] The first TCP packet in the TCP window is the next TCP packet after the last successfully sent TCP packet. The sender can determine the first packet in the TCP window based on the acknowledgment pointer (ACKED), where ACKED indicates the last successfully sent TCP packet. As shown in Figure 2-1, the sender's buffer contains TCP packets 1 through 16. TCP packet 4 is the last successfully sent TCP packet. Therefore, the first TCP packet in the TCP window is TCP packet 5. Assuming the TCP window is six TCP packets long, the last TCP packet in the TCP window is TCP packet 10.
[0058] The previously mentioned successfully sent TCP message refers to the message sent by the sender that is confirmed to be received by the receiver. The acknowledgment message (ACK) is also a TCP message. For ease of distinction, this application refers to the TCP message sent by the sender as SEND and the TCP message sent by the receiver as ACK.
[0059] When the SEND received by the receiver is an in-sequence message, the receiver sends an ACK to confirm receipt of the SEND. The receiver generally sends an acknowledgment message to the sender based on the receive pointer (denoted as RECV_NXT), where RECV_NXT is used to indicate the sequence number of the next SEND after the last SEND received in sequence. For example, the receiver can determine the sequence number of the SEND based on the sequence number in the TCP header of the SEND. The receiver does not necessarily respond with an ACK immediately after receiving an in-sequence message. It may respond with an ACK after receiving several messages (for example, two messages) based on the algorithm or after a timer expires.
[0060] As shown in Figure 2-1, because the receiver had already received SEND 1 through SEND 7 in sequence before receiving SEND 8 through SEND 10, SEND 8 through SEND 10 are considered in-sequence messages. After receiving SEND 8 through SEND 10, as shown in Figure 2-2, the receiver can send two ACKs to the sender, one acknowledging SEND 8 and the other acknowledging SEND 10. For example, the acknowledgment sequence numbers in the TCP headers of these two ACKs are 8 and 10, respectively. After receiving these two ACKs, the sender can determine that SEND 8 through SEND 10 were successfully sent. Then, as shown in Figure 2-3, the first SEND message in the TCP window changes to SEND 11, and SEND 14 through SEND 16 enter the window. The sender can then continue sending SEND 14 through SEND 16.
[0061] TCP can ensure reliable data transmission through confirmation retransmission. Confirmation retransmission generally includes timeout retransmission (RTO) and fast retransmission. Among them, RTO retransmission is that the sender starts a timer when sending SEND. If an ACK is received for the SEND before the timer expires, the timer is stopped. If the timer times out, the sender retransmits the SEND. Fast retransmission is that after the sender sends SEND, if it receives three repeated confirmations, the sender can retransmit the SEND without waiting for the timer to expire. Fast retransmission has good performance in high-bandwidth scenarios.
[0062] When packet loss occurs, the receiver receives out-of-order packets and repeatedly sends duplicate ACKs (denoted as DUP ACKs). DUP ACKs are used to confirm the SENDs that have already been received. Referring to Figure 2-1, assume that SEND 8 is lost. After the receiver receives SEND 9 and SEND 10, it determines that SEND 9 and SEND 10 are out-of-order packets because the sequence number of the received SEND is not 8. As shown in Figure 2-4, the receiver sends two ACKs with the acknowledgment sequence number 7 (denoted as ACK 7), both confirming the successful receipt of SEND 7.
[0063] Continuing with Figure 2-4, after sending SEND 8 through SEND 10 and receiving ACK 6, the sender can move the TCP window from the position shown in Figure 2-1 to the position shown in Figure 2-4. Therefore, based on the TCP window shown in Figure 2-4, the sender can continue to send SEND 11 through SEND 13. After receiving SEND 11 through SEND 13, the receiver can send three ACKs 7, as shown in Figure 2-5.
[0064] As shown in Figures 2-4 and 2-5, the sender can receive five DUP ACKs (i.e., ACK 7). Based on the fast retransmit mechanism, as shown in Figure 2-6, after receiving the first three ACK 7s, the sender can send a retransmitted message (i.e., SEND 8) to the receiver. After receiving SEND 8, as shown in Figure 2-7, the receiver can send an ACK to acknowledge receipt of SEND 8 through SEND 13, as SEND 8 through SEND 13 were received in sequence. For example, the acknowledgment sequence number in the TCP header of this ACK might be 13.
[0065] After the sender receives ACK 13, as shown in Figure 2-7, the first SEND message in the TCP window changes to SEND 14, and the sender can continue to send messages in the window.
[0066] When packet loss occurs in a TCP connection, the bandwidth of the TCP connection is usually significantly reduced, jitter is large, and network performance is severely degraded.
[0067] Quality of service (QoS) is a network security mechanism used to address issues such as network latency and congestion. When overloaded, switches will drop packets based on algorithms. By analyzing the structure of the IP header of an IP packet and the switch's processing mechanism for IP packets, it is found that switches generally set up multiple queues for output ports, and different queues generally correspond to QoS priority tags with different values. After receiving an IP packet, the switch places the received IP packet into a corresponding queue of the output port according to the value of the QoS priority tag marked with the IP packet. When a queue is congested, the forwarding delay is long, and packet loss may even occur. This application does not limit the specific type of QoS priority tag. Figure 3 schematically shows the structure of an Ethernet packet. As shown in Figure 3, the data of the Ethernet packet includes an IP packet, and the header of the IP packet includes a service type field (TOS), which includes a differentiated services code point (DSCP) field and a CU field, where CU is a reserved field. The QoS priority tag can be the TOS field or the DSCP field in the IP packet header. In the following text, the QoS priority tag is used as the DSCP field as an example. A certain value of the DSCP field is referred to as a DSCP value. Accordingly, different queues on the same output port of the switch correspond to different DSCP values.
[0068] An analysis of the current protocol stack reveals that the DSCP value generally defaults to 0. Although the Linux operating system provides an interface for modifying DSCP values, it currently only supports modifying DSCP values based on IP addresses or TCP connections, and cannot be set differently based on TCP packet congestion. In other words, the sender and receiver use a fixed DSCP value to encapsulate the IP header for all packets of the same transport layer protocol or all packets of the same TCP connection. Packet loss on a TCP connection indicates that the DSCP value used by the sender to send packets on that TCP connection corresponds to a congested queue on the switch. Using this DSCP value for transmission by the sender and / or receiver can easily increase the latency of the TCP connection, causing significant network jitter and severely degrading network performance.
[0069] For ease of description, this application refers to the DSCP value used by the sender before packet loss as the first DSCP value. Based on the above analysis, this application proposes that after the sender recognizes packet loss, it can use other DSCP values (called the second DSCP value) to send SEND, which helps to avoid the switch from continuing to use a congested or overloaded queue to forward the SEND of the TCP connection, thereby not only helping to reduce the forwarding delay of SEND, but also helping to avoid further packet loss in the TCP connection, thereby helping to ensure that the TCP connection has better network performance. Similarly, after the receiving end recognizes packet loss, it can use other DSCP values (called the third DSCP value) to send ACK, which not only helps to reduce the forwarding delay of ACK, but also helps to avoid further packet loss in the TCP connection, thereby helping to ensure that the TCP connection has better network performance.
[0070] Based on the above analysis, it can be found that the switch generally has different forwarding delays for IP packets with different DSCP values. For ease of description, for any two DSCP values, this application will refer to the DSCP value that results in a smaller forwarding delay for the switch / or a lighter corresponding queue load as the more optimal DSCP value.
[0071] Optionally, the transmitting end may determine a DSCP value that is superior to the first DSCP value as the second DSCP value. Similarly, the receiving end may determine a DSCP value that is superior to the first DSCP value as the third DSCP value. The second DSCP value and the third DSCP value may be the same or different. The method by which the transmitting end and the receiving end determine the preferred DSCP value will be described later and will not be elaborated here. The following uses the first DSCP value of 0 and the second and third DSCP values of 1 as an example. This application does not limit the specific values of the first, second, and third DSCP values.
[0072] To prevent TCP connections from seizing a preferred DSCP value, which could cause congestion in the queue corresponding to the preferred DSCP value, the sender and / or receiver can use the preferred DSCP value to send a limited number of TCP packets after detecting packet loss. This limited number of TCP packets can be a preset number of TCP packets sent after detecting packet loss, or can be TCP packets sent within a preset time period starting from detecting packet loss, or can be TCP packets of a preset type sent after detecting packet loss.
[0073] Next, we analyze the selection scheme for this limited number of TCP packets.
[0074] Continuing to refer to Figures 2-5 to 2-7, after the sender sends SEND 13, before receiving ACK 13, due to the limitation of the TCP window, the sender cannot continue to send the message after SEND 13, resulting in the sender processing of the TCP connection being idle. After receiving SEND 13, the receiver needs a longer interval before continuing to receive SEND 14. This interval is caused by retransmission, so this application refers to this interval as the retransmission delay. Compared with the time interval for the receiver to receive adjacent SENDs, the retransmission delay is generally much longer than this time interval. Therefore, the size of the retransmission delay is an important factor in determining the network performance of the TCP connection. Excessive retransmission delay will cause the network performance on the TCP connection to deteriorate significantly, for example, the bandwidth will be greatly reduced, the delay and jitter will be greatly increased, and it may even easily cause the TCP connection to be interrupted, reducing the user experience.
[0075] In order to analyze the factors affecting the retransmission delay, the present application uses Figure 4 to represent the process shown in Figure 2-1 and Figures 2-4 to 2-7. Figure 4 marks multiple moments. Among them, TO represents the moment when the switch discards SEND 8, T1 represents the moment when the receiving end receives SEND 9, T2 represents the moment when the sending end receives the third ACK 7 (i.e., confirmation of packet loss), T3 represents the moment when the receiving end receives SEND 13, T4 represents the moment when the receiving end receives the retransmitted message SEND 8, T5 represents the moment when the sending end receives ACK 13, and T6 represents the moment when the receiving end receives SEND 14. Among them, the retransmission delay t=T6-T3. Ignoring the processing delays of the sending and receiving ends, the present application models the retransmission delay as t=t1+t2+t3, where t1=T4-T3, t2=T5-T4, and t3=T6-T5. t3 mainly depends on the transmission delay of SEND 14, t2 mainly depends on the transmission delay of ACK 13, and t1 mainly depends on the delay of the receiving end recognizing the packet loss (i.e., T1-T0), the delay of the sending end recognizing the packet loss (i.e., T2-T1), and the transmission delay of the retransmitted message SEND 8.
[0076] Based on the existing protocol stack, different TCP connections all use a DSCP value of 0 to send TCP packets. Packets from different TCP connections are sorted into the same queue. Queue congestion not only leads to longer sorting times and forwarding delays, but also, if the queue is full, the switch may drop packets through its algorithm. Figure 5-1 schematically illustrates multiple senders and receivers connected to a switch. Sender i-1 establishes a TCP connection i with receiver i-2. Assume that a SEND message sent by the sender is forwarded to the corresponding receiver via switch port P1, and the ACK message returned by the receiver is forwarded to the corresponding sender via switch port P2. The switch places IP packets with a DSCP value of 0 on port P1 into queue 1-0 and IP packets with a DSCP value of 0 on port P2 into queue 2-0. Since each TCP connection uses a DSCP value of 0 to send packets, queue 1-0 buffers the SEND messages from each TCP connection, and queue 2-0 buffers the ACK messages from each TCP connection. In Figure 5-1, rectangles marked with sequence numbers in the switch represent packets on a TCP connection. The sequence numbers in the rectangles represent the sequence numbers of the TCP connections. For example, the rectangle marked with 1 in queue 1-0 represents the SEND message of TCP connection 1 to be forwarded through port 1, and the rectangle marked with 1 in queue 2-0 represents the ACK message of TCP connection 1 to be forwarded through port 2.
[0077] As shown in Figure 5-2, assume queue 1-0 is congested. The switch discards a send from sender 2-1. Receiver 2-2 receives the three send messages following the packet loss and sends three dup ACKs with a DSCP value of 0 (see the rectangle marked with a black triangle in Figure 5-2). After receiving the three dup ACKs, sender 2-1 recognizes packet loss. When queue 1-0 is congested, queue 2-0 is typically also congested. The three dup ACKs are blocked in queue 2-0 for a long time, resulting in a longer delay before sender 2-1 recognizes the packet loss.
[0078] As shown in Figure 5-3, after transmitter 2-1 detects packet loss, it retransmits a packet with a DSCP value of 0. The switch places the retransmitted packet in queue 2-0 (see the rectangle marked with a black circle in Figure 5-3). Because queue status (e.g., congestion level) rarely changes over time, or because congested queues take a while to clear, the retransmitted packet remains blocked in queue 1-0 for a long time. This results in a longer transmission delay for the retransmitted packet and may even lead to further packet loss.
[0079] It can be seen that after the sender loses a packet sent using a DSCP value of 0, the sender 2-1 and the receiver 2-2 continue to send packets using this DSCP value, which will result in a large retransmission delay and severely degrade the network performance of the TCP connection, for example, causing large jitter.
[0080] Based on the above modeling results of retransmission delay, the present application proposes that, after detecting packet loss, the sender can use other DSCP values to send a retransmission message (e.g., SEND 8) and / or the first normal message sent after the retransmission message (e.g., SEND 14). This other DSCP value can refer to the second DSCP value described above. The limited number of TCP messages sent by the sender described above can include the retransmission message (e.g., SEND 8) and / or the first normal message sent after the retransmission message (e.g., SEND 14). This helps reduce retransmission delay and avoids severe degradation of the network performance of the TCP connection.
[0081] Figure 4 shows the DSCP value in the IP packet header, represented by a dashed box with a number. As shown in Figure 4, the sender sends SEND 8 to SEND 13 via an IP packet with a DSCP value of 0. After the sender detects that SEND 8 is lost, it can send SEND 8 via an IP packet with a DSCP value of 1. Furthermore, after receiving ACK 13, the sender can optionally continue to send SEND 14 via an IP packet with a DSCP value of 1. Thereafter, the sender can optionally send SEND 15 and SEND 16 via IP packets with a DSCP value of 0.
[0082] After detecting packet loss, the receiving end can use other DSCP values to send a DUP ACK (e.g., ACK 7) and / or the first ACK sent after the DUP ACK (e.g., ACK 13). This other DSCP value can refer to the third DSCP value described above. The limited number of TCP packets sent by the receiving end described above can include the DUP ACK and / or the first ACK sent after the DUP ACK. This helps reduce retransmission delays and avoids severe degradation of TCP connection network performance.
[0083] As shown in Figure 4, after the receiving end receives SEND 8 to SEND 13 carried in an IP packet with a DSCP value of 0, it can send multiple ACKs 7 via IP packets with a DSCP value of 1 based on the recognition that SEND 8 is lost. Furthermore, optionally, after receiving SEND 8, the receiving end can continue to send ACK 13 via IP packets with a DSCP value of 1. Subsequently, optionally, after receiving SEND 14 and SEND 15, the sending end can send ACK 15 via IP packets with a DSCP value of 0 to confirm receipt of SEND 14 and SEND 15, or in other words, to indicate its expectation of receiving SEND 16.
[0084] Figure 6-1 schematically illustrates queues 1-0 and 1-1 corresponding to port 1 on a switch, and queues 2-0 and 2-1 corresponding to port 2. The DSCP values for queues 1-0 and 2-0 are 0, while those for queues 1-1 and 2-1 are 1. Unlike Figure 5-2, as shown in Figure 6-1, after receiver 2-2 detects packet loss (for example, loss of SEND 8 in Figure 4), it can send a dup ACK (for example, ACK 7 in Figure 4) with a DSCP value of 1. The switch places the dup ACK in queue 2-1. Because queue 2-1 is less busy than queue 2-0, the dup ACK is transmitted to sender 2-1 with a shorter latency, reducing the delay before the sender detects packet loss.
[0085] Unlike Figure 5-3, as shown in Figure 6-2, after transmitter 2-1 detects packet loss, it can send a retransmission message with a DSCP value of 1 (for example, carrying SEND 8 as shown in Figure 4). The switch places the retransmission message in queue 1-1. Because queue 1-1 is less busy than queue 1-0, the retransmission message waits in queue 1-1 for a shorter time, resulting in a shorter transmission delay and helping to prevent further packet loss.
[0086] Optionally, after receiving the retransmitted message (e.g., SEND 8 shown in Figure 4), assuming that SEND 9 to SEND 13 have been received, receiving end 2-1 can send an acknowledgment response (e.g., ACK 13) using a DSCP value of 1 to notify sending end 2-1 to continue sending subsequent normal messages (e.g., SEND 14). The switch places the acknowledgment response in queue 2-1, which helps to shorten the transmission delay of the acknowledgment response and helps to avoid further packet loss of the acknowledgment response.
[0087] Optionally, after receiving the confirmation response, the sender 2-1 can continue to send one or more normal packets, such as SEND 14, using a DSCP value of 1. The switch puts SEND 14 into queue 1-1, which helps to shorten the transmission delay of SEND 14 and helps to avoid further packet loss of SEND 14.
[0088] It can be seen that after the sender loses a packet sent using a DSCP value of 0, the sender and / or receiver can use a DSCP value other than 0 to send the packet, which helps reduce the retransmission delay t, thereby helping to reduce network jitter and avoid serious degradation of the network performance of the TCP connection.
[0089] As described above, this application models retransmission delay, identifies multiple types of messages that affect retransmission delay, and reduces the transmission delay of any one type of message, thereby reducing retransmission delay. Furthermore, by analyzing the switch's forwarding mechanism, it is proposed that when a message sent by a sender using a first DSCP value is lost, the sender and / or receiver can use another DSCP value to send at least one of the multiple messages. This can help reduce message transmission delay, thereby reducing retransmission delay and ensuring better network quality even after a TCP connection experiences packet loss.
[0090] The following example describes how the sender determines a preferred DSCP value.
[0091] Based on the analysis above, forwarding devices can be used to provide differentiated forwarding services for IP packets marked with different DSCP values. For example, IP packets with different DSCP values can be placed in different queues on the output port. Accordingly, it can be considered that the sender and receiver can use different transmission channels to transmit IP packets marked with different DSCP values. For example, for n DSCP values, there are n transmission channels between the sender and the receiver, and the n transmission channels are used to transmit IP packets marked with n different DSCP values, where n is a positive integer greater than 1. For any positive integer i less than or equal to n, it can be considered that the i-th transmission channel among the n transmission channels is used to transmit the i-th value among the n values.
[0092] Because the states of the queues used by forwarding devices on different transmission channels generally vary, transmission delays on different transmission channels generally differ. For example, for two different DSCP values, if the queue corresponding to a particular DSCP value is more congested, the corresponding transmission channel's delay will generally be longer. Conversely, if the queue corresponding to a particular DSCP value is less congested, the corresponding transmission channel's delay will generally be shorter.
[0093] For ease of description, this application refers to the transmission channel corresponding to the first DSCP value as the first transmission channel. Optionally, the sender can also measure the round-trip time (RTT) of n transmission channels separately. Since the transition of the queue state in the switch usually takes a certain amount of time, the sender can predict a transmission channel with a smaller RTT than the RTT of the first transmission channel based on the measurement results. Thereafter, based on the measurement results of the RTT of the n transmission channels, the second DSCP value is determined from n different values. This is conducive to using the DSCP value corresponding to the transmission channel with the smaller RTT as the second DSCP value, and is conducive to using the transmission channel with the smaller RTT to send retransmitted messages, thereby reducing the delay of the receiving end in receiving the retransmitted messages, reducing the jitter on the TCP connection, and improving the network performance of the TCP connection.
[0094] In this application, the transmission channel corresponding to the second DSCP value is referred to as the second transmission channel. Optionally, among the RTT values of the n transmission channels, the RTT value of the second transmission channel is the smallest. This facilitates the transmission of retransmitted messages on the transmission channel with the smallest RTT (or lightly loaded transmission channel), thereby further reducing the delay in the second communication device receiving the retransmitted message, reducing the jitter on the TCP connection, and improving the network performance of the TCP connection.
[0095] This application does not limit the specific method by which the sender measures the RTT of n transmission channels. The following example describes how the sender measures the RTT of the i-th transmission channel. For example, the sender can send probe data for a TCP connection via an IP packet marked with the i-th DSCP value, receive an ACK for the probe data from the receiver, and then determine the RTT of the i-th transmission channel based on the time information of sending the probe data and the time information of receiving the ACK. Optionally, the sender can obtain time information by adding a timestamp to the packet.
[0096] Based on the ACK mechanism of the TCP connection, the sender sends an IP message carrying the data on the TCP connection, and the receiver can respond with an IP message to the sender after receiving the IP message to calculate the RTT of the transmission channel, which helps to reduce the complexity of measuring RTT.
[0097] Through analysis, it was found that after receiving the data on the TCP connection, the receiving end may not reply with an ACK immediately. It may reply with an ACK after receiving several data on the TCP connection based on the algorithm or after the timer expires. As the RTT of the data center network becomes smaller and smaller, the ACK algorithm of the protocol stack in the receiving end will reduce the accuracy of the RTT measurement results. After receiving the keep-alive message, the receiving end generally does not perform ACK aggregation, but instead replies with an ACK in response to receiving the keep-alive message. In order to improve the accuracy of the RTT measurement results of the i-th transmission channel, the detection data can be a keep-alive message (or heartbeat packet) on the TCP connection.
[0098] In addition, since reliable transmission protocols are generally designed with a keep-alive mechanism and support sending keep-alive messages, the sender sends multiple keep-alive messages during the process of measuring the RTT of n transmission channels without affecting the functionality and compatibility of the reliable transmission protocol.
[0099] 7 schematically illustrates the process of the transmitter 2 - 1 measuring the RTT of transmission channel 0 and the RTT of transmission channel 1. Transmission channel 0 is used to transmit IP packets with a DSCP value of 0, and transmission channel 1 is used to transmit IP packets with a DSCP value of 1.
[0100] When transmitter 2-1 measures the RTT of transmission channel 0, it can send an IP packet carrying a keepalive message. The DSCP value in the IP packet header is 0, and a timing probe (or timestamp) can be added to the keepalive message. The switch places the IP packet in queue 1-0 and then forwards it to receiver 2-2 via port 1. After receiving the IP packet, receiver 2-2 can send an IP packet carrying an ACK. The DSCP value in the IP packet header can be 0, and the ACK can be timestamp-added. The switch places the IP packet in queue 2-0 and then forwards it to transmitter 2-1 via port 2. After receiving the IP packet, transmitter 2-1 can calculate the RTT of transmission channel 0 based on the timestamp in the ACK.
[0101] When transmitter 2-1 measures the RTT of transmission channel 1, it can send an IP packet carrying a keepalive message. The DSCP value in the IP packet header is 1, and a timing probe (or timestamp) can be added to the keepalive message. The switch places the IP packet in queue 1-1 and then forwards it to receiver 2-2 via port 1. After receiving the IP packet, receiver 2-2 can send an IP packet carrying an ACK. The DSCP value in the IP packet header can be 1, and the ACK can be timestamp-added. The switch places the IP packet in queue 2-1 and then forwards it to transmitter 2-1 via port 2. After receiving the IP packet, transmitter 2-1 can calculate the RTT of transmission channel 1 based on the timestamp in the ACK.
[0102] The aforementioned sender and receiver generally correspond to different communication devices. Alternatively, the same communication device can serve as both a sender and a receiver. For example, assuming the aforementioned sender is communication device 1 and the receiver is communication device 2, communication device 1 can send a SEND message to another communication device, and communication device 2 can send an ACK message to communication device 1. Communication devices 1 and 2 can each measure the RTT of multiple transmission channels using the RTT measurement method described above.
[0103] FIG8-1 and FIG8-2 schematically illustrate the structures of the communication device 1 and the communication device 2, respectively.
[0104] As shown in FIG8-1 , communication device 1 may include a connection establishment module 11 and a sending module 12. Connection establishment module 11 is configured to establish a session connection with communication device 2. Sending module 12 is configured to send one or more data segments on the session connection via one or more IP packets marked with a Quality of Service (QoS) priority tag having a first value. Sending module 12 is further configured to, based on the loss of a first data segment among the one or more data segments, send at least one data segment on the session connection via at least one IP packet marked with a QoS priority tag having a second value, the at least one data segment including the first data segment.
[0105] Optionally, the communication device 1 also includes a measurement module 13, which is used to measure the round-trip time RTT of n transmission channels between the communication device 1 and the communication device 2 respectively, wherein the n transmission channels are used to transmit IP packets with n QoS priority labels of different values, and n is a positive integer greater than 1; and the second value is determined from the n different values based on the measurement results of the RTT of the n transmission channels.
[0106] Optionally, the i-th transmission channel among n transmission channels is used to transmit an IP packet with a QoS priority tag with an i-th value among n different values. In the process of measuring the RTT of the i-th transmission channel, the measurement module 13 can send a keep-alive message for the session connection through an IP packet marked with a QoS priority tag with an i-th value; receive an acknowledgment ACK for the keep-alive message sent by the communication device 2; and determine the RTT of the i-th transmission channel through the time information of sending the keep-alive message and the time information of receiving the ACK.
[0107] Optionally, the measurement result of the RTT of the n transmission channels indicates that the RTT of the transmission channel used to transmit the IP packet with the QoS priority label of the second value among the n transmission channels is the smallest.
[0108] Optionally, the communication device 1 further includes a receiving module 14, which is used to receive an ACK sent by the communication device 2, and when a preset number of repeated ACKs are received, determines that the first data segment is lost, wherein the repeated ACKs are used to indicate that the first data segment is expected to be received.
[0109] As shown in Figure 8-2, the communication device 2 may include a connection establishment module 21, a receiving module 22 and a sending module 23; the connection establishment module 21 is used to establish a session connection with the communication device 1; the receiving module 22 is used to receive one or more data segments sent by the communication device 1 through one or more IP packets marked with a quality of service QoS priority tag of a first value, and the one or more data segments are out-of-order data segments on the session connection; the sending module 23 is used to send one or more confirmation responses ACK through one or more IP packets marked with a QoS priority tag of a second value, and the one or more ACKs are respectively used to indicate the expectation of receiving the lost data segments on the session connection.
[0110] Optionally, the communication device 2 also includes a measurement module 24, which is used to measure the round-trip time RTT of n transmission channels between the communication device 1 and the communication device 2 respectively, wherein the n transmission channels are used to transmit IP packets with n QoS priority labels of different values, and n is a positive integer greater than 1; and the second value is determined from the n different values based on the measurement results of the RTT of the n transmission channels.
[0111] Optionally, the i-th transmission channel among n transmission channels is used to transmit an IP packet with a QoS priority tag with an i-th value among n different values. In the process of measuring the RTT of the i-th transmission channel, the measurement module sends a keep-alive message for the session connection through the IP packet marked with the QoS priority tag with the i-th value; receives an ACK for the keep-alive message sent by the first communication device; and determines the RTT of the i-th transmission channel through the time information of sending the detection data and the time information of receiving the ACK.
[0112] Optionally, the measurement result of the RTT of the n transmission channels indicates that the RTT of the transmission channel used to transmit the IP packet with the QoS priority label of the second value among the n transmission channels is the smallest.
[0113] In some cases, communication device 2 can also serve as a transmitter, and communication device 1 can also serve as a receiver. Accordingly, communication device 2 sends a SEND message to communication device 1, and communication device 1 sends an ACK message to communication device 2. Communication device 1 can also include the modules shown in Figure 8-2, or in other words, the modules in communication device 1 can also be used to perform the functions of the corresponding modules in communication device 2, and communication device 1 can perform any of the method examples performed by the transmitter described above. Similarly, communication device 2 can also include the modules shown in Figure 8-1, and the modules in communication device 2 can also be used to perform the functions of the corresponding modules in communication device 1, and communication device 2 can perform any of the method examples performed by the receiver described above.
[0114] This application does not limit the manner in which a TCP connection is established between communication device 1 and communication device 2. For example, communication device 1 or communication device 2 may initiate a TCP connection. Taking the example of a communication device initiating a TCP connection, communication device 1 may be referred to as a client, and communication device 2 may be referred to as a server.
[0115] The following examples introduce the application scenarios of this application.
[0116] The solution provided in this application can be applied to the communication system shown in Figure 9. As shown in Figure 9, the communication system may include multiple computing nodes, multiple storage nodes and multiple switches, wherein the forwarding device 1 is used to forward data between different computing nodes, the forwarding device 2 is used to forward data between computing nodes and storage nodes, and the forwarding device 3 is used to forward data between different storage nodes. The switch mentioned above can be any forwarding device shown in Figure 9, and accordingly, the communication device 1 and the communication device 2 can be two communication devices connected to the forwarding device (referred to as communication device 1 and communication device 2, respectively), or the communication device 1 can be a communication module installed in or used in conjunction with the communication device 1, and the communication device 2 can be a communication module installed in or used in conjunction with the communication device 2. The communication module can be a network card or a chip or a software virtual module. The network card can be an intelligent network card based on TCP offloading or a data processor (DPU) DPU card or a host bus adapter (Host Bus Adapter, HBA). As shown in Figure 9, the communication device 1 and the communication device 2 can both be computing nodes or both be storage nodes or respectively be computing nodes and storage nodes.
[0117] This application does not limit the types of services provided by computing nodes and storage nodes. For example, computing nodes can be used to provide cloud computing services or traditional computing services, and storage nodes can be used to provide storage services. Figure 9 takes the communication system including computing nodes and storage nodes as an example. Optionally, the communication system used in the present application solution may include computing nodes and forwarding devices, but not storage nodes. The communication network can also be called a computing network. Alternatively, the communication system used in the present application solution may include storage nodes and forwarding devices, but not computing nodes. The communication network can also be called a storage network.
[0118] The switch mentioned in this application is used to perform data forwarding. The switch can be replaced with other types of forwarding devices. The above figures of this application schematically illustrate a single forwarding device between the sending end and the receiving end. In actual applications, the sending end and the receiving end can be connected through one or more forwarding devices.
[0119] This application does not limit the type of communication device. For example, the communication device may be a terminal or a server. The terminal may be, for example, a handheld terminal or various types of robots or vehicle-mounted terminals. In one possible implementation, the handheld terminal may be, for example, a mobile phone, a laptop computer, a tablet computer, or a smart bracelet. In one possible implementation, the robot may be, for example, a freight robot, a detection robot, a sweeping robot, or other types of robots. In one possible implementation, the vehicle-mounted terminal may refer to a vehicle system, a vehicle computer, or a vehicle-mounted computer.
[0120] As described above, the communication device can be a network card or a communication device, and the network card and the communication device can both be computer devices. The following describes a possible structure of a computer device. As shown in FIG10 , the computer device 10 includes a processor 1001 and a memory 1002 .
[0121] The processor 1001 may be one or more CPUs, and the CPU may be a single-core CPU or a multi-core CPU.
[0122] Memory 1002 includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), flash memory, or optical storage. Memory 1002 stores instructions, computer-readable instructions, operating system and program instruction code, computer program instructions, or functional programs. Optionally, memory 1002 may be non-volatile memory or volatile memory.
[0123] Optionally, the computer device 10 further includes a communication interface 1003. Communication interface 1003 can be a wired interface, such as a Fiber Distributed Data Interface (FDDI) or a Gigabit Ethernet (GE) interface. Communication interface 1004 can also be a wireless interface. Optionally, communication interface 1003 can be any of the network cards described above.
[0124] Optionally, the computer device further includes a bus 1004 . The processor 1001 and the memory 1002 are usually connected to each other via the bus 1004 , but may also be connected to each other in other ways.
[0125] The processor 1001 reads and executes the program instructions stored in the memory 1002 to enable the computer device 10 to execute all or part of the methods executed by the sending end and / or the receiving end in the above method embodiments, or generate all or part of the modules shown in Figure 8-1 and / or Figure 8-2.
[0126] Optionally, these instructions are stored in a memory external to the computer device. When these instructions are decoded and executed by the processor 1001 of the computer device 10, the memory 1002 within the computer device 10 temporarily stores part or all of the contents of the above instructions. Optionally, part of the contents of these instructions are stored in a memory external to the computer device 10, and the rest of the contents of these instructions are stored in the memory 1002 within the computer device 10.
[0127] Optionally, a chip may be integrated into a computer device or network card, and the chip includes one or more logic circuits. These one or more logic circuits are used to implement all or part of the methods performed by the transmitting end and / or the receiving end in the above method embodiments, and may include all or part of the modules shown in Figure 8-1 and / or Figure 8-2. This application does not limit the division method of the logic circuit to the same as the module method shown in Figure 8-1 or Figure 8-2.
[0128] The messages mentioned in this application may also be referred to as packets. For example, IP messages may be referred to as IP packets, and TCP messages may be referred to as TCP packets. This application does not limit the type of data link layer protocol used for communication between the sender and the receiver. Figure 1 takes an IP message encapsulated in an Ethernet message as an example.
[0129] As mentioned above, in addition to the TCP protocol, the reliable transport protocol can also be the Quick UDP Internet Connection (QUIC) protocol, or RDMA over converged Ethernet (RoCE), etc. UDP is the abbreviation of the User Datagram Protocol, and RDMA is the abbreviation of Remote Direct Memory Access. Reliable transport protocols such as QUIC and ROCE are also based on the IP layer and have a retransmission mechanism. Therefore, the TCP connection mentioned in this application can also be replaced by a session connection established based on other reliable transport protocols to reduce the network jitter caused by packet loss in the session connection and optimize the network performance of the session connection. The data segment on the session connection mentioned above can be, for example, a SEND on a TCP connection, a duplicate ACK can refer to a dup ACK (such as ACK 7 shown in FIG4 ), an out-of-order data segment can refer to SEND 9 to SEND 13 shown in FIG4 , and a lost data segment can refer to SEND 8 shown in FIG4 . ACK 7 shown in FIG4 is used to indicate that SEND 8 is expected to be received. The QoS priority label mentioned above can be the service type TOS field in the IP packet header, or the differentiated services code point DSCP field.
[0130] Those skilled in the art will understand that when software is used to implement the various aspects of the embodiments of the present application, or the possible implementation of each aspect, the above-mentioned various aspects, or the possible implementation of each aspect can be implemented in whole or in part in the form of a computer program product. A computer program product refers to instructions (or computer-readable instructions or computer program instructions or functional programs or program codes) stored in a computer-readable medium. When these instructions are loaded and executed on a computer, the process or function described in the embodiments of the present application are generated in whole or in part.
[0131] The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. Computer-readable storage media include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or apparatuses, or any suitable combination thereof. For example, the computer-readable storage medium may be a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), or a portable compact disc read-only memory (CD-ROM).
[0132] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged under appropriate circumstances. This is merely a way of distinguishing objects with the same properties when describing the embodiments of the present application. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion, so that a process, method, system, product or apparatus that includes a series of units is not necessarily limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or apparatuses. The term "plurality" appearing in the embodiments of the present application refers to two or more.
[0133] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the scope of the present invention. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present invention, the present invention is also intended to include these modifications and variations.
Claims
1. A communication method, characterized in that: The method is applied to a communication system, the communication system including a first communication device, one or more forwarding devices, and a second communication device, the one or more forwarding devices being configured to forward data between the first communication device and the second communication device, the method including: Establishing a session connection with the second communication device; Sending one or more data segments on the session connection via one or more IP packets marked with a quality of service (QoS) priority tag having a first value; Based on the loss of the first data segment among the one or more data segments, at least one data segment on the session connection is sent via at least one IP packet marked with a QoS priority tag with a second value, and the at least one data segment includes the first data segment.
2. The method according to claim 1, characterized in that The QoS priority tag is the service type TOS field or the differentiated services code point DSCP field in the IP packet header.
3. The method according to claim 1 or 2, characterized in that The method further comprises: Respectively measure the round-trip delays (RTTs) of n transmission channels between the first communication device and the second communication device, where the n transmission channels are used to transmit IP packets with n different values of the QoS priority labels, where n is a positive integer greater than 1; The second value is determined from the n different values according to the measurement results of the RTTs of the n transmission channels.
4. The method according to claim 3, characterized in that The i-th transmission channel among the n transmission channels is used to transmit the IP packet of the QoS priority label having the i-th value among the n different values, wherein measuring the RTT of the i-th transmission channel includes: Sending a keep-alive message for the session connection via an IP message marked with the QoS priority tag having the i-th value; receiving an acknowledgment ACK for the keep-alive message sent by the second communication device; The RTT of the i-th transmission channel is determined according to the time information of sending the keep-alive message and the time information of receiving the ACK.
5. The method according to claim 3 or 4, characterized in that The measurement result of the RTT of the n transmission channels indicates that the RTT of the transmission channel used to transmit the IP packet with the QoS priority label of the second value among the n transmission channels is the smallest.
6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: When a preset number of repeated ACKs sent by the second communication device are received, it is determined that the first data segment is lost, wherein the repeated ACKs are used to indicate that the first data segment is expected to be received.
7. The method according to any one of claims 1 to 6, characterized in that The session connection is a connection established based on the Transmission Control Protocol TCP, or a connection established based on the Remote Memory Direct Access Protocol RoCE of Converged Ethernet, or a connection established based on the Fast User Datagram Protocol Internet Connection Protocol QUIC.
8. A communication method, characterized in that: The method is applied to a communication system, the communication system including a first communication device, one or more forwarding devices, and a second communication device, the one or more forwarding devices being configured to forward data between the first communication device and the second communication device, the method including: Establishing a session connection with the first communication device; receiving one or more data segments sent by the first communication device through one or more IP packets marked with a quality of service (QoS) priority tag having a first value, the one or more data segments being out-of-order data segments on the session connection; One or more acknowledgments ACK are sent via one or more IP packets marked with a QoS priority tag having a second value, where the one or more ACKs are respectively used to indicate an expectation to receive the data segment lost on the session connection.
9. The method according to claim 8, characterized in that The QoS priority tag is the service type TOS field or the differentiated services code point DSCP field in the IP packet header.
10. The method according to claim 8 or 9, characterized in that The method further comprises: Respectively measure the round-trip delays (RTTs) of n transmission channels between the second communication device and the first communication device, where the n transmission channels are used to transmit IP packets with n different values of the QoS priority labels, where n is a positive integer greater than 1; The second value is determined from the n different values according to the measurement results of the RTTs of the n transmission channels.
11. The method according to claim 10, characterized in that The i-th transmission channel among the n transmission channels is used to transmit the IP packet of the QoS priority label having the i-th value among the n different values, wherein measuring the RTT of the i-th transmission channel includes: Sending a keep-alive message for the session connection via an IP message marked with the QoS priority tag having the i-th value; receiving an ACK for the keep-alive message sent by the first communication device; The RTT of the i-th transmission channel is determined according to the time information of sending the detection data and the time information of receiving the ACK.
12. The method according to claim 10 or 11, characterized in that The measurement result of the RTT of the n transmission channels indicates that the RTT of the transmission channel used to transmit the IP packet with the QoS priority label of the second value among the n transmission channels is the smallest.
13. The method according to any one of claims 8 to 12, characterized in that The session connection is a connection established based on the Transmission Control Protocol TCP, or a connection established based on the Remote Memory Direct Access Protocol RoCE of Converged Ethernet, or a connection established based on the Fast User Datagram Protocol Internet Connection Protocol QUIC.
14. A communication device, characterized in that: The communication device is used to communicate with other communication devices other than the communication device through one or more forwarding devices, and the communication device includes a connection establishment module and a sending module; The connection establishing module is used to establish a session connection with the other communication device; The sending module is configured to send one or more data segments on the session connection via one or more IP packets marked with a quality of service (QoS) priority tag having a first value; The sending module is also used to send at least one data segment on the session connection through at least one IP packet marked with a QoS priority tag with a second value based on the loss of the first data segment among the one or more data segments, and the at least one data segment includes the first data segment.
15. The communication device according to claim 14, wherein: The communication device is a computing device, a storage device, a network card, or a chip.
16. A communication device, characterized in that: The communication device is used to communicate with other communication devices other than the communication device through one or more forwarding devices, and the communication device includes a connection establishment module, a receiving module and a sending module; The connection establishing module is used to establish a session connection with the other communication device; The receiving module is configured to receive one or more data segments sent by the other communication device via one or more IP packets marked with a quality of service (QoS) priority tag having a first value, wherein the one or more data segments are out-of-order data segments on the session connection; The sending module is used to send one or more acknowledgments ACK via one or more IP packets marked with a QoS priority tag of a second value, where the one or more ACKs are respectively used to indicate an expectation to receive the data segment lost on the session connection.
17. The communication device according to claim 16, wherein: The communication device is a computing device, a storage device, a network card, or a chip.
18. A communication system, characterized in that The device comprises the communication device according to claim 14 or 15, the communication device according to claim 16 or 17, and one or more forwarding devices.
19. A computer-readable storage medium, characterized in that The computer-readable storage medium stores program code, and when the program code is executed by a processor in a computer device, the method according to any one of claims 1 to 13 is implemented.
20. A computer program product, characterized in that When the program code contained in the computer program product is executed by a processor in a computer device, the method according to any one of claims 1 to 13 is implemented.
Citation Information
Patent Citations
Data transmission method and network equipment
CN111131061A
Network congestion control method and network equipment
CN113726681A
Method for transmitting packet data in datacommunication network
KR1020020084546A
Apparatus and method for increasing reliability of data sensitive to packet loss
US20070189327A1
Packet classification and prioritization using an IP header in a mobile wireless device
US20120033563A1