Methods, devices and computer-readable storage media for controlling packet loss and retransmission

By including the maximum sequence number and the packet loss recovery number in the response message, the problem of low efficiency of the fast retransmission method when the tail packet and retransmitted data packet are lost is solved, and faster data packet retransmission is achieved, thus improving data transmission efficiency.

CN123074650APending Publication Date: 2026-11-10ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510594314.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-09
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

The existing fast retransmission method is inefficient when the tail packet is lost and the retransmitted packet is lost again. It cannot trigger fast retransmission in time, resulting in frequent timeout retransmissions and affecting data transmission efficiency.

Method used

By including the maximum sequence number of the data packets sent by this end in the response message, packet loss can be determined, and the packet loss recovery number can be recorded at the sending end. This allows for quick determination of retransmission failure, triggering fast retransmission and reducing timeout retransmissions.

Benefits of technology

It improves the retransmission efficiency of tail packet data messages and retransmitted data messages, reduces timeout retransmissions, and achieves more timely and efficient data packet recovery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123074650A_ABST
    Figure CN123074650A_ABST
Patent Text Reader

Abstract

This application provides a packet loss retransmission control method, device, and computer-readable storage medium. The method may include: a first device receiving a first response message from a second device for a data packet from the first device, wherein the first response message carries a first maximum sequence number, which is the maximum sequence number of data packets already sent by the second device to the first device; determining whether the first maximum sequence number and a second maximum sequence number are consistent, wherein the second maximum sequence number is the maximum sequence number of data packets already received by the first device from the second device; if the first maximum sequence number is greater than the second maximum sequence number, sending a first duplicate response message with the second maximum sequence number as the response number to the second device to trigger the second device to retransmit the lost packet. This can improve the retransmission efficiency of data packets, including tail packets, sent by the second device to the first device after packet loss.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This document relates to the field of data communication technology, and in particular to a packet loss retransmission control method, device, and computer-readable storage medium. Background Technology

[0002] At the transport layer, data transmission is categorized into unreliable and reliable transmission based on different transmission protocols. Unreliable transmission, aiming for higher data transmission speeds, only involves the sender transmitting data without guaranteeing its correct reception by the receiver, making it suitable for high-speed, lossless networks. Reliable transmission, on the other hand, requires the receiver to correctly receive the transmitted data. Therefore, the receiver must send an acknowledgment message to the sender upon receiving the data. If data packets are lost due to issues with the underlying network, the lost packets must be retransmitted.

[0003] Currently, there are two methods for packet loss retransmission: timeout retransmission and fast retransmission. From a time efficiency perspective, timeout retransmission is less efficient, requiring a longer wait time to recover from packet loss, while fast retransmission is more efficient. When packet loss occurs, fast retransmission should be used whenever possible to avoid timeout retransmission.

[0004] However, existing fast retransmission methods have limited applicability: on the one hand, when tail packet loss occurs, the receiving end cannot receive the packet and therefore cannot generate an acknowledgment message, and the sending end cannot determine the receiving end's reception status through the acknowledgment message, and can only wait for a timeout before initiating retransmission; on the other hand, when the retransmitted data packet is lost again, fast retransmission cannot be initiated again, and can only wait for a timeout before retransmission. It is evident that packet loss retransmission is inefficient in both of these scenarios and needs improvement. Summary of the Invention

[0005] This application provides a packet loss retransmission control method, device, and computer-readable storage medium to solve the problem of low retransmission efficiency in at least one of the following situations: tail packet data packet loss and retransmitted data packet loss again.

[0006] To solve the above-mentioned technical problems, the embodiments of this application are implemented as follows: In a first aspect, a packet loss retransmission control method is provided, applied to a first device, the method comprising: The device receives a first response message from the second device in response to a data packet from the first device, wherein the first response message carries a first maximum sequence number, which is the maximum sequence number of the data packet that the second device has sent to the first device. Determine whether the first maximum sequence number and the second maximum sequence number are consistent, wherein the second maximum sequence number is the maximum sequence number of the data packets received by the first device from the second device; If the first maximum sequence number is greater than the second maximum sequence number, a first duplicate response message with the response number of the second maximum sequence number is sent to the second device to trigger the second device to retransmit the lost packet message.

[0007] Secondly, a packet loss retransmission control method is provided, applied to a first device, the method comprising: Send a second response message to the second device in response to the data packet from the second device, wherein the second response message carries a third maximum sequence number, which is the maximum sequence number of the data packet that the first device has sent to the second device.

[0008] Thirdly, a packet loss retransmission control method is provided, applied to a first device, the method comprising: In response to retransmitting the second data packet to the second device, the locally recorded packet loss recovery number is updated, wherein the packet loss recovery number is the maximum sequence number of the data packet sent by the first device to the second device; Send a third data packet to the second device and receive a third response packet from the second device in response to the third data packet, wherein the maximum sequence number of the third data packet is greater than the packet loss recovery number, and the third response packet carries a response number and a selection acknowledgment number; Determine whether the maximum value in the selected confirmation number exceeds the packet loss recovery number; If the maximum value in the selected acknowledgment number exceeds the packet loss recovery number, and the acknowledgment number carried in the third acknowledgment message has not increased relative to the acknowledgment number carried in the previously received acknowledgment message, it is determined that the retransmission of the second data packet has failed, and the second data packet is retransmitted again.

[0009] Fourthly, a packet loss retransmission control device is provided, applied to a first device, the device comprising: The first receiving module is configured to receive a first response message sent by the second device in response to a data packet from the first device, wherein the first response message carries a first maximum sequence number, which is the maximum sequence number of the data packet sent by the second device to the first device. The first determining module is used to determine whether the first maximum sequence number and the second maximum sequence number are consistent, wherein the second maximum sequence number is the maximum sequence number of the data packets received by the first device from the second device; The duplicate response module is used to send a first duplicate response message with the response number of the second maximum sequence number to the second device when the first maximum sequence number is greater than the second maximum sequence number, so as to trigger the second device to retransmit the lost packet message.

[0010] Fifthly, a packet loss retransmission control device is provided, applied to a first device, the device comprising: The first sending module is configured to send a second response message to the second device in response to a data packet from the second device, wherein the second response message carries a third maximum sequence number, which is the maximum sequence number of the data packet that the first device has sent to the second device.

[0011] Sixthly, a packet loss retransmission control device is provided, applied to a first device, the device comprising: The packet loss recording module is used to update the locally recorded packet loss recovery number in response to retransmitting the second data packet to the second device, wherein the packet loss recovery number is the maximum sequence number of the data packet sent by the first device to the second device; The sending and receiving module is used to send a third data packet to the second device and receive a third response packet sent by the second device in response to the third data packet, wherein the maximum sequence number of the third data packet is greater than the packet loss recovery number, and the third response packet carries a response number and a selection acknowledgment number; The second determining module is used to determine whether the maximum value in the selected confirmation number exceeds the packet loss recovery number; The second retransmission module is configured to respond to the fact that the maximum value in the selected acknowledgment number exceeds the packet loss recovery number, and the acknowledgment number carried in the third acknowledgment message has not increased relative to the acknowledgment number carried in the previously received acknowledgment message, determine that the retransmission of the second data packet has failed, and retransmit the second data packet again.

[0012] Seventhly, an electronic device is provided, comprising: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the methods described in the first, second, or third aspects.

[0013] Eighthly, a computer-readable storage medium is provided, wherein when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the methods described in the first, second, or third aspects.

[0014] A ninth aspect provides a computer program product including instructions, wherein when a computer executes the instructions of the computer program product, the computer performs the method as described in the first aspect, the second aspect, or the third aspect. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 This is a schematic diagram of a TCP / IP four-layer network model given in an embodiment of this application.

[0017] Figure 2 This is a schematic diagram of a data packet transmission process in related technologies.

[0018] Figure 3 This is a schematic diagram of another data packet transmission process in related technologies.

[0019] Figure 4 This is a schematic diagram of the data packet timeout retransmission process in related technologies.

[0020] Figure 5 This is a schematic diagram of the fast retransmission process for data packets in related technologies.

[0021] Figure 6 This is a schematic diagram of the transmission process in which tail packet data packet loss occurs in related technologies.

[0022] Figure 7 This is a schematic diagram of the retransmission process when a retransmitted message is lost again in related technologies.

[0023] Figure 8A This is a schematic diagram of a bidirectional data transmission scenario proposed in an embodiment of this application.

[0024] Figure 8B This is a schematic diagram of a one-way data transmission scenario proposed in an embodiment of this application.

[0025] Figure 9 This is a flowchart illustrating a packet loss retransmission control method provided in an embodiment of this application.

[0026] Figure 10 This is a flowchart illustrating a packet loss retransmission control method provided in another embodiment of this application.

[0027] Figure 11 This is a flowchart illustrating a packet loss retransmission control method provided in another embodiment of this application.

[0028] Figure 12 This is a flowchart illustrating a packet loss retransmission control method provided in another embodiment of this application.

[0029] Figure 13This is a flowchart illustrating a packet loss retransmission control method provided in another embodiment of this application.

[0030] Figure 14 This is a flowchart illustrating a packet loss retransmission control method provided in another embodiment of this application.

[0031] Figure 15 This is a flowchart illustrating a packet loss retransmission control method provided in another embodiment of this application.

