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

By comparing the target sending code rate with the original data code rate and calculating the retransmission time, and determining the retransmission time threshold based on the length of the jitter buffer feedback from the audience and the current round trip delay, the problem of too many invalid retransmission packets in network transmission is solved, and the effectiveness and user experience of data retransmission are improved.

CN119834938APending Publication Date: 2025-04-15BIGO TECH PTE LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510008708.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-03
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

In the network transmission, the prior art packet errors or losses caused by signal attenuation and network congestion lead to excessive invalid packet retransmission, low bandwidth utilization, poor packet loss recovery effect, and unable to guarantee the user's viewing experience.

Method used

By obtaining the retransmission data packet to be sent, comparing the target sending code rate with the original data bit rate, calculating the retransmission time, and determining the first retransmission time threshold based on the length of the jitter buffer feedback by the audience and the current round trip delay, and discarding the retransmission data packet when the retransmission time length is greater than the threshold.

Benefits of technology

It reduces the transmission of invalid retransmission packets, improves the effectiveness of data retransmission under limited bandwidth, ensures packet loss recovery effect, and improves the user's viewing experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119834938A_ABST
    Figure CN119834938A_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 to-be-sent retransmission data packet, and comparing a target sending code rate of the currently sent data packet with an original data code rate; under the condition that the target sending code rate is smaller than the original data code rate, the retransmission duration is calculated according to the current system time and the original data receiving time corresponding to the retransmission data packet; and obtaining a jitter buffer length fed back by the audience side, determining a first retransmission duration threshold value according to the jitter buffer length, the current round-trip delay with the audience side and a set maximum retransmission duration threshold value, and discarding the retransmitted data packet under the condition that the retransmission duration is greater than the first retransmission duration threshold value. According to the scheme, the transmission of invalid retransmission packets is reduced, the validity of data retransmission under a limited bandwidth is improved, the packet loss recovery effect is guaranteed, and the viewing experience of a user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of communication technology, and in particular, to a data retransmission method, apparatus, device, storage medium, and program product. Background Art

[0002] At present, during network transmission, data packets are prone to errors or loss due to signal attenuation, software and hardware anomalies, etc. In streaming media transmission scenarios, in order to ensure that video frames can be successfully assembled, an automatic retransmission mechanism is usually used to automatically resend data packets when data packet loss or errors are detected. However, if the data packet loss is caused by network congestion, retransmitting data packets will introduce more network traffic, aggravating congestion, resulting in more packet loss and greater delays, affecting the user's viewing experience.

[0003] The related technology adopts a traffic allocation mechanism that simply limits the total traffic occupied by sending retransmission packets. This method is prone to transmitting a large number of invalid retransmission packets, resulting in low bandwidth utilization and poor packet loss recovery effect, which cannot guarantee the user's viewing experience. Summary of the invention

[0004] The embodiments of the present application provide a data retransmission method, apparatus, device, storage medium and program product, which solve the problem that related technologies are prone to transmitting a large number of invalid retransmission packets, resulting in low bandwidth utilization, poor packet loss recovery effect, and inability to guarantee user viewing experience. The invention reduces the transmission of invalid retransmission packets, improves the effectiveness of data retransmission under limited bandwidth, guarantees packet loss recovery effect, and enhances user viewing experience.

[0005] In a first aspect, an embodiment of the present application provides a data retransmission method, the method comprising:

[0006] Obtain the retransmitted data packet to be sent, and compare the target sending code rate of the currently sent data packet with the original data code rate;

[0007] When the target transmission bit rate is less than the original data bit rate, the retransmission duration is calculated according to the current system time and the original data reception time corresponding to the retransmission data packet, and the original data reception time is the time when the original data packet corresponding to the retransmission data packet sent by the anchor terminal is received;

[0008] Obtain the jitter buffer length fed back by the audience end, determine the first retransmission duration threshold according to the jitter buffer length, the current round-trip delay with the audience end and the set maximum retransmission duration threshold, and discard the retransmitted data packet when the retransmission duration is greater than the first retransmission duration threshold.

[0009] In a second aspect, an embodiment of the present application further provides a data retransmission device, the device comprising:

[0010] A code rate comparison module is configured to obtain a retransmission data packet to be sent and compare a target transmission code rate of a currently sent data packet with an original data code rate;

[0011] The retransmission duration calculation module is configured to calculate the retransmission duration according to the current system time and the original data reception time corresponding to the retransmission data packet when the target transmission bit rate is less than the original data bit rate, wherein the original data reception time is the time when the original data packet corresponding to the retransmission data packet sent by the anchor terminal is received;

[0012] The retransmission packet processing module is configured to obtain the jitter buffer length fed back by the audience end, determine the first retransmission duration threshold according to the jitter buffer length, the current round-trip delay with the audience end and the set maximum retransmission duration threshold, and discard the retransmission data packet when the retransmission duration is greater than the first retransmission duration threshold.

