Datagram retransmission method, device, chip, network interface card, equipment, medium and program product

CN122204246BActive Publication Date: 2026-09-25SHENZHEN JAGUAR MICROSYSTEMS CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202610671118.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-05-15
Publication Date
2026-09-25
Estimated Expiration
2046-05-15

AI Technical Summary

Technical Problem

[0004]然而selective repeat只要检测到一个报文丢失则后续每接收到一个乱序报文都会产生一个bmp报文,虽然报文数据不大但依然占用带宽,导致有效带宽降低

Benefits of technology

[0056]上述数据报文重传方法、装置、芯片、网络接口卡、设备、介质和程序产品,向数据接收端发送数据报文;接收所述数据接收端返回的否定应答报文,所述否定应答报文包括所述数据接收端根据相邻的丢包时间戳得到的丢包程度;基于所述丢包程度确定数据报文重传参数;基于所述数据报文重传参数向所述数据接收端重新发送所述数据报文,这样数据接收端返回的否定应答报文包括数据接收端根据相邻的丢包时间戳得到的丢包程度,根据丢包程度来确定数据报文重传参数,数据接收端只通过少量否定应答报文把丢包程度发回给数据发送端,减少大量否定应答报文对带宽的额外占用。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122204246B_ABST
    Figure CN122204246B_ABST
Patent Text Reader

Abstract

The application relates to a data message retransmission method, device, chip, network interface card, equipment, medium and program product. The method comprises the following steps: sending a data message to a data receiving end; receiving a negative acknowledgement message returned by the data receiving end, wherein the negative acknowledgement message comprises a packet loss degree obtained by the data receiving end according to adjacent packet loss time stamps; determining a data message retransmission parameter based on the packet loss degree; and re-sending the data message to the data receiving end based on the data message retransmission parameter. The method can improve the bandwidth utilization rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a data packet retransmission method, apparatus, chip, network interface card, device, medium, and program product. Background Technology

[0002] RDMA (Remote Direct Memory Access) is a high-efficiency data transmission technology widely used in high-performance computing and data center networks. RDMA's retransmission mechanism plays a crucial role in ensuring the reliability of data transmission. When the sender's packet transmission rate exceeds the receiver's processing capacity, the receiver can only choose to discard subsequently received data packets. This receiver could be the final recipient of the data packets or an intermediate switch or router.

[0003] In traditional technologies, RDMA networks implement selective repeat retransmission schemes after packet loss on the communication link.

[0004] However, if Selective Repeat detects a lost packet, it will generate a BMP packet for every subsequent out-of-order packet received. Although the packet data is small, it still occupies bandwidth, resulting in a reduction in effective bandwidth. Summary of the Invention

[0005] Therefore, it is necessary to provide a data packet retransmission method, apparatus, chip, network interface card, device, medium, and program product that can improve bandwidth utilization in response to the above-mentioned technical problems.

[0006] Firstly, this application provides a data packet retransmission method, applied at a data sending end, the method comprising:

[0007] Send data packets to the data receiving end;

[0008] Receive a negative response message returned by the data receiving end, the negative response message including the packet loss degree obtained by the data receiving end based on adjacent packet loss timestamps;

[0009] The data packet retransmission parameters are determined based on the degree of packet loss.

[0010] The data packet is retransmitted to the data receiving end based on the data packet retransmission parameters.

[0011] In one embodiment, determining the data packet retransmission parameters based on the packet loss level includes: determining the number of retransmitted data packets, the number of retransmissions, and the retransmission start position based on the packet loss level; and the larger the packet loss level indicates, the more retransmissions and / or the more retransmitted data packets there are; and when the number of retransmissions is greater than or equal to 2, the retransmission start position of each retransmission is shifted sequentially from the position of the desired packet.

[0012] In one embodiment, determining the number of retransmitted data packets based on the packet loss level includes:

[0013] The number of retransmitted data packets is determined based on the packet loss level, average packet loss rate, and packet loss rate amplification factor.

[0014] In one embodiment, determining the number of retransmitted data packets based on the packet loss level, average packet loss rate, and packet loss rate amplification factor includes:

[0015] The packet loss rate amplification factor is obtained based on the maximum number of consecutive packet losses and the average packet loss rate.

[0016] The base quantity is obtained based on the average packet loss rate and the packet loss rate amplification factor.

[0017] The number of retransmitted data packets is obtained based on the packet loss level and the base quantity.

[0018] In one embodiment, determining the data packet retransmission parameters based on the packet loss level includes:

[0019] When the packet loss level indicates that the packet loss scale of the data packet is a first scale, the retransmission start position is the position of the expected packet, the retransmission number is the first number, and the number of retransmitted data packets is a first number.

[0020] When the packet loss level indicates that the packet loss scale of the data packet is the second scale, the number of retransmissions is the second number, the retransmission start position of each retransmission is shifted sequentially from the position of the expected packet, and the number of retransmitted data packets in each retransmission is the second number.

[0021] When the packet loss level indicates that the packet loss scale of the data packet is the third scale, the number of retransmissions is the third number, the retransmission start position of each retransmission is shifted sequentially from the position of the expected packet, and the number of retransmitted data packets in each retransmission is the third number.

[0022] Wherein, the first scale is smaller than the second scale, the second scale is smaller than the third scale; the first number is smaller than the second number, and the second number is smaller than the third number; the first quantity is smaller than the second quantity, and the second quantity is smaller than the third quantity.

[0023] In one embodiment, the method further includes:

[0024] After sending a data packet to the data receiver, start the timer;

[0025] If the timer expires and no negative acknowledgment or acknowledgment message corresponding to the data packet is received, the location of the target packet corresponding to the previously received acknowledgment message is determined.

[0026] The system begins retransmitting the data packet to the data receiving end from the data packet following the target packet position.

[0027] Secondly, this application also provides a data packet retransmission method, applied at a data receiving end, the method comprising:

[0028] Receive data packets sent by the data sender;

[0029] If packet loss is determined based on the currently received data packets, the degree of packet loss is obtained according to the adjacent packet loss timestamps, and a negative response message is generated based on the degree of packet loss.

[0030] The negative acknowledgment message is sent to the data sending end. The negative acknowledgment message is used to instruct the data sending end to determine the data packet retransmission parameters based on the packet loss level, and to retransmit the data packet to the data receiving end based on the data packet retransmission parameters.

