Data retransmission method and device, equipment, storage medium and program product

By using a packet loss determination method based on acknowledgment packet sequence number and link status, the problem of invalid retransmission in real-time streaming media data transmission is solved, enabling timely recovery of data packets and improving user experience.

CN120956393APending Publication Date: 2025-11-14SHANGHAI LUOTA INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511144706.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-15
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

In existing technologies, the high rate of out-of-order and invalid retransmissions of data packets due to changes in link bandwidth during real-time streaming media data transmission affects the user's viewing experience, cannot adapt to dynamic changes in the link, and causes playback stuttering.

Method used

By determining the sequence number interval and transmission time interval based on the sequence number of the first maximum acknowledgment packet and the data packets for which no acknowledgment message has been received, and combining this with the link status to determine the packet loss judgment threshold, it is possible to determine whether to retransmit data packets, adapt to dynamic changes in the link, and reduce the proportion of invalid retransmissions.

Benefits of technology

It significantly reduces the number of invalid retransmissions, reduces network overhead, avoids playback stuttering, improves the user viewing experience, and ensures timely data recovery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120956393A_ABST
    Figure CN120956393A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data retransmission method and device, equipment, a storage medium and a program product, and the method comprises the steps: obtaining a first maximum acknowledgement packet serial number, determining a first serial number interval according to the first maximum acknowledgement packet serial number and a packet serial number of a first original data packet which does not receive an acknowledgement message, determining a first sending time interval according to the sending time of the original data packet corresponding to the first maximum acknowledgement packet serial number and the sending time of the first original data packet; determining a first packet loss judgment threshold based on the first current bandwidth, the first current round-trip delay, a preset packet loss proportion and the maximum transmission unit length, and determining a second packet loss judgment threshold based on the first current round-trip delay; and when the frame type of the frame where the first original data packet is located is a non-key frame, the first serial number interval is greater than a first packet loss judgment threshold, and the first sending time interval is greater than a second packet loss judgment threshold, retransmitting the first original data packet. According to the scheme, the invalid retransmission proportion can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a data retransmission method, apparatus, device, storage medium, and program product. Background Technology

[0002] Currently, during the transmission of real-time streaming media data, data packets are easily lost due to various network disturbances. To ensure the reliability and integrity of data transmission and provide stable and efficient network services, the sending end needs to retransmit lost data packets. Taking a live streaming scenario as an example, for uplink video streams, the sending end is the broadcaster, while for downlink video streams, the sending end is the viewer's video server. For video streams that require transcoding, the sending end can also be the broadcaster's video server, which sends the video stream to a server with transcoding capabilities. The broadcaster server typically simply forwards data packets to the transcoding server, which receives the data packets and performs operations such as framing, decoding, and transcoding. Out-of-order data packets will directly affect the transcoding server's framing and decoding. Similarly, the viewer receives video packets from the viewer's video server and performs framing, decoding, and playback. If data packets are retransmitted even without loss, it will waste bandwidth and may cause data packets to fail to reach the viewer in a timely manner, resulting in playback stuttering or significant latency.

[0003] Related technologies employ RTO (RTT timeout), packet sequence number-based retransmission mechanisms, and NACK (Negative Acknowledgement) mechanisms for data retransmission. However, due to the negative impact of link bandwidth variations, RTT jitter and out-of-order packet errors are easily caused. Therefore, using the aforementioned methods for data retransmission can result in a high proportion of invalid retransmissions, failing to adapt to dynamic link changes and causing playback stuttering and negatively impacting the user's viewing experience. Summary of the Invention

[0004] This application provides a data retransmission method, apparatus, device, storage medium, and program product. It determines a first sequence number interval and a first transmission time interval based on the original data packet corresponding to the first maximum acknowledgment packet sequence number and the first original data packet for which no acknowledgment message has been received. It then combines this with the link status to determine a first packet loss threshold and a second packet loss threshold, thereby determining whether to retransmit the first original data packet. This addresses the problem in related technologies where the proportion of invalid retransmissions is high, making it unable to adapt to dynamic changes in the link, causing playback stuttering and affecting the user's viewing experience. It can determine retransmission based on the cooperative packet sequence number and packet transmission time, adapting to dynamic changes in the link, reducing the proportion of invalid retransmissions, minimizing playback stuttering, and improving the user's viewing experience.

[0005] In a first aspect, embodiments of this application provide a data retransmission method, the method comprising: Obtain the first maximum acknowledgment packet sequence number, determine the first sequence number interval based on the first maximum acknowledgment packet sequence number and the packet sequence number of the first original data packet for which no acknowledgment message has been received, and determine the first transmission time interval based on the transmission time of the original data packet corresponding to the first maximum acknowledgment packet sequence number and the transmission time of the first original data packet; A first packet loss threshold is determined based on the first current bandwidth, the first current round-trip time, the preset packet loss ratio, and the maximum transmission unit length, and a second packet loss threshold is determined based on the first current round-trip time. If the frame type of the first original data packet is a non-critical frame, the first sequence number interval is greater than the first packet loss judgment threshold, and the first transmission time interval is greater than the second packet loss judgment threshold, the first original data packet is retransmitted.

[0006] Secondly, embodiments of this application also provide a data retransmission apparatus, comprising: The acquisition module is configured to acquire the sequence number of the first maximum confirmation packet. The sequence number interval determination module is configured to determine the first sequence number interval based on the sequence number of the first maximum acknowledgment packet and the sequence number of the first original data packet for which no acknowledgment message has been received; The transmission time interval determination module is configured to determine the first transmission time interval based on the transmission time of the original data packet corresponding to the first maximum acknowledgment packet sequence number and the transmission time of the first original data packet. The packet loss judgment threshold determination module is configured to determine a first packet loss judgment threshold based on a first current bandwidth, a first current round-trip delay, a preset packet loss ratio, and a maximum transmission unit length, and to determine a second packet loss judgment threshold based on the first current round-trip delay. The first data packet retransmission module is configured to retransmit the first original data packet when the frame type of the frame containing the first original data packet is a non-critical frame, the first sequence number interval is greater than the first packet loss judgment threshold, and the first transmission time interval is greater than the second packet loss judgment threshold.

[0007] Thirdly, embodiments of this application also provide a data retransmission device, the device comprising: One or more processors; Storage device, configured to store one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the data retransmission method described in the embodiments of this application.

[0008] Fourthly, embodiments of this application also provide a non-volatile storage medium for storing computer-executable instructions, which, when executed by a computer processor, are configured to perform the data retransmission method described in embodiments of this application.

[0009] Fifthly, embodiments of this application also provide a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor of the device reads from the computer-readable storage medium and executes the computer program, causing the device to perform the data retransmission method described in embodiments of this application.

[0010] In this embodiment, the first sequence number interval is determined based on the first maximum acknowledgment packet sequence number and the sequence number of the first original data packet for which no acknowledgment message has been received. This accurately quantifies the sequence number difference between the original data packet corresponding to the first maximum acknowledgment packet sequence number and the first original data packet for which no acknowledgment message has been received. The first transmission time interval is determined based on the transmission time of the original data packet corresponding to the first maximum acknowledgment packet sequence number and the transmission time of the first original data packet. This accurately quantifies the transmission time difference between the original data packet corresponding to the first maximum acknowledgment packet sequence number and the first original data packet for which no acknowledgment message has been received. The first packet loss judgment threshold is determined based on the first current bandwidth, the first current round-trip delay, the preset packet loss ratio, and the maximum transmission unit length. The second packet loss judgment threshold is determined based on the first current round-trip delay. This allows for flexible adjustment of the thresholds to adapt to actual network conditions and ensures the accuracy of the thresholds. When the frame type of the frame containing the first original data packet is a non-critical frame, the first sequence number interval is greater than the first packet loss judgment threshold, and the first transmission time interval is greater than the second packet loss judgment threshold, the first original data packet is retransmitted. This combination of dual thresholds significantly reduces unnecessary retransmissions, reduces network overhead, avoids exacerbating congestion, and ensures timely recovery of lost data. The above solution can determine retransmission based on the sequence number of the collaborative packet and the packet sending time, adapt to dynamic changes in the link, reduce the proportion of invalid retransmissions, reduce playback stuttering, and improve the user viewing experience. Attached Figure Description

