Data packet retransmission method and device
By sending a target message from the receiving end to instruct the sending end to retransmit lost data packets, and using information such as bitmap indexes and sequence numbers for accurate retransmission, the Go-Back-N protocol solves the problem of redundant retransmission in wide-area lossy networks, thus improving data transmission efficiency and performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-03-10
AI Technical Summary
In RDMA technology, the Go-Back-N protocol leads to redundant retransmissions in wide-area lossy network scenarios, resulting in decreased throughput and network congestion, especially with low efficiency when channel quality is poor.
The receiving end instructs the sending end to retransmit lost data packets by sending a target message, and uses information such as bitmap index and sequence number to perform accurate retransmission, avoiding redundant retransmission.
It reduces bandwidth waste, avoids network congestion, and improves the efficiency of packet retransmission and overall transmission performance.
Smart Images

Figure CN121644008A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and in particular to a data packet retransmission method and apparatus. Background Technology
[0002] With the increasing demand for high-performance computing applications, Remote Direct Memory Access (RDMA) technology has become a research hotspot due to its ability to provide networks with high throughput, low latency, and low computational cost.
[0003] In RDMA technology, Go-Back-N is an Automatic Repeat Request (ARQ) protocol based on a sliding window, employing a cumulative acknowledgment mechanism. The sender can continuously send multiple packets (limited by the window size), and the receiver only receives packets in order and sends a cumulative ACK message (acknowledging the sequence number of the last correctly received packet). If a packet is lost or corrupted, the receiver discards the out-of-order packet without buffering it, and only retransmits the most recent valid ACK message. If the sender does not receive the expected ACK message within the timeout period, it will retransmit all sent but unacknowledged packets (starting from the first unacknowledged packet), even if subsequent packets have arrived correctly. This mechanism does not require the receiver to buffer out-of-order packets, but it can lead to a "snowball" effect: the loss of a single packet can trigger redundant retransmissions of a large number of subsequent packets, which is particularly inefficient when the channel quality is poor, making it suitable for network environments with low error rates.
[0004] In wide-area lossy network scenarios, there is a certain amount of queuing and packet loss, and the overall packet loss rate is much higher than in lossless network scenarios. If Go-Back-N is still used unchanged, it may lead to a large number of redundant retransmissions, which will result in a significant decrease in throughput or even transmission unavailability. Summary of the Invention
[0005] This invention provides a data packet retransmission method and apparatus to solve the defect in the prior art where data packet transmission easily leads to redundant retransmission.
[0006] In a first aspect, the present invention provides a data packet retransmission method applied at a receiving end, the method comprising: Send a target message to the sending end, the target message being used to indicate the lost target data packet; Receive the target data packet retransmitted by the sending end.
[0007] In one embodiment, sending the target message to the sender includes: If the target conditions are met, the target message is sent to the sending end; The target conditions include at least one of the following: Data packets are lost during the data packet reception period; Data packets are lost within the data packet reception length, where the reception length represents the number of data packets received; The number of lost data packets is greater than or equal to the loss threshold; Wake stream data packets were lost.
[0008] In one embodiment, the target message includes a bitmap index and a bitmap value corresponding to the bitmap index; The bitmap index corresponds to the data packet sequence number, and the bitmap value indicates whether a data packet has been received. The bitmap value corresponding to the target data packet indicates that no data packet was received.
[0009] In one embodiment, the target message further includes a base packet sequence number; The reference data packet sequence number indicates that a data packet with a sequence number preceding the reference data packet sequence number has been received.
[0010] In one embodiment, the target message further includes a trigger packet sequence number; The trigger data packet sequence number is the sequence number of the data packet that triggers the sending of the target message to the sending end.
[0011] Secondly, the present invention provides a data packet retransmission method applied at the sending end, the method comprising: Receive a target message sent by the receiving end, the target message being used to indicate a lost target data packet; The target data packet is retransmitted to the receiving end.
[0012] Thirdly, the present invention provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in the first or second aspect above.
[0013] Fourthly, the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first or second aspect above.
[0014] Fifthly, the present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the method described in the first or second aspect above.
[0015] The data packet retransmission method and apparatus provided by this invention enable the sending end to send a target message indicating the target data packet that needs to be retransmitted when the data packet is lost. This allows the sending end to retransmit the lost data packet in a targeted manner, thereby avoiding redundant retransmissions caused by the existing Go-Back-N mechanism. This significantly reduces the waste of bandwidth resources and effectively avoids network congestion. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in this invention 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 some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0017] Figure 1 This is one of the flowcharts of the data packet retransmission method provided by the present invention.
[0018] Figure 2 This is a schematic diagram of the target message header provided by the present invention.
[0019] Figure 3 This is the second flowchart of the data packet retransmission method provided by the present invention.
[0020] Figure 4 This is one of the structural schematic diagrams of the data packet retransmission device provided by the present invention.
[0021] Figure 5 This is the second schematic diagram of the data packet retransmission device provided by the present invention.
[0022] Figure 6 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0024] In this application, "at least one" means one or more. "More than one" means two or more. The descriptions of "first," "second," etc., appearing in the embodiments of this application are only for illustration and to distinguish the described objects, and have no order, nor do they indicate a special limitation on the number in the embodiments of this application, and cannot constitute any limitation on the embodiments of this application.
[0025] In this application, terms such as "exemplary," "in some embodiments," and "in other embodiments" are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Rather, the term "exemplary" is used to present the concept in a specific manner.
[0026] Figure 1 This is one of the flowcharts illustrating the data packet retransmission method provided by this invention, such as... Figure 1 As shown, the method may include the following steps: Step 110: The receiving end sends a target message to the sending end; correspondingly, the sending end receives the target message, wherein the target message is used to indicate the lost target data packet.
[0027] Step 120: The sending end determines the target data packet based on the target message and retransmits the target data packet to the receiving end; correspondingly, the receiving end receives the retransmitted target data packet.
[0028] Specifically, before step 110, the sending end and the receiving end will initialize and establish a connection, and negotiate and select data packet transmission parameters, including the sliding window size of Go-Back-N, timeout time, etc.
[0029] After the sending and receiving ends establish a connection, the sending end will send data packets to the receiving end in sequence. Each data packet carries a unique Packet Sequence Number (PSN).
[0030] In some scenarios, the receiving end will strictly follow the order in which the data packets were sent to receive them, and will notify the sending end of any out-of-order data packets by sending a message instructing the sending end to retransmit the out-of-order data packets.
[0031] In other scenarios, the receiving end may tolerate a certain degree of out-of-order data packets, but will focus on whether the data packets are received successfully.
[0032] In these scenarios, if the receiving end does not receive the data packet, it will generate a target message and send the target message to the sending end in step 110, so as to instruct the sending end to retransmit the lost target data packet.
[0033] After receiving the target message, the sending end will determine the lost target data packet according to the indication of the target message, and retransmit the target data packet to the receiving end in step 120. The receiving end will then receive the target data packet accordingly.
[0034] The data packet retransmission method provided by this invention allows the receiving end to send a target message to the sending end in the event of data packet loss, indicating the target data packet that needs to be retransmitted. This enables the sending end to retransmit lost data packets in a targeted manner, thereby avoiding redundant retransmissions caused by the existing Go-Back-N mechanism. This significantly reduces the waste of bandwidth resources and effectively avoids network congestion.
[0035] In one embodiment, the receiving end sending a target message to the sending end may include: If the target conditions are met, the receiving end sends the target message to the sending end; The target condition may include at least one of the following: Data packets are lost during the data packet reception period; Data packets are lost within the data packet reception length, where the reception length represents the number of data packets received. The number of lost data packets is greater than or equal to the loss threshold; Wake stream data packets were lost.
[0036] Specifically, each of the target conditions can be used individually.
[0037] For example, the data packet reception period can be, for example, 50ms, 60ms, etc., and its specific size can be adjusted according to the actual situation. This invention does not make a specific limitation on this.
[0038] Within a data packet reception cycle, the receiving end will determine whether packet loss has occurred based on the PSN of the received data packets.
[0039] If no packet loss occurs, the receiving end will not send the target message, but will instead send a regular ACK message to inform the sending end of the data packet reception status.
[0040] If packet loss occurs, the receiving end will determine the PSN of the lost target data packet and send a target message accordingly to instruct the sending end to retransmit the lost target data packet.
[0041] For example, the data packet receiving length can be 60, 100, etc. The specific size of the data packet receiving length can also be defined using data size units; for example, assuming the data packet size is 1 byte, the data packet receiving length can be 60 bytes, 80 bytes, etc. The specific size of the data packet receiving length can be adjusted according to actual circumstances, and this invention does not impose a specific limitation on it.
[0042] Within a data packet reception length, the receiving end will determine whether packet loss has occurred based on the PSN of the received data packets.
[0043] If no packet loss occurs, the receiving end will not send the target message, but will instead send a regular ACK message to inform the sending end of the data packet reception status.
[0044] If packet loss occurs, the receiving end will determine the PSN of the lost target data packet and send a target message accordingly to instruct the sending end to retransmit the lost target data packet.
[0045] For example, the threshold for the number of missing items can be, for example, 3 or 5, and its specific value can be adjusted according to the actual situation. This invention does not impose a specific limitation on this.
[0046] When the number of lost data packets is set as the target condition, the receiving end will determine whether packet loss has occurred based on the PSN of the received data packets and accumulate the number of lost data packets.
[0047] If the number of lost data packets does not reach the loss threshold, the receiving end will not send the target message, but will instead send a regular ACK message to inform the sending end of the data packet reception status.
[0048] If the number of lost data packets reaches the loss threshold, the receiver will determine the PSN of the lost target data packet and send a target message accordingly to instruct the sender to retransmit the lost target data packet.
[0049] Optionally, the receiver may check the tail condition when receiving data packets. Specifically, if the receiver receives a data packet with the LAST flag, the receiver will check the tail condition, including send, receive, read, and write operations, as shown in Table 1.
[0050] Table 1. Examples of Operation Types and Wake Sign Detection Mechanisms If the receiving end confirms that the data packet is a tail flow data packet, for example by determining that the current data stream has entered the tail flow stage through protocol identifiers (such as the Last flag in the BTH header or length matching), the receiving end will immediately determine the PSN of the lost tail flow data packet (i.e., the target data packet) and send a target message accordingly to instruct the sending end to retransmit the lost tail flow data packet.
[0051] It should be noted that when the sending end receives a target message where the tail flow data packet is lost, it will prioritize retransmitting the lost tail flow data packet, thereby reducing tail flow latency and improving overall transmission performance.
[0052] Optionally, each of the target conditions can be used in combination.
[0053] For example, the data packet reception period can be combined with the number of lost data packets. In this case, the receiving end will accumulate the number of lost data packets within a data packet reception period. If the number of lost data packets is greater than or equal to the loss threshold, the receiving end will determine the PSN of the lost target data packet and send a target message accordingly to instruct the sending end to retransmit the lost target data packet.
[0054] For example, the data packet reception length can be combined with the number of data packets lost. The receiving end will accumulate the number of data packets lost within a data packet reception length. If the number of data packets lost is greater than or equal to the loss threshold, the receiving end will determine the PSN of the lost target data packet and send a target message accordingly to instruct the sending end to retransmit the lost target data packet.
[0055] It is understandable that other target conditions can be used in different combinations, which will not be listed here.
[0056] The data packet retransmission method provided by this invention can trigger the generation and transmission of target messages by setting different target conditions, which makes the invention adaptable to data packet retransmission needs in various scenarios and effectively improves its practicality.
[0057] In one embodiment, the target message may include a bitmap index and a bitmap value corresponding to the bitmap index; The bitmap index corresponds to the data packet sequence number, and the bitmap value indicates whether a data packet has been received. The bitmap value corresponding to the target data packet indicates that no data packet was received.
[0058] It should be noted that since the sequence number of each data packet is continuous and unique within a certain range, mapping the bitmap index to the data packet sequence number and then using the bitmap value to represent whether a data packet has been received can accurately and uniquely represent the reception status of each data packet.
[0059] Specifically, a bitmap value of 0 can be used to indicate that no data packet has been received, and a bitmap value of 1 can be used to indicate that a data packet has been received, and vice versa.
[0060] For example, in one example, bitmap index [0, 1, 2, 3] corresponds to PSN [n, n+1, n+2, n+3], and bitmap value 1 indicates that a data packet has been received. Then bitmap value 1101 indicates that the data packet with PSN=n+2 (index 2) was lost, while the data packets with PSN=n (index 0), PSN=n+1 (index 1), and PSN=n+3 (index 3) were successfully received.
[0061] Correspondingly, after receiving the target message, the sending end will parse out the bitmap information of the target message, and determine the PSN=n+2 of the lost target data packet according to the bitmap index [0, 1, 2, 3] and the bitmap value 1101, and retransmit the target data packet with PSN=n+2 to the sending end.
[0062] In this invention, since the target message incorporates a bitmap, the target message can be called a BACK (Bitmap Acknowledgment) message.
[0063] The data packet retransmission method provided by this invention introduces a bitmap index and a bitmap value corresponding to the bitmap index to represent whether a data packet has been received. This can accurately and efficiently express the data packet reception status, thereby facilitating the sending end to retransmit lost data packets in a targeted manner and ensuring the efficiency of data packet retransmission.
[0064] In one embodiment, the target message also includes a base packet sequence number; The reference data packet sequence number indicates that data packets whose sequence number precedes the reference data packet sequence number have been received.
[0065] It should be noted that since the sequence number of each data packet is consecutive and unique within a certain range, the baseline data packet sequence number can be used to accurately indicate that data packets preceding the baseline data packet sequence number have been received.
[0066] For example, in one example, if the base packet sequence number PSN = n, it means that all packets with PSNs prior to n have been received. Specifically, if n is 100, then the base packet sequence number PSN = n means that all packets with sequence numbers [001, 002, …, 099] have been received.
[0067] Correspondingly, after receiving the target message, the sending end will parse out the base data packet sequence number PSN=n of the target message and release the buffer of consecutive data packets with PSN≤n, thereby saving buffer resources.
[0068] The data packet retransmission method provided by this invention can accurately and efficiently express the cumulative reception status of data packets by introducing a reference data packet sequence number, thereby facilitating the sender to release corresponding buffer resources in a targeted manner and improving the storage performance of the sender.
[0069] In one embodiment, the target message also includes a trigger packet sequence number; The trigger packet sequence number is the sequence number of the data packet that triggers the sending of the target message to the sending end.
[0070] It is understandable that the trigger packet sequence number may differ under different target conditions.
[0071] For example, if the target condition is that a data packet is lost during the data packet reception period, the trigger data packet sequence number is the PSN of the data packet received / lost at the end of that reception period.
[0072] When the target condition is that a data packet is lost within the data packet reception length, the trigger data packet sequence number is the PSN of the data packet received / lost at the end of that reception length.
[0073] When the target condition is that the number of lost packets is greater than or equal to the number of lost packets threshold, the trigger packet sequence number is the PSN of the lost packets that caused the number of lost packets to reach the number of lost packets threshold.
[0074] When the target condition is that the tail stream packet is lost, the trigger packet sequence number is the PSN of the lost tail stream packet.
[0075] Correspondingly, after receiving the target message, the sending end will parse out the trigger data packet sequence number of the target message, determine the progress of data packet reception based on the trigger data packet sequence number of the target message, and arrange the data packets to be sent accordingly.
[0076] For example, if PSN=n+3 is triggered, after the sending end receives the target message, it can determine that it needs to send data packets with PSN=n+4, n+5, ... next.
[0077] The data packet retransmission method provided by this invention can accurately and efficiently express the data packet reception progress by introducing a trigger data packet sequence number, thereby facilitating the sender to arrange subsequent data packet transmission in a targeted manner and improving the data packet transmission efficiency of the sender.
[0078] In one example, the Ethernet header of the destination packet can be the destination / source MAC (Media Access Control) address, and the IPv4 / UDP (User Datagram Protocol) header can be a RoCEv2 standard encapsulation (destination port 4791).
[0079] like Figure 2 As shown, the BACK header format based on the RoCEv2 protocol AETH (ACK Extended Transport Header) header extension can include the following fields: A(Ack)ACK type flag: Setting it to 1 indicates that this is a BACK message (reusing the AckReq bit of the original AETH).
[0080] E (E-bit) Emergency ACK flag: Setting it to 1 requires the receiver to process the request immediately.
[0081] S-bit (S-bit) bitmap compression flag: 0 = original bitmap, 1 = run-length encoding (RLE) compression.
[0082] V (V-bit) bitmap segment validity flag: 0 = contains only cumulative ACK, 1 = contains valid bitmap segment.
[0083] Bitmap Ctrl bitmap length control: N = Bitmap Ctrl + 1, bitmap segment occupies N*8 bits (default N=7).
[0084] Cumulative ACK Baseline PSN: Represents the baseline PSN, used to characterize the highest PSN currently continuously confirmed (the MSN field of the original AETH is extended to 24 bits).
[0085] Trigger ACK Baseline PSN: Indicates the triggering PSN, used to characterize the PSN that causes the receiver to immediately generate a BACK message.
[0086] Compatibility handling: When A = 0, the message degenerates into a standard RoCEv2 ACK (containing only cumulative ACKs).
[0087] ICRC (optional) contains an integrity check code for the bitmap extension header.
[0088] App Tag (optional) Application layer tag (used to match the original request).
[0089] Based on the above message extension header, the target message provided by this invention can achieve the following innovations and features: (1) Seamless compatibility with RoCEv2 The reserved bits (Bits 28-31) of the AETH header are reused as control flags. Standard devices can safely ignore the extended field. When A=0, it completely degenerates to the standard ACK mode, ensuring backward compatibility.
[0090] (2) Dynamic bitmap length control The bitmap length (range 8-1024 bits) can be dynamically adjusted using the Bitmap Ctrl field.
[0091] Example: Bitmap Ctrl=7 → Bitmap length = (7+1)*8 = 64 bits (default value), 0 represents a bitmap length of 1 byte.
[0092] (3) High-efficiency compression support When S-bit=1, run-length encoding is enabled to compress bitmaps.
[0093] In one example, the i-th bit of the bitmap corresponds to PSN base_psn + i, where bitmap[i] = 1 indicates successful PSN reception and 0 indicates a missing PSN. With base PSN = 100, receiving PSNs 102, 103, and 105 triggers a back.
[0094] The BACK header contains: (1) AETH Head Extension A=1, E=0, S=0, V=1, Bitmap Ctrl=0x07 (N=8) Cumulative ACK = 100 --> Continuous ACKs to PSN 100 (2) Bitmap segment (64 bits) Bitmap index:
[101] ,
[102] ,
[103] ,
[104] ,
[105] , ...,
[164] Actual values: 0, 1, 1, 0, 1, ... (all subsequent values are 0) Hexadecimal: 0x0000_0000_0000_0013 (only the lower 16 bits are valid) Correspondingly, after receiving the BACK message, the sending end can determine that: PSN≤100 has been continuously acknowledged, PSN=102, 103, and 105 have been received, and PSN=101 and 104 need to be retransmitted. This design achieves precise selective retransmission at the cost of adding 64 bits (approximately 8 bytes) while maintaining full compatibility with RoCEv2, making it particularly suitable for RDMA in wide area networks with high packet loss rates.
[0095] In a practical application, the sending end and the receiving end establish a QP (Queue Pair) connection, and the two ends are interconnected through an RDMA network to achieve efficient retransmission.
[0096] The sending end includes an RTO (Retransmission Timeout) dynamic calculation engine and a retransmission manager.
[0097] The RTO dynamic calculation engine is used to dynamically adjust the retransmission timeout threshold based on smooth RTT (Round-Trip Time) and timeout backoff strategy; the retransmission manager is used to maintain the retransmission queue with a red-black tree structure and quickly retrieve the data packets to be acknowledged by PSN.
[0098] The receiving end includes a bitmap manager and a retransmission manager.
[0099] The retransmission manager includes a message intelligent generator and a wake accelerator; the bitmap manager uses a ring bitmap to accurately record the packet reception status (PSN→0 / 1 mapping).
[0100] The message intelligent generator is used to generate BACK packets carrying three fields (trigger PSN / baseline PSN / bitmap segment) based on target conditions; the tail accelerator is used to detect the end-of-transmission flag (LAST packet) and actively initiate a BACK request to retransmit the missing tail packet.
[0101] In a practical application, such as Figure 3 As shown, the data packet retransmission method provided by the present invention may include the following steps: Step 301: The sending end sends a data packet with PSN=[n, n+3] to the receiving end, and the receiving end receives the data packet.
[0102] Step 302: The receiving end updates the bitmap information: n=1, n+1=1, n+2=0, n+3=1.
[0103] Step 303: The receiving end sends a BACK to the sending end (trigger PSN=3, base PSN=n, bitmap value=0b1101, where 0b represents binary), and the sending end receives the BACK.
[0104] Step 304: The receiving end performs bitmap detection on the BACK to confirm that the data packet with PSN=n+2 is lost.
[0105] Step 305: The receiving end retransmits the data packet with PSN=n+2.
[0106] On the sending end side: After the sender transmits a data packet with PSN=[n, n+3], it starts an RTO timer to monitor the response. Upon receiving a BACK message, it first parses the key fields: 1. Extract the A(Ack)ACK type flag. If it is set to 1, it means that this is a BACK message, which means that there are data packets that need to be retransmitted. Otherwise, there is no need to retransmit.
[0107] 2. Extract the baseline PSN (cum_ack=n) and release the buffer of consecutive packets with PSN≤n.
[0108] 3. Check if the bitmap segment is empty (bitmap=0b1101), and calculate the missing packet by bit offset: bitmap index [0,1, 2, 3] corresponds to PSN[n, n+1, n+2, n+3], and bitmap value 1101 indicates that the data packet with PSN=n+2 (index 2) is lost.
[0109] 4. Immediately retrieve the original data packet with PSN=n+2 from the retransmission queue.
[0110] 5. Reuse RDMA registered memory to perform zero-copy retransmission and avoid data copying.
[0111] On the receiving end side: Initiate real-time bitmap update upon data packet arrival: 1. Map the received PSN to the bitmap index, PSN=n→index0, ..., PSN=n+3→index3.
[0112] 2. Set the bitmap value: set it to 1 for successfully received packets (PSN=n, n+1, n+3), and keep it at 0 for lost packets (PSN=n+2).
[0113] 3. Extend the AETH header encapsulation bitmap information via RoCEv2 and immediately provide a BACK response.
[0114] In summary, the data packet retransmission method provided by this invention has the following advantages: 1. Significantly reduce redundant retransmissions: By introducing packet bitmaps and selective retransmission mechanisms, the system can accurately identify lost packets and only retransmit lost packets, avoiding large-scale retransmissions caused by out-of-order delivery or packet loss in the traditional Go-Back-N protocol, thereby significantly reducing bandwidth waste and network congestion.
[0115] 2. Improve the accuracy and real-time performance of the confirmation mechanism: The improved BACK packet format includes trigger PSN, base PSN, and bitmap information, enabling the sender to accurately grasp the data reception status of the receiver, quickly locate lost data packets, and improve retransmission efficiency and response speed.
[0116] 3. Effectively reduce tail flow latency: During the tail flow phase, the system introduces a tail flow acceleration mechanism to immediately trigger selective retransmission when a data packet is detected as lost, avoiding the transmission delay caused by waiting timeout in traditional protocols and significantly improving overall transmission performance.
[0117] The data packet retransmission device provided by the present invention will be described below. The data packet retransmission device described below can be referred to in correspondence with the data packet retransmission method described above, and can achieve the same technical effect. It will not be described again here.
[0118] Figure 4 This is one of the structural schematic diagrams of the data packet retransmission device provided by the present invention. For example... Figure 4 As shown, the device may include: The message sending module 410 is used to send a target message to the sending end, the target message being used to indicate a lost target data packet; The retransmission receiving module 420 is used to receive the target data packet retransmitted by the sending end.
[0119] In one embodiment, the message sending module 410 is specifically used for: If the target conditions are met, the target message is sent to the sending end; The target conditions include at least one of the following: Data packets are lost during the data packet reception period; Data packets are lost within the data packet reception length, where the reception length represents the number of data packets received; The number of lost data packets is greater than or equal to the loss threshold; Wake stream data packets were lost.
[0120] In one embodiment, the target message includes a bitmap index and a bitmap value corresponding to the bitmap index; The bitmap index corresponds to the data packet sequence number, and the bitmap value indicates whether a data packet has been received. The bitmap value corresponding to the target data packet indicates that no data packet was received.
[0121] In one embodiment, the target message further includes a base packet sequence number; The reference data packet sequence number indicates that a data packet with a sequence number preceding the reference data packet sequence number has been received.
[0122] In one embodiment, the target message further includes a trigger packet sequence number; The trigger data packet sequence number is the sequence number of the data packet that triggers the sending of the target message to the sending end.
[0123] Figure 5 This is the second structural schematic diagram of the data packet retransmission device provided by the present invention. For example... Figure 5 As shown, the device may include: The message receiving module 510 is used to receive a confirmation message sent by the receiving end, the confirmation message being used to indicate the lost target data packet; The retransmission module 520 is used to retransmit the target data packet to the receiving end.
[0124] In one embodiment, the target message includes a bitmap index and a bitmap value corresponding to the bitmap index; The bitmap index corresponds to the data packet sequence number, and the bitmap value indicates whether a data packet has been received. The bitmap value corresponding to the target data packet indicates that no data packet was received.
[0125] In one embodiment, the target message further includes a base packet sequence number; The reference data packet sequence number indicates that a data packet with a sequence number preceding the reference data packet sequence number has been received.
[0126] In one embodiment, the target message further includes a trigger packet sequence number; The trigger data packet sequence number is the sequence number of the data packet that triggers the sending of the target message to the sending end.
[0127] Figure 6 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 6 As shown, the electronic device may include: a processor 610, a communications interface 620, a memory 630, and a communication bus 640, wherein the processor 610, the communications interface 620, and the memory 630 communicate with each other via the communication bus 640. The processor 610 can call logical instructions in the memory 630 to execute the methods described in any of the above embodiments, such as including: Send a target message to the sending end, the target message being used to indicate the lost target data packet; Receive the target data packet retransmitted by the sender. Or, Receive a target message sent by the receiving end, the target message being used to indicate a lost target data packet; The target data packet is retransmitted to the receiving end.
[0128] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0129] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program, the computer program being able to be stored on a non-transitory computer-readable storage medium, and the computer program being executed by a processor, the computer being able to perform the methods described in any of the above embodiments, for example including: Send a target message to the sending end, the target message being used to indicate the lost target data packet; Receive the target data packet retransmitted by the sender. Or, Receive a target message sent by the receiving end, the target message being used to indicate a lost target data packet; The target data packet is retransmitted to the receiving end.
[0130] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the methods described in any of the above embodiments, for example including: Send a target message to the sending end, the target message being used to indicate the lost target data packet; Receive the target data packet retransmitted by the sender. Or, Receive a target message sent by the receiving end, the target message being used to indicate a lost target data packet; The target data packet is retransmitted to the receiving end.
[0131] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0132] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0133] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method of retransmitting data packets, characterized by, The method applied to a receiving end comprises: sending a target message to a sending end, the target message being used for indicating a target data packet lost; receiving the target data packet retransmitted by the sending end.
2. The data packet retransmission method of claim 1, wherein, The sending of the target message to the sending end comprises: sending the target message to the sending end when a target condition is met; the target condition comprises at least one of the following: a data packet is lost within a data packet receiving period; a data packet is lost within a data packet receiving length, the receiving length representing a number of data packets received; a number of data packets lost is greater than or equal to a threshold value of the number of data packets lost; a tail flow data packet is lost.
3. The data packet retransmission method of claim 1, wherein, The target message comprises a bitmap index and a bitmap value corresponding to the bitmap index; the bitmap index corresponds to a data packet sequence number, and the bitmap value represents whether the data packet is received; the bitmap value corresponding to the target data packet represents that the data packet is not received.
4. The data packet retransmission method of claim 3, wherein, The target message further comprises a reference data packet sequence number; the reference data packet sequence number represents that data packets with sequence numbers before the reference data packet sequence number have been received.
5. The data packet retransmission method of claim 3 or 4, characterized by, The target message further comprises a trigger data packet sequence number; the trigger data packet sequence number is a sequence number of a data packet triggering the sending of the target message to the sending end.
6. A data packet retransmission method, characterized by, The method applied to a sending end comprises: receiving a target message sent by a receiving end, the target message being used for indicating a target data packet lost; retransmitting the target data packet to the receiving end.
7. A data packet retransmission apparatus characterized by comprising: The apparatus applied to a receiving end comprises: a message sending module, configured to send a target message to a sending end, the target message being used for indicating a target data packet lost; a retransmission receiving module, configured to receive the target data packet retransmitted by the sending end.
8. A data packet retransmission method, characterized by, The apparatus applied to a sending end comprises: a message receiving module, configured to receive an acknowledgement message sent by a receiving end, the acknowledgement message being used for indicating a target data packet lost; a retransmission sending module, configured to retransmit the target data packet to the receiving end.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, The processor executes the computer program to implement the data packet retransmission method according to any one of claims 1 to 5, or implement the data packet retransmission method according to claim 6.
10. A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the data packet retransmission method according to any one of claims 1 to 5, or implement the data packet retransmission method according to claim 6.
11. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the data packet retransmission method according to any one of claims 1 to 5, or implement the data packet retransmission method according to claim 6.