[0031] In one embodiment, obtaining the packet loss level based on adjacent packet loss timestamps includes:

[0032] The timestamp difference is obtained based on the timestamp of the previous packet loss and the current packet loss timestamp.

[0033] The packet loss level is determined based on the relationship between the timestamp difference and the base time.

[0034] In one embodiment, the method further includes:

[0035] The base time is obtained based on the time required to send the largest data packet using the current maximum bandwidth.

[0036] In one embodiment, determining the packet loss level based on the relationship between the timestamp difference and the base time includes:

[0037] If the timestamp difference is greater than or equal to the base time and less than N times the base time, the packet loss level is determined to be the third scale, where N is the time amplification factor used to offset network latency, and N is an integer greater than or equal to 2.

[0038] If the timestamp difference is greater than or equal to N times the base time, but less than 2N times the base time, the packet loss level is determined to be the second scale.

[0039] If the timestamp difference is greater than or equal to 2N times the base time, the packet loss level is determined to be of the first scale.

[0040] In one embodiment, before determining the packet loss level based on the relationship between the timestamp difference and the base time, the method further includes:

[0041] If the timestamp difference is less than the base time, the negative response message will not be generated.

[0042] Thirdly, this application also provides a data packet retransmission device, applied at a data sending end, the device comprising:

[0043] The first sending module is used to send data packets to the data receiving end;

[0044] The first receiving module is used to receive a negative acknowledgment message returned by the data receiving end, the negative acknowledgment message including the packet loss degree obtained by the data receiving end based on adjacent packet loss timestamps;

[0045] The first message processing module is used to determine the data message retransmission parameters based on the packet loss level.

[0046] The first sending module is also configured to resend the data packet to the data receiving end based on the data packet retransmission parameters.

[0047] Fourthly, this application also provides a data packet retransmission device, applied at a data receiving end, the device comprising:

[0048] The second receiving module is used to receive data packets sent by the data sending end;

[0049] The second message processing module is used to determine the degree of packet loss based on adjacent packet loss timestamps when packet loss is determined based on the currently received data message, and to generate a negative response message based on the packet loss degree.

[0050] The second sending module is used to send the negative acknowledgment message to the data sending end. The negative acknowledgment message is used to instruct the data sending end to determine the data packet retransmission parameters based on the packet loss level, and to retransmit the data packet to the data receiving end based on the data packet retransmission parameters.

[0051] Fifthly, this application also provides a chip including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method in any of the above embodiments.

[0052] Sixthly, this application also provides a network interface card, including a chip as described in any of the above embodiments and multiple interfaces, wherein the chip processes data or communicates externally through the interfaces.

[0053] Seventhly, this application also provides a computer device including a network interface card in any of the above embodiments, the network interface card being used for processing data or external communication.

[0054] Eighthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the methods in any of the above embodiments.

[0055] Ninthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method in any of the above embodiments.

[0056] The aforementioned data packet retransmission method, apparatus, chip, network interface card, device, medium, and program product send data packets to a data receiving end; receive a negative acknowledgment message returned by the data receiving end, the negative acknowledgment message including the packet loss degree obtained by the data receiving end based on adjacent packet loss timestamps; determine data packet retransmission parameters based on the packet loss degree; and retransmit the data packet to the data receiving end based on the data packet retransmission parameters. Thus, the negative acknowledgment message returned by the data receiving end includes the packet loss degree obtained by the data receiving end based on adjacent packet loss timestamps, and the data packet retransmission parameters are determined based on the packet loss degree. The data receiving end only sends the packet loss degree back to the data sending end through a small number of negative acknowledgment messages, reducing the additional bandwidth consumption of a large number of negative acknowledgment messages. Attached Figure Description

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

[0058] Figure 1 This is a schematic diagram of the go-back-n scheme in one embodiment;

[0059] Figure 2 This is a schematic diagram of a selective repeat scheme in one embodiment;

[0060] Figure 3 This is a schematic diagram illustrating the application environment of a data packet retransmission method in one embodiment.

[0061] Figure 4 This is a flowchart illustrating a data packet retransmission method in one embodiment;

[0062] Figure 5 This is a flowchart illustrating a data packet retransmission method in another embodiment;

[0063] Figure 6 This is a flowchart illustrating the data packet retransmission method in yet another embodiment;

[0064] Figure 7 This is a flowchart illustrating a data packet retransmission method in another embodiment;

[0065] Figure 8 This is a schematic diagram of the internal structure of a computer device in one embodiment. Detailed Implementation

[0066] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0067] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0068] Among them, combined Figure 1 As shown, Figure 1 This is a schematic diagram of a go-back-n scheme in one embodiment. In go-back-n, after the data receiver detects packet loss, it actively notifies the data sender of the location of the packet loss. The data sender then rolls back to the location of the packet loss and re-transmits the packet. The process is as follows:

[0069] The data sender assigns a number to each message, called the packet sequence number (PSN), and sends it along with the data message.

[0070] If an intermediate switch loses packets (as shown in the diagram, packets with PSN=3 are discarded by the switch), the data receiver checks the continuity of PSNs. If packets with PSNs equal to 0, 1, and 2 are consecutive, it assumes no packet loss and sends an ACK (acknowledgment) message to notify the data sender that the packet has been correctly received. If, after receiving a PSN=4 packet, no PSN=3 packet is received, and the PSNs are not consecutive, it assumes the PSN=3 packet has been discarded and sends a NAK (negative acknowledgment) message to notify the data sender that the PSN=3 packet has been discarded. Furthermore, subsequent packets with PSNs greater than 3 are silently discarded by the data receiver without further response.

[0071] After receiving NAK, the data sender will resend the message starting from PSN=3.

[0072] Combination Figure 2 As shown, Figure 2 This is a schematic diagram of a selective repeat scheme in one embodiment. Similar to go-back-n, the data receiver uses PSN to detect packet loss. The difference lies in the information the data receiver returns to the data sender after determining packet loss, and the subsequent retransmission behavior of the data sender. The specific process is as follows:

[0073] The data sender assigns a number to each message, called the Packet Sequence Number (PSN), and sends it along with the data message.

[0074] If the intermediate switch loses packets (as shown in the figure, packets with PSN=3 are dropped by the switch).