[0011] Figure 1 A flowchart of a data retransmission method provided in an embodiment of this application; Figure 2 A flowchart of a data retransmission method provided in this application embodiment, including a process of retransmission determination based on a packet loss determination threshold corresponding to a key frame; Figure 3 A flowchart of a data retransmission method provided in this application embodiment, including a process of determining a fifth packet loss judgment threshold after an invalid retransmission occurs; Figure 4A flowchart of a data retransmission method provided in this application embodiment, including the process of determining a sixth packet loss judgment threshold when no invalid retransmission occurs within a preset time interval; Figure 5 A flowchart of a data retransmission method provided in this application embodiment, including the process of determining a seventh packet loss judgment threshold after an invalid retransmission occurs; Figure 6 A flowchart of a data retransmission method provided in this application embodiment, including the process of determining an eighth packet loss judgment threshold when no invalid retransmission occurs within a preset time interval; Figure 7 A structural block diagram of a data retransmission device provided in an embodiment of this application; Figure 8 This is a schematic diagram of the structure of a data retransmission device provided in an embodiment of this application. Detailed Implementation

[0012] The embodiments of this application will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the embodiments of this application and are not intended to limit the scope of the embodiments. Furthermore, it should be noted that, for ease of description, only the parts relevant to the embodiments of this application are shown in the accompanying drawings, not the entire structure.

[0013] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and are not limited in number; for example, a first object can be one or more. The term "several" means one or more, and multiple means two or more. Furthermore, "and / or" in the specification and claims indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0014] The data retransmission method provided in this application can determine a first sequence number interval and a first transmission time interval based on the original data packet corresponding to the first maximum acknowledgment packet sequence number and the first original data packet for which no acknowledgment message has been received. It then combines this with the link status to determine a first packet loss threshold and a second packet loss threshold, thereby determining whether to retransmit the first original data packet. This data retransmission method can be specifically applied to instant messaging, live audio and video streaming, social media updates, etc. The aforementioned application scenarios are merely exemplary and illustrative. In practical applications, this data retransmission method can also be used in other scenarios, and this application does not limit its application to these scenarios.

[0015] The data retransmission method provided in this application embodiment can be executed by a computer device. The computer device refers to any electronic device with data computing, processing and storage capabilities, such as mobile phones, PCs (Personal Computers), tablet computers, or server terminal devices. This application embodiment does not limit this.

[0016] Figure 1 This is a flowchart illustrating a data retransmission method provided in an embodiment of this application. This data retransmission method is applied at the data sending end. Figure 1 As shown, this data retransmission method specifically includes the following steps: Step S101: Obtain the first maximum acknowledgment packet sequence number, determine the first sequence number interval based on the first maximum acknowledgment packet sequence number and the packet sequence number of the first original data packet for which no acknowledgment message has been received, and determine the first transmission time interval based on the transmission time of the original data packet corresponding to the first maximum acknowledgment packet sequence number and the transmission time of the first original data packet.

[0017] During data transmission, the receiving end returns an acknowledgment message to the sending end, indicating that certain data packets have been successfully received. The first maximum acknowledgment packet sequence number can be the maximum value of the sequence numbers of the original data packets corresponding to all acknowledgment messages currently received by the sending end. The first sequence number interval can be used to quantify the sequence number difference between the original data packet corresponding to the first maximum acknowledgment packet sequence number and the first original data packet that has not received an acknowledgment message. The larger the first sequence number interval, the longer the first original data packet has not been acknowledged, and the greater the possibility of packet loss.

[0018] In one embodiment, the first sequence number interval can be obtained by subtracting the sequence number of the first original data packet from the first maximum acknowledgment packet sequence number. For example, the largest data packet sequence number among all currently received acknowledgment messages is... The sequence number of the first raw data packet that did not receive an acknowledgment message is Then the first sequence number interval is .

[0019] In one embodiment, the first sequence number interval can be obtained by subtracting the sequence number of the first original data packet from the first maximum acknowledgment packet sequence number and then adding a first adjustment coefficient. The first adjustment coefficient is a configurable integer value used to adjust the sensitivity of packet loss judgment based on the packet sequence number. When the first adjustment coefficient is a positive integer, the sensitivity can be increased and retransmission can be accelerated; when the first adjustment coefficient is a negative integer, the sensitivity can be reduced and retransmission can be slowed down. The specific value of the first adjustment coefficient can be adaptively set according to the actual network conditions, and this application does not limit it.

[0020] The first transmission time interval can be used to quantify the transmission time difference between the original data packet corresponding to the first maximum acknowledgment packet sequence number and the first original data packet that has not received an acknowledgment message. The larger the first transmission time interval, the longer the first original data packet waits for acknowledgment, and the greater the possibility of packet loss.

[0021] In one embodiment, the first transmission time interval can be obtained by subtracting the transmission time of the first original data packet from the transmission time of the original data packet corresponding to the first maximum acknowledgment packet sequence number. For example, the transmission time of the original data packet corresponding to the first maximum acknowledgment packet sequence number is... The time when the first raw data packet was sent without receiving an acknowledgment message was Then the first sequence number interval is .

[0022] In one embodiment, the first transmission time interval can be obtained by subtracting the transmission time of the first original data packet from the transmission time of the original data packet corresponding to the first maximum acknowledgment packet sequence number, and then adding a second adjustment coefficient. The second adjustment coefficient is a configurable time value used to adjust the sensitivity of packet loss judgment based on packet transmission time. When the second adjustment coefficient is positive, the sensitivity can be increased and retransmission can be accelerated; when the second adjustment coefficient is negative, the sensitivity can be reduced and retransmission can be slowed down. The specific value of the second adjustment coefficient can be adaptively set according to the actual network conditions, and is not limited in this application.

[0023] Step S102: Determine a first packet loss threshold based on the first current bandwidth, the first current round-trip delay, the preset packet loss ratio, and the maximum transmission unit length, and determine a second packet loss threshold based on the first current round-trip delay.

[0024] Here, the first current bandwidth can be the available bandwidth of the current network path detected by the data sender at the current moment. The first current round-trip time can be the time elapsed from the sending of the current data packet to the receiving acknowledgment, detected by the data sender at the current moment. The preset packet loss ratio can be a pre-set expected packet loss rate threshold, which can be adaptively set based on empirical data and network link conditions, and its value range can be [missing value]. The maximum transmission unit length can be the maximum data packet size that the network path can transmit. The first packet loss threshold can be used to determine whether the first sequence interval meets the packet loss condition.

[0025] In one embodiment, the formula for calculating the first packet loss threshold is as follows:

[0026] in, The first packet loss threshold is set. The first current bandwidth, For the first current round-trip delay, To preset the packet loss ratio, This is the maximum transmission unit length. It should be noted that the product of the first current bandwidth and the first current round-trip time can be used to obtain the maximum number of data packets that can be transmitted in the link. Then, combined with the preset packet loss ratio and the maximum transmission unit length, the number of out-of-order data packets can be calculated as the first packet loss judgment threshold.