[0013] In a third aspect, an embodiment of the present application further provides a data retransmission device, the device comprising:

[0014] one or more processors;

[0015] a 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 embodiment of the present application.

[0017] In a fourth aspect, an embodiment of the present application further provides a non-volatile storage medium storing computer executable instructions, wherein the computer executable instructions are configured to execute the data retransmission method described in the embodiment of the present application when executed by a computer processor.

[0018] In the fifth aspect, an embodiment of the present application also provides a computer program product, which includes a computer program, which is stored in a computer-readable storage medium, and at least one processor of the device reads and executes the computer program from the computer-readable storage medium, so that the device executes the data retransmission method described in the embodiment of the present application.

[0019] In an embodiment of the present application, by obtaining a retransmission data packet to be sent, the target transmission bit rate of the data packet currently being sent is compared with the original data bit rate; when the target transmission bit rate is lower than the original data bit rate, the retransmission duration is calculated based on the current system time and the original data reception time corresponding to the retransmission data packet, wherein the original data reception time is the time when the original data packet corresponding to the retransmission data packet sent by the anchor end is received; the jitter buffer length fed back by the audience end is obtained, and the first retransmission duration threshold is determined based on the jitter buffer length, the current round-trip delay with the audience end, and the set maximum retransmission duration threshold; when the retransmission duration is greater than the first retransmission duration threshold, the retransmission data packet is discarded. In the above scheme, by comparing the target sending bit rate of the data packet currently being sent with the original data bit rate, the current congestion situation of the network transmission can be effectively determined, and by calculating the retransmission duration of the retransmitted data packet, reliable reference information is provided for measuring the importance of the retransmitted data packet. By determining the first retransmission duration threshold according to the jitter buffer length, the current round-trip delay with the audience end and the set maximum retransmission duration threshold, the retransmission duration threshold can be dynamically adjusted to adapt to data transmission scenarios with different real-time requirements, and when the retransmission duration is greater than the first retransmission duration threshold, the retransmitted data packet is discarded. The retransmitted data packets with an earlier time can be discarded first, reducing the transmission of invalid retransmission packets, improving the effectiveness of data retransmission under limited bandwidth, ensuring the packet loss recovery effect, and improving the user's viewing experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 A flowchart of a data retransmission method provided in an embodiment of the present application;

[0021] Figure 2 A flowchart of a data retransmission method including a process of processing a retransmitted data packet based on a second retransmission duration threshold provided in an embodiment of the present application;

[0022] Figure 3 A flowchart of a data retransmission method including a process of determining a first retransmission duration threshold provided in an embodiment of the present application;

[0023] Figure 4 A flowchart of a data retransmission method including a process of determining a target jitter buffer length according to a jitter buffer length and a current round-trip delay provided in an embodiment of the present application;

[0024] Figure 5 A flowchart of another data retransmission method provided by an embodiment of the present application, including a process of determining a target jitter buffer length according to a jitter buffer length and a current round-trip delay;

[0025] Figure 6A flowchart of a data retransmission method including a process of sending a retransmission data packet provided in an embodiment of the present application;

[0026] Figure 7 A structural block diagram of a data retransmission device provided in an embodiment of the present application;

[0027] Figure 8 A schematic diagram of the structure of a data retransmission device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0028] The embodiments of the present application are further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the embodiments of the present application, rather than to limit the embodiments of the present application. It should also be noted that, for ease of description, only parts related to the embodiments of the present application are shown in the accompanying drawings, rather than all structures.

[0029] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0030] The data retransmission method provided in the embodiment of the present application can be used to selectively send retransmission data packets in congestion scenarios, reduce the transmission of invalid retransmission packets, avoid aggravating network congestion while ensuring packet loss recovery. Relevant application scenarios include web page live broadcast, conference live broadcast, video live broadcast, etc. The aforementioned application scenarios are only exemplary and explanatory. In actual applications, the data retransmission method can also be used in data transmission in other scenarios, and the embodiment of the present application does not limit this.

[0031] In the data retransmission method provided in the embodiment of the present application, the executor of each step can be a computer device, which refers to any electronic device with data calculation, processing and storage capabilities, such as mobile phones, PCs (Personal Computers), tablet computers and other terminal devices, and can also be servers and other devices, which are not limited in the embodiment of the present application.

[0032] Figure 1The flowchart of a data retransmission method provided in an embodiment of the present application. The execution subject of the data retransmission method can be a server, wherein the anchor end encodes the collected audio and video data into a network data packet and sends the network data packet to the server, and the server forwards the network data packet to the audience end according to the audience subscription information. The data retransmission method provided in this embodiment can be applied to the data transmission process of the server forwarding the network data packet to the audience end. Figure 1 As shown, the following steps are included:

[0033] Step S101: Obtain a retransmitted data packet to be sent, and compare the target transmission code rate of the currently sent data packet with the original data code rate.