[0032] Figure 16 This is a flowchart illustrating a packet loss retransmission control method provided in another embodiment of this application.

[0033] Figure 17 This is a flowchart illustrating a packet loss retransmission control method provided in another embodiment of this application.

[0034] Figure 18 This is a flowchart illustrating a packet loss retransmission control method provided in another embodiment of this application.

[0035] Figure 19 This is a flowchart illustrating a packet loss retransmission control method provided in another embodiment of this application.

[0036] Figure 20 This is a flowchart illustrating a packet loss retransmission control method provided in another embodiment of this application.

[0037] Figure 21 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application.

[0038] Figure 22 This is a schematic diagram of the structure of a packet loss retransmission control device provided in an embodiment of this application.

[0039] Figure 23 This is a schematic diagram of a packet loss retransmission control device provided in another embodiment of this application.

[0040] Figure 24 This is a schematic diagram of a packet loss retransmission control device provided in another embodiment of this application.

[0041] Figure 25 This is a schematic diagram of a packet loss retransmission control device provided in another embodiment of this application.

[0042] Figure 26 This is a schematic diagram of a packet loss retransmission control device provided in another embodiment of this application.

[0043] Figure 27 This is a schematic diagram of a packet loss retransmission control device provided in another embodiment of this application.

[0044] Figure 28 This is a schematic diagram of a packet loss retransmission control device provided in another embodiment of this application.

[0045] Figure 29 This is a schematic diagram of a packet loss retransmission control device provided in another embodiment of this application. Detailed Implementation

[0046] To enable those skilled in the art to better understand the technical solutions in the embodiments of this application, the technical solutions in one or more embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the protection scope of this document.

[0047] The terms "first," "second," etc., used in this application and claims are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein. Furthermore, in this application and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0048] like Figure 1As shown, network data transmission widely uses the TCP / IP four-layer network model, which includes: application layer, transport layer, network layer, and data link layer. The application layer includes application programs, which generate data to be sent and transmit it to the transport layer. The protocols / technologies that the application layer relies on include at least one of the following: Hypertext Transfer Protocol (HTTP), File Transfer Protocol (FTP), Domain Name System (DNS), and Secure Shell (SSH). The transport layer receives data generated by the application layer and encapsulates the data packets, providing end-to-end communication functionality. The protocols / technologies that the transport layer relies on include at least one of the following: Transmission Control Protocol (TCP), User Datagram Protocol (UDP), and Stream Control Transmission Protocol (SCTP). The network layer receives data from the transport layer and encapsulates data frames, providing host-to-host communication functionality. The network layer relies on at least one of the following protocols / technologies: Internet Protocol version 4 (IPv4), Internet Protocol version 6 (IPv6), Internet Control Message Protocol (ICMP), and Address Resolution Protocol (ARP). The data link layer performs data bitstream conversion and is responsible for data transmission between hosts or routers. The data link layer relies on protocols / technologies including Ethernet and wireless networks.

[0049] At the transport layer, data transmission is categorized into unreliable and reliable transmission based on different transmission protocols. Unreliable transmission, aiming for higher data transmission speeds, only involves the sender transmitting data without guaranteeing its correct reception by the receiver, making it suitable for high-speed, lossless networks. Reliable transmission, on the other hand, requires the receiver to correctly receive the transmitted data. Therefore, the receiver must send an acknowledgment message to the sender upon receiving the data. If data packets are lost due to issues with the underlying network, the lost packets must be retransmitted.

[0050] Currently, there are two methods for packet loss retransmission: timeout retransmission and fast retransmission. Timeout retransmission times the duration of a sent packet; if no acknowledgment is received within a long period, the packet is considered lost and retransmission is initiated. Fast retransmission uses a different packet loss detection method. The sender assigns a sequence number to each data packet sent in the order of transmission. Upon receiving a packet, the receiver replies with the corresponding acknowledgment number based on the sequence number. Normally, the sequence numbers received by the receiver are consecutively increasing. If the receiver receives non-consecutive sequence numbers, it indicates that a packet loss may have occurred. In this case, the receiver will notify the sender by sending a duplicate acknowledgment or SACK, and the sender will then initiate retransmission based on the abnormal acknowledgment. From a time efficiency perspective, timeout retransmission is less efficient, requiring a longer wait time to recover from packet loss, while fast retransmission is more efficient. When packet loss occurs, fast retransmission should be used whenever possible to avoid timeout retransmission.

[0051] The data transmission method in related technologies is typically as follows: Sending end A sends data packets to receiving end B, and receiving end B, after receiving the data packets, replies with an acknowledgment packet based on the data packets. The data packets contain: a sequence number (seq) and a length (len). The sequence number is the number assigned to the data packets by sending end A according to the order of packet transmission, and the length is the length of the data sent in the data packet. The acknowledgment packet contains: an acknowledgment number (ACK) and a selection acknowledgment number (SACK). The acknowledgment number is the largest sequence number received by receiving end B in normal sequence order, and the selection acknowledgment number (SACK) is a non-contiguous sequence number segment received by receiving end B.

[0052] For example, such as Figure 2 As shown, a data transmission process in related technologies may include: Step 1: Sender A sends data packet 1 to receiver B. The sequence number of data packet 1 is 0 and the length of data packet 1 is 100. Step 2: After receiving data packet 1, receiver B replies with acknowledgment packet 1 to sender A. The acknowledgment packet 1 carries an acknowledgment number of 100 and an empty selection acknowledgment number (NULL).

[0053] It is understandable that receiver B can notify sender A that it has completed receiving the first 100 data packets with the sequence number by using acknowledgment message 1; sender A receives acknowledgment message 1 and completes the transmission of data packet 1.

[0054] For example, such as Figure 3 As shown, a data transmission process in related technologies may include: Step 1: Sender A sends data packet 1 to receiver B. The sequence number of data packet 1 is 0 and the length of data packet 1 is 100. Step 2: If data packet 1 is lost, sender A continues to send data packet 2 to receiver B. The sequence number of data packet 2 is 100 and the sending length is 100. Step 3: After receiving data packet 2, receiver B confirms that the received packet sequence number is 0. Since the packet sequence number of data packet 2 is not consecutive with the packet sequence number confirmed by receiver B, receiver B replies with acknowledgment packet 1. The acknowledgment packet 1 carries an acknowledgment number of 0 and a selection acknowledgment number of [100, 200].

[0055] In related technologies, when data packet loss occurs, the sending end cannot receive the acknowledgment message from the receiving end. If the sending end does not receive an acknowledgment within a certain period of time, this period is defined as the timeout period (RTO). The sending end then determines that data packet loss has occurred and initiates a timeout retransmission.

[0056] For example, such as Figure 4 As shown, the timeout retransmission process in related technologies may include: Step 1: Sender A sends data packet 1 to receiver B. The sequence number of data packet 1 is 0 and the length of data packet 1 is 100. Step 2: If data packet 1 is lost during network transmission, after the RTO time, the sending end A determines that data packet 1 is lost and retransmits data packet 1. The retransmitted data packet 1 carries a sequence number of 0 and a transmission length of 100. Step 3: After receiving data packet 1, receiver B replies with response packet 1. The response packet 1 carries a response number of 100 and an empty selection response number (NULL).

[0057] In this scenario, receiver B can notify sender A via acknowledgment message 1 that receiver B has completed receiving the first 100 data packets with the correct sequence number. Correspondingly, upon receiving acknowledgment message 1, sender A has completed sending data packet 1.

[0058] Figure 4 The retransmission method shown (timeout retransmission) can handle any form of packet loss retransmission problem, but it is inefficient and requires a long wait to detect packet loss and initiate a retransmission. Therefore, related technologies have also proposed fast retransmission.

[0059] like Figure 5 As shown, the fast retransmission process in related technologies may include: Step 1: Sender A continuously sends data packet 1 and data packet 2. Data packet 1 has a sequence number of 0 and a length of 100. Data packet 2 has a sequence number of 100 and a length of 100. Step 2: If data packet 1 is lost during transmission, and data packet 2 is received normally by receiver B, then after receiving data packet 2, receiver B will detect that its sequence number is 100. At this moment, receiver B has confirmed that the sequence number of the largest data packet received is 0, which is not continuous with the sequence number of data packet 2. Receiver B will reply to sender A with acknowledgment packet 1, in which the acknowledgment number carried in acknowledgment packet 1 is 0, and the selected acknowledgment number carried is [100, 200].

[0060] Step 3: After receiving the acknowledgment message 1, the sending end A checks the acknowledgment number in it. Since the acknowledgment number has not increased, it is determined that the data message 1 has not been acknowledged. The sending end A retransmits the data message 1. The retransmitted data message 1 has a sequence number of 0 and a transmission length of 100. Step 4: After receiving the retransmitted data packet 1, receiver B replies with acknowledgment packet 2. Acknowledgment packet 2 carries an acknowledgment number of 200 and a null select acknowledgment number (NULL). It can be understood that after receiving acknowledgment packet 2, sender A completes the data transmission.