[0075] The data receiver checks the continuity of PSNs (0, 1, 2) to determine if packets with PSNs equal to 0, 1, or 2 are consecutive. If they are consecutive, it assumes no packet loss and replies with an ACK to notify the data sender that the packet has been correctly received. If a packet with PSN=4 is received but not with PSN=3, indicating a discontinuous PSN, the receiver assumes the packet with PSN=3 has been discarded. In this case, the data receiver does not directly reply with a NAK packet but instead replies with a SACK packet, which contains a field called the bitmap (BMP) [KH3.1]. The bitmap consists of multiple bits, each representing the reception status of a packet: 0 indicates the packet was not received, and 1 indicates the packet was received. Furthermore, a SACK packet must be replied to for each subsequent valid packet received.

[0076] After receiving a SACK message, the data sender parses the SACK bitmap information, retransmits messages with bits set to 0, and messages with bits set to 1 indicate that the data receiver has received the data correctly and does not need to retransmit.

[0077] Therefore, the go-back-n scheme requires retransmission of all subsequent packets if a single packet is lost. A large number of invalid retransmissions consume bandwidth, reducing effective bandwidth. Selective repeat generates a BMP (Blocking Missing Page) for every out-of-order packet received after detecting a packet loss, which, although small, still consumes bandwidth. Furthermore, go-back-n receives duplicate packet information at the receiver, which is silently discarded. Selective repeat receives duplicate packet loss information at the sender, increasing the sender's processing burden. Selective repeat requires additional resources to record and process BMP information; upon receiving a BMP, it relies on historical records to determine if a packet has been retransmitted, making implementation complex. Selective repeat uses bitmaps to record packet loss information; however, bitmaps have limited length, and continuous large-scale packet loss wastes a significant amount of bitmap data, exceeding recording capacity.

[0078] To address the aforementioned technical problems, the data packet retransmission method provided in this application embodiment can be applied to, for example... Figure 3 The application environment shown.

[0079] The data sending end includes a first sending module 310, a timing module 350, a first receiving module 320, a first message processing module 330, and a first buffer module 340; the data receiving end includes a second buffer module 360, a second receiving module 370, a second message processing module 380, and a second sending module 390.

[0080] 1) The first sending module 310 of the data sending end schedules a QP (Queue Pair) from the first buffer module 340 to send data packets (DATA), and marks each data packet with a PSN; 2) The timing module 350 updates the timer, and the timeout time is a configurable value. At the same time, the first sending module 310 sends out the data packets; 3) After receiving the data packets, the second receiving module 370 of the data receiving end determines whether there is packet loss by identifying whether the PSN is continuous. If there is no packet loss, it notifies the second message processing module 380 that the QP has an ACK message to send and puts the data into the memory of the data receiving end; otherwise, it notifies the second message processing module 380 that the QP has a NAK message to send; 4) The second message processing module 380 sends an ACK / NAK request to the second sending module 390 and sends the corresponding ACK / NAK message; 5) The second sending module 390 sends the ACK / NAK message; 6) The first receiving module 320 of the data sending end sends the ACK / NAK message to the first message processing module 330 for processing. 7) The first message processing module 330 processes the received message and updates the timer; if it is a NAK message, it notifies the first sending module 310 to retransmit the message and updates the timer; 8) If no ACK / NAK message is received after the timer expires, the previous ACK information is used and the message is sent from there.

[0081] In this application, after the data receiving end receives the data packet sent by the data sending end, it determines that it needs to return a negative acknowledgment message. Then, it obtains the packet loss degree based on the adjacent packet loss timestamps, generates a negative acknowledgment message based on the packet loss degree, and sends the negative acknowledgment message to the data sending end. The data sending end determines the data packet retransmission parameters based on the packet loss degree, and retransmits the data packet to the data receiving end based on the data packet retransmission parameters.

[0082] In this way, the negative acknowledgment message returned by the data receiver includes the packet loss level obtained by the data receiver based on adjacent packet loss timestamps. The data receiver determines the retransmission parameters of the data packet based on the packet loss level. The data receiver only sends the packet loss level back to the data sender through a small number of negative acknowledgment messages, reducing the additional bandwidth consumption of a large number of negative acknowledgment messages.

[0083] The data sender and receiver can be a terminal or a server. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, drones, low-altitude aircraft, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, and projection equipment. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted displays. Head-mounted displays can be virtual reality (VR) devices, augmented reality (AR) devices, and smart glasses. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0084] In one exemplary embodiment, such as Figure 4 As shown, a data packet retransmission method is provided, which is applied to... Figure 3 Taking the data sending end as an example, the explanation includes the following steps S402 to S408. Wherein:

[0085] S402: Send a data packet to the data receiving end.

[0086] The data sending end can send data packets to the data receiving end. The data packets carry a packet sequence number (PSN). The data sending end sends the data packets to the data receiving end in ascending order of the packet sequence number.

[0087] S404: Receive a negative acknowledgment message returned by the data receiver. The negative acknowledgment message includes the packet loss level obtained by the data receiver based on adjacent packet loss timestamps.

[0088] When the data receiving end detects packet loss, it needs to send a negative acknowledgment message to the data sending end. In this application, a negative acknowledgment message is not sent every time. Instead, it first determines whether a packet loss level has been generated based on the adjacent packet loss timestamps. If so, the packet loss level is obtained based on the adjacent packet loss timestamps, and a negative acknowledgment message is generated based on the packet loss level. If no packet loss level is generated, there is no need to send a negative acknowledgment message.

[0089] After receiving a negative acknowledgment message from the data receiver, the data sender parses the negative acknowledgment message to determine the packet loss level.

[0090] S406: Determine data packet retransmission parameters based on the degree of packet loss.

[0091] The data sending end can obtain the data packet retransmission parameters based on the packet loss level. The correlation between the packet loss level and the data packet retransmission parameters can be preset, so that after determining the packet loss level, the data packet retransmission parameters can be obtained by querying the correlation.

[0092] In some optional embodiments, the data packet retransmission parameter includes at least one of the following: the number of retransmitted data packets, the number of retransmissions, and the retransmission start position.

[0093] The number of retransmitted data packets is the number of packets that need to be retransmitted each time. The number of retransmissions is the number of times each packet is retransmitted. The retransmission start position is the starting position of each retransmission. Based on the start position and the number of packets that need to be retransmitted, the retransmission end position can be obtained.