[0027] In another embodiment, the formula for calculating the first packet loss determination threshold is as follows:

[0028] in, The first packet loss threshold is set. The first current bandwidth, For the first current round-trip delay, To preset the packet loss ratio, The maximum transmission unit length, It is a function with maximum value. This is the first preset value. The minimum value that can be used to maintain the first packet loss judgment threshold is To avoid setting the first packet loss threshold too low. For example, The specific configuration can be adapted according to the actual network conditions.

[0029] The second packet loss threshold can be used to determine whether the first transmission time interval meets the packet loss condition. In one embodiment, the second packet loss threshold can be obtained by multiplying the first current round-trip time delay by a preset coefficient, where the preset coefficient can be... Specifically, the settings can be adaptively configured based on empirical data and network link conditions. In one embodiment, the second packet loss judgment threshold can be obtained by multiplying the weighted average of the first current round-trip time and the previous historical round-trip time by a preset coefficient.

[0030] Step S103: If the frame type of the first original data packet is a non-critical frame, the first sequence number interval is greater than the first packet loss judgment threshold, and the first transmission time interval is greater than the second packet loss judgment threshold, the first original data packet is retransmitted.

[0031] In network transmission, a GOP (Group of Pictures) is a group of independently decodable pictures. The first frame is usually a key frame, which can be independently decoded into a picture frame without relying on any other frames. Other frames are usually forward prediction frames or bidirectional prediction frames, which need to refer to the preceding frames or the frames before and after them to be successfully decoded. Therefore, different retransmission strategies can be set for different types of data frames to ensure timely and reliable transmission of key frames. When the frame type of the first original data packet is determined to be a non-key frame, the calculation result of step S102 can be directly used for retransmission judgment. When the frame type of the first original data packet is determined to be a key frame, a more sensitive related threshold can be further determined based on the calculation result of step S102 to prioritize the retransmission of key frames and improve the recovery speed of key frames. If the first sequence number interval is greater than the first packet loss judgment threshold, it can be considered that the difference between the first maximum acknowledgment packet sequence number and the packet sequence number of the first original data packet that did not receive an acknowledgment message is large, and judging from the packet sequence number dimension, the first original data packet is more likely to be lost. If the first transmission time interval is greater than the second packet loss threshold, it can be considered that the difference between the transmission time of the original data packet corresponding to the first maximum acknowledgment packet sequence number and the transmission time of the first original data packet is large, and judging from the packet transmission time dimension, the probability of packet loss of the first original data packet is high. Therefore, combining the fact that the first sequence number interval is greater than the first packet loss threshold and the first transmission time interval is greater than the second packet loss threshold, it can be determined that the first original data packet should be retransmitted. If the first sequence number interval is less than or equal to the first packet loss threshold, or the first transmission time interval is less than or equal to the second packet loss threshold, the first original data packet can be temporarily not determined to be lost, and there is no need to retransmit the first original data packet.

[0032] The above-mentioned method of determining the first sequence number interval based on the first maximum acknowledgment packet sequence number and the sequence number of the first original data packet for which no acknowledgment message has been received can accurately quantify the sequence number difference between the original data packet corresponding to the first maximum acknowledgment packet sequence number and the first original data packet for which no acknowledgment message has been received. Similarly, determining the first transmission time interval based on the transmission time of the original data packet corresponding to the first maximum acknowledgment packet sequence number and the transmission time of the first original data packet can accurately quantify the transmission time difference between the original data packet corresponding to the first maximum acknowledgment packet sequence number and the first original data packet for which no acknowledgment message has been received. Furthermore, determining the first packet loss judgment threshold based on the first current bandwidth, the first current round-trip time delay, the preset packet loss ratio, and the maximum transmission unit length, and determining the second packet loss judgment threshold based on the first current round-trip time delay, allows for flexible adjustment of the thresholds to adapt to actual network conditions, ensuring threshold accuracy. When the frame type of the first original data packet is a non-critical frame, the first sequence number interval is greater than the first packet loss judgment threshold, and the first transmission time interval is greater than the second packet loss judgment threshold, retransmitting the first original data packet can significantly reduce unnecessary retransmissions by combining the dual thresholds, reducing network overhead, avoiding exacerbating congestion, and ensuring timely recovery of lost data. The above solution can determine retransmission based on the sequence number of the collaborative packet and the packet sending time, adapt to dynamic changes in the link, reduce the proportion of invalid retransmissions, reduce playback stuttering, and improve the user viewing experience.

[0033] Figure 2 This is a flowchart illustrating a data retransmission method provided in this application, which includes a retransmission determination process based on a packet loss threshold corresponding to a keyframe. For example... Figure 2 As shown, the specific steps include the following: Step S201: Obtain the first maximum acknowledgment packet sequence number, determine the first sequence number interval based on the first maximum acknowledgment packet sequence number and the packet sequence number of the first original data packet for which no acknowledgment message has been received, and determine the first transmission time interval based on the transmission time of the original data packet corresponding to the first maximum acknowledgment packet sequence number and the transmission time of the first original data packet.

[0034] Step S202: Determine a first packet loss threshold based on the first current bandwidth, the first current round-trip delay, the preset packet loss ratio, and the maximum transmission unit length, and determine a second packet loss threshold based on the first current round-trip delay.

[0035] Step S203: If the frame type of the first original data packet is a non-critical frame, the first sequence number interval is greater than the first packet loss judgment threshold, and the first transmission time interval is greater than the second packet loss judgment threshold, the first original data packet is retransmitted.

[0036] Step S204: If the frame type of the frame containing the first original data packet is a key frame, determine the third packet loss judgment threshold based on the first out-of-order degree value, the second current bandwidth, the second current round-trip delay, the first preset priority ratio, the maximum transmission unit length, and the first packet loss judgment threshold, and determine the fourth packet loss judgment threshold based on the second out-of-order degree value, the second current round-trip delay, the second preset priority ratio, and the second packet loss judgment threshold.

[0037] If the frame type of the first original data packet is a keyframe, a more sensitive relevant threshold can be further determined based on the calculation result of step S202. The first out-of-order severity value can be used to measure the degree of out-of-order status of data packets in the corresponding packet sequence number dimension on the transmission link at the current moment. Optionally, the calculation formula for the first out-of-order severity value is as follows:

[0038] in, This represents the first level of disorder. The first packet loss threshold is set. This is a smoothed calculation result based on multiple recent bandwidth sample values. This is a smoothed calculation result of the most recent round-trip delay samples. This is the maximum transmission unit length.

[0039] The second out-of-order severity value can be used to measure the degree of data packet out-of-order in terms of the corresponding packet transmission time dimension on the transmission link at the current moment. Optionally, the formula for calculating the second out-of-order severity value is as follows:

[0040] in, This is the second disorder level value. This is the second packet loss threshold. This is a smoothed calculation result of the most recent round-trip delay samples.

[0041] The first preset priority ratio is a priority adjustment parameter set for the corresponding packet sequence number dimension of the keyframe, used to adjust the priority level of the keyframe, and its value range can be... .

[0042] In one embodiment, the specific calculation process for the third packet loss determination threshold is as follows: The first packet loss judgment difference is determined based on the first out-of-order degree value, the second current bandwidth, the second current round-trip time, the first preset priority ratio, and the maximum transmission unit length; the third packet loss judgment threshold is determined based on the first packet loss judgment threshold and the first packet loss judgment difference.