[0061] contrast Figure 5 and Figure 4 It can be observed that fast retransmission can initiate the retransmission of lost data packet 1 without waiting for the timeout period to expire. Fast retransmission is highly efficient, and should be used whenever possible to avoid timeout retransmission when data packet loss occurs. However, the existing fast retransmission method has limited applicability: on the one hand, when the tail packet is lost, the receiving end cannot receive the packet and therefore cannot generate an acknowledgment message. The sending end also cannot determine the receiving end's reception status through the acknowledgment message and can only wait for the timeout before initiating retransmission. On the other hand, if the retransmitted data packet is lost again, fast retransmission cannot be initiated again, and a timeout retransmission is the only option. Therefore, packet loss retransmission is inefficient in these two scenarios and needs improvement.

[0062] For example, such as Figure 6 As shown, in related technologies, the transmission process in which tail packet data loss occurs includes: Step 1: Sender A continuously sends data packet 1 and data packet 2. Data packet 1 has a sequence number of 0 and a length of 100. Data packet 2 has a sequence number of 100 and a length of 100. Step 2: Receiver B receives data packet 1 and replies with response packet 1. The response packet 1 carries a response number of 100 and an empty selection response number. Step 3: Data packet 2 is lost during transmission as the tail packet. After waiting for the timeout period RTO, the sending end A determines that data packet 2 is lost and retransmits data packet 2.

[0063] Step 4: After receiving the retransmitted data packet 2, receiver B replies with acknowledgment packet 2. Acknowledgment packet 2 carries an acknowledgment number of 200 and a null select acknowledgment number (NULL). It can be understood that after receiving acknowledgment packet 2, sender A completes the data transmission.

[0064] from Figure 6 As can be seen, when a tail packet is lost, the receiving end cannot receive the packet and therefore cannot generate an acknowledgment packet. The sending end also cannot determine the receiving end's reception status through the acknowledgment packet. It can only wait for the timeout before initiating a retransmission, resulting in low retransmission efficiency.

[0065] For example, such as Figure 7 As shown, in related technologies, the transmission process for retransmitted packets that are lost again includes: Step 1: Sender A continuously sends data packet 1 and data packet 2. Data packet 1 has a sequence number of 0 and a length of 100. Data packet 2 has a sequence number of 100 and a length of 100. Step 2, data packet 1 is lost; Step 3: Data packet 2 is received normally by receiver B, and receiver B replies with acknowledgment packet 1. The acknowledgment number carried in acknowledgment packet 1 is 0, and the selected acknowledgment number is [100, 200]. Step 4: When the sending end A receives the acknowledgment message 1, it determines that the acknowledgment number has not increased, and based on the selected acknowledgment number, it determines that data message 1 is lost, and retransmits data message 1. In this data message 1, the sequence number of the message is 0, and the transmission length is 100. Step 5, data packet 1 is lost again; Step 6: The sending end A can only wait for the timeout period RTO to end before retransmitting data packet 1. In data packet 1, the sequence number is 0 and the transmission length is 100. Step 7: Receiver B receives data packet 1 and replies with response packet 2. The response packet 2 carries a response number of 200 and an empty selection response number.

[0066] from Figure 7 It can be seen that when a retransmitted data packet is lost again, it is impossible to initiate a fast retransmission again. Instead, it can only wait for a timeout and retransmit, resulting in low retransmission efficiency of the data packet.

[0067] To address the problem of low retransmission efficiency in cases of tail packet loss and retransmitted data packet loss in at least one of the following situations, this application proposes a packet loss retransmission control method, device, and computer-readable storage medium.

[0068] It should be noted that, in response to the problem of low retransmission efficiency after tail packet loss in related technologies, the packet loss retransmission control method provided in this application improves the packet loss detection efficiency of data packets, including tail packets, by adding the maximum sequence number of the data packets already sent by the local end to the peer end to the acknowledgment message, so as to trigger the retransmission of data packets, including tail packets, as early as possible, thereby improving the retransmission efficiency of data packets, including tail packets. In response to the problem of low retransmission efficiency after retransmitted data packets are lost again in related technologies, the packet loss retransmission control method provided in this application records the maximum sequence number of the data packets sent when retransmission occurs as the packet loss recovery number (Recover_Point, RP) at the sending end (such as the first device). After the sending end completes the retransmission of the lost data, it will continue to send new data packets after the RP. Subsequently, when the sending end receives an acknowledgment number exceeding the sequence number of the RP, it can quickly determine that the retransmitted data packet has been lost again and needs to be retransmitted quickly again, thereby improving the retransmission efficiency after the retransmitted data packet is lost again.

[0069] In summary, the packet loss retransmission control method proposed in this application can reduce timeout retransmissions and use fast retransmissions as much as possible, thereby achieving more timely and efficient recovery of lost packet data. The following is a detailed description in conjunction with the accompanying drawings.

[0070] It should be noted that, Figure 9 , Figure 10 , Figure 11 , Figure 12 and Figure 15 The packet loss retransmission control method proposed in the illustrated embodiment is applicable to... Figure 8A The scenario shown illustrates the bidirectional transmission of data packets between the first device 81 and the second device 82. Figure 16 , Figure 17 and Figure 18 The packet loss retransmission control method proposed in the illustrated embodiment can be applied to... Figure 8A The bidirectional data transmission scenario shown can also be applied to Figure 8B The scenario shown illustrates a one-way transmission of data packets from the first device 81 to the second device 82.

[0071] like Figure 8AAs shown, in a scenario where the first device 81 and the second device 82 transmit data packets bidirectionally, the first device 81 needs to send data A (DATA_A) to the second device 82, and the second device 82 also needs to send data B (DATA_B) to the first device 81. The roles of the first device 81 and the second device 82 can be interchanged. Specifically, the first device 81 sends data A to the second device 82 through network interface card 1, a switch, and network interface card 2, while the second device 82 sends data B to the first device 81 through network interface card 2, a switch, and network interface card 1. Furthermore, in this bidirectional data transmission scenario, both the first device 81 and the second device 82 function as both senders and receivers; that is, they can send both data packets and acknowledgment packets, and they can also receive both acknowledgment packets and data packets.

[0072] like Figure 8B As shown, in the scenario where the first device 81 transmits data packets unidirectionally to the second device 82, the first device 81, as the data sender, has the function of sending data packets and receiving response packets, and the second device, as the data receiver, has the function of receiving data packets and sending response packets.

[0073] like Figure 9 As shown, an embodiment of this application provides a packet loss retransmission control method, which can be applied to a first device. The method may include: Step 901: Receive a first response message from the second device in response to a data packet from the first device, wherein the first response message carries a first maximum sequence number, which is the maximum sequence number of the data packets sent by the second device to the first device.

[0074] In some embodiments, after receiving a data packet from the first device, the second device adds a sequence number field to the reply response message (such as the first response message) in addition to carrying the regular response number and selection response number. The value of the sequence number field is the first maximum sequence number, which represents the maximum sequence number of the data packets that the second device has sent to the first device.

[0075] Step 902: Determine whether the first maximum sequence number and the second maximum sequence number are consistent, wherein the second maximum sequence number is the maximum sequence number of the data packets received by the first device from the second device.

[0076] In some embodiments, if the first maximum sequence number is greater than the second maximum sequence number, then step 903 is executed. In other embodiments, if the first maximum sequence number is less than or equal to the second maximum sequence number, then it is determined that the first device has successfully received all data packets sent by the second device.

[0077] Specifically, if the first maximum sequence number is equal to the second maximum sequence number, it means that all data packets sent by the second device to the first device have been successfully received, which is normal, and the first device does not need to perform any additional processing; if the first maximum sequence number is less than the second maximum sequence number, the first device can determine that the response message sent by the second device is delayed relative to the actual received data packets, and there is an out-of-order situation in the network, and the first device also does not need to perform any additional processing.

[0078] Step 903: If the first maximum sequence number is greater than the second maximum sequence number, send a first duplicate response message with the response number of the second maximum sequence number to the second device to trigger the second device to retransmit the lost packet message.

[0079] In some embodiments, to avoid repeatedly sending the first duplicate response message, resulting in a large number of response messages being transmitted in the network and reducing network transmission efficiency, additional [measures can be added]. Figure 9 The exit mechanism of the method shown exits if, within a timeout period, the number of duplicate responses caused by out-of-order responses (such as the first response message) exceeds a preset threshold. Figure 9 The method shown employs a conventional data transmission process. For example, in step 903, sending a first duplicate response message with the response number of the second maximum sequence number to the second device may include: Within a preset timeout period, determine whether the number of first duplicate response messages with the second maximum sequence number sent exceeds a preset threshold. If the number of first duplicate response messages sent within the preset timeout period does not exceed the preset threshold, the first duplicate response message is sent to the second device. If the number of first duplicate response messages sent within the preset timeout period exceeds the preset threshold, the first duplicate response messages will no longer be sent.

[0080] It's understandable that if the lost packet is a tail packet data message, then... Figure 9 The method shown enables the first device to quickly determine whether the tail packet data message sent by the second device has been lost. Then, by sending a first duplicate acknowledgment message with the acknowledgment number of the second maximum sequence number to the second device, the second device is triggered to quickly retransmit the lost tail packet data message, instead of waiting for the timeout period to expire. Therefore, the retransmission efficiency of the tail packet data message sent by the second device to the first device after packet loss can be improved.

[0081] Optionally, such as Figure 10 As shown in the embodiments of this application, a packet loss retransmission control method may further include: Step 904: Send a second response message to the second device in response to the data packet from the second device, wherein the second response message carries a third maximum sequence number, which is the maximum sequence number of the data packet sent by the first device to the second device.