[0034] Among them, the target transmission rate can be the target transmission rate at which the server needs to send data packets to the audience end, and the target transmission rate can be determined by the server according to the real-time network information and the device information of the audience end. The real-time network information may include network type, network bandwidth, network packet loss rate, network round-trip delay, etc. The device information may include device model, screen resolution, etc. For example, the corresponding judgment conditions can be set for the estimated network bandwidth, real-time packet loss rate and screen resolution of the audience end, or the appropriate target transmission rate can be matched in combination with the pre-built function correspondence, which is not limited in this application. The original data rate can be the rate at which the server receives the original video data sent by the anchor end, or it can be the rate at which the server transcodes the original video data sent by the anchor end. By comparing the target transmission rate with the original data rate, it can be determined whether the network condition is congested. If the target transmission rate is less than the original data rate, it can be regarded as the current transmission link cannot support the video data transmission of the original data rate, and the network may be congested. It can be considered to selectively send a retransmission data packet, which can be determined based on the automatic retransmission mechanism. If the target transmission bit rate is greater than or equal to the original data bit rate, it can be regarded that the current transmission link can better support the video data transmission of the original data bit rate, and the overall network condition is good, and the full amount of retransmission data packets can be considered. In this embodiment, the target transmission bit rate is compared with the original data bit rate to determine the network congestion situation, which can provide sufficient bandwidth upward exploration space for the server, make the bandwidth detection more accurate, prevent the occurrence of insufficient transmission data resulting in low bandwidth detection, and help improve data throughput, and provide viewers with better picture quality and higher frame rate playback experience. Of course, in the scenario where network congestion continues to increase, the sum of the bit rates of the original data bit rate, the retransmission bit rate and the forward error correction bit rate can be compared with the target transmission bit rate. If the target transmission bit rate is less than the sum of the bit rates, the selective transmission of the retransmission data packet can be considered. If the target transmission bit rate is greater than or equal to the sum of the bit rates, the full amount of retransmission data packets can be considered. Compared with only using the original data bit rate, adding the retransmission bit rate and the forward error correction bit rate can make the selective transmission of the retransmission data packet more stringent, avoiding further aggravation of network congestion. Of course, developers can make adaptive adjustments based on the network characteristics and business requirements of the actual application scenario, and this application does not limit this.

[0035] Step S102: When the target transmission bit rate is lower than the original data bit rate, the retransmission duration is calculated based on the current system time and the original data reception time corresponding to the retransmission data packet, wherein the original data reception time is the time when the original data packet corresponding to the retransmission data packet sent by the anchor is received.

[0036] Among them, if the target sending code rate is less than the original data code rate, it can be regarded as possible network congestion, and the judgment step of whether to send a retransmission data packet can be continued. The original data reception time is the time when the original data packet corresponding to the retransmission data packet sent by the anchor is received. By subtracting the current system time from the original data reception time, the retransmission duration corresponding to the retransmission data packet can be obtained. Since the related art limits the sending traffic of the retransmission data packet to avoid aggravating network congestion, only the traffic occupied by the retransmission data packet is considered, and the importance of the retransmission data packet is not distinguished, which easily leads to the transmission of more invalid retransmission packets when the bandwidth is insufficient, and the important retransmission data packets cannot be sent because they exceed the traffic limit, resulting in low utilization of the limited bandwidth and poor recovery effect of retransmission. Therefore, this embodiment introduces the retransmission duration as an indicator to measure the importance. The retransmission duration can be used to determine whether the retransmission data packet is a data packet sent by the anchor end that is received earlier by the server. The longer the retransmission duration, the older the content of the retransmission data packet, and the higher the probability of becoming an invalid retransmission packet. Invalid retransmission packets are retransmission data packets that cannot be played after being received by the audience end, for example, the retransmission data packet is received too late and cannot be played in time, the received retransmission data packet is duplicate content, etc. Therefore, the retransmission duration can be used to measure the importance of the retransmission data packet.

[0037] Step S103, obtain the jitter buffer length fed back by the audience end, determine the first retransmission duration threshold according to the jitter buffer length, the current round-trip delay with the audience end and the set maximum retransmission duration threshold, and discard the retransmitted data packet when the retransmission duration is greater than the first retransmission duration threshold.