[0094] The parameters for determining data packet retransmission based on the degree of packet loss include: determining the number of retransmitted data packets, the number of retransmissions, and the retransmission start position based on the degree of packet loss; and the greater the packet loss level, the more retransmissions and / or the more retransmitted data packets there are. When the number of retransmissions is greater than or equal to 2, the retransmission start position of each retransmission is shifted sequentially from the position of the expected packet.

[0095] In this application, the data packet retransmission parameters include the number of retransmitted data packets, the number of retransmissions, and the retransmission start position as an example. The packet loss level indicates that the larger the scale of data packet loss, the more retransmissions and the more data packets are retransmitted. In addition, the retransmission start position of each retransmission is shifted sequentially from the position of the expected packet.

[0096] S408: Resend the data packet to the data receiver based on the data packet retransmission parameters.

[0097] After determining the data packet retransmission parameters, the data sender can retransmit the data packet to the data receiver based on these parameters. Upon receiving a retransmission request in the form of a Negative Acknowledgment (NAK) message, the data sender immediately initiates retransmission and sends a retransmission message.

[0098] The above-described data packet retransmission method involves sending a data packet to a data receiving end; receiving a negative acknowledgment message returned by the data receiving end, the negative acknowledgment message including the packet loss degree obtained by the data receiving end based on adjacent packet loss timestamps; determining data packet retransmission parameters based on the packet loss degree; and retransmitting the data packet to the data receiving end based on the data packet retransmission parameters. In this way, the negative acknowledgment message returned by the data receiving end includes the packet loss degree obtained by the data receiving end based on adjacent packet loss timestamps, and the data packet retransmission parameters are determined based on the packet loss degree. The data receiving end only sends the packet loss degree back to the data sending end through a small number of negative acknowledgment messages, reducing the additional bandwidth consumption of a large number of negative acknowledgment messages.

[0099] In some optional embodiments, the number of retransmitted data packets is determined based on the degree of packet loss, including: determining the number of retransmitted data packets based on the degree of packet loss, the average packet loss rate, and the packet loss rate amplification factor.

[0100] The number of retransmitted data packets can be determined based on a base number and the degree of packet loss. This base number can be determined based on the average packet loss rate and the packet loss rate amplification factor.

[0101] In some optional embodiments, the number of retransmitted data packets is determined based on the packet loss level, the average packet loss rate, and the packet loss rate amplification factor, including: obtaining the packet loss rate amplification factor based on the maximum number of consecutive packet losses and the average packet loss rate; obtaining the base number based on the average packet loss rate and the packet loss rate amplification factor; and obtaining the number of retransmitted data packets based on the packet loss level and the base number.

[0102] The base quantity can be obtained from the average packet loss rate and the packet loss rate amplification factor. The packet loss rate amplification factor can be obtained based on the maximum number of consecutive packet losses and the average packet loss rate. The packet loss rate amplification factor is used to over-send packets to prevent the link from still losing packets.

[0103] Specifically, the packet loss rate amplification factor can be the integer part obtained by multiplying the maximum number of consecutive packet losses by the average packet loss rate and rounding it up; the base number is obtained by multiplying the average packet loss rate by P and rounding it up to the integer part, where P is the packet loss rate amplification factor.

[0104] The number of retransmitted data packets varies depending on the degree of packet loss. Therefore, the number of retransmitted data packets is determined based on the degree of packet loss and the basic number of packets. The greater the degree of packet loss, the more retransmitted data packets there will be.

[0105] In some alternative embodiments, combined with Figure 5 As shown, Figure 5The flowchart of a data packet retransmission method in another embodiment is provided. The data packet retransmission parameters are determined based on the packet loss level, including: when the packet loss level represents a first-level packet loss, the retransmission start position is the desired packet position, the number of retransmissions is the first count, and the number of retransmitted data packets is the first quantity; when the packet loss level represents a second-level packet loss, the number of retransmissions is the second count, the retransmission start position for each retransmission shifts sequentially from the desired packet position, and the number of retransmitted data packets for each retransmission is the second quantity; when the packet loss level represents a third-level packet loss, the number of retransmissions is the third count, the retransmission start position for each retransmission shifts sequentially from the desired packet position, and the number of retransmitted data packets for each retransmission is the third quantity; wherein the first level is less than the second level, the second level is less than the third level; the first count is less than the second count, and the second count is less than the third count; the first quantity is less than the second quantity, and the second quantity is less than the third quantity.

[0106] Among them, combined Figure 5 As shown, after the data sender receives the negative acknowledgment message, it parses the message to obtain the expected packet sequence number, the sequence number of the corresponding negative acknowledgment message, and the packet loss level. Since packet loss is detected at the data receiver, the data sender is unaware of the receiver's processing results; therefore, the packet loss level is used to measure the packet loss severity of the data receiver link.

[0107] When packet loss occurs frequently, the difference in timestamps of packet arrival will decrease, indicating a high degree of packet loss in the link. This information is converted into a mode value and transmitted to the data sender to indicate the degree of packet loss at the data receiver.

[0108] When mode=1, meaning the packet loss level indicates that the packet loss scale of the data packets is at the first level, since the SACK message generation interval is long, it means that the link is experiencing occasional packet loss and the number of dropped packets is small. Data can be recovered simply by retransmitting the dropped packets. Therefore, the retransmission start position is the position of the expected packet, and the number of retransmissions is the first count. In this application, the first count is 1, that is, retransmitting once starting from the expected packet EPSN. The number of retransmitted data packets is the first count, that is, the basic count.

[0109] When mode=2, meaning the packet loss level indicates the second scale of data packet loss, the short interval between SACK message generation indicates that the link is experiencing a small amount of packet loss, with a moderate number of packets dropped. A small number of packets need to be retransmitted, and further packet loss is expected, requiring retransmission of a segment of packets. Therefore, the number of retransmissions is the second number, which is 2 in this application. The first retransmission starts from the expected packet EPSN, retransmitting the second number of data packets. The second retransmission starts from the expected packet EPSN + base_num / 2, retransmitting the second number of data packets, where the second number can be base_num + base_num / 2, where base_num is the base number. In other embodiments, this second number can be other values.