[0082] Step 905: Receive a second duplicate response message sent by the second device, wherein the second duplicate response message carries a fourth maximum sequence number, the fourth maximum sequence number being the maximum sequence number of the data packets received by the second device from the first device, and the second duplicate response message is sent by the second device when the third maximum sequence number is greater than the fourth maximum sequence number.

[0083] Step 906: In response to the second duplicate acknowledgment message, retransmit the lost first data packet to the second device.

[0084] In some embodiments, the first data packet includes a tail packet. It can be understood that if the first data packet is a tail packet, then... Figure 10 The method shown enables the second device to quickly determine whether the tail packet data message sent by the first device has been lost. Then, by sending a second duplicate acknowledgment message with the fourth largest sequence number to the first device, the first device is triggered to quickly retransmit the lost tail packet data message, instead of waiting for the timeout period to expire. Therefore, the retransmission efficiency of the tail packet data message sent by the first device to the second device after packet loss can be improved.

[0085] like Figure 11 As shown, an embodiment of this application provides a packet loss retransmission control method, which can be applied to a first device. The method may include: Step 1101: Send a second response message to the second device in response to the data packet from the second device, wherein the second response message carries a third maximum sequence number, which is the maximum sequence number of the data packet sent by the first device to the second device.

[0086] The third maximum sequence number can be used by the second device to quickly detect whether the data packet sent to the first device is lost, thereby triggering the first device to quickly retransmit the lost tail packet data packet, instead of waiting for the timeout period to expire before retransmitting the lost tail packet data packet. Therefore, the retransmission efficiency of the tail packet data packet sent by the first device to the second device after packet loss can be improved.

[0087] Optionally, such as Figure 12 As shown, an embodiment of this application provides a packet loss retransmission control method, which can be applied to a first device. The method may further include: Step 1102: Receive a second duplicate response message sent by the second device, wherein the second duplicate response message carries a fourth maximum sequence number, the fourth maximum sequence number being the maximum sequence number of the data packets received by the second device from the first device, and the second duplicate response message is sent by the second device when the third maximum sequence number is greater than the fourth maximum sequence number.

[0088] Step 1103: In response to the second duplicate acknowledgment message, retransmit the lost first data packet to the second device.

[0089] In some embodiments, the first data packet includes a tail packet. It can be understood that if the first data packet is a tail packet, then... Figure 12 The method shown enables the second device to quickly determine whether the tail packet data message sent by the first device has been lost. Then, by sending a second duplicate acknowledgment message with the fourth largest sequence number to the first device, the first device is triggered to quickly retransmit the lost tail packet data message, instead of waiting for the timeout period to expire. Therefore, the retransmission efficiency of the tail packet data message sent by the first device to the second device after packet loss can be improved.

[0090] The following is through Figure 13 The example shown is for Figure 12 The packet loss retransmission control method described above will be illustrated with an example. For instance... Figure 13 As shown: In step 1, the first device 81 sends a data packet A1 to the second device 82, wherein the data packet A1 carries a sequence number of N1 and a transmission length of L1; the first device 81 updates the third maximum sequence number to N2=N1+L1 and confirms the second maximum sequence number as m1; the second device 82 sends a data packet B1 to the first device 81, wherein the data packet B1 carries a sequence number of m1 and a transmission length of l1; the second device 82 updates the first maximum sequence number to m2=m1+l1 and confirms the fourth maximum sequence number as N1.

[0091] Wherein, the first maximum sequence number represents the maximum sequence number of the data packet sent by the second device 82 to the first device 81, the second maximum sequence number represents the maximum sequence number of the data packet received by the first device 81 from the second device 82, the third maximum sequence number represents the maximum sequence number of the data packet sent by the first device 81 to the second device 82, and the fourth maximum sequence number represents the maximum sequence number of the data packet received by the second device 82 from the first device 81.

[0092] In step 2, the first device 81 receives data packet B1, determines the third maximum sequence number as N2, confirms that the second maximum sequence number is updated to m2=m1+l1, and replies to the second device 82 with a second response packet. The second response packet carries the third maximum sequence number as N2, the response number (ACK) as m2, and the selected response number (SACK) as empty. The second device 82 determines the first maximum sequence number as m2 and confirms that the fourth maximum sequence number is N1.

[0093] In step 3, the first device 81 determines the third maximum sequence number as N2 and confirms the second maximum sequence number as m2; the second device 82 receives the second response message, and the second device 82 determines the first maximum sequence number as m2 based on the second response message and confirms the fourth maximum sequence number as N1. If the third maximum sequence number is greater than the fourth maximum sequence number (N2>N1), the second device 82 replies to the first device 81 with a second duplicate response message, wherein the second duplicate response message carries the first maximum sequence number as m2, carries the response number as N1 (the response number remains unchanged), and carries an empty selection response number; if the third maximum sequence number is less than or equal to the fourth maximum sequence number (N2≤N1), the second device does not perform any additional processing.

[0094] In step 4, the first device 81 determines that the third maximum sequence number is N2 and confirms that the second maximum sequence number is m2; the first device 81 receives the second duplicate response message, determines that the response number in it has not changed, and retransmits the data message A1 to the second device 82.

[0095] It is understandable that if data packet A1 is a tail packet data packet, then... Figure 13 The method shown enables the second device 82 to quickly determine whether the tail packet data message A1 sent by the first device has been lost. Then, by sending a second duplicate acknowledgment message with acknowledgment number N1 to the first device 81, the first device 81 is triggered to quickly retransmit the lost tail packet data message A1, instead of waiting for the timeout period of the tail packet data message A1 to expire before retransmitting the lost tail packet data message A1. Therefore, the retransmission efficiency of the tail packet data message A1 sent by the first device 81 to the second device 82 after packet loss can be improved.

[0096] Next, we will proceed through... Figure 14 The example shown is for Figure 12 The packet loss retransmission control method described above will be illustrated with an example. For instance... Figure 14 As shown: Step 1: The first device 81 continuously sends data packet A1 and data packet A2, wherein the sequence number of data packet A1 is 0 and the sending length is 100, and the sequence number of data packet A2 is 100 and the sending length is 100.

[0097] Step 2, data packet A2 is lost.

[0098] Step 3: The second device 82 receives data packet A1 and replies with response packet B1 (i.e., the first response packet). Response packet B1 contains a first maximum sequence number, a response number, and a selection response number. The first maximum sequence number represents the maximum sequence number of the data packet that the second device 82 has sent to the first device 81. In response packet B1, the first maximum sequence number is 0, the response number is 100, and the selection response number is empty.

[0099] Step 4: The second device 82 sends data packet B1 to the first device 81, wherein the sequence number of data packet B1 is 0 and the sending length is 50.

[0100] Step 5: The first device 81 receives data packet B1 and replies with a second response packet A1. The second response packet A1 contains a third maximum sequence number, a response number, and a selection response number. The third maximum sequence number in the second response packet A1 is 200, the response number is 50, and the selection response number is empty. The third maximum sequence number represents the maximum sequence number of the data packets that the first device 81 has sent to the second device 82.

[0101] Step 6: The second device 82 receives the second response message A1. The response number in the second response message A1 is 50. The second device 82 determines that the sent data message B1 has been received normally based on the response number in the second response message A1. The third maximum sequence number in the second response message A1 is 200, while the sequence number of the message that the second device 82 has confirmed receiving is 100, indicating that there is packet loss in the messages between 100 and 200 sent by the first device 81. Therefore, the second device 82 constructs a duplicate response message B2 (i.e., the first duplicate response message). The duplicate response message B2 contains the first maximum sequence number, the response number, and the selection acknowledgment number. The response number in the duplicate response message B2 remains unchanged at 100. The first maximum sequence number in the duplicate response message B2 is the maximum sequence number of the data message that the second device 82 has sent, which is 50. The selection acknowledgment number is empty.

[0102] Step 7: The first device 81 receives the duplicate acknowledgment message B2. The first device 81 determines that the acknowledgment number in the duplicate acknowledgment message B2 is 100, which is not an increase compared to the acknowledgment number of the previous acknowledgment message B1. Therefore, it is a duplicate acknowledgment, and the first device 81 determines that the data packet A2 is lost. The first device 81 retransmits the data packet A2, wherein the sequence number of the data packet A2 is 100 and the transmission length is 100. Step 8: The second device 82 receives data packet A2 and replies with response packet B3. In response packet B, the first maximum sequence number is 50, the response number is 200, and the selected response number is empty.

[0103] pass Figure 14 As shown in the process, the first device 81 completed the transmission of data packets A1 and A2. From Figure 14It can be seen that by carrying the third maximum sequence number in the second response message A1 sent by the first device 81 to the second device 82, the second device 82 can quickly determine whether the tail packet data message A2 sent by the first device 81 has been lost. Thus, by sending a duplicate response message B2 with response number 50 to the first device 81, the first device 81 is triggered to quickly retransmit the lost tail packet data message A2, instead of waiting for the timeout period of the tail packet data message A2 to expire before retransmitting the lost tail packet data message A2. Therefore, the retransmission efficiency of the tail packet data message A2 sent by the first device 81 to the second device 82 after packet loss can be improved.