[0043] The first packet loss determination difference can be the adjustment range of the first packet loss determination threshold to obtain the third packet loss determination threshold. Optionally, the formula for calculating the first packet loss determination difference is as follows:

[0044] in, This is the difference for determining the first packet loss. This represents the first level of disorder. For the second current bandwidth, For the second current round-trip delay, The maximum transmission unit length, This is the first preset priority ratio.

[0045] Optionally, the third packet loss judgment threshold can be obtained by subtracting the first packet loss judgment difference from the first packet loss judgment threshold, or by subtracting the first packet loss judgment difference from the first packet loss judgment threshold and then adding the first out-of-order compensation factor. The first out-of-order compensation factor can be adaptively set according to empirical data and network link type.

[0046] The second preset priority ratio is a priority adjustment parameter set for the corresponding packet transmission time dimension of the key frame. It is used to adjust the priority level of the key frame, and its value range can be... .

[0047] In one embodiment, the specific calculation process for the fourth packet loss determination threshold is as follows: The second packet loss judgment difference is determined based on the second disorder level value, the second current round-trip delay, and the second preset priority ratio; the fourth packet loss judgment threshold is determined based on the second packet loss judgment threshold and the second packet loss judgment difference.

[0048] The second packet loss determination difference can be the adjustment range of the second packet loss determination threshold to obtain the fourth packet loss determination threshold. Optionally, the formula for calculating the second packet loss determination difference is as follows:

[0049] in, This is the difference for determining the second packet loss. This is the second disorder level value. For the second current round-trip delay, This is the second preset priority ratio.

[0050] Optionally, the fourth packet loss judgment threshold can be obtained by subtracting the second packet loss judgment difference from the second packet loss judgment threshold, or by subtracting the second packet loss judgment difference from the second packet loss judgment threshold and then adding the second out-of-order compensation factor. The second out-of-order compensation factor can be adaptively set according to empirical data and network link type.

[0051] Step S205: If the first sequence number interval is greater than the third packet loss judgment threshold and the first transmission time interval is greater than the fourth packet loss judgment threshold, retransmit the first original data packet.

[0052] Specifically, if the first sequence number interval is greater than the third packet loss threshold and the first transmission time interval is greater than the fourth packet loss threshold, the first original data packet of the corresponding frame type (key frame) can be considered lost and needs to be retransmitted. Original data packets of other frame types are then judged using the first and second packet loss thresholds.

[0053] As mentioned above, when the frame type of the first original data packet is determined to be a key frame, the first packet loss judgment threshold and the second packet loss judgment threshold can be reasonably adjusted to obtain the third packet loss judgment threshold and the fourth packet loss judgment threshold that meet the high priority requirements of the key frame, making full use of the limited link bandwidth, ensuring timely recovery of the key frame, and guaranteeing the smoothness and real-time performance of playback.

[0054] Figure 3 This is a flowchart illustrating a data retransmission method provided in this application, which includes a process for determining a fifth packet loss threshold after an invalid retransmission occurs. Figure 3 As shown, the specific steps include the following: Step S301: Obtain the first maximum acknowledgment packet sequence number, determine the first sequence number interval based on the first maximum acknowledgment packet sequence number and the packet sequence number of the first original data packet for which no acknowledgment message has been received, and determine the first transmission time interval based on the transmission time of the original data packet corresponding to the first maximum acknowledgment packet sequence number and the transmission time of the first original data packet.

[0055] Step S302: Determine a first packet loss judgment threshold based on the first current bandwidth, the first current round-trip delay, the preset packet loss ratio, and the maximum transmission unit length, and determine a second packet loss judgment threshold based on the first current round-trip delay.

[0056] Step S303: If the frame type of the frame containing the first original data packet is a non-critical frame, the first sequence number interval is greater than the first packet loss judgment threshold, and the first transmission time interval is greater than the second packet loss judgment threshold, the first original data packet is retransmitted.

[0057] Step S304: Determine the third out-of-order value based on the first packet loss judgment threshold, the first bandwidth smoothing value, the first round-trip delay smoothing value, and the maximum transmission unit length.

[0058] The third out-of-order severity value can be used to measure the degree of data packet out-of-order status at the current moment, corresponding to the packet sequence number dimension on the transmission link. Optionally, the formula for calculating the third out-of-order severity value is as follows:

[0059] in, This is the third disorder level value. The first packet loss threshold is set. This is the first bandwidth smoothing value. This is the smoothed value for the first round-trip delay. This is the maximum transmission unit length.

[0060] Step S305: Upon receiving the original acknowledgment information corresponding to the first original data packet, obtain the second maximum acknowledgment packet sequence number, determine the second sequence number interval based on the second maximum acknowledgment packet sequence number and the packet sequence number of the first original data packet, and determine the first invalid out-of-order degree value based on the second sequence number interval, the second bandwidth smoothing value, the second round-trip delay smoothing value, and the maximum transmission unit length.

[0061] Specifically, if an original acknowledgment message corresponding to the first original data packet is received after retransmitting the first original data packet, the first original data packet can be considered an invalid retransmission. In this case, the packet loss threshold for the corresponding sequence number dimension needs to be re-determined to reduce invalid retransmissions. The second maximum acknowledgment packet sequence number can be the maximum sequence number of all original data packets corresponding to acknowledgment messages currently received by the data sender when the original acknowledgment message corresponding to the first original data packet is received.

[0062] In one embodiment, the second sequence number interval can be obtained by subtracting the sequence number of the first original data packet from the second maximum acknowledgment packet sequence number. In another embodiment, the second sequence number interval can be obtained by subtracting the sequence number of the first original data packet from the second maximum acknowledgment packet sequence number and then adding a third adjustment coefficient. This third adjustment coefficient is a configurable integer value used to adjust the sensitivity of packet loss determination based on sequence numbers. The specific value of the third adjustment coefficient can be adaptively set according to the actual network conditions, and is not limited in this application.

[0063] In one embodiment, the formula for calculating the first invalid disorder level value is as follows:

[0064] in, This is the first level of invalid disorder. The second sequence number interval, This is the second bandwidth smoothing value. This is the second round-trip delay smoothing value. This is the maximum transmission unit length.

[0065] Step S306: If the first invalid out-of-order severity value is greater than the third out-of-order severity value, a fifth packet loss judgment threshold is determined based on the first invalid out-of-order severity value, the second bandwidth smoothing value, the second round-trip delay smoothing value, and the maximum transmission unit length. This threshold is used to determine whether the second original data packet that has not received an acknowledgment message should be retransmitted.

[0066] If the first out-of-order severity value is greater than the third out-of-order severity value, it can be considered that the out-of-order severity of actual network transmission has increased, and the packet loss judgment threshold needs to be increased. In one embodiment, the calculation formula for the fifth packet loss judgment threshold is as follows:

[0067] in, This is the fifth packet loss threshold. This is the second bandwidth smoothing value. This is the first level of invalid disorder. This is the second round-trip delay smoothing value. This is the maximum transmission unit length. Therefore, the fifth packet loss judgment threshold can be used instead of the first packet loss judgment threshold for packet loss judgment at the corresponding packet sequence number dimension, and combined with the packet loss judgment threshold at the corresponding packet transmission time dimension for retransmission judgment of the second original data packet for which no acknowledgment message has been received.