[0110] When mode=3, meaning the packet loss level indicates the third scale of data packet loss, the short interval between SACK message generation indicates a large number of packets being lost, necessitating retransmission of a large number of packets. Furthermore, it is anticipated that more packets will be lost, requiring further retransmission. Therefore, the number of retransmissions is the third number. In this application, the third number is 3. The first retransmission starts from the expected packet EPSN, retransmitting the third number of data packets. The second retransmission starts from the expected packet EPSN + base_num / 3, retransmitting the third number of data packets. The third retransmission starts from the expected packet EPSN + (base_num / 3)*2, retransmitting the third number of data packets. In this application, the third number can be base_num*2. In other embodiments, the third number can be other values, with base_num being the base number.

[0111] In some optional embodiments, the method further includes: after sending a data packet to the data receiver, starting a timer; if the timer expires and no negative acknowledgment or acknowledgment message corresponding to the data packet is received, determining the target packet position corresponding to the previously received acknowledgment message; and starting to resend a data packet to the data receiver from the data packet position following the target packet position.

[0112] To prevent the rejection message from being dropped, fuzzy retransmission uses a timer at the data sending end to monitor whether the ACK or NAK message is returned on time. If the preset maximum waiting time of the timer is exceeded and no ACK or NAK message has been received, the data sending end immediately starts sending messages from the last ACK message.

[0113] This is because the data receiver determines whether a packet loss level is generated based on adjacent packet loss timestamps. If no packet loss level is generated, there is no need to send a negative acknowledgment message. At this time, packet loss is very frequent, so the data sender needs to start sending messages from the last acknowledgment acknowledgment message (ACK) and continue sending messages.

[0114] In addition, if a negative acknowledgment message is dropped, messages can be sent from the last confirmed acknowledgment message (ACK) onwards in a timely manner to prevent the extent of packet loss from escalating.

[0115] This approach eliminates the need to retransmit all packets after a packet loss. The number of retransmitted packets, the retransmission count, and the retransmission start position are determined based on the packet loss procedure, thus reducing the number of invalid retransmitted packets. Furthermore, packet loss is assessed only under specific circumstances using a limited number of negative acknowledgment packets, rather than generating a BMP packet for every subsequent out-of-order packet received after detecting a packet loss. This application only adds a packet loss level without requiring additional information, reducing the need for recording extra information and bandwidth consumption. Moreover, determining the number of retransmitted packets, the retransmission count, and the retransmission start position based on the packet loss procedure reduces the processing burden on the data sender.

[0116] In one exemplary embodiment, such as Figure 6 As shown, a data packet retransmission method is provided, which is applied to... Figure 1 Taking the data receiving end as an example, the explanation includes the following steps S602 to S606. Wherein:

[0117] S602: Receive data packets sent by the data sender.

[0118] The data sender can send data packets to the data receiver. Each data packet carries a packet sequence number (PSN). The data sender sends data packets to the data receiver in ascending order of sequence number. The data receiver can determine whether any data packets have been lost based on the sequence numbers of the received data packets.

[0119] S604: If packet loss is determined based on the currently received data packets, the packet loss level is obtained according to the adjacent packet loss timestamps, and a negative response message is generated based on the packet loss level.

[0120] After receiving a data packet, it is determined whether the packet sequence number is consecutive. If the packet sequence number is not consecutive, it is determined that there is packet loss.

[0121] When the data receiving end determines that packet loss exists, it can generate the packet loss level based on the sequence number of the currently received message, the arrival timestamp, and the sequence number of the expected message. After obtaining the packet loss level, it generates a negative response message based on the packet loss level.

[0122] Packet loss can be categorized into intermittent and continuous packet loss. Intermittent packet loss typically involves dropping several packets intermittently within a continuous sequence, usually occurring when switches or routers have insufficient buffers. Continuous packet loss involves dropping packets continuously, typically occurring when the network interface's receiving capacity is insufficient. Using selective repeat to record packet loss information may exceed the bitmap's recording range, and a large number of packet losses will generate a large number of BMP (Browser Message Maps), increasing the computational burden. Using go-back-n retransmission may result in repeated retransmissions due to repeated packet loss, leading to a sharp decrease in effective bandwidth. For easier understanding, consider... Figure 7 As shown, Figure 7 This is a schematic diagram of a negative acknowledgment message in one embodiment. In this embodiment, the negative acknowledgment message includes: EMSN (Expected Message Sequence Number): the MSN (Message Sequence Number) of the message that the current receiver expects to receive; msn_off: the offset of the MSN of the message currently received by the receiver relative to the EMSN; EIPSN: the IPSN (Internal Packet Sequence Number) of the message that the current receiver expects to receive; ipsn_off: the offset of the PSN of the message currently received by the receiver relative to the EIPSN; and mode: the retransmission mode selected by the sender, i.e., the packet loss level.

[0123] S606: Send a negative acknowledgment message to the data sender. The negative acknowledgment message is used to instruct the data sender to determine the data packet retransmission parameters based on the packet loss level, and to retransmit the data packet to the data receiver based on the data packet retransmission parameters.

[0124] In this process, after the data receiver detects packet loss, it raises the priority of the Negative Acknowledgment (NAK) message to the highest level, skips the message scheduling queue, and directly sends the NAK message to the data sender.

[0125] After receiving a negative acknowledgment message from the data receiver, the data sender parses the negative acknowledgment message to determine the packet loss level.

[0126] The data sender can obtain data packet retransmission parameters based on the packet loss level. The correlation between the packet loss level and the data packet retransmission parameters can be preset, so that after determining the packet loss level, the data packet retransmission parameters can be obtained by querying this correlation. After determining the data packet retransmission parameters, the data sender can retransmit the data packet to the data receiver based on the data packet retransmission parameters.

[0127] In the above embodiments, the negative acknowledgment (NAK) message returned by the data receiver includes the packet loss level obtained by the data receiver based on adjacent packet loss timestamps. The data receiver determines the data packet retransmission parameters based on the packet loss level. The data receiver only sends the packet loss level back to the data sender using a small number of NAK messages, reducing the additional bandwidth consumption of a large number of NAK messages. Furthermore, the data receiver checks whether packet loss detection is performed continuously via PSN. The data sender uses a timeout mechanism to detect whether NAK messages are dropped. It does not require precise calculation and storage of packet loss information, making it simple to implement and suitable for large-scale deployment. Only packet loss detection and retransmission logic is added without modifying the original implementation, facilitating system integration. It adapts to various packet loss modes, making it easy to handle common packet loss scenarios.