[0104] Optionally, such as Figure 15 As shown, an embodiment of this application provides a packet loss retransmission control method, which can be applied to a first device. The method may further include: Step 1104: Receive a first response message sent by the second device in response to a data packet from the first device, wherein the first response message carries a first maximum sequence number, which is the maximum sequence number of the data packets sent by the second device to the first device.

[0105] In some embodiments, after receiving a data packet from the first device, the second device adds a sequence number field to the reply response message (such as the first response message) in addition to carrying the regular response number and selection response number. The value of the sequence number field is the first maximum sequence number, which represents the maximum sequence number of the data packets that the second device has sent to the first device.

[0106] Step 1105: Determine whether the first maximum sequence number and the second maximum sequence number are consistent, wherein the second maximum sequence number is the maximum sequence number of the data packets received by the first device from the second device.

[0107] In some embodiments, if the first maximum sequence number is greater than the second maximum sequence number, then step 903 is executed. In other embodiments, if the first maximum sequence number is less than or equal to the second maximum sequence number, then it is determined that the first device has successfully received all data packets sent by the second device.

[0108] Specifically, if the first maximum sequence number is equal to the second maximum sequence number, it means that all data packets sent by the second device to the first device have been successfully received, which is normal, and the first device does not need to perform any additional processing; if the first maximum sequence number is less than the second maximum sequence number, the first device can determine that the response message sent by the second device is delayed relative to the actual received data packets, and there is an out-of-order situation in the network, and the first device also does not need to perform any additional processing.

[0109] Step 1106: If the first maximum sequence number is greater than the second maximum sequence number, send a first duplicate response message with the response number of the second maximum sequence number to the second device to trigger the second device to retransmit the lost packet message.

[0110] In some embodiments, to avoid repeatedly sending the first duplicate response message, resulting in a large number of response messages being transmitted in the network and reducing network transmission efficiency, additional [measures can be added]. Figure 15 The exit mechanism of the method shown exits if, within a timeout period, the number of duplicate responses caused by out-of-order responses (such as the first response message) exceeds a preset threshold. Figure 15 The method shown employs a conventional data transmission process. For example, in step 1106, sending a first duplicate response message with the response number of the second maximum sequence number to the second device may include: Within a preset timeout period, determine whether the number of first duplicate response messages with the second maximum sequence number sent exceeds a preset threshold. If the number of first duplicate response messages sent within the preset timeout period does not exceed the preset threshold, the first duplicate response message is sent to the second device. If the number of first duplicate response messages sent within the preset timeout period exceeds the preset threshold, the first duplicate response messages will no longer be sent.

[0111] It's understandable that if the lost packet is a tail packet data message, then... Figure 15 The method shown can also enable the first device to quickly determine whether the tail packet data message sent by the second device has been lost. Then, by sending a first duplicate acknowledgment message with the acknowledgment number of the second maximum sequence number to the second device, the second device is triggered to quickly retransmit the lost tail packet data message, instead of waiting for the timeout period to expire before retransmitting the lost tail packet data message. Therefore, the retransmission efficiency of the tail packet data message sent by the second device to the first device after packet loss can be improved.

[0112] like Figure 16 As shown, another embodiment of this application provides a packet loss retransmission control method, which can be applied to a first device. It should be noted that... Figure 16 The method shown can be used as a standalone embodiment, or it can be... Figure 9 , Figure 10 , Figure 11 , Figure 12 and Figure 15 This is a further improved embodiment of the packet loss retransmission control method proposed in any of the embodiments.

[0113] like Figure 16As shown, another embodiment of this application provides a packet loss retransmission control method, which may include: Step 1601: In response to retransmitting the second data packet to the second device, update the packet loss recovery number recorded locally, wherein the packet loss recovery number is the maximum sequence number of the data packets sent by the first device to the second device.

[0114] Step 1602: Send a third data packet to the second device and receive a third response packet from the second device in response to the third data packet, wherein the maximum sequence number of the third data packet is greater than the packet loss recovery number, and the third response packet carries a response number and a selection acknowledgment number.

[0115] Step 1603: Determine whether the maximum value in the selected confirmation number exceeds the packet loss recovery number; if yes, proceed to step 1604; otherwise, no additional processing is performed.

[0116] Step 1604: In response to the fact that the maximum value in the selected acknowledgment number exceeds the packet loss recovery number, and the acknowledgment number carried in the third acknowledgment message has not increased relative to the acknowledgment number carried in the previously received acknowledgment message, it is determined that the retransmission of the second data packet has failed, and the second data packet is retransmitted again.

[0117] It is understandable that the first device, as the data sender, additionally records a packet loss recovery number locally. This packet loss recovery number is the maximum sequence number of the data packets already sent by the first device to the second device. The first device then sends a third data packet with a maximum sequence number greater than the packet loss recovery number to the second device and receives a third response packet from the second device for the third data packet. This third response packet carries an acknowledgment number and a selection confirmation number. The device then determines whether the maximum value in the selection confirmation number exceeds the packet loss recovery number. If the maximum value in the selection confirmation number exceeds the packet loss recovery number, and the acknowledgment number carried in the third response packet is not larger than the acknowledgment number carried in the previously received acknowledgment packet, it indicates that the retransmission of the second data packet has failed. The second data packet can be retransmitted immediately without waiting for the retransmission timeout to expire. Therefore, this improves the retransmission efficiency of the second data packet retransmitted by the first device to the second device after it is lost again.

[0118] Optionally, such as Figure 17 As shown in the embodiments of this application, a packet loss retransmission control method may further include: Step 1605: Receive a first response message from the second device in response to a data packet from the first device, wherein the first response message carries a first maximum sequence number, which is the maximum sequence number of the data packets sent by the second device to the first device.

[0119] In some embodiments, after receiving a data packet from the first device, the second device adds a sequence number field to the reply response message (such as the first response message) in addition to carrying the regular response number and selection response number. The value of the sequence number field is the first maximum sequence number, which represents the maximum sequence number of the data packets that the second device has sent to the first device.

[0120] Step 1606: Determine whether the first maximum sequence number and the second maximum sequence number are consistent, wherein the second maximum sequence number is the maximum sequence number of the data packets received by the first device from the second device.

[0121] In some embodiments, if the first maximum sequence number is greater than the second maximum sequence number, then step 1607 is executed. In other embodiments, if the first maximum sequence number is less than or equal to the second maximum sequence number, then it is determined that the first device has successfully received all data packets sent by the second device.

[0122] Specifically, if the first maximum sequence number is equal to the second maximum sequence number, it means that all data packets sent by the second device to the first device have been successfully received, which is normal, and the first device does not need to perform any additional processing; if the first maximum sequence number is less than the second maximum sequence number, the first device can determine that the response message sent by the second device is delayed relative to the actual received data packets, and there is an out-of-order situation in the network, and the first device also does not need to perform any additional processing.

[0123] Step 1607: If the first maximum sequence number is greater than the second maximum sequence number, send a first duplicate response message with the response number of the second maximum sequence number to the second device to trigger the second device to retransmit the lost packet message.

[0124] In some embodiments, to avoid repeatedly sending the first duplicate response message, resulting in a large number of response messages being transmitted in the network and reducing network transmission efficiency, an additional exit mechanism can be added. If, within a timeout period, the number of duplicate responses caused by out-of-order responses (such as the first response message) exceeds a preset threshold, then step 1607 is exited, and the conventional data transmission process is adopted. In this case, for example, sending the first duplicate response message with the response number of the second maximum sequence number to the second device in step 1607 may include: Within a preset timeout period, determine whether the number of first duplicate response messages with the second maximum sequence number sent exceeds a preset threshold. If the number of first duplicate response messages sent within the preset timeout period does not exceed the preset threshold, the first duplicate response message is sent to the second device. If the number of first duplicate response messages sent within the preset timeout period exceeds the preset threshold, the first duplicate response messages will no longer be sent.

[0125] It's understandable that if the lost packet is a tail packet data message, then... Figure 17 The method shown enables the first device to quickly determine whether the tail packet data message sent by the second device has been lost. Then, by sending a first duplicate acknowledgment message with the acknowledgment number of the second maximum sequence number to the second device, the second device is triggered to quickly retransmit the lost tail packet data message, instead of waiting for the timeout period to expire. Therefore, the retransmission efficiency of the tail packet data message sent by the second device to the first device after packet loss can be improved.

[0126] Optionally, such as Figure 18 As shown in the embodiments of this application, a packet loss retransmission control method may further include: Step 1608: Send a second response message to the second device in response to the data packet from the second device, wherein the second response message carries a third maximum sequence number, which is the maximum sequence number of the data packet sent by the first device to the second device.

[0127] Step 1609: Receive a second duplicate response message sent by the second device, wherein the second duplicate response message carries a fourth maximum sequence number, the fourth maximum sequence number being the maximum sequence number of the data packets received by the second device from the first device, and the second duplicate response message is sent by the second device when the third maximum sequence number is greater than the fourth maximum sequence number.

[0128] Step 1610: In response to the second duplicate acknowledgment message, retransmit the lost first data packet to the second device.

[0129] In some embodiments, the first data packet includes a tail packet. It can be understood that if the first data packet is a tail packet, then... Figure 18 The method shown enables the second device to quickly determine whether the tail packet data message sent by the first device has been lost. Then, by sending a second duplicate acknowledgment message with the fourth largest sequence number to the first device, the first device is triggered to quickly retransmit the lost tail packet data message, instead of waiting for the timeout period to expire. Therefore, the retransmission efficiency of the tail packet data message sent by the first device to the second device after packet loss can be improved.