[0068] As described above, upon receiving the original acknowledgment information corresponding to the first original data packet, a first invalid out-of-order severity value is determined based on the second sequence number interval, the second bandwidth smoothing value, the second round-trip delay smoothing value, and the maximum transmission unit length. This accurately quantifies the actual out-of-order severity of the link in conjunction with invalid retransmission scenarios. Furthermore, if the first invalid out-of-order severity value is greater than the third out-of-order severity value, a fifth packet loss judgment threshold is determined based on the first invalid out-of-order severity value, the second bandwidth smoothing value, the second round-trip delay smoothing value, and the maximum transmission unit length. This adaptively increases the packet loss judgment threshold in conjunction with invalid retransmission scenarios, reducing sensitivity and avoiding frequent false triggering of retransmissions in out-of-order scenarios.

[0069] Figure 4 This is a flowchart illustrating a data retransmission method provided in this application, which includes determining a sixth packet loss threshold when no invalid retransmissions occur within a preset time interval. Figure 4 As shown, the specific steps include the following: Step S401: Obtain the first maximum acknowledgment packet sequence number, determine the first sequence number interval based on the first maximum acknowledgment packet sequence number and the packet sequence number of the first original data packet for which no acknowledgment message has been received, and determine the first transmission time interval based on the transmission time of the original data packet corresponding to the first maximum acknowledgment packet sequence number and the transmission time of the first original data packet.

[0070] Step S402: Determine a first packet loss judgment threshold based on the first current bandwidth, the first current round-trip delay, the preset packet loss ratio, and the maximum transmission unit length, and determine a second packet loss judgment threshold based on the first current round-trip delay.

[0071] Step S403: If the frame type of the first original data packet is a non-critical frame, the first sequence number interval is greater than the first packet loss judgment threshold, and the first transmission time interval is greater than the second packet loss judgment threshold, the first original data packet is retransmitted.

[0072] Step S404: If no invalid retransmission data packet occurs within the preset time interval, determine the first downsizing step size based on the third bandwidth smoothing value, the third round-trip delay smoothing value, the maximum transmission unit length, and the first preset descent ratio.

[0073] Invalid retransmitted data packets can be redundant data packets that were retransmitted due to out-of-order delivery, delay, or other reasons, but whose original data packets were acknowledged as received. If no invalid retransmitted data packets occur within the preset time interval, it can be considered that the network is relatively stable at this time, and the degree of out-of-order delivery or delay has decreased. This allows for a reduction in the packet loss threshold, improving the timeliness of packet loss detection and accelerating packet loss recovery. The first preset reduction ratio can be a threshold reduction coefficient pre-set for the corresponding packet sequence number dimension to control the degree of threshold reduction. For example, the first preset reduction ratio is... The first adjustment step size can be the magnitude by which the packet loss judgment threshold in the current packet sequence dimension is lowered.

[0074] In one embodiment, the formula for calculating the first downward adjustment step size is as follows:

[0075] in, The first step down is to adjust the size of the adjustment. This is the third bandwidth smoothing value. This is the third round-trip delay smoothing value. The maximum transmission unit length, The first preset decrease ratio.

[0076] In another embodiment, the formula for calculating the first downsizing step size is as follows:

[0077] in, The first step down is to adjust the size of the adjustment. This is the third bandwidth smoothing value. This is the third round-trip delay smoothing value. The maximum transmission unit length, The first preset decrease ratio, This is the second preset value. For the maximum value function, this The minimum value that can be used to maintain the first downward adjustment step size is To avoid setting the first downward adjustment step too small. For example, The specific configuration can be adapted according to the actual network conditions.

[0078] Step S405: Determine the sixth packet loss judgment threshold based on the first downsizing step size and the first packet loss judgment threshold, which is used to determine whether the second original data packet that has not received an acknowledgment message should be retransmitted based on the sixth packet loss judgment threshold.

[0079] In one embodiment, the formula for calculating the sixth packet loss determination threshold is as follows:

[0080] in, The sixth packet loss threshold is set. The first step down is to adjust the size of the adjustment. This is the first packet loss threshold.

[0081] In another embodiment, the formula for calculating the sixth packet loss determination threshold is as follows:

[0082] in, The sixth packet loss threshold is set. The first step down is to adjust the size of the adjustment. The first packet loss threshold is set. It is a function with maximum value. This is the third preset value. The minimum value that can be used to maintain the sixth packet loss judgment threshold is To avoid setting the sixth packet loss threshold too low. For example, Specifically, the configuration can be adapted according to the actual network conditions. Therefore, the sixth packet loss threshold can be used to replace the first packet loss threshold for packet loss judgment at the corresponding packet sequence number dimension, and combined with the packet loss threshold at the corresponding packet sending time dimension to determine the retransmission of the second original data packet for which no acknowledgment message has been received.

[0083] As described above, if no invalid retransmitted data packets occur within the preset time interval, the first reduction step size is determined based on the third bandwidth smoothing value, the third round-trip delay smoothing value, the maximum transmission unit length, and the first preset reduction ratio. This can accurately quantify the magnitude of the reduction in the packet loss judgment threshold. The sixth packet loss judgment threshold is determined based on the first reduction step size and the first packet loss judgment threshold. This can appropriately reduce the packet loss judgment threshold, improve the timeliness of packet loss detection, and ensure rapid recovery from packet loss.

[0084] Figure 5This is a flowchart illustrating a data retransmission method provided in this application, which includes a process for determining a seventh packet loss threshold after an invalid retransmission occurs. Figure 5 As shown, the specific steps include the following: Step S501: Obtain the first maximum acknowledgment packet sequence number, determine the first sequence number interval based on the first maximum acknowledgment packet sequence number and the packet sequence number of the first original data packet for which no acknowledgment message has been received, and determine the first transmission time interval based on the transmission time of the original data packet corresponding to the first maximum acknowledgment packet sequence number and the transmission time of the first original data packet.

[0085] Step S502: Determine a first packet loss judgment threshold based on the first current bandwidth, the first current round-trip delay, the preset packet loss ratio, and the maximum transmission unit length, and determine a second packet loss judgment threshold based on the first current round-trip delay.

[0086] Step S503: If the frame type of the frame containing the first original data packet is a non-critical frame, the first sequence number interval is greater than the first packet loss judgment threshold, and the first transmission time interval is greater than the second packet loss judgment threshold, the first original data packet is retransmitted.

[0087] Step S504: Determine the fourth out-of-order value based on the second packet loss judgment threshold and the fourth round-trip delay smoothing value.

[0088] The fourth out-of-order severity value can be used to measure the degree of data packet out-of-order status at the current moment, corresponding to the packet sequence number dimension. Optionally, the formula for calculating the fourth out-of-order severity value is as follows:

[0089] in, This is the fourth disorder level value. This is the fourth round-trip delay smoothing value. This is the second packet loss threshold.

[0090] Step S505: Upon receiving the original acknowledgment information corresponding to the first original data packet, obtain the second maximum acknowledgment packet sequence number, determine the second transmission time interval based on the transmission time of the original data packet corresponding to the second maximum acknowledgment packet sequence number and the transmission time of the first original data packet, and determine the second invalid out-of-order degree value based on the second transmission time interval and the fifth round-trip delay smoothing value.

[0091] If, after retransmitting the first original data packet, the original acknowledgment information corresponding to the first original data packet is received, the first original data packet can be regarded as an invalid retransmission. It is necessary to re-determine the packet loss judgment threshold of the corresponding packet sending time dimension in order to reduce invalid retransmissions.