[0128] In some optional embodiments, the packet loss level is obtained based on adjacent packet loss timestamps, including: obtaining a timestamp difference based on the timestamp of the last packet loss and the current packet loss timestamp; and obtaining the packet loss level based on the relationship between the timestamp difference and the base time.

[0129] The timestamp difference is the difference between the current packet loss timestamp and the timestamp of the last packet loss determination, where the initial timestamp of the last packet loss determination is recorded as 0.

[0130] In some optional embodiments, before determining the packet loss level based on the relationship between the timestamp difference and the base time, the method further includes: not generating a negative response message if the timestamp difference is less than the base time.

[0131] The base time is the time required to send the maximum data packet based on the maximum bandwidth. In some optional embodiments, the method further includes obtaining the base time based on the time required to send the maximum data packet based on the current maximum bandwidth.

[0132] The base time is LineRate / (MTU*8), where LineRate is the current maximum bandwidth and MTU*8 is the maximum data packet size.

[0133] If the timestamp difference is less than the base time, no negative response message will be generated to avoid generating too many negative response messages.

[0134] If the timestamp difference is greater than or equal to the base time, the packet loss level is determined based on the relationship between the timestamp difference and the base time. In this application, the smaller the timestamp difference, the larger the scale of the packet loss level, i.e., the more concentrated the packet loss; the larger the timestamp difference, the smaller the scale of the packet loss level, i.e., the sparser the packet loss.

[0135] In some alternative embodiments, combined with Figure 8 As shown, the packet loss level is determined based on the relationship between the timestamp difference and the base time, including: when the timestamp difference is greater than or equal to the base time and less than N times the base time, the packet loss level is determined to be of the third scale, where N is a time amplification factor used to offset network latency, and N is an integer greater than or equal to 2; when the timestamp difference is greater than or equal to N times the base time and less than 2N times the base time, the packet loss level is determined to be of the second scale; when the timestamp difference is greater than or equal to 2N times the base time, the packet loss level is determined to be of the first scale.

[0136] Within the range of time_diff < base_time * N, the packet loss level is determined to be the third scale, i.e., mode=3, and a retransmission is marked. Here, time_diff is the timestamp difference, base_time is the base time, and N is a time amplification factor used to compensate for network latency, and N is an integer greater than or equal to 2.

[0137] Within the range of time_diff < base_time *2*N, determine the packet loss level as the second scale, i.e., mode=2, and mark this retransmission.

[0138] When the timestamp difference is greater than or equal to 2N times the base time, the packet loss level is determined to be the first scale, i.e., mode=1. This retransmission is marked, and the sequence number PSN of the current message, the sequence number EPSN of the expected message, and the packet loss level are recorded in the negative acknowledgment message NAK and sent to the data sender.

[0139] For easier understanding, please refer to Table 1 for an explanation of the packet loss level.

[0140] Table 1:

[0141]

[0142] In the above embodiments, for packets dropped on the link, the data receiver only sends the packet loss information back to the sender using a small number of NAK packets, reducing the additional bandwidth consumption of a large number of NAK packets. Compared to go-back-n, fewer retransmission packets are sent, resulting in higher retransmission efficiency. NAK packets carry receiver information and are directly used for retransmission, eliminating the need for additional resource calculation and storage, thus saving computational and storage resources. When retransmitting, the data sender only needs to extract the information from the NAK packets for direct retransmission, without needing to perform calculations or store information; the timer module directly uses the existing timeout mechanism, and the timestamp directly uses the timestamp carried in the packet, eliminating the need for a new module. Different packet loss types and rates are covered by using different modes carried in the NAK packets.

[0143] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0144] Based on the same inventive concept, this application also provides a data packet retransmission apparatus for implementing the data packet retransmission method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more data packet retransmission apparatus embodiments provided below can be found in the limitations of the data packet retransmission method described above, and will not be repeated here.

[0145] In one exemplary embodiment, such as Figure 3 As shown, a data packet retransmission device is provided, comprising:

[0146] The first sending module 310 is used to send data packets to the data receiving end;

[0147] The first receiving module 320 is used to receive a negative acknowledgment message returned by the data receiving end, the negative acknowledgment message including the packet loss degree obtained by the data receiving end based on adjacent packet loss timestamps;

[0148] The first message processing module 330 is used to determine the data message retransmission parameters based on the packet loss level;

[0149] The first sending module 310 is also configured to resend the data packet to the data receiving end based on the data packet retransmission parameters.

[0150] In some optional embodiments, the first message processing module 330 is specifically used to determine the number of retransmitted data packets, the number of retransmissions, and the retransmission start position based on the packet loss level; and the larger the packet loss level indicates, the more retransmissions and / or the more retransmitted data packets there are; and when the number of retransmissions is greater than or equal to 2, the retransmission start position of each retransmission is shifted sequentially from the position of the desired message.

[0151] In some optional embodiments, the first message processing module 330 is specifically used to determine the number of retransmitted data packets based on the packet loss degree, the average packet loss rate, and the packet loss rate amplification factor.

[0152] In some optional embodiments, the first message processing module 330 is specifically used to obtain a packet loss rate amplification factor based on the maximum number of consecutive packet losses and the average packet loss rate; to obtain a base quantity based on the average packet loss rate and the packet loss rate amplification factor; and to obtain the number of retransmitted data packets according to the packet loss degree and the base quantity.

[0153] In some optional embodiments, the first message processing module 330 is specifically configured to: when the packet loss level indicates that the packet loss scale of the data packet is a first scale, the retransmission start position is the position of the expected message, the number of retransmissions is the first count, and the number of retransmitted data packets is a first quantity; when the packet loss level indicates that the packet loss scale of the data packet is a second scale, the number of retransmissions is the second count, the retransmission start position of each retransmission is sequentially shifted from the position of the expected message, and the number of retransmitted data packets in each retransmission is a second quantity; when the packet loss level indicates that the packet loss scale of the data packet is a third scale, the number of retransmissions is the third count, the retransmission start position of each retransmission is sequentially shifted from the position of the expected message, and the number of retransmitted data packets in each retransmission is a third quantity; wherein, the first scale is smaller than the second scale, the second scale is smaller than the third scale; the first count is smaller than the second count, and the second count is smaller than the third count; the first quantity is smaller than the second quantity, and the second quantity is smaller than the third quantity.