[0130] The following is through Figure 19 The example shown is for Figure 16 The packet loss retransmission control method described above will be illustrated with an example. For instance... Figure 19As shown, the packet loss retransmission control method may specifically include: In step 1, the first device 81 receives an acknowledgment message from the second device 82. The acknowledgment message carries a first maximum sequence number of m2, an acknowledgment number (ACK) of N1, and a blank select acknowledgment number (SACK). Based on the acknowledgment message, the first device 81 determines that the acknowledgment number has not increased, and therefore retransmits data packet 1 with sequence number N1 and transmission length L1. Furthermore, the first device 81 updates the third maximum sequence number to N2 = N1 + L1, confirms the second maximum sequence number as m2, and records the packet loss recovery number RP = N2. At this time, the second device 82 updates the first maximum sequence number to m2 and confirms the fourth maximum sequence number as N1.

[0131] Wherein, the first maximum sequence number represents the maximum sequence number of the data packet sent by the second device 82 to the first device 81, the second maximum sequence number represents the maximum sequence number of the data packet received by the first device 81 from the second device 82, the third maximum sequence number represents the maximum sequence number of the data packet sent by the first device 81 to the second device 82, and the fourth maximum sequence number represents the maximum sequence number of the data packet received by the second device 82 from the first device 81.

[0132] In step 2, the first device 81 continues to send data packet 2 to the second device 82, wherein the sequence number of data packet 2 is N2 and the sending length is L2; ​​at this time, the first device 81 updates the third maximum sequence number to N3=N2+L2, confirms the second maximum sequence number as m2, and records the packet loss recovery number RP=N2; at this time, the second device 82 updates the first maximum sequence number to m2 and confirms the fourth maximum sequence number as N1.

[0133] In step 3, the first device 81 determines that the third maximum sequence number is N3 = N2 + L2, confirms that the second maximum sequence number is m2, and determines that the packet loss recovery number RP = N2; the second device 82 receives data packet 2 and replies with a third response packet. The first maximum sequence number in the third response packet is m2, the response number remains unchanged at N1, and the response number is selected as [N2, N3]; at this time, the second device 82 determines that the first maximum sequence number is still m2, and confirms that the fourth maximum sequence number is still N1.

[0134] In step 4, the first device 81 receives a third acknowledgment message. Since the maximum value of the selection acknowledgment number in the third acknowledgment message exceeds the packet loss recovery number (N3 > N2), and the acknowledgment number carried in the third acknowledgment message has not increased compared to the acknowledgment number carried in the previously received acknowledgment message (it is still N1), it is determined that the retransmission of data packet 1 has failed, and data packet 1 is quickly retransmitted again. It can be understood that because data packet 2 after the packet loss recovery number RP was sent after retransmitted data packet 1, and the later-sent data packet 2 has been received, but the earlier-sent retransmitted data packet 1 has not yet been received, it proves that retransmitted data packet 1 has been lost.

[0135] pass Figure 19 The packet loss retransmission control process shown can improve the retransmission efficiency of data packet 1 that has been lost again.

[0136] Next, we will proceed through... Figure 20 The example shown is for Figure 16 The packet loss retransmission control method described above will be illustrated with an example. For instance... Figure 20 As shown, the packet loss retransmission control method may specifically include: Step 1: The first device 81 sends data packet 1 with sequence number 0 and length 100. At this time, the maximum sequence number sent by the first device 81—the third maximum sequence number—is 100, and the maximum sequence number of the received data packet—the second maximum sequence number—is 0. Since no packet loss has occurred at this time, the packet loss recovery number RP is empty.

[0137] Step 2: The first device 81 continues to send data packet 2 with sequence number 100 and length 100. At this time, the maximum sequence number sent by the first device 81—the third maximum sequence number—is 200, the maximum sequence number of the received data packet—the second maximum sequence number—is 0, and the packet loss recovery number RP is still empty.

[0138] Step 3: Data packet 1 is lost during transmission.

[0139] Step 4: The second device 82 receives data packet 2 and then replies with response packet 1. The first maximum sequence number in response packet 1 is 0, the response number is 0, and the selected response number is [100, 200]. At this time, the maximum sequence number that the second device 82 has sent—the first maximum sequence number—is 0, and the maximum sequence number of the data packet it has received—the fourth maximum sequence number—is 0.

[0140] Step 5: Upon receiving acknowledgment message 1, the first device 81 determines that the acknowledgment number has not changed, indicating that the acknowledgment message is a duplicate acknowledgment. It then retransmits data packet 1 with sequence number 0 and length 100, and simultaneously updates the packet loss recovery number RP to 200. At this point, the second device 82's maximum sequence number that has been sent—the first maximum sequence number—is 0, and the maximum sequence number of the data packets it has received—the fourth maximum sequence number—is 0.

[0141] Step 6: The first device 81 continues to send a new data packet 3, with sequence number 300 and length 10.

[0142] Step 7: The retransmitted data packet 1 is lost again.

[0143] Step 8: The second device 82 receives data packet 3 and replies with response packet 2. The first maximum sequence number in response packet 2 is 0, the response number is 0, and the selected response number is [100, 210].

[0144] Step 9: The first device 81 receives the response message 2, determines that the maximum value of the selection response field is greater than RP (210>200), and then determines that data message 1 has been lost again. It then retransmits data message 1 with sequence number 0 and length 100.

[0145] Step 10: The second device 82 receives data packet 1 and replies with response packet 3. The first maximum sequence number in response packet 3 is 0, the response number is 210, and the selected response number is empty.

[0146] pass Figure 20 As shown in the process, the first device 81 completed the transmission of data packet 1 and data packet 2. From Figure 20 As can be seen, the first device 81, as the data sender, can quickly determine that the retransmission of data packet 1 has failed by recording the maximum sequence number of the data packets sent by the first device 81 to the second device 82 as the packet loss recovery number RP, and combining it with the selection acknowledgment number and acknowledgment number in the response message 3 of the subsequently sent data packet 2. Data packet 1 can be retransmitted immediately without waiting for the retransmission timeout to expire. Therefore, the retransmission efficiency of data packet 1 retransmitted by the first device 81 to the second device 82 after packet loss can be improved.

[0147] The foregoing has described specific embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0148] Figure 21 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Please refer to it. Figure 21At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and memory. The memory may include main memory, such as high-speed random-access memory (RAM), or non-volatile memory, such as at least one disk drive. Of course, the electronic device may also include other hardware required for other business operations.

[0149] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 21 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0150] Memory is used to store programs. Specifically, programs may include program code, which includes computer operation instructions. Memory may include main memory and non-volatile memory, and provides instructions and data to the processor.

[0151] The processor reads the corresponding computer program from non-volatile memory into main memory and then runs it, forming a packet loss retransmission control mechanism at the logical level. The processor executes the program stored in memory and specifically performs the tasks... Figure 9 , Figure 10 , Figure 11 , Figure 12 , Figure 15 , Figure 16 , Figure 17 and Figure 18 The packet loss retransmission control method shown in any of the attached figures achieves the same technical effect and will not be described in detail here.

[0152] The above is as stated in this application. Figure 21The method executed by the packet loss retransmission control device disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0153] The electronic device can also perform Figure 9 , Figure 10 , Figure 11 , Figure 12 , Figure 15 , Figure 16 , Figure 17 and Figure 18 The packet loss retransmission control method shown in any of the accompanying drawings is described, and the functions of the packet loss retransmission control device in the corresponding embodiment are implemented. The embodiments of this application will not be described again here.

[0154] Of course, in addition to software implementation, the electronic device of this application does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. In other words, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0155] This application also proposes a computer-readable storage medium that stores one or more programs, the programs including instructions that, when executed by a portable electronic device comprising multiple target applications, enable the portable electronic device to perform... Figure 9 , Figure 10 , Figure 11 , Figure 12 , Figure 15 , Figure 16 , Figure 17 and Figure 18 The packet loss retransmission control method shown in any of the attached figures achieves the same technical effect and will not be described in detail here.

[0156] This application also proposes a computer program product including instructions, which, when executed by a computer, performs actions such as... Figure 9 , Figure 10 , Figure 11 , Figure 12 , Figure 15 , Figure 16 , Figure 17 and Figure 18 The packet loss retransmission control method shown in any of the attached figures achieves the same technical effect and will not be described in detail here.

[0157] The following describes a packet loss retransmission control device proposed in an embodiment of this application, which can be applied to a first device.

[0158] Figure 22 This is a schematic diagram of the structure of a packet loss retransmission control device 220 according to an embodiment of this application. Please refer to it. Figure 22 In one software implementation, the packet loss retransmission control device 220 may include: a first receiving module 221, a first determining module 222, and a repeat response module 223.

[0159] The first receiving module 221 is configured to receive a first response message sent by the second device in response to a data packet from the first device, wherein the first response message carries a first maximum sequence number, which is the maximum sequence number of the data packet sent by the second device to the first device.

[0160] In some embodiments, after receiving a data packet from the first device, the second device adds a sequence number field to the reply response message (such as the first response message) in addition to carrying the regular response number and selection response number. The value of the sequence number field is the first maximum sequence number, which represents the maximum sequence number of the data packets that the second device has sent to the first device.

