Data retransmission methods, apparatus, equipment, storage media, and software products
By detecting invalid retransmission conditions for data packets and updating the retransmission delay threshold, the problem of misjudgment of packet loss caused by out-of-order data packets is solved, invalid retransmission redundancy is reduced, and transmission efficiency and user experience are improved.
Patent Information
- Application Number
- CN202410952871.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-07-16
AI Technical Summary
In network transmission, out-of-order data packets can cause automatic retransmission mechanisms to misjudge packet loss, resulting in a large amount of invalid retransmission redundancy, which occupies link resources and affects normal media data transmission.
By checking whether there are invalid retransmission conditions for the data packets corresponding to the transmission sequence numbers in the confirmation message, the retransmission delay threshold is updated, and retransmission data packets with a transmission time interval less than or equal to the retransmission delay threshold are discarded during the data packet transmission cycle.
It effectively reduces redundant retransmissions caused by packet loss and misjudgment, enhances the anti-out-of-order capability of the data sender, improves the utilization rate of the transmission link, and ensures the normal transmission of media data and user experience.
Smart Images

Figure CN118802081B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a data retransmission method, apparatus, device, storage medium, and program product. Background Technology
[0002] Currently, during network transmission, data packets are prone to errors or loss due to signal attenuation, noise interference, and multipath effects. To ensure the reliability and integrity of data transmission and provide stable and efficient network services, an automatic retransmission request mechanism can be used. This mechanism automatically requests the data sender to retransmit data packets when packet loss or errors are detected.
[0003] However, network transmission scenarios often face the challenge of out-of-order transmission. Due to factors such as routing paths, link congestion, and device processing, data packets that were originally sent in order by the data sender may appear out of order compared to the data packets received by the data receiver. This is particularly common in transmission scenarios using the UDP protocol. Related technologies primarily employ automatic retransmission request mechanisms, including selective retransmission and timeout retransmission. Selective retransmission can detect packet loss by the data sender based on the sequence number of the data packet returned in the acknowledgment message. For example, for a data packet with sequence number n, if the acknowledgment message indicates that the data packet with sequence number n+k was successfully transmitted, it can be considered that the data packet with sequence number n was lost, and a retransmission request can be made. Conversely, timeout retransmission can determine packet loss by estimating the retransmission timeout period of the link. For example, if a sent data packet has not received an acknowledgment message after the retransmission timeout period, it can be considered that the data packet was lost, and a retransmission request can be made. However, if out-of-order transmission occurs, subsequent confirmation messages may indicate that data packets identified as lost were successfully transmitted, leading to a misjudgment of packet loss. This causes the data sender to resend redundant data packets, resulting in a large amount of invalid retransmission redundancy, consuming link resources, increasing network transmission costs, and affecting normal media data transmission. This needs to be improved. Summary of the Invention
[0004] This application provides a data retransmission method, apparatus, device, storage medium, and program product, which solves the problem that the automatic retransmission mechanism misjudges packet loss detection due to out-of-order data packets, resulting in a large amount of invalid retransmission redundancy, occupying link resources, increasing network transmission costs, and affecting normal media data transmission. It effectively reduces invalid retransmission redundancy caused by packet loss misjudges, enhances the anti-out-of-order capability of the data sender, improves the utilization rate of the transmission link, ensures normal media data transmission, and optimizes user experience.
[0005] In a first aspect, embodiments of this application provide a data retransmission method, the method comprising:
[0006] Upon receiving an acknowledgment message for a transmitted data packet from the data receiving end, it is detected whether there is at least one target data packet in the data packet corresponding to the transmission sequence number in the acknowledgment message that satisfies the invalid retransmission condition.
[0007] If the target data packet is detected, the retransmission delay of the target data packet is compared with the set retransmission delay threshold, and the retransmission delay threshold is updated according to the comparison result. The retransmission delay is the time difference between the retransmission time and the sending time of the target data packet.
[0008] When the data packet transmission period is reached at a time node, a data packet to be processed is acquired. If the data packet to be processed is detected to be a retransmission data packet, and the transmission time interval of the original data packet corresponding to the data packet to be processed is less than or equal to the retransmission delay threshold, the data packet to be processed is discarded. The transmission time interval is the time difference between the current system time and the transmission time of the original data packet.
[0009] Secondly, embodiments of this application also provide a data retransmission apparatus, the apparatus comprising:
[0010] The detection module is configured to, upon receiving an acknowledgment message for a transmitted data packet sent by the data receiving end, detect whether there is at least one target data packet in the data packet corresponding to the transmission sequence number in the acknowledgment message that satisfies the invalid retransmission condition.
[0011] The update module is configured to, when the target data packet is detected, compare the retransmission delay of the target data packet with a set retransmission delay threshold, and update the retransmission delay threshold according to the comparison result. The retransmission delay is the time difference between the retransmission time and the sending time of the target data packet.
[0012] The data packet processing module is configured to acquire a data packet to be processed when the data packet transmission period is reached at a time node, and discard the data packet to be processed if it is detected that the data packet to be processed is a retransmission data packet and the transmission time interval of the original data packet corresponding to the data packet to be processed is less than or equal to the retransmission delay threshold. The transmission time interval is the time difference between the current system time and the transmission time of the original data packet.
[0013] Thirdly, embodiments of this application also provide a data retransmission device, the device comprising:
[0014] One or more processors;
[0015] Storage device, configured to store one or more programs,
[0016] 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.
[0017] 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.
[0018] 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.
[0019] In this embodiment, upon receiving an acknowledgment message for a transmitted data packet from the data receiving end, it is detected whether at least one target data packet that satisfies the invalid retransmission condition exists in the data packet corresponding to the transmission sequence number in the acknowledgment message. If a target data packet is detected, the retransmission delay of the target data packet is compared with a set retransmission delay threshold, and the retransmission delay threshold is updated based on the comparison result. Here, the retransmission delay is the time difference between the retransmission time and the transmission time of the target data packet. When the data packet transmission cycle is reached at a time node, a data packet to be processed is acquired. If the data packet to be processed is detected as a retransmission data packet, and the transmission time interval of the original data packet corresponding to the data packet to be processed is less than or equal to the retransmission delay threshold, the data packet to be processed is discarded. Here, the transmission time interval is the time difference between the current system time and the transmission time of the original data packet. In the above scheme, by detecting whether there is at least one target data packet that meets the invalid retransmission condition in the data packet corresponding to the transmission sequence number in the confirmation message, invalid retransmission information fed back by the link can be effectively collected, providing reliable reference information for adjusting the retransmission delay threshold. By updating the retransmission delay threshold according to the retransmission delay of the target data packet, the retransmission delay threshold can be effectively adjusted in out-of-order network scenarios, providing a more accurate basis for judging whether to retransmit the data packet. By discarding the retransmitted data packet when the transmission time interval of the original data packet corresponding to the retransmitted data packet is less than or equal to the retransmission delay threshold, the redundancy of invalid retransmission caused by packet loss misjudgment can be effectively reduced, the anti-out-of-order capability of the data sender can be enhanced, the utilization rate of the transmission link can be improved, the normal transmission of media data can be guaranteed, and the user experience can be optimized. Attached Figure Description
[0020] Figure 1 A flowchart of a data retransmission method provided in an embodiment of this application;
[0021] Figure 2A schematic diagram illustrating the streaming media data transmission process of an application data retransmission method provided in this embodiment of the application;
[0022] Figure 3 A flowchart illustrating a data retransmission method that includes a comparison process between the retransmission delay of the target data packet and a retransmission delay threshold, provided for embodiments of this application;
[0023] Figure 4 A flowchart of a data retransmission method including a process of updating a retransmission delay threshold is provided for embodiments of this application;
[0024] Figure 5 A flowchart of a data retransmission method including a process for restoring a retransmission delay threshold is provided for embodiments of this application;
[0025] Figure 6 A flowchart of a data retransmission method including a process of reducing a retransmission delay threshold is provided for embodiments of this application;
[0026] Figure 7 A flowchart of a data retransmission method including the process of sending retransmission data packets is provided for embodiments of this application;
[0027] Figure 8 A structural block diagram of a data retransmission device provided in an embodiment of this application;
[0028] Figure 9 This is a schematic diagram of the structure of a data retransmission device provided in an embodiment of this application. Detailed Implementation
[0029] 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.
[0030] 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 use of 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 the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0031] The data retransmission method provided in this application can be used by the data sending end to collect information on invalid retransmission packets in the transmission scenario, adjust the sending conditions of retransmission data packets, and reduce invalid retransmission redundancy. This method can be applied to uplink and downlink transmission scenarios in live streaming media, including web page live streaming, conference live streaming, and video live streaming. The aforementioned application scenarios are merely exemplary and illustrative. In practical applications, this data retransmission method can also be used in data transmission in other scenarios, and this application does not limit its application in these areas.
[0032] 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 and other terminal devices, or servers and other devices. This application embodiment does not limit the scope of the data retransmission method.
[0033] 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, such as... Figure 1 As shown, it includes the following steps:
[0034] Step S101: Upon receiving an acknowledgment message for a transmitted data packet from the data receiver, check whether there is at least one target data packet in the data packet corresponding to the sequence number in the acknowledgment message that satisfies the invalid retransmission condition.
[0035] Taking the uplink and downlink transmission scenarios of live streaming as an example, in the uplink transmission scenario, the data sender is the broadcaster, and the data receiver is the media server; in the downlink transmission scenario, the data sender is the media server, and the viewer's client is the data receiver. In this embodiment, the data sender is described as the execution entity. The data packets sent by the data sender to the data receiver can carry a transmission sequence number, which identifies the order in which the data sender pushes the data packets into the transmission link. Each data packet has a unique transmission sequence number. Correspondingly, after the data receiver successfully receives the data packet, its reply confirmation message can carry a transmission sequence number, used to confirm to the data sender that the data packet corresponding to that transmission sequence number has been successfully transmitted. In one embodiment, the data sender stores the sending time and retransmission time of the data packet corresponding to each transmission sequence number. The sending time is the time when the data packet is pushed into the transmission link, and the retransmission time is the time when the data packet is determined to be lost and retransmitted. Optionally, the sending time and retransmission time can be stored in the form of a local timestamp with millisecond precision. In one embodiment, the data sender determines that a data packet is lost and needs to be retransmitted based on either selective retransmission or timeout retransmission. The retransmission flag for this data packet can be set to true. Furthermore, after a data packet is determined to be lost and retransmitted, the corresponding retransmission time is not zero. In one embodiment, the data receiver can determine successfully transmitted data packets by obtaining the sequence number in the acknowledgment message. If it detects that a transmitted data packet was determined to be lost and retransmitted, it can determine that the retransmitted data packet is a redundant data packet, indicating an invalid retransmission. In one embodiment, an invalid retransmission condition can be set. By detecting whether there is at least one target data packet among the data packets corresponding to the sequence number in the acknowledgment message that satisfies the invalid retransmission condition, it can be effectively determined whether the data sender has performed an invalid retransmission. Optionally, at least one target data packet that satisfies the invalid retransmission condition includes: a data packet whose retransmission flag is true, or a data packet whose retransmission time is not zero. In addition, the data sending end can also record the number of times the same data packet is transmitted. Correspondingly, the data packet that meets the invalid retransmission condition can also be one whose corresponding transmission count is greater than 1. Of course, invalid retransmission conditions can also be set according to other invalid retransmission judgment criteria, which are not limited in this application.
[0036] Step S102: If a target data packet is detected, the retransmission delay of the target data packet is compared with the set retransmission delay threshold, and the retransmission delay threshold is updated according to the comparison result. The retransmission delay is the time difference between the retransmission time and the sending time of the target data packet.
[0037] The detection of a target data packet can be considered an invalid retransmission of the most recent data packet sent by the data sender. The retransmission delay threshold used as a retransmission condition can be adaptively adjusted. The retransmission delay of the target data packet can be the time difference between the retransmission time and the sending time of the invalid retransmission packet, representing the statistical duration from the initial sending to the retransmission. The retransmission delay threshold serves as a delay threshold for determining whether to send a retransmitted data packet, representing the upper limit of transmission out-of-order conditions. Depending on the degree of transmission out-of-order in the actual network environment, the retransmission delay of different invalid retransmission packets may be the same or different. The greater the degree of transmission out-of-order, the greater the retransmission delay of the invalid retransmission packet. Appropriately increasing the retransmission delay threshold can reduce the sending of invalid retransmission packets triggered by packet loss misjudgment. In one embodiment, if a target data packet corresponding to the sequence number in the acknowledgment message is found to satisfy the invalid retransmission condition, the retransmission delay of this target data packet can be directly compared with a retransmission delay threshold. If the retransmission delay is greater than the retransmission delay threshold, the retransmission delay threshold can be directly updated to the retransmission delay. In another embodiment, if multiple target data packets corresponding to the sequence number in the acknowledgment message are found to satisfy the invalid retransmission condition, the retransmission delays corresponding to the multiple target data packets can be statistically processed to obtain a retransmission delay reference value. This reference value can then be compared with the retransmission delay threshold, and the threshold can be updated based on the comparison result. Optionally, the maximum retransmission delay can be determined from the retransmission delays corresponding to the multiple target data packets, and this maximum retransmission delay can be used as a retransmission delay reference value for comparison with the retransmission delay threshold. Optionally, to eliminate abnormal network fluctuations, outlier values in the retransmission delays corresponding to multiple target data packets can be removed. For example, retransmission delays exceeding a set number of standard deviations can be removed, and the retransmission delay with the largest value can be averaged to obtain a retransmission delay reference value. Optionally, the retransmission delays corresponding to multiple target data packets can also be averaged and averaged, and a set number of standard deviations can be added to the average to obtain the retransmission delay reference value. In one embodiment, after statistically processing the retransmission delays corresponding to multiple target data packets to obtain the retransmission delay reference value, the retransmission delay threshold can be updated based on the comparison between the retransmission delay reference value and the retransmission delay threshold. Optionally, if the retransmission delay reference value is greater than the retransmission delay threshold, the retransmission delay threshold can be updated to the retransmission delay reference value; if the retransmission delay reference value is greater than or equal to the retransmission delay threshold, the retransmission delay threshold can be kept unchanged. Optionally, if the retransmission delay reference value is greater than the retransmission delay threshold, the increment ratio of the retransmission delay threshold can be selected based on the numerical range of the difference between the retransmission delay reference value and the retransmission delay threshold. Each numerical range has a preset increment ratio. For example, if the difference between the retransmission delay and the retransmission delay threshold is in the first numerical range, the first increment ratio can be selected to increase the retransmission delay threshold.Of course, the update method of the retransmission delay threshold can be selected according to the degree of out-of-order sensitivity of the actual application scenario and the accuracy adjustment requirements, which is not limited in this application.
[0038] Step S103: When the data packet transmission period is reached at the time node, the data packet to be processed is obtained. If the data packet to be processed is detected to be a retransmission data packet and the transmission time interval of the original data packet corresponding to the data packet to be processed is less than or equal to the retransmission delay threshold, the data packet to be processed is discarded. The transmission time interval is the time difference between the current system time and the transmission time of the original data packet.
[0039] The sending period can be a preset time interval for the data sender to send data packets to the data receiver. The specific period size can be set according to real-time network conditions and business scenario requirements, and is not limited in this application. When the data packet sending period is reached at a time node, the data packet to be sent can be retrieved from the sending queue. Optionally, whether the data packet to be sent is a retransmission data packet can be determined by combining the retransmission-related parameters of the data packet to be sent. These retransmission-related parameters can include retransmission flag, retransmission time, and cumulative transmission count. Therefore, if any of the following conditions is detected: the retransmission flag is true, the retransmission time is not zero, or the cumulative transmission count is not zero, the data packet to be sent can be regarded as a retransmission data packet. In addition, the transmission time interval of the original data packet corresponding to the data packet to be sent can be the time difference between the current system time and the sending time of the original data packet. By comparing this transmission time interval with the retransmission delay threshold, it can be determined whether to send a retransmission data packet. Because out-of-order interference in the transmission link may cause a certain delay in receiving the acknowledgment message of the sent data packet, if the transmission interval is less than or equal to the retransmission delay threshold, the corresponding delay time can be considered to be within a reasonable delay time range, and the possibility of packet loss misjudgment is relatively high. In this case, the retransmission data packet can be discarded to reduce invalid retransmission redundancy. If the transmission interval is greater than the retransmission delay threshold, the corresponding delay time can be considered to be beyond the reasonable delay time range, and the possibility of packet loss misjudgment is relatively low. In this case, the retransmission data packet needs to be sent.
[0040] In one embodiment, Figure 2 This application provides a schematic diagram of the streaming media data transmission process for an application data retransmission method, as illustrated in the embodiments of this application. Figure 2As shown, the data sending end 101 includes a sending window module 1011, a packet loss processing module 1012, and an invalid retransmission detection module 1013. The data receiving end 102 includes a receiving queue module 1021 and an acknowledgment message sending module 1022. The data receiving end 102 stores the received data packets in the receiving queue module 1021 and sends an acknowledgment message for the received data packets to the data sending end 101 through the acknowledgment message sending module 1022. After receiving the acknowledgment message, the data sending end 101, through the invalid retransmission detection module 1013, can detect whether there is at least one target data packet that meets the invalid retransmission condition in the data packets corresponding to the transmission sequence number in the acknowledgment message. The invalid retransmission detection result is then passed to the packet loss processing module 1012. The packet loss processing module 1012 adjusts the retransmission delay threshold based on the invalid retransmission detection result and passes the retransmission delay threshold to the sending window module 1011. The sending window module 1011 can use the retransmission delay threshold as a criterion for whether to send retransmitted data packets.
[0041] As described above, upon receiving an acknowledgment message for a transmitted data packet from the data receiving end, the system checks whether at least one target data packet that meets the invalid retransmission condition exists in the data packet corresponding to the transmission sequence number in the acknowledgment message. If a target data packet is detected, the retransmission delay of the target data packet is compared with a set retransmission delay threshold, and the retransmission delay threshold is updated based on the comparison result. Here, the retransmission delay is the time difference between the retransmission time and the transmission time of the target data packet. When the data packet transmission period is reached at a time node, a data packet to be processed is acquired. If the data packet to be processed is detected as a retransmission data packet, and the transmission time interval of the original data packet corresponding to the data packet to be processed is less than or equal to the retransmission delay threshold, the data packet to be processed is discarded. Here, the transmission time interval is the time difference between the current system time and the transmission time of the original data packet. In the above scheme, by detecting whether there is at least one target data packet that meets the invalid retransmission condition in the data packet corresponding to the transmission sequence number in the confirmation message, invalid retransmission information fed back by the link can be effectively collected, providing reliable reference information for adjusting the retransmission delay threshold. By updating the retransmission delay threshold according to the retransmission delay of the target data packet, the retransmission delay threshold can be effectively adjusted in out-of-order network scenarios, providing a more accurate basis for judging whether to retransmit the data packet. By discarding the retransmitted data packet when the transmission time interval of the original data packet corresponding to the retransmitted data packet is less than or equal to the retransmission delay threshold, the redundancy of invalid retransmission caused by packet loss misjudgment can be effectively reduced, the anti-out-of-order capability of the data sender can be enhanced, the utilization rate of the transmission link can be improved, the normal transmission of media data can be guaranteed, and the user experience can be optimized.
[0042] Figure 3This is a flowchart illustrating a data retransmission method provided in this application, which includes a comparison process between the retransmission delay of the target data packet and a retransmission delay threshold. Figure 3 As shown, it includes the following steps:
[0043] Step S201: Upon receiving an acknowledgment message for a transmitted data packet from the data receiver, check whether there is at least one target data packet in the data packet corresponding to the transmission sequence number in the acknowledgment message that satisfies the invalid retransmission condition.
[0044] Step S202: If the target data packet is detected, the retransmission delay of the target data packet is statistically analyzed to determine the maximum retransmission delay.
[0045] When only one target data packet is detected, its retransmission delay can be directly determined as the maximum retransmission delay. When multiple target data packets are detected, the maximum retransmission delay can be obtained by comparing the retransmission delays of each target data packet. This maximum retransmission delay characterizes the maximum response delay of acknowledgment messages when data packets are out of order in the current transmission link.
[0046] Step S203: Compare the maximum retransmission delay with the set retransmission delay threshold, and update the retransmission delay threshold according to the comparison result. Here, the retransmission delay is the time difference between the retransmission time and the sending time of the target data packet.
[0047] In one embodiment, if the retransmission delay threshold is greater than or equal to the maximum retransmission delay, the retransmission delay threshold can be kept unchanged. In another embodiment, if the retransmission delay threshold is less than the maximum retransmission delay, the retransmission delay threshold can be updated to the maximum retransmission delay, or a corresponding increase ratio can be determined based on the difference between the retransmission delay threshold and the maximum retransmission delay. For example, a correlation relationship can be established between the range of differences between the retransmission delay threshold and the maximum retransmission delay and the increase ratio. By querying this correlation relationship, the target difference range in which the calculated difference lies can be determined, and the increase ratio associated with the target difference range can be obtained. This correlation relationship can be a piecewise function mapping, a numerical comparison table, etc., which are not limited in this application.
[0048] Step S204: When the data packet transmission period is reached at the time node, the data packet to be processed is obtained. If the data packet to be processed is detected to be a retransmission data packet and the transmission time interval of the original data packet corresponding to the data packet to be processed is less than or equal to the retransmission delay threshold, the data packet to be processed is discarded. The transmission time interval is the time difference between the current system time and the transmission time of the original data packet.
[0049] The above-mentioned maximum retransmission delay corresponding to invalid retransmission data packets can be statistically obtained, which can effectively quantify the out-of-order situation of the transmission link, provide a reliable basis for updating the retransmission delay threshold, ensure that the adjustment of the retransmission delay threshold is reasonably adapted to the real-time out-of-order changes of the transmission link, and improve the effectiveness and smoothness of data transmission in out-of-order scenarios.
[0050] Figure 4 This is a flowchart illustrating a data retransmission method that includes updating a retransmission delay threshold, as provided in an embodiment of this application. Figure 4 As shown, it includes the following steps:
[0051] Step S301: Upon receiving an acknowledgment message for a transmitted data packet from the data receiver, check whether there is at least one target data packet in the data packet corresponding to the sequence number in the acknowledgment message that satisfies the invalid retransmission condition.
[0052] Step S302: If the target data packet is detected, the retransmission delay of the target data packet is statistically analyzed to determine the maximum retransmission delay.
[0053] Step S303: Compare the maximum retransmission delay with the set retransmission delay threshold. If the retransmission delay threshold is less than the maximum retransmission delay, update the retransmission delay threshold to the maximum retransmission delay. Here, the retransmission delay is the time difference between the retransmission time and the sending time of the target data packet.
[0054] If the retransmission delay threshold is less than the maximum retransmission delay, it can be considered that the out-of-order transmission of the current transmission link has increased, and the retransmission delay threshold needs to be updated in a timely manner to adapt to the changes in the out-of-order situation of the link.
[0055] Step S304: When the data packet transmission period is reached at the time node, the data packet to be processed is obtained. If the data packet to be processed is detected to be a retransmission data packet and the transmission time interval of the original data packet corresponding to the data packet to be processed is less than or equal to the retransmission delay threshold, the data packet to be processed is discarded. The transmission time interval is the time difference between the current system time and the transmission time of the original data packet.
[0056] As described above, when the retransmission delay threshold is less than the maximum retransmission delay, the retransmission delay threshold is updated to the maximum retransmission delay in a timely manner. This effectively adapts to changes in out-of-order conditions and adjusts the sending conditions of retransmitted data packets, reducing invalid retransmission redundancy caused by packet loss misjudgment. In scenarios with severe out-of-order conditions, this can significantly reduce transmission overhead, improve link utilization, and optimize user experience.
[0057] Figure 5 A flowchart illustrating a data retransmission method including a process for restoring a retransmission delay threshold, provided as an embodiment of this application. Figure 5 As shown, it includes the following steps:
[0058] Step S401: Upon receiving an acknowledgment message for a transmitted data packet from the data receiver, check whether there is at least one target data packet in the data packet corresponding to the sequence number in the acknowledgment message that satisfies the invalid retransmission condition.
[0059] Step S402: If a target data packet is detected, the retransmission delay of the target data packet is compared with the set retransmission delay threshold, and the retransmission delay threshold is updated according to the comparison result. The retransmission delay is the time difference between the retransmission time and the sending time of the target data packet.
[0060] Step S403: If no target data packet is detected, the interval time is obtained by subtracting the current system time from the recorded reference time node. The reference time node is the most recent time when an invalid retransmission data packet was detected or the retransmission delay threshold was adjusted.
[0061] If no target data packet is detected, it means that no invalid retransmission data packet appeared in the confirmation message. This can be considered as the current out-of-order severity of the transmission link potentially weakening or disappearing. When it is determined to be a weak out-of-order or non-out-of-order scenario, the original retransmission delay threshold, which adapts to the increasing out-of-order severity, can be restored. The reference time node is the most recent time when an invalid retransmission data packet was detected or the retransmission delay threshold was adjusted. It represents the time since the most recent detection of an invalid retransmission or the adjustment of the retransmission delay threshold based on the invalid retransmission judgment. The interval is the time difference between the current system time and the reference time node, representing the cumulative duration during which no invalid retransmissions or retransmission delay threshold adjustments have occurred on the current transmission link.
[0062] Step S404: If the interval time is greater than the recovery cycle threshold, reduce the retransmission delay threshold and update the reference time node to the current system time.
[0063] The recovery period threshold serves as a reference duration for determining whether the original retransmission delay threshold, which is constantly increasing due to worsening out-of-order delivery, needs to be restored. For example, 200ms. The specific value can be adaptively set by developers based on the business characteristics of the actual application scenario; this application does not impose any limitations on this setting. If the interval is greater than the recovery period threshold, it can be considered that the current transmission link has not experienced invalid retransmissions or triggered retransmission delay threshold adjustments for a relatively long time, indicating that the out-of-order delivery has weakened or disappeared. In this case, the retransmission delay threshold can be reduced to restore timely transmission of retransmitted data packets, and the reference time node can be updated to the current system time. This ensures that the interval calculation effectively reflects the invalid retransmission situation of the transmission link and effectively captures changes in out-of-order delivery. If the interval is less than or equal to the recovery period threshold, it can be considered that the cumulative duration for which the current transmission link has not experienced invalid retransmissions or triggered retransmission delay threshold adjustments has not reached the expected duration. In this case, the retransmission delay threshold can be maintained, and the current transmission link can continue to be monitored. In one embodiment, a fixed recovery factor can be set, with a value ranging from (0,1). For example, for application scenarios with a superior network environment, a relatively small recovery factor can be selected, such as 0.5, to ensure rapid threshold recovery after the out-of-order delivery weakens or disappears, ensuring timely retransmission. Conversely, for application scenarios with a poor network environment, a relatively large recovery factor can be selected, such as 0.9, to adapt to the weakening trend of out-of-order delivery and achieve steady recovery. The specific settings can be adaptively configured by developers based on the network environment characteristics of different application scenarios, and this application does not impose any limitations on this. By multiplying the recovery factor by the retransmission delay threshold, the retransmission delay threshold can be reduced, achieving the purpose of restoring the retransmission delay threshold. In one embodiment, the reduction ratio of the retransmission delay threshold can be determined based on periodically measured network indicators, such as round-trip time and packet loss rate. The worse the network indicator, the smaller the reduction ratio; the better the network indicator, the larger the reduction ratio. By reducing the retransmission delay threshold based on this reduction ratio, the purpose of restoring the retransmission delay threshold can also be achieved.
[0064] Step S405: When the data packet transmission period is reached at the time node, the data packet to be processed is obtained. If the data packet to be processed is detected to be a retransmission data packet and the transmission time interval of the original data packet corresponding to the data packet to be processed is less than or equal to the retransmission delay threshold, the data packet to be processed is discarded. The transmission time interval is the time difference between the current system time and the transmission time of the original data packet.
[0065] As mentioned above, by calculating the interval between the current system time and the reference time node, a reliable reference basis can be provided for reasonably determining the degree of out-of-order recovery of the transmission link. By reducing the retransmission delay threshold when the interval is greater than the recovery period threshold, an out-of-order recovery mechanism can be effectively established. When the out-of-order condition weakens or disappears, the retransmission delay threshold can be quickly adjusted and restored after processing multiple confirmation messages, ensuring the timeliness of data packet retransmission.
[0066] Figure 6 A flowchart illustrating a data retransmission method including a process for reducing a retransmission delay threshold, provided as an embodiment of this application. Figure 6 As shown, it includes the following steps:
[0067] Step S501: Upon receiving an acknowledgment message for a transmitted data packet from the data receiver, check whether there is at least one target data packet in the data packet corresponding to the sequence number in the acknowledgment message that satisfies the invalid retransmission condition.
[0068] Step S502: When a target data packet is detected, the retransmission delay of the target data packet is compared with the set retransmission delay threshold, and the retransmission delay threshold is updated according to the comparison result. The retransmission delay is the time difference between the retransmission time and the sending time of the target data packet.
[0069] Step S503: If no target data packet is detected, the interval time is obtained by subtracting the current system time from the recorded reference time node. The reference time node is the most recent time when an invalid retransmission data packet was detected or the retransmission delay threshold was adjusted.
[0070] Step S504: If the interval time is greater than the recovery cycle threshold, determine the reduction ratio of the retransmission delay threshold based on the current network indicators, reduce the retransmission delay threshold according to the reduction ratio, and update the reference time node to the current system time.
[0071] The system can establish a correlation between network metrics and reduction ratios, such as a function mapping or a numerical comparison table. These network metrics may include round-trip time (RTD) and packet loss rate, and the specific metrics can be adaptively selected by the developers based on the network environment characteristics of the actual application scenario; this application does not impose any limitations on this. In one embodiment, one or more of the RTD, packet loss rate, etc., can be selected to determine the current network condition as a reference state. For example, network metrics falling within different value ranges can identify the current network condition as poor, average, or good reference states, respectively. Optionally, the average RTD or average packet loss rate determined based on multiple consecutive time points can also be used as the current network metric; this application does not impose any limitations on this either. Correspondingly, different reference states can be assigned reduction ratios; for example, a reduction ratio of 10% might correspond to a poor network condition, while a reduction ratio of 40% might correspond to a good network condition. In one embodiment, a function mapping relationship in which network metrics are negatively correlated with the reduction ratio can be set. By inputting the current network metrics into this function mapping relationship, the corresponding reduction ratio can be obtained. For example, the higher the round-trip latency or packet loss rate, the smaller the reduction ratio, and the lower the round-trip latency or packet loss rate, the higher the reduction ratio. The specific function mapping relationship can be selected by the developers based on the network conditions of the actual application scenario and the specific recovery effect of the reduction ratio. This application does not limit this selection.
[0072] Step S505: When the data packet transmission period is reached at the time node, the data packet to be processed is obtained. If the data packet to be processed is detected to be a retransmission data packet and the transmission time interval of the original data packet corresponding to the data packet to be processed is less than or equal to the retransmission delay threshold, the data packet to be processed is discarded. The transmission time interval is the time difference between the current system time and the transmission time of the original data packet.
[0073] As mentioned above, by referring to real-time network indicators, we can accurately judge the quality of the current network environment, reasonably determine the recovery degree of the retransmission delay threshold, optimize the reduction recovery strategy of the retransmission delay threshold, provide a more reliable out-of-order recovery mechanism, ensure timely retransmission response in weak out-of-order or non-out-of-order scenarios, and ensure the upper limit of system performance in normal scenarios.
[0074] Figure 7 This is a flowchart illustrating a data retransmission method, including the process of sending retransmission data packets, provided as an embodiment of this application. Figure 7 As shown, it includes the following steps:
[0075] Step S601: Upon receiving an acknowledgment message for a transmitted data packet from the data receiver, check whether there is at least one target data packet in the data packet corresponding to the sequence number in the acknowledgment message that satisfies the invalid retransmission condition.
[0076] Step S602: When a target data packet is detected, the retransmission delay of the target data packet is compared with the set retransmission delay threshold, and the retransmission delay threshold is updated according to the comparison result. The retransmission delay is the time difference between the retransmission time and the sending time of the target data packet.
[0077] Step S603: When the data packet sending period is reached at the time node, obtain the data packet to be processed.
[0078] Step S604: If the data packet to be processed is detected to be a retransmission data packet, and the transmission time interval of the original data packet corresponding to the data packet to be processed is less than or equal to the retransmission delay threshold, the data packet to be processed is discarded. The transmission time interval is the time difference between the current system time and the sending time of the original data packet.
[0079] Step S605: If the data packet to be processed is detected to be a retransmission data packet, and the transmission time interval of the original data packet corresponding to the data packet to be processed is greater than the retransmission delay threshold, the data packet to be processed is sent to the data receiving end.
[0080] If the transmission time interval is greater than the retransmission delay threshold, it can be considered as exceeding the reasonable delay time range caused by out-of-order transmission. The possibility of packet loss misjudgment is small, and the retransmission data packet needs to be sent again.
[0081] As described above, by comparing the transmission time interval with the retransmission delay threshold, it is possible to reasonably determine whether to send retransmitted data packets. This effectively reduces redundant retransmissions while ensuring the normal operation of the retransmission function and improving the effectiveness and smoothness of data transmission in out-of-order scenarios.
[0082] Figure 8 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 8 As shown, the device includes:
[0083] The detection module 201 is configured to, upon receiving an acknowledgment message for a transmitted data packet sent by the data receiving end, detect whether there is at least one target data packet in the data packet corresponding to the transmission sequence number in the acknowledgment message that satisfies the invalid retransmission condition.
[0084] The update module 202 is configured to compare the retransmission delay of the target data packet with the set retransmission delay threshold when the target data packet is detected, and update the retransmission delay threshold according to the comparison result. The retransmission delay is the time difference between the retransmission time and the sending time of the target data packet.
[0085] The data packet processing module 203 is configured to acquire the data packet to be processed when the data packet transmission period is reached at a time node, and discard the data packet to be processed if it is detected that the data packet to be processed is a retransmission data packet and the transmission time interval of the original data packet corresponding to the data packet to be processed is less than or equal to the retransmission delay threshold. The transmission time interval is the time difference between the current system time and the transmission time of the original data packet.
[0086] As described above, upon receiving an acknowledgment message for a transmitted data packet from the data receiving end, the system checks whether at least one target data packet that meets the invalid retransmission condition exists in the data packet corresponding to the transmission sequence number in the acknowledgment message. If a target data packet is detected, the retransmission delay of the target data packet is compared with a set retransmission delay threshold, and the retransmission delay threshold is updated based on the comparison result. Here, the retransmission delay is the time difference between the retransmission time and the transmission time of the target data packet. When the data packet transmission period is reached at a time node, a data packet to be processed is acquired. If the data packet to be processed is detected as a retransmission data packet, and the transmission time interval of the original data packet corresponding to the data packet to be processed is less than or equal to the retransmission delay threshold, the data packet to be processed is discarded. Here, the transmission time interval is the time difference between the current system time and the transmission time of the original data packet. In the above scheme, by detecting whether there is at least one target data packet that meets the invalid retransmission condition in the data packet corresponding to the transmission sequence number in the confirmation message, invalid retransmission information fed back by the link can be effectively collected, providing reliable reference information for adjusting the retransmission delay threshold. By updating the retransmission delay threshold according to the retransmission delay of the target data packet, the retransmission delay threshold can be effectively adjusted in out-of-order network scenarios, providing a more accurate basis for judging whether to retransmit the data packet. By discarding the retransmitted data packet when the transmission time interval of the original data packet corresponding to the retransmitted data packet is less than or equal to the retransmission delay threshold, the redundancy of invalid retransmission caused by packet loss misjudgment can be effectively reduced, the anti-out-of-order capability of the data sender can be enhanced, the utilization rate of the transmission link can be improved, the normal transmission of media data can be guaranteed, and the user experience can be optimized.
[0087] In one possible embodiment, the update module 202 is further configured to:
[0088] The maximum retransmission delay is determined by statistically analyzing the retransmission delay of the target data packet.
[0089] The maximum retransmission delay is compared with the set retransmission delay threshold.
[0090] In one possible embodiment, the update module 202 is further configured to:
[0091] If the retransmission delay threshold is less than the maximum retransmission delay, the retransmission delay threshold will be updated to the maximum retransmission delay.
[0092] In one possible embodiment, a threshold recovery module is also included, configured to:
[0093] If no target data packet is detected, the interval time is obtained by subtracting the current system time from the recorded reference time node. The reference time node is the most recent time when an invalid retransmission data packet was detected or the retransmission delay threshold was adjusted.
[0094] If the interval time is greater than the recovery cycle threshold, reduce the retransmission delay threshold and update the reference time node to the current system time.
[0095] In one possible embodiment, the threshold recovery module is further configured to:
[0096] Determine the reduction percentage of the retransmission delay threshold based on current network metrics;
[0097] Reduce the retransmission delay threshold according to the reduction ratio.
[0098] In one possible embodiment, a data packet sending module is also included, configured to:
[0099] If the data packet to be processed is detected to be a retransmitted data packet, and the transmission time interval of the original data packet corresponding to the data packet to be processed is greater than the retransmission delay threshold, the data packet to be processed is sent to the data receiving end.
[0100] In one possible embodiment, at least one target data packet that satisfies the invalid retransmission condition includes:
[0101] Data packets that satisfy the retransmission flag being true, or data packets whose retransmission time is not zero.
[0102] Figure 9 This is a schematic diagram of the structure of a data retransmission device provided in an embodiment of this application, as shown below. Figure 9 As shown, the device includes a processor 301, a memory 302, an input device 303, and an output device 304; the number of processors 301 in the device can be one or more. Figure 9 Taking a processor 301 as an example; the processor 301, memory 302, input device 303, and output device 304 in the device can be connected via a bus or other means. Figure 9Taking a bus connection as an example, the memory 302, 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 301 executes various functional applications and data processing of the device by running the software programs, instructions, and modules stored in the memory 302, thereby implementing the aforementioned data retransmission method. The input device 303 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 304 may include a display screen or other display device.
[0103] This application also provides a non-volatile storage medium containing computer-executable instructions, which, when executed by a computer processor, are configured to perform a data retransmission method described in the above embodiments, comprising:
[0104] Upon receiving an acknowledgment message for a transmitted data packet from the data receiver, the system checks whether there is at least one target data packet among the data packets corresponding to the transmission sequence number in the acknowledgment message that meets the invalid retransmission condition. If a target data packet is detected, the retransmission delay of the target data packet is compared with the set retransmission delay threshold, and the retransmission delay threshold is updated based on the comparison result. Here, the retransmission delay is the time difference between the retransmission time and the transmission time of the target data packet. When the data packet transmission cycle is reached at a time node, a data packet to be processed is acquired. If the data packet to be processed is detected as a retransmission data packet, and the transmission time interval of the original data packet corresponding to the data packet to be processed is less than or equal to the retransmission delay threshold, the data packet to be processed is discarded. Here, the transmission time interval is the time difference between the current system time and the transmission time of the original data packet.
[0105] 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.
[0106] 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 any combination of one or more readable media.
Claims
1. A data retransmission method, characterized in that, include: Upon receiving an acknowledgment message for a transmitted data packet from the data receiving end, it is detected whether there is at least one target data packet in the data packet corresponding to the transmission sequence number in the acknowledgment message that satisfies the invalid retransmission condition. If the target data packet is detected, the retransmission delay of the target data packet is compared with the set retransmission delay threshold, and the retransmission delay threshold is updated according to the comparison result. The retransmission delay is the time difference between the retransmission time and the sending time of the target data packet. When the data packet transmission period is reached at a time node, a data packet to be processed is acquired. If the data packet to be processed is detected to be a retransmission data packet, and the transmission time interval of the original data packet corresponding to the data packet to be processed is less than or equal to the retransmission delay threshold, the data packet to be processed is discarded. The transmission time interval is the time difference between the current system time and the transmission time of the original data packet.
2. The data retransmission method according to claim 1, characterized in that, The step of comparing the retransmission delay of the target data packet with the set retransmission delay threshold includes: The retransmission delay of the target data packet is statistically analyzed to determine the maximum retransmission delay; The maximum retransmission delay is compared with the set retransmission delay threshold.
3. The data retransmission method according to claim 2, characterized in that, The step of updating the retransmission delay threshold based on the comparison result includes: If the retransmission delay threshold is less than the maximum retransmission delay, the retransmission delay threshold is updated to the maximum retransmission delay.
4. The data retransmission method according to claim 1, characterized in that, Also includes: If the target data packet is not detected, the interval time is obtained by subtracting the current system time from the recorded reference time node, where the reference time node is the most recent time when an invalid retransmission data packet is detected or the retransmission delay threshold is adjusted. If the interval time is greater than the recovery cycle threshold, the retransmission delay threshold is reduced, and the reference time node is updated to the current system time.
5. The data retransmission method according to claim 4, characterized in that, The reduction of the retransmission delay threshold includes: The reduction ratio of the retransmission delay threshold is determined based on the current network metrics; The retransmission delay threshold is reduced according to the reduction ratio.
6. The data retransmission method according to claim 1, characterized in that, Also includes: If the data packet to be processed is detected to be a retransmission data packet, and the transmission time interval of the original data packet corresponding to the data packet to be processed is greater than the retransmission delay threshold, the data packet to be processed is sent to the data receiving end.
7. The data retransmission method according to any one of claims 1-6, characterized in that, The at least one target data packet that satisfies the invalid retransmission condition includes: Data packets that satisfy the retransmission flag being true, or data packets whose retransmission time is not zero.
8. A data retransmission device, characterized in that, include: The detection module is configured to, upon receiving an acknowledgment message for a transmitted data packet sent by the data receiving end, detect whether there is at least one target data packet in the data packet corresponding to the transmission sequence number in the acknowledgment message that satisfies the invalid retransmission condition. The update module is configured to, when the target data packet is detected, compare the retransmission delay of the target data packet with a set retransmission delay threshold, and update the retransmission delay threshold according to the comparison result. The retransmission delay is the time difference between the retransmission time and the sending time of the target data packet. The data packet processing module is configured to acquire a data packet to be processed when the data packet transmission period is reached at a time node, and discard the data packet to be processed if it is detected that the data packet to be processed is a retransmission data packet and the transmission time interval of the original data packet corresponding to the data packet to be processed is less than or equal to the retransmission delay threshold. The transmission time interval is the time difference between the current system time and the transmission time of the original data packet.
9. A data retransmission device, the device comprising: One or more processors; A storage device configured to store one or more programs that, when executed by one or more processors, cause the one or more processors to implement the data retransmission method according to any one of claims 1-7.
10. A non-volatile storage medium storing computer-executable instructions, which, when executed by a computer processor, are configured to perform the data retransmission method of any one of claims 1-7.
11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the data retransmission method according to any one of claims 1-7.
Citation Information
Patent Citations
QUIC adaptive data retransmission method, device and system
CN117394953A
Method and system for detecting retransmission threshold condition in selective repeat ARQ communication system
US20120210185A1