[0154] In some optional embodiments, the above apparatus further includes: a timer module, configured to start a timer after sending a data packet to a data receiver; if the timer expires and no negative acknowledgment or acknowledgment message corresponding to the data packet is received, determine the target packet position corresponding to the previously received acknowledgment message; and start retransmitting the data packet to the data receiver from a data packet following the target packet position.

[0155] In one exemplary embodiment, such as Figure 3 As shown, a data packet retransmission device is provided, comprising:

[0156] The second receiving module 370 is used to receive data packets sent by the data sending end;

[0157] The second message processing module 380 is used to determine the degree of packet loss based on adjacent packet loss timestamps when packet loss is determined based on the currently received data message, and to generate a negative response message based on the packet loss degree.

[0158] The second sending module 390 is used to send the negative acknowledgment message to the data sending end. The negative acknowledgment message is used to instruct the data sending end to determine the data packet retransmission parameters based on the packet loss level, and to retransmit the data packet to the data receiving end based on the data packet retransmission parameters.

[0159] In some optional embodiments, the second message processing module 380 is specifically used to obtain a timestamp difference based on the timestamp of the previous packet loss and the current packet loss timestamp; and to obtain the packet loss degree according to the relationship between the timestamp difference and the base time.

[0160] In some alternative embodiments, the second message processing module 380 is specifically used to obtain the base time based on the time required to send the maximum data message with the current maximum bandwidth.

[0161] In some optional embodiments, the second message processing module 380 is specifically configured to determine the packet loss level as a third scale when the timestamp difference is greater than or equal to the base time and less than N times the base time, where N is a time amplification factor used to offset network latency and N is an integer greater than or equal to 2; determine the packet loss level as a second scale when the timestamp difference is greater than or equal to N times the base time and less than 2N times the base time; and determine the packet loss level as a first scale when the timestamp difference is greater than or equal to 2N times the base time.

[0162] In some optional embodiments, the second message processing module 380 is specifically configured not to generate the negative response message if the timestamp difference is less than the base time.

[0163] Each module in the aforementioned data packet retransmission device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0164] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 8 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When executed by the processor, the computer program implements a data packet retransmission method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0165] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0166] In one exemplary embodiment, a chip is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the method in any of the above embodiments.

[0167] In one exemplary embodiment, a network interface card is provided, including a chip as described in any of the above embodiments and multiple interfaces, through which the chip processes data or communicates externally.

[0168] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0169] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0170] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0171] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0172] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0173] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0174] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A data packet retransmission method, characterized in that, Applied to the data sending end, the method includes: Send data packets to the data receiving end; The system receives a negative acknowledgment message from the data receiver. This message includes the packet loss severity determined by the data receiver based on adjacent packet loss timestamps. The packet loss severity is determined by the data receiver using the timestamp difference between the previously determined packet loss timestamp and the current packet loss timestamp, and based on the relationship between this timestamp difference and the base time. If the timestamp difference is greater than or equal to the base time but less than N times the base time, the packet loss severity is determined to be at the third scale. If the timestamp difference is greater than or equal to N times the base time but less than 2N times the base time, the packet loss severity is determined to be at the second scale. If the timestamp difference is greater than or equal to 2N times the base time, the packet loss severity is determined to be at the first scale. Here, N is a time amplification factor used to compensate for network latency, and N is an integer greater than or equal to 2. Based on the packet loss severity, the system determines data packet retransmission parameters, including the number of retransmitted data packets, the number of retransmissions, and the retransmission start position. The retransmission end position is determined based on the retransmission start position and the number of retransmitted data packets. When the packet loss level (representing the packet loss scale) is at the first level, the retransmission start position is the expected packet position, the number of retransmissions is the first count, and the number of retransmitted data packets is the first quantity. When the packet loss level (representing the packet loss scale) is at the second level, the number of retransmissions is the second count, the retransmission start position for each retransmission shifts sequentially from the expected packet position, and the number of retransmitted data packets for each retransmission is the second quantity. When the packet loss level (representing the packet loss scale) is at the third level, the number of retransmissions is the third count, the retransmission start position for each retransmission shifts sequentially from the expected packet position, and the number of retransmitted data packets for each retransmission is the third quantity. Wherein, the first level is less than the second level, the second level is less than the third level; the first count is less than the second count, and the second count is less than the third count; the first quantity is less than the second quantity, and the second quantity is less than the third quantity. The data packet is retransmitted to the data receiving end based on the data packet retransmission parameters.

2. The method according to claim 1, characterized in that, The method for determining the number of retransmitted data packets includes: The number of retransmitted data packets is determined based on the packet loss level, average packet loss rate, and packet loss rate amplification factor.

3. The method according to claim 2, characterized in that, The determination of the number of retransmitted data packets based on the packet loss level, average packet loss rate, and packet loss rate amplification factor includes: The packet loss rate amplification factor is obtained based on the maximum number of consecutive packet losses and the average packet loss rate. The base quantity is obtained based on the average packet loss rate and the packet loss rate amplification factor. The number of retransmitted data packets is obtained based on the packet loss level and the base quantity.

4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: After sending a data packet to the data receiver, start the timer; If the timer expires and no negative acknowledgment or acknowledgment message corresponding to the data packet is received, the location of the target packet corresponding to the previously received acknowledgment message is determined. The system begins retransmitting the data packet to the data receiving end from the data packet following the target packet position.