[0038] Among them, a retransmission time threshold can be set to compare with the retransmission time. If the retransmission time is greater than the retransmission time threshold, it can be regarded that the probability of the retransmission data packet becoming an invalid retransmission packet is high, and its importance is low. You can choose to discard the retransmission data packet. If the retransmission time is less than or equal to the retransmission time threshold, it can be regarded that the probability of the retransmission data packet becoming an invalid retransmission packet is low, and its importance is high. You can choose to continue to send the retransmission data packet. Since different application scenarios have different real-time requirements, and sending retransmission data packets will increase the transmission link delay, the larger the retransmission time threshold, the fewer corresponding retransmission data packets will be discarded, and the impact on the transmission link delay is small, which is suitable for scenarios with high real-time requirements. Correspondingly, the smaller the retransmission time threshold, the more corresponding retransmission data packets will be discarded, and the impact on the transmission link delay is large, which is suitable for scenarios with low real-time requirements. Therefore, this embodiment adopts a method of dynamically setting the retransmission duration threshold, and determines the first retransmission duration threshold based on the jitter buffer length, the current round-trip delay with the audience end, and the set maximum retransmission duration threshold, and compares the first retransmission duration threshold with the retransmission duration to determine whether to discard the retransmitted data packet. The current round-trip delay is the total time from the current server sending the data packet to the audience end to the server receiving the confirmation information fed back by the audience end. Among them, after calculating the first retransmission delay threshold, the first retransmission delay threshold can be set to the new maximum retransmission duration threshold, so as to adjust the threshold according to the changes in real-time requirements of different application scenarios. It should be noted that the jitter buffer is a data processing module set at the audience end, which can process situations such as data packet loss, disorder, delayed arrival, etc., and smoothly output data packets or data frames to the decoding module to alleviate the impact of various weak network conditions on video playback or rendering, reduce video jams, and improve the user's viewing experience. For the audience end, the larger the jitter buffer length, the better the smoothing effect, but it will cause the delay to increase. Therefore, for application scenarios with different real-time requirements, the jitter buffer length set by the audience end is different. For example, for the scene where the anchor and the audience are connected, the two sides need to talk in real time, so the delay requirement is higher, and the corresponding jitter buffer length is smaller. For example, for the scene where the audience watches the anchor or communicates with the anchor through the bullet screen, the delay requirement is relatively low, and the corresponding jitter buffer length is larger. Therefore, the jitter buffer length can reflect the actual application scenario for the high or low demand of real-time performance. In one embodiment, the larger value of the jitter buffer length and the set maximum retransmission duration threshold can be determined as the first retransmission duration threshold, which meets the data cache processing requirements of the audience end and also ensures the real-time performance of the transmission. In one embodiment, the sum of the jitter buffer length and the current round-trip delay and the larger value of the set maximum retransmission duration threshold can be determined as the first retransmission duration threshold, which meets the data cache processing requirements of the audience end and appropriately compensates for the delay of the transmission link.

[0039] In the above, by obtaining the retransmission data packet to be sent, the target transmission bit rate of the currently transmitted data packet is compared with the original data bit rate; when the target transmission bit rate is lower than the original data bit rate, the retransmission duration is calculated according to the current system time and the original data reception time corresponding to the retransmission data packet, wherein the original data reception time is the time when the original data packet corresponding to the retransmission data packet sent by the anchor end is received; the jitter buffer length fed back by the audience end is obtained, and the first retransmission duration threshold is determined according to the jitter buffer length, the current round-trip delay with the audience end and the set maximum retransmission duration threshold, and when the retransmission duration is greater than the first retransmission duration threshold, the retransmission data packet is discarded. In the above scheme, by comparing the target sending bit rate of the currently sent data packet with the original data bit rate, the current congestion situation of the network transmission can be effectively determined. By calculating the retransmission time of the retransmitted data packet, reliable reference information is provided for measuring the importance of the retransmitted data packet. By determining the first retransmission time threshold according to the jitter buffer length, the current round-trip delay with the audience end and the set maximum retransmission time threshold, the retransmission time threshold can be dynamically adjusted to adapt to data transmission scenarios with different real-time requirements. When the retransmission time is greater than the first retransmission time threshold, the retransmitted data packet is discarded. The retransmitted data packets with an earlier time can be discarded first, reducing the transmission of invalid retransmission packets, improving the effectiveness of data retransmission under limited bandwidth, ensuring the packet loss recovery effect, and improving the user's viewing experience.

[0040] Figure 2 A flowchart of a data retransmission method including a process of processing a retransmitted data packet based on a second retransmission duration threshold is provided in an embodiment of the present application. Figure 2 As shown, the following steps are included:

[0041] Step S201: Obtain a retransmitted data packet to be sent, and compare the target transmission code rate of the currently sent data packet with the original data code rate.

[0042] Step S202: When the target transmission bit rate is lower than the original data bit rate, the retransmission duration is calculated based on the current system time and the original data reception time corresponding to the retransmission data packet, wherein the original data reception time is the time when the original data packet corresponding to the retransmission data packet sent by the anchor is received.

[0043] Step S203: Obtain the jitter buffer length fed back by the viewer end and the picture group duration of the current encoding setting fed back by the host end.

[0044] The GOP is a basic unit in video encoding, which represents a group of continuous pictures. A GOP contains one or more key frames, forward prediction frames, and bidirectional prediction frames. Key frames can be encoded independently, but forward prediction frames and bidirectional prediction frames need to rely on the previous key frames for decoding. The GOP duration is the duration of playing a GOP.

[0045] Step S204: determine the first retransmission duration threshold according to the jitter buffer length, the current round-trip delay with the viewer end and the set maximum retransmission duration threshold, and determine the larger value of the first retransmission duration threshold and the picture group duration as the second retransmission duration threshold.