[0161] The first determining module 222 is used to determine whether the first maximum sequence number and the second maximum sequence number are consistent, wherein the second maximum sequence number is the maximum sequence number of the data packets received by the first device from the second device.

[0162] In some embodiments, if the first maximum sequence number is greater than the second maximum sequence number, the first determining module 222 triggers the repeat response module 223. In other embodiments, if the first maximum sequence number is less than or equal to the second maximum sequence number, the device 220 determines that the first device has successfully received all data packets sent by the second device, and no additional processing is performed.

[0163] Specifically, if the first maximum sequence number is equal to the second maximum sequence number, it means that all data packets sent by the second device to the first device have been successfully received, which is normal, and the device 220 does not perform any additional processing; if the first maximum sequence number is less than the second maximum sequence number, the first device can determine that the response message sent by the second device is delayed relative to the actual received data packets, and there is an out-of-order situation in the network, and the device 220 also does not perform any additional processing.

[0164] The duplicate response module 223 is used to send a first duplicate response message with the response number of the second maximum sequence number to the second device when the first maximum sequence number is greater than the second maximum sequence number, so as to trigger the second device to retransmit the packet loss message.

[0165] In some embodiments, the repeat response module 223 may specifically be used for: Within a preset timeout period, determine whether the number of first duplicate response messages with the second maximum sequence number sent exceeds a preset threshold. If the number of first duplicate response messages sent within the preset timeout period does not exceed the preset threshold, the first duplicate response message is sent to the second device. If the number of first duplicate response messages sent within the preset timeout period exceeds the preset threshold, the first duplicate response messages will no longer be sent.

[0166] The packet loss retransmission control device 220 provided in this application embodiment can also perform... Figure 9 The method, and implementation Figure 9 The embodiments shown in this application have the same functions and achieve the same technical effects, and will not be described in detail here.

[0167] Optionally, such as Figure 23 As shown in the embodiment of this application, a packet loss retransmission control device 220 may further include: a first sending module 224, a second receiving module 225, and a first retransmission module 226.

[0168] The first sending module 224 is configured to send a second response message to the second device in response to a data packet from the second device, wherein the second response message carries a third maximum sequence number, which is the maximum sequence number of the data packet that the first device has sent to the second device.

[0169] The second receiving module 225 is used to receive a second duplicate response message sent by the second device, wherein the second duplicate response message carries a fourth maximum sequence number, the fourth maximum sequence number being the maximum sequence number of the data packets received by the second device from the first device, and the second duplicate response message is sent by the second device when the third maximum sequence number is greater than the fourth maximum sequence number.

[0170] The first retransmission module 226 is used to retransmit the lost first data packet to the second device in response to the second duplicate acknowledgment message.

[0171] The packet loss retransmission control device 220 provided in this application embodiment can also perform... Figure 10 The method, and implementation Figure 10 The embodiments shown in this application have the same functions and achieve the same technical effects, and will not be described in detail here.

[0172] Figure 24 This is a schematic diagram of the structure of a packet loss retransmission control device 240 according to an embodiment of this application. Please refer to... Figure 24 In one software implementation, the packet loss retransmission control device 240 may include: a first sending module 241.

[0173] The first sending module 241 is configured to send a second response message to the second device in response to a data packet from the second device, wherein the second response message carries a third maximum sequence number, which is the maximum sequence number of the data packet that the first device has sent to the second device.

[0174] The third maximum sequence number can be used by the second device to quickly detect whether the data packet sent to the first device is lost, thereby triggering the first device to quickly retransmit the lost tail packet data packet, instead of waiting for the timeout period to expire before retransmitting the lost tail packet data packet. Therefore, the retransmission efficiency of the tail packet data packet sent by the first device to the second device after packet loss can be improved.

[0175] Figure 24 The packet loss retransmission control device 240 provided in the illustrated embodiment can also perform... Figure 11 The method, and implementation Figure 11 The embodiments shown in this application have the same functions and achieve the same technical effects, and will not be described in detail here.

[0176] Optionally, such as Figure 25 As shown, the packet loss retransmission control device 240 provided in one embodiment of this application may further include: a second receiving module 242 and a first retransmission module 243.

[0177] The second receiving module 242 is used to receive a second duplicate response message sent by the second device, wherein the second duplicate response message carries a fourth maximum sequence number, the fourth maximum sequence number being the maximum sequence number of the data packets received by the second device from the first device, and the second duplicate response message is sent by the second device when the third maximum sequence number is greater than the fourth maximum sequence number.

[0178] The first retransmission module 243 is used to retransmit the lost first data packet to the second device in response to the second duplicate acknowledgment message.

[0179] In some embodiments, the first data packet includes a tail packet. It can be understood that if the first data packet is a tail packet, then... Figure 12 The method shown enables the second device to quickly determine whether the tail packet data message sent by the first device has been lost. Then, by sending a second duplicate acknowledgment message with the fourth largest sequence number to the first device, the first device is triggered to quickly retransmit the lost tail packet data message, instead of waiting for the timeout period to expire. Therefore, the retransmission efficiency of the tail packet data message sent by the first device to the second device after packet loss can be improved.

[0180] Figure 25 The packet loss retransmission control device 240 provided in the illustrated embodiment can also perform... Figure 12 The method, and implementation Figure 12 The embodiments shown in this application have the same functions and achieve the same technical effects, and will not be described in detail here.

[0181] Optionally, such as Figure 26 As shown, the packet loss retransmission control device 240 provided in one embodiment of this application may further include: a first receiving module 244, a first determining module 245, and a repeat response module 246.

[0182] The first receiving module 24 is configured to receive a first response message sent by the second device in response to a data packet from the first device, wherein the first response message carries a first maximum sequence number, which is the maximum sequence number of the data packet sent by the second device to the first device.

[0183] In some embodiments, after receiving a data packet from the first device, the second device adds a sequence number field to the reply response message (such as the first response message) in addition to carrying the regular response number and selection response number. The value of the sequence number field is the first maximum sequence number, which represents the maximum sequence number of the data packets that the second device has sent to the first device.

[0184] The first determining module 245 is used to determine whether the first maximum sequence number and the second maximum sequence number are consistent, wherein the second maximum sequence number is the maximum sequence number of the data packets received by the first device from the second device.

[0185] In some embodiments, if the first maximum sequence number is greater than the second maximum sequence number, the repeat response module 246 is triggered. In other embodiments, if the first maximum sequence number is less than or equal to the second maximum sequence number, it is determined that the first device has successfully received all data packets sent by the second device, and no additional processing is performed.

[0186] Specifically, if the first maximum sequence number is equal to the second maximum sequence number, it means that all data packets sent by the second device to the first device have been successfully received, which is normal, and the first device does not need to perform any additional processing; if the first maximum sequence number is less than the second maximum sequence number, the first device can determine that the response message sent by the second device is delayed relative to the actual received data packets, and there is an out-of-order situation in the network, and the first device also does not need to perform any additional processing.

[0187] The duplicate response module 246 is used to send a first duplicate response message with the response number of the second maximum sequence number to the second device when the first maximum sequence number is greater than the second maximum sequence number, so as to trigger the second device to retransmit the packet loss message.

[0188] In some embodiments, the repeat response module 246 can be specifically used for: Within a preset timeout period, determine whether the number of first duplicate response messages with the second maximum sequence number sent exceeds a preset threshold. If the number of first duplicate response messages sent within the preset timeout period does not exceed the preset threshold, the first duplicate response message is sent to the second device. If the number of first duplicate response messages sent within the preset timeout period exceeds the preset threshold, the first duplicate response messages will no longer be sent.

[0189] Figure 26 The packet loss retransmission control device 240 provided in the illustrated embodiment can also perform... Figure 15 The method, and implementation Figure 15The embodiments shown in this application have the same functions and achieve the same technical effects, and will not be described in detail here.

[0190] Figure 27 This is a schematic diagram of the structure of a packet loss retransmission control device 270 according to an embodiment of this application. Please refer to... Figure 27 In one software implementation, the packet loss retransmission control device 270 may include: a packet loss recording module 271, a sending and receiving module 272, a second determination module 273, and a second retransmission module 274.

[0191] The packet loss recording module 271 is used to update the locally recorded packet loss recovery number in response to retransmitting the second data packet to the second device, wherein the packet loss recovery number is the maximum sequence number of the data packet sent by the first device to the second device.

[0192] The sending and receiving module 272 is used to send a third data packet to the second device and receive a third response packet sent by the second device in response to the third data packet, wherein the maximum sequence number of the third data packet is greater than the packet loss recovery number, and the third response packet carries an acknowledgment number and a selection confirmation number.

[0193] The second determining module 273 is used to determine whether the maximum value in the selected confirmation number exceeds the packet loss recovery number.

[0194] The second retransmission module 274 is configured to respond to the fact that the maximum value in the selected acknowledgment number exceeds the packet loss recovery number, and the acknowledgment number carried in the third acknowledgment message has not increased relative to the acknowledgment number carried in the previously received acknowledgment message, determine that the retransmission of the second data packet has failed, and retransmit the second data packet again.

[0195] Figure 27 The packet loss retransmission control device 270 provided in the illustrated embodiment can also perform... Figure 16 The method, and implementation Figure 16 The embodiments shown in this application have the same functions and achieve the same technical effects, and will not be described in detail here.