[0092] In one embodiment, the second transmission time interval can be obtained by subtracting the transmission time of the first original data packet from the transmission time of the original data packet corresponding to the second maximum acknowledgment packet sequence number. In another embodiment, the second transmission time interval can be obtained by subtracting the transmission time of the first original data packet from the transmission time of the original data packet corresponding to the second maximum acknowledgment packet sequence number, and then adding a fourth adjustment coefficient. This fourth adjustment coefficient is a configurable time value used to adjust the sensitivity of packet loss determination based on packet transmission time. The specific value of the fourth adjustment coefficient can be adaptively set according to the actual network conditions, and is not limited in this application.

[0093] In one embodiment, the formula for calculating the second invalid disorder level value is as follows:

[0094] in, This is the second level of invalid disorder. This is the fifth round-trip delay smoothing value. This is the second transmission time interval.

[0095] Step S506: If the second invalid out-of-order severity value is greater than the fourth out-of-order severity value, a seventh packet loss judgment threshold is determined based on the second invalid out-of-order severity value and the fifth round-trip delay smoothing value. This threshold is used to determine whether the second original data packet that has not received an acknowledgment message should be retransmitted.

[0096] If the second out-of-order severity value is greater than the fourth out-of-order severity value, it can be considered that the out-of-order severity of actual network transmission has increased, and the packet loss judgment threshold needs to be raised. In one embodiment, the calculation formula for the seventh packet loss judgment threshold is as follows:

[0097] in, The seventh packet loss threshold is set. This is the fifth round-trip delay smoothing value. This is the second invalid out-of-order severity value. Therefore, the seventh packet loss judgment threshold can be used instead of the second packet loss judgment threshold for packet loss judgment in the corresponding packet transmission time dimension, and combined with the packet loss judgment threshold in the corresponding packet sequence number dimension for retransmission judgment of the second original data packet that did not receive an acknowledgment message in the subsequent sequence.

[0098] As described above, upon receiving the original acknowledgment information corresponding to the first original data packet, the second invalid out-of-order severity value is determined based on the second transmission time interval and the fifth round-trip delay smoothing value. This accurately quantifies the actual out-of-order severity of the link in conjunction with invalid retransmission. Furthermore, if the second invalid out-of-order severity value is greater than the fourth out-of-order severity value, the seventh packet loss judgment threshold is determined based on the second invalid out-of-order severity value and the fifth round-trip delay smoothing value. This adaptively increases the packet loss judgment threshold in conjunction with invalid retransmission, reducing sensitivity and avoiding frequent false triggering of retransmissions in out-of-order scenarios.

[0099] Figure 6 This is a flowchart illustrating a data retransmission method provided in this application, which includes a process for determining an eighth packet loss threshold when no invalid retransmissions occur within a preset time interval. (See flowchart for example.) Figure 6 As shown, the specific steps include the following: Step S601: Obtain the first maximum acknowledgment packet sequence number, determine the first sequence number interval based on the first maximum acknowledgment packet sequence number and the packet sequence number of the first original data packet for which no acknowledgment message has been received, and determine the first transmission time interval based on the transmission time of the original data packet corresponding to the first maximum acknowledgment packet sequence number and the transmission time of the first original data packet.

[0100] Step S602: Determine a first packet loss judgment threshold based on the first current bandwidth, the first current round-trip delay, the preset packet loss ratio, and the maximum transmission unit length, and determine a second packet loss judgment threshold based on the first current round-trip delay.

[0101] Step S603: If the frame type of the frame containing the first original data packet is a non-critical frame, the first sequence number interval is greater than the first packet loss judgment threshold, and the first transmission time interval is greater than the second packet loss judgment threshold, the first original data packet is retransmitted.

[0102] Step S604: If no invalid retransmission data packet occurs within the preset time interval, determine the second downward adjustment step size based on the sixth round-trip delay smoothing value and the second preset decrease ratio.

[0103] Invalid retransmitted data packets can be redundant data packets that were retransmitted due to out-of-order delivery, delay, or other reasons, but whose original data packets were acknowledged as received. If no invalid retransmitted data packets occur within the preset time interval, it can be considered that the network is relatively stable at that time, and the degree of out-of-order delivery or delay has decreased, thus lowering the packet loss judgment threshold. The second preset reduction ratio can be a threshold reduction coefficient preset in the corresponding packet transmission time dimension to control the degree of threshold reduction. For example, the second preset reduction ratio is... The second adjustment step size can be the magnitude by which the packet loss judgment threshold in the current packet sending time dimension is lowered.

[0104] In one embodiment, the formula for calculating the second downsizing step size is as follows:

[0105] in, This is the second step down. The second preset decrease ratio, This is the sixth round-trip delay smoothing value.

[0106] In another embodiment, the formula for calculating the second down-adjustment step size is as follows:

[0107] in, This is the second step down. The second preset decrease ratio, This is the sixth round-trip delay smoothing value. This is the fourth preset value. For the maximum value function, this The minimum value that can be used to maintain the second downward adjustment step size is To avoid setting the second downward adjustment step size too small. For example, The specific configuration can be adapted according to the actual network conditions.

[0108] Step S605: Determine the eighth packet loss judgment threshold based on the second downsizing step size and the second packet loss judgment threshold, which is used to determine whether the second original data packet that has not received an acknowledgment message should be retransmitted based on the eighth packet loss judgment threshold.

[0109] In one embodiment, the formula for calculating the eighth packet loss determination threshold is as follows:

[0110] in, This is the eighth packet loss threshold. This is the second step down. This is the second packet loss threshold.

[0111] In another embodiment, the formula for calculating the eighth packet loss determination threshold is as follows:

[0112] in, This is the eighth packet loss threshold. This is the second step down. This is the second packet loss threshold. It is a function with maximum value. This is the fifth preset value. The minimum value that can be used to maintain the eighth packet loss judgment threshold is To avoid setting the eighth packet loss threshold too low. For example, , This represents the round-trip time at the current moment, which can be adaptively configured based on actual network conditions. Therefore, the eighth packet loss threshold can be used to replace the second packet loss threshold for packet loss judgment based on the corresponding packet transmission time dimension, and combined with the packet loss threshold based on the corresponding packet sequence number dimension for retransmission judgment of the second original data packet for which no acknowledgment message has been received.

[0113] As described above, if no invalid retransmitted data packets occur within the preset time interval, the second reduction step size is determined based on the sixth round-trip delay smoothing value and the second preset reduction ratio, which can accurately quantify the magnitude of the reduction in the packet loss judgment threshold; the eighth packet loss judgment threshold is determined based on the second reduction step size and the second packet loss judgment threshold, which can appropriately reduce the packet loss judgment threshold, improve the timeliness of packet loss detection, and ensure rapid recovery from packet loss.

[0114] Figure 7 This is a structural block diagram of a data retransmission device provided in an embodiment of this application. The device is configured to execute the data retransmission method provided in the above embodiment, and has corresponding functional modules and beneficial effects for executing the method. For example... Figure 7 As shown, the device specifically includes: Module 701 is configured to acquire the sequence number of the first maximum confirmation packet; The sequence number interval determination module 702 is configured to determine the first sequence number interval based on the first maximum acknowledgment packet sequence number and the packet sequence number of the first original data packet for which no acknowledgment message has been received; The transmission time interval determination module 703 is configured to determine the first transmission time interval based on the transmission time of the original data packet corresponding to the first maximum acknowledgment packet sequence number and the transmission time of the first original data packet. The packet loss determination threshold determination module 704 is configured to determine a first packet loss determination threshold based on a first current bandwidth, a first current round-trip delay, a preset packet loss ratio, and a maximum transmission unit length, and to determine a second packet loss determination threshold based on the first current round-trip delay. The first data packet retransmission module 705 is configured to retransmit the first original data packet when the frame type of the frame containing the first original data packet is a non-critical frame, the first sequence number interval is greater than the first packet loss judgment threshold, and the first transmission time interval is greater than the second packet loss judgment threshold.