[0046] Among them, if the key frame in a picture group is not successfully framed due to data packet loss, the forward prediction frame and the bidirectional prediction frame behind this key frame cannot be played. Therefore, determining the retransmission duration threshold also needs to consider ensuring the integrity of a picture group, and the retransmission data packet whose retransmission duration is less than the picture group duration cannot be discarded to ensure the effectiveness of the retransmission. Therefore, the larger value of the first retransmission duration threshold and the picture group duration can be determined as the second retransmission duration threshold, and the retransmission data packet is discarded based on the second retransmission duration threshold. In addition, after calculating the second retransmission duration threshold, the second retransmission duration threshold can be updated to the new maximum retransmission duration threshold to achieve the purpose of dynamically updating the retransmission duration threshold.

[0047] Step S205: When the retransmission duration is greater than the second retransmission duration threshold, discard the retransmitted data packet.

[0048] As described above, on the basis of determining the first retransmission duration threshold, the judgment of the picture group duration is added. By determining the larger value of the first retransmission duration threshold and the picture group duration as the second retransmission duration threshold, it can be ensured that the retransmission duration of the discarded retransmitted data packet is greater than the picture group duration, thereby ensuring the integrity of the picture group, ensuring the effectiveness of the retransmission, reducing the waste of retransmission traffic and improving the user's viewing experience.

[0049] Figure 3 A flowchart of a data retransmission method including a process of determining a first retransmission duration threshold is provided in an embodiment of the present application. Figure 3 As shown, the following steps are included:

[0050] Step S301: Obtain a retransmitted data packet to be sent, and compare the target transmission code rate of the currently sent data packet with the original data code rate.

[0051] Step S302: When the target transmission bit rate is lower than the original data bit rate, the retransmission duration is calculated based on the current system time and the original data reception time corresponding to the retransmission data packet, wherein the original data reception time is the time when the original data packet corresponding to the retransmission data packet sent by the anchor is received.

[0052] Step S303: Obtain the jitter buffer length fed back by the audience, determine the target jitter buffer length according to the jitter buffer length and the current round-trip delay, and determine the larger value of the target jitter buffer length and the set maximum retransmission duration threshold as the first retransmission duration threshold.

[0053] Among them, the current round-trip delay can be used to compensate for the jitter buffer length, so that the target jitter buffer length is closer to the real-time jitter buffer length of the audience. In one embodiment, a jitter buffer smoothing value can be obtained based on the jitter buffer length and the corresponding historical jitter buffer length by smoothing, and the jitter buffer smoothing value is added to the current round-trip delay to obtain the target jitter buffer length. In one embodiment, the round-trip delay smoothing value can be determined based on the current round-trip delay and the corresponding historical round-trip delay, and the jitter buffer length is added to the round-trip delay smoothing value to obtain the target jitter buffer length. In addition, the first retransmission duration threshold is calculated, and the first retransmission duration threshold can be updated to a new maximum retransmission duration threshold, so that the maximum retransmission duration threshold can be iteratively updated the next time the new jitter buffer length is obtained, to ensure the accuracy and timeliness of the threshold setting.

[0054] Step S304: When the retransmission duration is greater than the first retransmission duration threshold, discard the retransmitted data packet.

[0055] As mentioned above, by determining the larger value of the target jitter buffer length and the set maximum retransmission duration threshold as the first retransmission duration threshold, it can be ensured that the retransmission duration corresponding to the retransmitted data packet that needs to be discarded is greater than the jitter buffer length, ensuring that the jitter buffer can normally handle network jitter, disorder and other anomalies, alleviating the increase in retransmission traffic while being beneficial to the optimization of audio and video quality.

[0056] Figure 4 A flowchart of a data retransmission method including a process of determining a target jitter buffer length according to a jitter buffer length and a current round trip delay is provided in an embodiment of the present application. Figure 4 As shown, the following steps are included:

[0057] Step S401: Obtain a retransmitted data packet to be sent, and compare the target transmission code rate of the currently sent data packet with the original data code rate.

[0058] Step S402: When the target transmission bit rate is lower than the original data bit rate, the retransmission duration is calculated based on the current system time and the original data reception time corresponding to the retransmission data packet, wherein the original data reception time is the time when the original data packet corresponding to the retransmission data packet sent by the anchor is received.

[0059] Step S403: obtain the jitter buffer length fed back by the audience, add the jitter buffer length to the current round-trip delay to obtain the target jitter buffer length, and determine the larger value of the target jitter buffer length and the set maximum retransmission duration threshold as the first retransmission duration threshold.

[0060] Step S404: When the retransmission duration is greater than the first retransmission duration threshold, discard the retransmitted data packet.

[0061] As described above, by adding the jitter buffer length to the current round-trip delay to obtain the target jitter buffer length, both the impact of network jitter on data packets and the impact of network delay on data transmission are taken into account, and the jitter buffer length is compensated to a certain extent, which is more conducive to optimizing playback smoothness.