5. A data packet retransmission method, characterized in that, Applied to a data receiving end, the method includes: Receive data packets sent by the data sender; If packet loss is detected based on the currently received data packets, the packet loss severity is determined according to adjacent packet loss timestamps, and a negative acknowledgment message is generated based on the packet loss severity. The packet loss severity is determined by the data receiver based on the timestamp difference between the previously detected packet loss timestamp and the current packet loss timestamp, and according to the relationship between the timestamp difference and the base time. If the timestamp difference is greater than or equal to the base time, but less than N times the base time, the packet loss severity is determined to be of the third scale. If the timestamp difference is greater than or equal to N times the base time, but less than 2N times the base time, the packet loss severity is determined to be of the second scale. If the timestamp difference is greater than or equal to 2N times the base time, the packet loss severity is determined to be of the first scale. Here, N is a time amplification factor used to compensate for network latency, and N is an integer greater than or equal to 2. The negative acknowledgment message is sent to the data sender. This message instructs the data sender to determine data packet retransmission parameters based on the packet loss level, including the number of retransmitted data packets, the number of retransmissions, and the retransmission start position. The retransmission end position is determined based on the retransmission start position and the number of retransmitted data packets. When the packet loss level indicates a first-level packet loss, the retransmission start position is the desired packet position, the number of retransmissions is the first count, and the number of retransmitted data packets is the first count. When the packet loss level indicates a second-level packet loss, the number of retransmissions is the second count, and each retransmission... The retransmission start position is shifted sequentially from the expected message position, and the number of retransmitted data packets in each retransmission is the second number; when the packet loss level indicates that the packet loss scale of the data packet is the third scale, the number of retransmissions is the third number, the retransmission start position is shifted sequentially from the expected message position, and the number of retransmitted data packets in each retransmission is the third number; wherein, the first scale is less than the second scale, the second scale is less than the third scale; the first number is less than the second number, and the second number is less than the third number; the first number is less than the second number, and the second number is less than the third number, and the data packet is retransmitted to the data receiving end based on the data packet retransmission parameters.

6. The method according to claim 5, characterized in that, The method further includes: The base time is obtained based on the time required to send the largest data packet using the current maximum bandwidth.

7. The method according to claim 5, characterized in that, Before determining the packet loss level based on the relationship between the timestamp difference and the base time, the method further includes: If the timestamp difference is less than the base time, the negative response message will not be generated.

8. A data packet retransmission device, characterized in that, The device, applied to a data transmitting end, includes: The first sending module is used to send data packets to the data receiving end; The first receiving module is configured to receive a negative acknowledgment message returned by the data receiving end. The negative acknowledgment message includes the packet loss degree obtained by the data receiving end based on adjacent packet loss timestamps. The packet loss degree is determined by the data receiving end based on the timestamp difference between the previously determined packet loss timestamp and the current packet loss timestamp, and according to the relationship between the timestamp difference and the base time. If the timestamp difference is greater than or equal to the base time and less than N times the base time, the packet loss degree is determined to be of the third scale. If the timestamp difference is greater than or equal to N times the base time and less than 2N times the base time, the packet loss degree is determined to be of the second scale. If the timestamp difference is greater than or equal to 2N times the base time, the packet loss degree is determined to be of the first scale. Here, N is a time amplification factor used to compensate for network latency, and N is an integer greater than or equal to 2. The first message processing module is used to determine data packet retransmission parameters based on the packet loss level, including the number of retransmitted data packets, the number of retransmissions, and the retransmission start position. Specifically, the retransmission end position is determined based on the retransmission start position and the number of retransmitted data packets. When the packet loss level indicates a first-level packet loss, the retransmission start position is the desired packet position, the number of retransmissions is the first count, and the number of retransmitted data packets is the first count. When the packet loss level indicates a second-level packet loss, the number of retransmissions is the second count, and each retransmission... The retransmission start position is shifted sequentially from the expected message position, and the number of retransmitted data packets in each retransmission is the second number; when the packet loss level represents the packet loss scale as the third scale, the number of retransmissions is the third number, the retransmission start position is shifted sequentially from the expected message position, and the number of retransmitted data packets in each retransmission is the third number; where the first scale is less than the second scale, the second scale is less than the third scale; the first number is less than the second number, and the second number is less than the third number; the first quantity is less than the second quantity, and the second quantity is less than the third quantity. The first sending module is also configured to resend the data packet to the data receiving end based on the data packet retransmission parameters.

9. A data packet retransmission device, characterized in that, The device, applied to a data receiving end, includes: The second receiving module is used to receive data packets sent by the data sending end; The second message processing module is used to determine the degree of packet loss based on adjacent packet loss timestamps when packet loss is determined to exist based on the currently received data packets, and to generate a negative acknowledgment message based on the packet loss degree. The packet loss degree is determined by the data receiving end based on the timestamp difference between the timestamp of the last packet loss determination and the current packet loss timestamp, and according to the relationship between the timestamp difference and the base time. When the timestamp difference is greater than or equal to the base time and less than N times the base time, the packet loss degree is determined to be of the third scale, where N is a time amplification factor used to compensate for network latency, and N is an integer greater than or equal to 2. When the timestamp difference is greater than or equal to N times the base time and less than 2N times the base time, the packet loss degree is determined to be of the second scale. When the timestamp difference is greater than or equal to 2N times the base time, the packet loss degree is determined to be of the first scale. The second sending module is used to send the negative acknowledgment message to the data sending end. The negative acknowledgment message instructs the data sending end to determine data packet retransmission parameters based on the packet loss level, including the number of retransmitted data packets, the number of retransmissions, and the retransmission start position. The retransmission end position is determined based on the retransmission start position and the number of retransmitted data packets. When the packet loss level indicates a first-level packet loss, the retransmission start position is the desired packet position, the number of retransmissions is the first count, and the number of retransmitted data packets is the first count. When the packet loss level indicates a second-level packet loss, the number of retransmissions is the second count, and the retransmission start position is the desired packet position. The retransmission start position of each retransmission is shifted sequentially from the position of the expected message, and the number of retransmitted data packets in each retransmission is the second number; when the packet loss level represents the packet loss scale of the data packet as the third scale, the number of retransmissions is the third number, the retransmission start position of each retransmission is shifted sequentially from the position of the expected message, and the number of retransmitted data packets in each retransmission is the third number; wherein, the first scale is less than the second scale, the second scale is less than the third scale; the first number is less than the second number, and the second number is less than the third number; the first number is less than the second number, and the second number is less than the third number, and the data packet is retransmitted to the data receiving end based on the data packet retransmission parameters.

10. A chip comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

11. A network interface card, characterized in that, It includes the chip as described in claim 10 and a plurality of interfaces, the chip processing data or communicating externally through the interfaces.

12. A computer device, characterized in that, Includes the network interface card as described in claim 11, wherein the network interface card is used for processing data or external communication.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

14. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Data transmission method, device and equipment and computer readable storage medium

    CN113676605A