[0196] Optionally, such as Figure 28 As shown in the embodiment of this application, a packet loss retransmission control device 270 may further include: a first receiving module 275, a first determining module 276, and a repeat response module 277.

[0197] The first receiving module 275 is configured to receive a first response message sent by the second device in response to a data packet from the first device, wherein the first response message carries a first maximum sequence number, which is the maximum sequence number of the data packet sent by the second device to the first device.

[0198] In some embodiments, after receiving a data packet from the first device, the second device adds a sequence number field to the reply response message (such as the first response message) in addition to carrying the regular response number and selection response number. The value of the sequence number field is the first maximum sequence number, which represents the maximum sequence number of the data packets that the second device has sent to the first device.

[0199] The first determining module 276 is used to determine whether the first maximum sequence number and the second maximum sequence number are consistent, wherein the second maximum sequence number is the maximum sequence number of the data packets received by the first device from the second device.

[0200] In some embodiments, if the first maximum sequence number is greater than the second maximum sequence number, the repeat response module 277 is triggered. In other embodiments, if the first maximum sequence number is less than or equal to the second maximum sequence number, it is determined that the first device has successfully received all data packets sent by the second device, and no additional processing is performed.

[0201] Specifically, if the first maximum sequence number is equal to the second maximum sequence number, it means that all data packets sent by the second device to the first device have been successfully received, which is normal, and the first device does not need to perform any additional processing; if the first maximum sequence number is less than the second maximum sequence number, the first device can determine that the response message sent by the second device is delayed relative to the actual received data packets, and there is an out-of-order situation in the network, and the first device also does not need to perform any additional processing.

[0202] The duplicate response module 277 is used to send a first duplicate response message with the response number of the second maximum sequence number to the second device when the first maximum sequence number is greater than the second maximum sequence number, so as to trigger the second device to retransmit the lost packet message.

[0203] In some embodiments, the repeat response module 277 may specifically be used for: Within a preset timeout period, determine whether the number of first duplicate response messages with the second maximum sequence number sent exceeds a preset threshold. If the number of first duplicate response messages sent within the preset timeout period does not exceed the preset threshold, the first duplicate response message is sent to the second device. If the number of first duplicate response messages sent within the preset timeout period exceeds the preset threshold, the first duplicate response messages will no longer be sent.

[0204] Figure 28 The packet loss retransmission control device 270 provided in the illustrated embodiment can also perform... Figure 17 The method, and implementation Figure 17The embodiments shown in this application have the same functions and achieve the same technical effects, and will not be described in detail here.

[0205] Optionally, such as Figure 29 As shown in the embodiment of this application, a packet loss retransmission control device 270 may further include: a first sending module 278, a second receiving module 279, and a first retransmission module 280.

[0206] The first sending module 278 is configured to send a second response message to the second device in response to a data packet from the second device, wherein the second response message carries a third maximum sequence number, which is the maximum sequence number of the data packet that the first device has sent to the second device.

[0207] The second receiving module 279 is configured to receive a second duplicate response message sent by the second device, wherein the second duplicate response message carries a fourth maximum sequence number, the fourth maximum sequence number being the maximum sequence number of the data packets received by the second device from the first device, and the second duplicate response message is sent by the second device when the third maximum sequence number is greater than the fourth maximum sequence number.

[0208] The first retransmission module 280 is used to retransmit the lost first data packet to the second device in response to the second duplicate acknowledgment message.

[0209] Figure 29 The packet loss retransmission control device 270 provided in the illustrated embodiment can also perform... Figure 18 The method, and implementation Figure 18 The embodiments shown in this application have the same functions and achieve the same technical effects, and will not be described in detail here.

[0210] In summary, the above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

[0211] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0212] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0213] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0214] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

Claims

1. A packet loss retransmission control method, characterized in that, Applied to a first device, the method includes: The device receives a first response message from the second device in response to a data packet from the first device, wherein the first response message carries a first maximum sequence number, which is the maximum sequence number of the data packet that the second device has sent to the first device. Determine whether the first maximum sequence number and the second maximum sequence number are consistent, wherein the second maximum sequence number is the maximum sequence number of the data packets received by the first device from the second device; If the first maximum sequence number is greater than the second maximum sequence number, a first duplicate response message with the response number of the second maximum sequence number is sent to the second device to trigger the second device to retransmit the lost packet message.

2. The method according to claim 1, characterized in that, The method further includes: Send a second response message to the second device in response to the data packet from the second device, wherein the second response message carries a third maximum sequence number, which is the maximum sequence number of the data packet that the first device has sent to the second device.

3. The method according to claim 2, characterized in that, The method further includes: The device receives a second duplicate response message sent by the second device, wherein the second duplicate response message carries a fourth maximum sequence number, the fourth maximum sequence number being the maximum sequence number of the data packets received by the second device from the first device, and the second duplicate response message is sent by the second device when the third maximum sequence number is greater than the fourth maximum sequence number; In response to the second duplicate acknowledgment message, the lost first data packet is retransmitted to the second device.

4. The method according to claim 3, characterized in that, The first data packet includes a tail packet data packet.

5. The method according to claim 1, characterized in that, Sending a first duplicate response message with the response number of the second maximum sequence number to the second device includes: Within a preset timeout period, determine whether the number of first duplicate response messages with the second maximum sequence number sent exceeds a preset threshold. If the number of first duplicate response messages sent within the preset timeout period does not exceed the preset threshold, the first duplicate response message is sent to the second device.

6. The method according to claim 5, characterized in that, The method further includes: If the number of first duplicate response messages sent within the preset timeout period exceeds the preset threshold, the first duplicate response messages will no longer be sent.

7. The method according to claim 1, characterized in that, The method further includes: If the first maximum sequence number is less than or equal to the second maximum sequence number, it is determined that the first device has successfully received all data packets sent by the second device.

8. The method according to any one of claims 1-7, characterized in that, The method further includes: In response to retransmitting the second data packet to the second device, the locally recorded packet loss recovery number is updated, wherein the packet loss recovery number is the maximum sequence number of the data packet sent by the first device to the second device; Send a third data packet to the second device and receive a third response packet from the second device in response to the third data packet, wherein the maximum sequence number of the third data packet is greater than the packet loss recovery number, and the third response packet carries a response number and a selection acknowledgment number; Determine whether the maximum value in the selected confirmation number exceeds the packet loss recovery number; If the maximum value in the selected acknowledgment number exceeds the packet loss recovery number, and the acknowledgment number carried in the third acknowledgment message has not increased relative to the acknowledgment number carried in the previously received acknowledgment message, it is determined that the retransmission of the second data packet has failed, and the second data packet is retransmitted again.

9. A packet loss retransmission control method, characterized in that, Applied to a first device, the method includes: Send a second response message to the second device in response to the data packet from the second device, wherein the second response message carries a third maximum sequence number, which is the maximum sequence number of the data packet that the first device has sent to the second device.

10. The method according to claim 9, characterized in that, The method further includes: The device receives a second duplicate response message sent by the second device, wherein the second duplicate response message carries a fourth maximum sequence number, the fourth maximum sequence number being the maximum sequence number of the data packets received by the second device from the first device, and the second duplicate response message is sent by the second device when the third maximum sequence number is greater than the fourth maximum sequence number; In response to the second duplicate acknowledgment message, the lost first data packet is retransmitted to the second device.

11. The method according to claim 9 or 10, characterized in that, The method further includes: In response to retransmitting the second data packet to the second device, the locally recorded packet loss recovery number is updated, wherein the packet loss recovery number is the maximum sequence number of the data packet sent by the first device to the second device; Send a third data packet to the second device and receive a third response packet from the second device in response to the third data packet, wherein the maximum sequence number of the third data packet is greater than the packet loss recovery number, and the third response packet also carries a response number and a selection acknowledgment number; Determine whether the maximum value in the selected confirmation number exceeds the packet loss recovery number; If the maximum value in the selected acknowledgment number exceeds the packet loss recovery number, and the acknowledgment number carried in the third acknowledgment message has not increased relative to the acknowledgment number carried in the previously received acknowledgment message, it is determined that the retransmission of the second data packet has failed, and the second data packet is retransmitted again.

12. A packet loss retransmission control method, characterized in that, Applied to a first device, the method includes: In response to retransmitting the second data packet to the second device, the locally recorded packet loss recovery number is updated, wherein the packet loss recovery number is the maximum sequence number of the data packet sent by the first device to the second device; Send a third data packet to the second device and receive a third response packet from the second device in response to the third data packet, wherein the maximum sequence number of the third data packet is greater than the packet loss recovery number, and the third response packet carries a response number and a selection acknowledgment number; Determine whether the maximum value in the selected confirmation number exceeds the packet loss recovery number; If the maximum value in the selected acknowledgment number exceeds the packet loss recovery number, and the acknowledgment number carried in the third acknowledgment message has not increased relative to the acknowledgment number carried in the previously received acknowledgment message, it is determined that the retransmission of the second data packet has failed, and the second data packet is retransmitted again.

13. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the method as described in any one of claims 1 to 12.

14. A computer-readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is able to perform the method as described in any one of claims 1 to 12.

15. A computer program product comprising instructions, characterized in that, When the computer executes the instructions of the computer program product, the computer performs the method as described in any one of claims 1 to 12.