[0062] Figure 5 A flowchart of another data retransmission method provided by an embodiment of the present application, including a process of determining a target jitter buffer length according to the jitter buffer length and the current round-trip delay. Figure 5 As shown, the following steps are included:

[0063] Step S501: Obtain a retransmitted data packet to be sent, and compare the target transmission code rate of the currently sent data packet with the original data code rate.

[0064] Step S502: When the target transmission bit rate is lower than the original data bit rate, the retransmission duration is calculated based on the current system time and the original data reception time corresponding to the retransmission data packet, wherein the original data reception time is the time when the original data packet corresponding to the retransmission data packet sent by the anchor is received.

[0065] Step S503, obtain the jitter buffer length fed back by the audience, determine the jitter buffer smoothing value according to the jitter buffer length and the recorded historical jitter buffer length, determine the round-trip delay smoothing value according to the current round-trip delay and the recorded historical round-trip delay, and add the jitter buffer smoothing value to the round-trip delay smoothing value to obtain the target jitter buffer length.

[0066] The smoothing of the jitter buffer length and the round-trip delay may be weighted moving average, exponential moving average or Gaussian filtering, etc., which is not limited in this application. Taking the exponential moving average as an example, the calculation formula of the jitter buffer smoothing value is as follows:

[0067] sJitterBufferLen t =α*JitterBufferLen t +(1-α)*sJitterBufferLen t-1 ,

[0068] sJitterBufferLen0=JitterBufferLen0,

[0069] Among them, sJitterBufferLen t The jitter buffer smoothing value at the current moment, sJitterBufferLen t-1 JitterBufferLen is the jitter buffer smoothing value at the previous moment. t is the jitter buffer length at the current moment, sJitterBufferLen0 is the jitter buffer smoothing value at the initial moment, JitterBufferLen0 is the jitter buffer length at the initial moment, and α is the reference index value.

[0070] The calculation formula for the round-trip delay smoothing value is as follows:

[0071] srtt t =β*rtt t +(1-β)*srtt t-1 ,

[0072] srtt0=rtt0,

[0073] Among them, srtt t is the round-trip delay smoothing value at the current moment, srtt t-1 is the round-trip delay smoothing value of the previous moment, rtt t is the round-trip delay at the current moment, srtt0 is the round-trip delay smoothing value at the initial moment, rtt0 is the round-trip delay at the initial moment, and β is the reference exponent value.

[0074] Step S504: The larger value between the target jitter buffer length and the set maximum retransmission duration threshold is determined as the first retransmission duration threshold.

[0075] Step S505: When the retransmission duration is greater than the first retransmission duration threshold, discard the retransmitted data packet.

[0076] As mentioned above, by smoothing the jitter buffer length and the round-trip delay respectively to obtain the corresponding jitter buffer smoothing value and the round-trip delay smoothing value, the volatility of the data can be reduced, and the jitter buffer smoothing value is added to the round-trip delay smoothing value to obtain the target jitter buffer length, thereby improving the stability and reference of the target jitter buffer length, eliminating the influence of abnormal data jitter, and providing a more accurate target jitter buffer length.

[0077] Figure 6 A flowchart of a data retransmission method including a process of sending a retransmission data packet is provided in an embodiment of the present application. Figure 6 As shown, the following steps are included:

[0078] Step S601: Obtain a retransmitted data packet to be sent, and compare the target transmission code rate of the currently sent data packet with the original data code rate.

[0079] Step S602: When the target transmission bit rate is lower than the original data bit rate, the retransmission duration is calculated based on the current system time and the original data reception time corresponding to the retransmission data packet, wherein the original data reception time is the time when the original data packet corresponding to the retransmission data packet sent by the anchor is received.

[0080] Step S603: When the target transmission code rate is greater than or equal to the original data code rate, a retransmission data packet is sent.

[0081] Step S604: Obtain the jitter buffer length fed back by the viewer end, and determine the first retransmission duration threshold according to the jitter buffer length, the current round-trip delay with the viewer end, and the set maximum retransmission duration threshold.

[0082] Step S605: When the retransmission duration is greater than the first retransmission duration threshold, discard the retransmitted data packet.

[0083] Step S606: When the retransmission duration is less than or equal to the first retransmission duration threshold, send a retransmission data packet.

[0084] As described above, by sending retransmission data packets when the target sending bit rate is greater than or equal to the original data bit rate, the sending of retransmission data packets can be adapted to good network conditions, and by sending retransmission data packets when the retransmission duration is less than or equal to the first retransmission duration threshold, the retransmission traffic can be reasonably reduced while ensuring the audio and video playback quality.

[0085] Figure 7 This is a structural block diagram of a data retransmission device provided in an embodiment of the present application. The device is configured to execute the data retransmission method provided in the above embodiment and has the corresponding functional modules and beneficial effects of the execution method. Figure 7 As shown, the device comprises:

[0086] The code rate comparison module 101 is configured to obtain a retransmission data packet to be sent, and compare the target transmission code rate of the data packet currently being sent with the original data code rate;

[0087] The retransmission duration calculation module 102 is configured to calculate the retransmission duration according to the current system time and the original data reception time corresponding to the retransmission data packet when the target transmission bit rate is less than the original data bit rate, wherein the original data reception time is the time when the original data packet corresponding to the retransmission data packet sent by the anchor terminal is received;

[0088] The retransmission packet processing module 103 is configured to obtain the jitter buffer length fed back by the audience end, determine the first retransmission duration threshold according to the jitter buffer length, the current round-trip delay with the audience end and the set maximum retransmission duration threshold, and discard the retransmission data packet when the retransmission duration is greater than the first retransmission duration threshold.

[0089] In the above, by obtaining the retransmission data packet to be sent, the target transmission bit rate of the currently transmitted data packet is compared with the original data bit rate; when the target transmission bit rate is lower than the original data bit rate, the retransmission duration is calculated according to the current system time and the original data reception time corresponding to the retransmission data packet, wherein the original data reception time is the time when the original data packet corresponding to the retransmission data packet sent by the anchor end is received; the jitter buffer length fed back by the audience end is obtained, and the first retransmission duration threshold is determined according to the jitter buffer length, the current round-trip delay with the audience end and the set maximum retransmission duration threshold, and when the retransmission duration is greater than the first retransmission duration threshold, the retransmission data packet is discarded. In the above scheme, by comparing the target sending bit rate of the currently sent data packet with the original data bit rate, the current congestion situation of the network transmission can be effectively determined. By calculating the retransmission time of the retransmitted data packet, reliable reference information is provided for measuring the importance of the retransmitted data packet. By determining the first retransmission time threshold according to the jitter buffer length, the current round-trip delay with the audience end and the set maximum retransmission time threshold, the retransmission time threshold can be dynamically adjusted to adapt to data transmission scenarios with different real-time requirements. When the retransmission time is greater than the first retransmission time threshold, the retransmitted data packet is discarded. The retransmitted data packets with an earlier time can be discarded first, reducing the transmission of invalid retransmission packets, improving the effectiveness of data retransmission under limited bandwidth, ensuring the packet loss recovery effect, and improving the user's viewing experience.

[0090] In a possible embodiment, it further includes an acquisition module configured to:

[0091] Get the picture group duration of the current encoding setting fed back by the anchor;

[0092] The retransmission duration threshold determination module is configured as follows:

[0093] Determine a larger value of the first retransmission duration threshold and the picture group duration as a second retransmission duration threshold;

[0094] Correspondingly, the retransmission packet processing module 103 is further configured as follows:

[0095] When the retransmission time length is greater than the second retransmission time length threshold, the retransmitted data packet is discarded.

[0096] In a possible embodiment, the retransmission packet processing module 103 is further configured to:

[0097] Determine a target jitter buffer length according to the jitter buffer length and the current round trip delay;

[0098] A larger value between the target jitter buffer length and the set maximum retransmission duration threshold is determined as the first retransmission duration threshold.

[0099] In a possible embodiment, the retransmission packet processing module 103 is further configured to:

[0100] The target jitter buffer length is obtained by adding the jitter buffer length to the current round trip delay.

[0101] In a possible embodiment, the retransmission packet processing module 103 is further configured to:

[0102] determining a jitter buffer smoothing value according to the jitter buffer length and a recorded historical jitter buffer length;

[0103] Determine a round trip delay smoothing value according to the current round trip delay and the recorded historical round trip delay;

[0104] The target jitter buffer length is obtained by adding the jitter buffer smoothing value to the round-trip delay smoothing value.

[0105] In a possible embodiment, it further includes a second retransmission packet processing module configured to:

[0106] When the target sending code rate is greater than or equal to the original data code rate, or when the retransmission duration is less than or equal to the first retransmission duration threshold, the retransmission data packet is sent.

[0107] Figure 8 A schematic diagram of the structure of a data retransmission device provided in an embodiment of the present application is shown in FIG. Figure 8 As shown, the device includes a processor 201, a memory 202, an input device 203 and an output device 204; the number of processors 201 in the device can be one or more. Figure 8 A processor 201 is taken as an example; the processor 201, memory 202, input device 203 and output device 204 in the device can be connected by a bus or other means. Figure 8The example of connecting via a bus is taken. The memory 202, as a computer-readable storage medium, can be configured to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the data retransmission method in the embodiment of the present application. The processor 201 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 202, that is, implements the above-mentioned data retransmission method. The input device 203 can be configured to receive input digital or character information, and generate key signal input related to user settings and function control of the device. The output device 204 may include a display device such as a display screen.