[0115] The above-mentioned method of determining the first sequence number interval based on the first maximum acknowledgment packet sequence number and the sequence number of the first original data packet for which no acknowledgment message has been received can accurately quantify the sequence number difference between the original data packet corresponding to the first maximum acknowledgment packet sequence number and the first original data packet for which no acknowledgment message has been received. Similarly, determining the first transmission time interval based on the transmission time of the original data packet corresponding to the first maximum acknowledgment packet sequence number and the transmission time of the first original data packet can accurately quantify the transmission time difference between the original data packet corresponding to the first maximum acknowledgment packet sequence number and the first original data packet for which no acknowledgment message has been received. Furthermore, determining the first packet loss judgment threshold based on the first current bandwidth, the first current round-trip time delay, the preset packet loss ratio, and the maximum transmission unit length, and determining the second packet loss judgment threshold based on the first current round-trip time delay, allows for flexible adjustment of the thresholds to adapt to actual network conditions, ensuring threshold accuracy. When the frame type of the first original data packet is a non-critical frame, the first sequence number interval is greater than the first packet loss judgment threshold, and the first transmission time interval is greater than the second packet loss judgment threshold, retransmitting the first original data packet can significantly reduce unnecessary retransmissions by combining the dual thresholds, reducing network overhead, avoiding exacerbating congestion, and ensuring timely recovery of lost data. The above solution can determine retransmission based on the sequence number of the collaborative packet and the packet sending time, adapt to dynamic changes in the link, reduce the proportion of invalid retransmissions, reduce playback stuttering, and improve the user viewing experience.

[0116] In one possible embodiment, a second data packet retransmission module is also included, configured as follows: When the frame type of the first original data packet is a key frame, a third packet loss judgment threshold is determined based on the first out-of-order degree value, the second current bandwidth, the second current round-trip delay, the first preset priority ratio, the maximum transmission unit length and the first packet loss judgment threshold, and a fourth packet loss judgment threshold is determined based on the second out-of-order degree value, the second current round-trip delay, the second preset priority ratio and the second packet loss judgment threshold. If the first sequence number interval is greater than the third packet loss judgment threshold and the first transmission time interval is greater than the fourth packet loss judgment threshold, the first original data packet is retransmitted.

[0117] In one possible embodiment, a second data packet retransmission module is also included, configured as follows: The first packet loss judgment difference is determined based on the first out-of-order degree value, the second current bandwidth, the second current round-trip time, the first preset priority ratio, and the maximum transmission unit length; The third packet loss threshold is determined based on the first packet loss threshold and the difference between the first packet loss threshold and the first packet loss threshold.

[0118] In one possible embodiment, a second data packet retransmission module is also included, configured as follows: The second packet loss determination difference is determined based on the second disorder level value, the second current round-trip time delay, and the second preset priority ratio; The fourth packet loss threshold is determined based on the difference between the second packet loss threshold and the second packet loss threshold.

[0119] In one possible embodiment, a first threshold adjustment module is further included, configured to: The third out-of-order severity value is determined based on the first packet loss judgment threshold, the first bandwidth smoothing value, the first round-trip delay smoothing value, and the maximum transmission unit length. Upon receiving the original acknowledgment information corresponding to the first original data packet, the second maximum acknowledgment packet sequence number is obtained, the second sequence number interval is determined based on the second maximum acknowledgment packet sequence number and the packet sequence number of the first original data packet, and the first invalid out-of-order degree value is determined based on the second sequence number interval, the second bandwidth smoothing value, the second round-trip delay smoothing value and the maximum transmission unit length. If the first invalid out-of-order severity value is greater than the third out-of-order severity value, a fifth packet loss judgment threshold is determined based on the first invalid out-of-order severity value, the second bandwidth smoothing value, the second round-trip delay smoothing value, and the maximum transmission unit length. This threshold is used to determine whether to retransmit the second original data packet that has not received an acknowledgment message in the subsequent sequence.

[0120] In one possible embodiment, a second threshold adjustment module is also included, configured to: If no invalid retransmitted data packets occur within the preset time interval, the first downsizing step size is determined based on the third bandwidth smoothing value, the third round-trip delay smoothing value, the maximum transmission unit length, and the first preset descent ratio. The sixth packet loss threshold is determined based on the first downsizing step size and the first packet loss threshold. It is used to determine whether to retransmit the second original data packet that has not received an acknowledgment message in the subsequent sequence.

[0121] In one possible embodiment, a third threshold adjustment module is also included, configured to: The fourth disorder level value is determined based on the second packet loss judgment threshold and the fourth round-trip delay smoothing value; Upon receiving the original acknowledgment information corresponding to the first original data packet, the second maximum acknowledgment packet sequence number is obtained. The second transmission time interval is determined based on the transmission time of the original data packet corresponding to the second maximum acknowledgment packet sequence number and the transmission time of the first original data packet. The second invalid out-of-order degree value is determined based on the second transmission time interval and the fifth round-trip delay smoothing value. If the second invalid out-of-order severity value is greater than the fourth out-of-order severity value, a seventh packet loss judgment threshold is determined based on the second invalid out-of-order severity value and the fifth round-trip delay smoothing value. This threshold is used to determine whether to retransmit the second original data packet that has not received an acknowledgment message in the subsequent sequence.

[0122] In one possible embodiment, a fourth threshold adjustment module is also included, configured to: If no invalid retransmitted data packets occur within the preset time interval, the second downward adjustment step size is determined based on the sixth round-trip delay smoothing value and the second preset decrease ratio. The eighth packet loss threshold is determined based on the second downsizing step size and the second packet loss threshold. It is used to determine whether to retransmit the second original data packet that has not received an acknowledgment message in the subsequent sequence.

[0123] Figure 8 This is a schematic diagram of the structure of a data retransmission device provided in an embodiment of this application, as shown below. Figure 8 As shown, the device includes a processor 801, a memory 802, an input device 803, and an output device 804; the number of processors 801 in the device can be one or more. Figure 8 Taking a processor 801 as an example; the processor 801, memory 802, input device 803, and output device 804 in the device can be connected via a bus or other means. Figure 8 Taking a bus connection as an example, the memory 802, as a computer-readable storage medium, can be configured to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the data retransmission method in this embodiment. The processor 801 executes various functional applications and data processing of the device by running the software programs, instructions, and modules stored in the memory 802, thereby implementing the aforementioned data retransmission method. The input device 803 can be configured to receive input digital or character information and generate key signal inputs related to user settings and function control of the device. The output device 804 may include a display screen or other display device.

[0124] This application also provides a non-volatile storage medium containing computer-executable instructions. When executed by a computer processor, the computer-executable instructions are configured to perform a data retransmission method described in the above embodiments, comprising: obtaining a first maximum acknowledgment packet sequence number; determining a first sequence number interval based on the first maximum acknowledgment packet sequence number and the packet sequence number of a first original data packet for which no acknowledgment message has been received; determining a first transmission time interval based on the transmission time of the original data packet corresponding to the first maximum acknowledgment packet sequence number and the transmission time of the first original data packet; determining a first packet loss judgment threshold based on a first current bandwidth, a first current round-trip time delay, a preset packet loss ratio, and a maximum transmission unit length; and determining a second packet loss judgment threshold based on the first current round-trip time delay; and retransmitting the first original data packet when the frame type of the frame containing the first original data packet is a non-critical frame, the first sequence number interval is greater than the first packet loss judgment threshold, and the first transmission time interval is greater than the second packet loss judgment threshold.