[0108] An embodiment of the present application also provides a non-volatile storage medium containing computer executable instructions, which, when executed by a computer processor, is configured to execute a data retransmission method described in the above embodiment, which includes: obtaining a retransmission data packet to be sent, and comparing the target transmission bit rate of the data packet currently being sent with the original data bit rate; when the target transmission bit rate is less than the original data bit rate, calculating the retransmission duration according to the current system time and the original data reception time corresponding to the retransmission data packet, wherein the original data reception time is the time when the original data packet corresponding to the retransmission data packet sent by the anchor end is received; obtaining the jitter buffer length fed back by the audience end, determining a first retransmission duration threshold according to the jitter buffer length, the current round-trip delay with the audience end and the set maximum retransmission duration threshold, and discarding the retransmission data packet when the retransmission duration is greater than the first retransmission duration threshold.

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

[0110] In some possible implementations, various aspects of the method provided in the present application may also be implemented in the form of a program product, which includes a program code. When the program product is run on a computer device, the program code is configured to enable the computer device to execute the steps of the method according to various exemplary embodiments of the present application described above in this specification. For example, the computer device may execute the data retransmission method described in the embodiment of the present application. The program product may be implemented in any combination of one or more readable media.

Claims

1. A data retransmission method, characterized in that: include: Obtain the retransmitted data packet to be sent, and compare the target sending code rate of the currently sent data packet with the original data code rate; When the target transmission bit rate is less than the original data bit rate, the retransmission duration is calculated according to the current system time and the original data reception time corresponding to the retransmission data packet, and the original data reception time is the time when the original data packet corresponding to the retransmission data packet sent by the anchor terminal is received; Obtain the jitter buffer length fed back by the audience end, determine the first retransmission duration threshold according to the jitter buffer length, the current round-trip delay with the audience end and the set maximum retransmission duration threshold, and discard the retransmitted data packet when the retransmission duration is greater than the first retransmission duration threshold.

2. The data retransmission method according to claim 1, characterized in that: Before determining the first retransmission duration threshold according to the jitter buffer length, the current round-trip delay with the viewer terminal and the set maximum retransmission duration threshold, the method further includes: Get the picture group duration of the current encoding setting fed back by the anchor; After determining the first retransmission duration threshold according to the jitter buffer length, the current round-trip delay with the viewer terminal and the set maximum retransmission duration threshold, the method further includes: Determine a larger value between the first retransmission duration threshold and the picture group duration as a second retransmission duration threshold; Correspondingly, when the retransmission duration is greater than the first retransmission duration threshold, discarding the retransmitted data packet includes: When the retransmission duration is greater than the second retransmission duration threshold, the retransmission data packet is discarded.

3. The data retransmission method according to claim 1, characterized in that: The determining of the first retransmission duration threshold according to the jitter buffer length, the current round-trip delay with the viewer end, and the set maximum retransmission duration threshold comprises: Determining a target jitter buffer length according to the jitter buffer length and a current round trip delay; A larger value between the target jitter buffer length and the set maximum retransmission duration threshold is determined as the first retransmission duration threshold.

4. The data retransmission method according to claim 3, characterized in that: The determining a target jitter buffer length according to the jitter buffer length and the current round trip delay comprises: The target jitter buffer length is obtained by adding the jitter buffer length to the current round trip delay.

5. The data retransmission method according to claim 3, characterized in that: The determining a target jitter buffer length according to the jitter buffer length and the current round trip delay comprises: Determining a jitter buffer smoothing value according to the jitter buffer length and a recorded historical jitter buffer length; Determine a round trip delay smoothing value according to the current round trip delay and the recorded historical round trip delay; The jitter buffer smoothing value is added to the round-trip delay smoothing value to obtain a target jitter buffer length.

6. The data retransmission method according to any one of claims 1 to 5, characterized in that: The method further comprises: When the target sending code rate is greater than or equal to the original data code rate, or when the retransmission duration is less than or equal to the first retransmission duration threshold, the retransmission data packet is sent.

7. A data retransmission device, characterized in that: include: A code rate comparison module is configured to obtain a retransmission data packet to be sent and compare a target transmission code rate of a currently sent data packet with an original data code rate; The retransmission duration calculation module is configured to calculate the retransmission duration according to the current system time and the original data reception time corresponding to the retransmission data packet when the target transmission bit rate is less than the original data bit rate, wherein the original data reception time is the time when the original data packet corresponding to the retransmission data packet sent by the anchor terminal is received; The retransmission packet processing module is configured to obtain the jitter buffer length fed back by the audience end, determine the first retransmission duration threshold according to the jitter buffer length, the current round-trip delay with the audience end and the set maximum retransmission duration threshold, and discard the retransmission data packet when the retransmission duration is greater than the first retransmission duration threshold.

8. A data retransmission device, comprising: one or more processors; A storage device configured to store one or more programs, when the one or more programs are executed by the one or more processors, enables the one or more processors to implement the data retransmission method according to any one of claims 1 to 6.

9. A non-volatile storage medium storing computer executable instructions, wherein the computer executable instructions are configured to execute the data retransmission method according to any one of claims 1 to 6 when executed by a computer processor.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the data retransmission method according to any one of claims 1 to 6 is implemented.