[0125] It is worth noting that in the above-described embodiments of the data retransmission device, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not configured to limit the protection scope of the embodiments of this application.

[0126] In some possible implementations, various aspects of the methods provided in this application can also be implemented as a program product comprising program code that, when run on a computer device, is configured to cause the computer device to perform the steps of the methods according to the various exemplary embodiments of this application described above. For example, the computer device may execute the data retransmission method described in the embodiments of this application. The program product may be implemented using a combination of one or more readable media.

Claims

1. A data retransmission method, characterized in that, include: Obtain the first maximum acknowledgment packet sequence number, determine the first sequence number interval based on the first maximum acknowledgment packet sequence number and the packet sequence number of the first original data packet for which no acknowledgment message has been received, and determine the first transmission time interval based on the transmission time of the original data packet corresponding to the first maximum acknowledgment packet sequence number and the transmission time of the first original data packet; A first packet loss threshold is determined based on the first current bandwidth, the first current round-trip time, the preset packet loss ratio, and the maximum transmission unit length, and a second packet loss threshold is determined based on the first current round-trip time. If the frame type of the first original data packet is a non-critical frame, the first sequence number interval is greater than the first packet loss judgment threshold, and the first transmission time interval is greater than the second packet loss judgment threshold, the first original data packet is retransmitted.

2. The data retransmission method according to claim 1, characterized in that, After determining the second packet loss threshold based on the first current round-trip time, the method further includes: When the frame type of the first original data packet is a key frame, a third packet loss judgment threshold is determined based on the first out-of-order degree value, the second current bandwidth, the second current round-trip delay, the first preset priority ratio, the maximum transmission unit length and the first packet loss judgment threshold, and a fourth packet loss judgment threshold is determined based on the second out-of-order degree value, the second current round-trip delay, the second preset priority ratio and the second packet loss judgment threshold. If the first sequence number interval is greater than the third packet loss determination threshold and the first transmission time interval is greater than the fourth packet loss determination threshold, the first original data packet is retransmitted.

3. The data retransmission method according to claim 2, characterized in that, The determination of the third packet loss threshold based on the first out-of-order severity value, the second current bandwidth, the second current round-trip time, the first preset priority ratio, the maximum transmission unit length, and the first packet loss threshold includes: The first packet loss judgment difference is determined based on the first out-of-order degree value, the second current bandwidth, the second current round-trip time, the first preset priority ratio, and the maximum transmission unit length; The third packet loss threshold is determined based on the first packet loss threshold and the difference between the first packet loss threshold and the first packet loss threshold.

4. The data retransmission method according to claim 2, characterized in that, The determination of the fourth packet loss threshold based on the second disorder level value, the second current round-trip time, the second preset priority ratio, and the second packet loss threshold includes: The second packet loss determination difference is determined based on the second disorder level value, the second current round-trip time delay, and the second preset priority ratio; The fourth packet loss threshold is determined based on the second packet loss threshold and the difference between the second packet loss threshold and the second packet loss threshold.

5. The data retransmission method according to claim 1, characterized in that, After the retransmission of the first original data packet, the following is also included: Based on the first packet loss judgment threshold, the first bandwidth smoothing value, the first round-trip delay smoothing value, and the maximum transmission unit length, a third out-of-order degree value is determined. Upon receiving the original acknowledgment information corresponding to the first original data packet, the second maximum acknowledgment packet sequence number is obtained, the second sequence number interval is determined based on the second maximum acknowledgment packet sequence number and the packet sequence number of the first original data packet, and the first invalid out-of-order degree value is determined based on the second sequence number interval, the second bandwidth smoothing value, the second round-trip delay smoothing value and the maximum transmission unit length. If the first invalid out-of-order severity value is greater than the third out-of-order severity value, a fifth packet loss determination threshold is determined based on the first invalid out-of-order severity value, the second bandwidth smoothing value, the second round-trip delay smoothing value, and the maximum transmission unit length. This threshold is used to determine whether a second original data packet that has not received an acknowledgment message should be retransmitted.

6. The data retransmission method according to claim 1, characterized in that, After the retransmission of the first original data packet, the following is also included: If no invalid retransmission data packet occurs within the preset time interval, the first downsizing step size is determined based on the third bandwidth smoothing value, the third round-trip delay smoothing value, the maximum transmission unit length, and the first preset descent ratio. A sixth packet loss threshold is determined based on the first downsizing step size and the first packet loss threshold, and is used to determine whether a second original data packet that has not received an acknowledgment message should be retransmitted based on the sixth packet loss threshold.

7. The data retransmission method according to claim 1, characterized in that, After the retransmission of the first original data packet, the following is also included: The fourth out-of-order value is determined based on the second packet loss judgment threshold and the fourth round-trip delay smoothing value; Upon receiving the original acknowledgment information corresponding to the first original data packet, the second maximum acknowledgment packet sequence number is obtained. The second transmission time interval is determined based on the transmission time of the original data packet corresponding to the second maximum acknowledgment packet sequence number and the transmission time of the first original data packet. The second invalid out-of-order degree value is determined based on the second transmission time interval and the fifth round-trip delay smoothing value. If the second invalid out-of-order severity value is greater than the fourth out-of-order severity value, a seventh packet loss determination threshold is determined based on the second invalid out-of-order severity value and the fifth round-trip delay smoothing value. This threshold is used to determine whether to retransmit the second original data packet that has not received an acknowledgment message in the subsequent sequence.

8. The data retransmission method according to claim 1, characterized in that, After the retransmission of the first original data packet, the following is also included: If no invalid retransmitted data packets occur within the preset time interval, the second downward adjustment step size is determined based on the sixth round-trip delay smoothing value and the second preset decrease ratio. The eighth packet loss threshold is determined based on the second downsizing step size and the second packet loss threshold, and is used to determine whether the second original data packet that has not received an acknowledgment message should be retransmitted based on the eighth packet loss threshold.

9. A data retransmission device, characterized in that, include: The acquisition module is configured to acquire the sequence number of the first maximum confirmation packet. The sequence number interval determination module is configured to determine the first sequence number interval based on the sequence number of the first maximum acknowledgment packet and the sequence number of the first original data packet for which no acknowledgment message has been received; The transmission time interval determination module is configured to determine the first transmission time interval based on the transmission time of the original data packet corresponding to the first maximum acknowledgment packet sequence number and the transmission time of the first original data packet. The packet loss judgment threshold determination module is configured to determine a first packet loss judgment threshold based on a first current bandwidth, a first current round-trip delay, a preset packet loss ratio, and a maximum transmission unit length, and to determine a second packet loss judgment threshold based on the first current round-trip delay. The first data packet retransmission module is configured to retransmit the first original data packet when the frame type of the frame containing the first original data packet is a non-critical frame, the first sequence number interval is greater than the first packet loss judgment threshold, and the first transmission time interval is greater than the second packet loss judgment threshold.

10. A data retransmission device, characterized in that, The device includes: one or more processors; and a storage device configured to store one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the data retransmission method according to any one of claims 1-8.

11. A non-volatile storage medium for storing computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a computer processor, are configured to perform the data retransmission method according to any one of claims 1-8.

12. A computer program product, comprising a computer program, characterized in that, The computer program is stored in a computer-readable storage medium, and at least one processor of the device reads from the computer-readable storage medium and executes the computer program, causing the device to perform the data retransmission method according to any one of claims 1-8.