Data transmission method and apparatus, electronic device, and storage medium

By using a packet-driven packet loss detection and retransmission mechanism, the problem that existing packet loss retransmission mechanisms cannot meet the time requirements of streaming media applications is solved, achieving low packet loss recovery time and efficient data block transmission.

CN115866095BActive Publication Date: 2025-11-25DOUYIN VISION CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211489158.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-25
Publication Date
2025-11-25
Estimated Expiration
2042-11-25

AI Technical Summary

Technical Problem

Existing packet loss retransmission mechanisms are insufficient to meet the strict time limits for data block transmission in streaming media applications, resulting in excessively long data block transmission times or congestion.

Method used

A packet loss detection and retransmission mechanism based on data packets is adopted. The mechanism determines whether packet loss has occurred based on data packets and retransmits them in a timely manner, avoiding waiting for timeout triggers or acknowledgment messages.

Benefits of technology

It achieves lower packet loss recovery time and data block transmission time, making it suitable for short video and live streaming services with time-limited requirements for data block transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115866095B_ABST
    Figure CN115866095B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of communication, in particular to a data transmission method and device, electronic equipment and storage medium, the method comprising: obtaining a size of a current data block and a historical packet loss rate of a historical data block, the current data block comprising at least one data packet; determining a current packet loss detection threshold of the current data block based on the size of the current data block and the historical packet loss rate; when it is determined that the current packet loss detection threshold is met based on a number of first received data packets of the current data block, performing packet loss detection on the current data block to determine first non-arrived data packets of the current data block; and obtaining the first non-arrived data packets to obtain data packets of the current data block. The transmission and packet loss judgment are performed in units of data blocks, the data blocks can be completely delivered to the application layer, the data blocks can be independently interacted with each other, the packet loss can be found as early as possible when the data blocks are lost, and the data blocks will not be blocked on the packet loss.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of communication, and in particular to a data transmission method and device, an electronic device, and a storage medium. BACKGROUND

[0002] Multi-path transmission technology can fully utilize heterogeneous uplink resources and maintain normal transmission capacity when a single connection is blocked, and thus has a good application prospect. At present, the multi-path transmission technology is widely used in file downloading, short video, live streaming and other streaming media services. Streaming media services usually have strict requirements on the transmission time of data blocks. For example, short video services require that the download time of a continuous data block does not exceed the remaining cache time, otherwise it will cause lag; live streaming services have even stricter requirements, requiring the transmission time of data blocks to be in the order of milliseconds. If a data block is lost and not recovered in time during transmission, it will cause lag and quality degradation. SUMMARY

[0003] Therefore, the embodiments of the present disclosure provide a data transmission method, device, electronic device and storage medium to solve the problem of packet loss recovery.

[0004] According to a first aspect, the embodiments of the present disclosure provide a data transmission method, comprising:

[0005] obtaining the size of a current data block and the historical packet loss rate of a historical data block, the current data block comprising at least one data packet;

[0006] determining a current packet loss detection threshold of the current data block based on the size of the current data block and the historical packet loss rate;

[0007] when it is determined that the current packet loss detection threshold is met based on the number of first received data packets of the current data block, performing packet loss detection on the current data block to determine first non-arrived data packets of the current data block;

[0008] obtaining the first non-arrived data packets to obtain data packets of the current data block.

[0009] According to a second aspect, the embodiments of the present disclosure further provide a data transmission device, comprising:

[0010] a first obtaining module configured to obtain the size of a current data block and the historical packet loss rate of a historical data block, the current data block comprising at least one data packet;

[0011] a first determining module configured to determine a current packet loss detection threshold of the current data block based on the size of the current data block and the historical packet loss rate;

[0012] a second determining module, configured to perform packet loss detection on the current data block to determine the first unarrived data packet of the current data block when it is determined that the current data block meets the current packet loss detection threshold based on the number of the first received data packet of the current data block.

[0013] a second obtaining module, configured to obtain the unarrived data packet to obtain the data packet of the current data block.

[0014] According to a third aspect, an electronic device is provided, including a memory and a processor, which are in communication connection with each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the data transmission method in the first aspect or any one of the implementation manners of the first aspect.

[0015] According to a fourth aspect, a computer readable storage medium is provided, which stores computer instructions for causing a computer to perform the data transmission method in the first aspect or any one of the implementation manners of the first aspect.

[0016] The data transmission method provided by the embodiments of the present disclosure transmits and judges packet loss in units of data blocks. Since the data blocks can be delivered to the application layer completely, the data blocks can interact with each other independently. This way can discover the packet loss as early as possible and will not cause the data blocks to be blocked on the packet loss. When detecting the packet loss, the data packet is used as the driving time to judge whether the packet loss occurs and to obtain the first unarrived data packet in time, without waiting for the timeout trigger or the confirmation message. This can achieve a lower packet loss reply time and data block transmission time, so that the method can be applied to short video and live broadcast services and other services that require limited data block transmission. BRIEF DESCRIPTION OF DRAWINGS

[0017] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed in the specific embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present disclosure, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.

[0018] Figure 1 is a flowchart of the data transmission method according to the embodiments of the present disclosure;

[0019] Figure 2 is a flowchart of the data transmission method according to the embodiments of the present disclosure;

[0020] Figure 3 is a flowchart of the data transmission method according to the embodiments of the present disclosure;

[0021] Figure 4 is a flow chart of a data transmission method according to an embodiment of the present disclosure;

[0022] Figure 5 is a structural block diagram of a data transmission device according to an embodiment of the present disclosure;

[0023] Figure 6 is a hardware structure schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0024] To make the objects, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be described clearly and completely below with reference to the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only some but not all of the embodiments of the present disclosure. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work fall within the protection scope of the present disclosure.

[0025] In the packet loss retransmission detection, time-driven retransmission and ACK (Acknowledge character)-driven retransmission are generally used. Specifically, the time-driven retransmission means that the sending end sets a timer when sending data, and if the timer expires without receiving the data acknowledgement information, the corresponding timeout and data retransmission are triggered. The timeout retransmission time is generally set to 1-2 times of the round-trip time of a single connection, or is estimated according to the network changes. The data packet recovery efficiency based on the time-driven retransmission is very low, especially when the path delay of the packet loss is large, the timeout retransmission time often exceeds the data block transmission time requirement, resulting in a long data block transmission time. The ACK-driven retransmission means that the sending end triggers the retransmission based on the acknowledgement information of the receiving end, rather than the timeout of the retransmission timer. If the data packets do not reach continuously, it means that the last ACK may be lost, and if the sender receives the same ACK for three times continuously, the data packet is retransmitted, and only one data packet can be recovered at a time. The SACK (Selective Acknowledge character) is an extension of ACK, which can support the recovery of multiple data packets. This retransmission mechanism is more efficient than the timeout-triggered retransmission mechanism, but in essence, the sending end must rely on receiving enough acknowledgement messages to perform retransmission, and if the ACK is lost, the data block transmission will be blocked on the data packet, which cannot meet the delay requirement of the data block transmission.

[0026] Therefore, it is evident that neither of the aforementioned packet loss retransmission mechanisms can meet the requirements of streaming media applications with strict time constraints for data block transmission. Based on this, the data transmission method provided in this disclosure is based on a packet-driven packet loss detection and retransmission mechanism. It determines whether packet loss has occurred and retransmits it promptly based on the data packet as the driving time, without waiting for timeout triggers or acknowledgment messages. Therefore, it can achieve lower packet loss recovery time and data block transmission time, enabling this method to be applied to short video and live streaming services with time constraints for data block transmission.

[0027] According to an embodiment of this disclosure, a data transmission method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0028] This embodiment provides a data transmission method that can be used in electronic devices, such as mobile terminals and computers. Figure 1 This is a flowchart of a data transmission method according to an embodiment of the present disclosure, such as... Figure 1 As shown, the process includes the following steps:

[0029] S11, obtain the size of the current data block and the historical packet loss rate of historical data blocks.

[0030] The current data block includes at least one data packet.

[0031] Data blocks include, but are not limited to, video frames, audio frames, etc. In this embodiment, detection is performed on a data block basis, and each data block can be independently delivered to the upper-layer application for processing. Therefore, detection on a data block basis can promptly detect packet loss. The size of the current data block is determined based on actual business needs, and its specific value is not limited here.

[0032] Historical data blocks are data blocks preceding the current data block. There can be one, two, or more data blocks; the specific number of historical data blocks is not limited. The historical packet loss rate of a historical data block is the ratio of the number of lost data packets to the total number of data packets in that historical data block. Each time a historical data block is received, the number of lost data packets is counted to obtain the historical packet loss rate for each historical data block.

[0033] S12, Based on the size of the current data block and the historical packet loss rate, determine the current packet loss detection threshold for the current data block.

[0034] The number of packets lost in the current data block can be predicted by multiplying the historical packet loss rate by the size of the current data block, and this number of packets lost can be used as the current packet loss detection threshold; or, the number of data packets that can be received can be determined by subtracting the above product from the size of the current data block, and this number can be used as the current packet loss detection threshold.

[0035] S13, when the number of the first received data packets of the current data block determines that the current packet loss detection threshold is met, packet loss detection is performed on the current data block to determine the first undelivered data packet of the current data block.

[0036] If the current packet loss detection threshold is expressed using the number of lost packets, then the number of the first received data packets is counted, and the number of the first undelivered data packets is determined by combining this with the size of the current data block. If the number of the first undelivered data packets is equal to the current packet loss detection threshold, then packet loss detection for the current data block is triggered. If the current packet loss threshold is expressed using the number of received data packets, then packet loss detection for the current data block is triggered when the number of received data packets is equal to the current packet loss detection threshold.

[0037] During packet loss detection, the first received data packet can be recorded and compared with all data packets in the current data block to determine the first missing data packet of the current data block.

[0038] In some implementations, S13 includes:

[0039] (1) Count the number of the first received data packets of the current data block to determine the number of the first undelivered data packets of the current data block.

[0040] (2) When the number of the first undelivered data packets reaches the packet loss detection threshold, the first undelivered data packet of the current data block is determined based on the identifiers of each data packet in the current data block and the identifier of the first received data packet.

[0041] A counter is started on a per-data-block basis, with an initial value of 0. The counter value is incremented by 1 for each received data packet. The counter value represents the number of the first received data packets. The number of the first undelivered data packets is obtained by subtracting the number of the first received data packets from the total number of data packets in the current data block.

[0042] The number of the first missing data packets is calculated after each counter update, or after a preset time interval. When the number of the first missing data packets reaches the packet loss detection threshold, it indicates that the timing for packet loss detection is met, and packet loss detection is performed. Since each data packet contains an identifier of its data block and its position within the current data block to determine its respective data block when the current data block is encapsulated into at least one data packet, these identifiers are collectively referred to as data packet identifiers below. Based on this, the identifiers of the first received data packets are extracted, and these identifiers are compared with the identifiers of each data packet to determine the identifier of the first missing data packet in the current data block, thus identifying the first missing data packet.

[0043] The packet loss detection threshold is the time to trigger packet loss detection. It is obtained by counting the number of received data packets and determining the number of missing data packets. Furthermore, when the number of missing data packets is obtained, the first missing data packet can be accurately identified by using the identifier of each data packet.

[0044] S14, obtain the first undelivered data packet to obtain the data packet of the current data block.

[0045] Retrieving the first missing data packet can trigger its retransmission. The reason for its non-arrival could be that the packet was just sent and hasn't arrived yet, or it could be packet loss. Therefore, retrieving the first missing data packet can involve retransmission, waiting for a further period, or a combination of retransmission and waiting, etc. No restrictions are placed on this; the specific settings should be based on actual needs.

[0046] For packet loss detection of the current data block, it can be performed in a single detection or in multiple rounds. For example, during the transmission of data packets for the current data block, each time a data packet is received, the current packet loss detection threshold is dynamically updated based on the number of data packets already received for the current data block. By setting a packet loss detection threshold, if the updated current packet loss detection threshold is higher than the current packet loss detection threshold, a new round of packet loss detection is initiated until all data packets arrive.

[0047] The data transmission method provided in this embodiment performs transmission and packet loss judgment on a data block basis. Since the data block can be delivered to the application layer completely, the data blocks can interact independently with each other. This method can detect packet loss as early as possible when a data block is lost, and will not cause the data block to be blocked indefinitely due to packet loss. Moreover, during packet loss detection, the method uses the data packet as the driving time to determine whether packet loss has occurred and obtains the first undelivered data packet in a timely manner, without waiting for timeout triggers or acknowledgment messages. This can achieve lower packet loss response time and data block transmission time, making this method applicable to short video and live streaming services with time-limited requirements for data block transmission.

[0048] This embodiment provides a data transmission method that can be used in electronic devices, such as mobile terminals and computers. Figure 2 This is a flowchart of a data transmission method according to an embodiment of the present disclosure, such as... Figure 2 As shown, the process includes the following steps:

[0049] S21, obtain the size of the current data block and the historical packet loss rate of historical data blocks.

[0050] The current data block includes at least one data packet.

[0051] Please see details Figure 1 S11 of the illustrated embodiment will not be described again here.

[0052] S22, Based on the size of the current data block and the historical packet loss rate, determine the current packet loss detection threshold for the current data block.

[0053] Please see details Figure 1 S12 of the illustrated embodiment will not be described again here.

[0054] S23, when the number of the first received data packets of the current data block determines that the current packet loss detection threshold is met, packet loss detection is performed on the current data block to determine the first undelivered data packet of the current data block.

[0055] Please see details Figure 1 S13 of the illustrated embodiment will not be described again here.

[0056] S24, obtain the first undelivered data packet to obtain the data packet of the current data block.

[0057] Specifically, S24 above includes:

[0058] S241, obtain the sending time of the first undelivered data packet and the current time, and determine the flight time of the first undelivered data packet.

[0059] By communicating with the sender, the time when each data packet was sent can be obtained, thus determining the transmission time of the first undelivered data packet. Then, the difference between the current time and the transmission time is calculated to determine the flight time of each first undelivered data packet.

[0060] S242, based on the relationship between flight time and flight time threshold, determine the method for obtaining the first undelivered data packet, and use the method for obtaining the first undelivered data packet to obtain the data packet of the current data block.

[0061] Due to network fluctuations, the calculation of data block packet loss rate may contain errors, leading to excessive retransmission of data packets by the packet-driven packet loss detection and retransmission mechanism. Therefore, this embodiment utilizes a time-of-flight threshold to avoid excessive retransmission. The time-of-flight threshold is set according to actual needs, and its specific value is not limited here.

[0062] In some implementations, the time-of-flight threshold is determined based on the current service type. For first-level services such as live streaming with latency requirements in the second range, the time-of-flight threshold is set relatively low, for example, 20ms. For second-level services such as short videos with partial caching, the time-of-flight threshold is higher than that of the first-level service, for example, 200ms. For third-level services such as file downloads with less stringent latency requirements, the time-of-flight threshold is higher than that of the second-level service. For example, a complete rollback to a timeout-triggered retransmission mechanism is used, i.e., the time-of-flight threshold is equal to the retransmission timeout.

[0063] In other implementations, the time-of-flight threshold is determined by acquiring the overtransmission coefficient of historical data blocks to determine the time-of-flight threshold, wherein the time-of-flight threshold is positively correlated with the overtransmission coefficient, which represents the proportion of the same retransmitted data packet repeatedly received in the historical data block.

[0064] Specifically, the overtransmission factor represents the proportion of repeatedly received packets in a retransmission. A lower overtransmission factor allows for the use of a smaller flight time threshold; a higher overtransmission factor requires a larger flight time threshold to avoid the cost overhead caused by overtransmission. For example, the magnitude of the overtransmission factor can be determined as the overtransmission factor; or, the overtransmission factor can be determined by multiplying the magnitude of the overtransmission factor by a preset value.

[0065] If the flight time is greater than the flight time threshold, it means that the first undelivered data packet has been lost and needs to be retransmitted; if the flight time is less than the flight time threshold, it means that the sender has just received the first undelivered data packet and needs to wait.

[0066] By using a time-of-flight threshold, transmission performance and cost can be balanced to meet the needs of different services. The time-of-flight threshold can be set to a small value to obtain high performance, or it can be set to a large value to avoid excessive retransmission, or even fall back to the timeout trigger retransmission mechanism.

[0067] In some implementations, S242 includes:

[0068] (1) Filter out the second undelivered data packets with a flight time greater than the flight time threshold and the third undelivered data packets with a flight time less than the flight time threshold from the first undelivered data packets.

[0069] By utilizing the relationship between flight time and flight time threshold, the first undelivered data packets are classified to obtain the second undelivered data packets that need to be retransmitted and the third undelivered data packets that need to be waited for.

[0070] (2) Trigger the retransmission of the second missing data packet.

[0071] The sender is informed of the identifier of the second undelivered data packet. Accordingly, the sender uses this identifier to determine the data packet that needs to be retransmitted, thereby realizing the retransmission of the second undelivered data packet.

[0072] In some implementations, step (2) above includes:

[0073] 2.1) Obtain the packet loss rate for each transmission path.

[0074] 2.2) Retransmit the second undelivered data packet based on the transmission path with the lowest packet loss rate.

[0075] The sending and receiving ends can use multiple transmission paths for transmission. When data packet retransmission is required, the transmission path with the lowest packet loss rate is selected to retransmit the second undelivered data packet based on the packet loss rate of each transmission path, thereby reducing the probability of data packet loss during retransmission.

[0076] Based on the packet loss rate of each transmission path, the transmission path with the lowest probability is selected for retransmission to avoid the loss of retransmitted data packets and the need for multiple retransmissions.

[0077] (3) Reduce the retransmission timeout of the third undelivered data packet and obtain the third undelivered data packet based on the reduced retransmission timeout.

[0078] As mentioned above, the third undelivered data packet indicates that the packet was just sent from the sender. Therefore, the retransmission timeout (RTO) for this packet is updated, and the timeout trigger time is shortened. The shortening of the retransmission timeout for the third undelivered data packet can be achieved by directly subtracting a preset value from the original retransmission timeout; or by recalculating the retransmission timeout according to a preset formula, etc. No specific method for reducing the retransmission timeout is limited here; it can be set according to actual needs, as long as the retransmission timeout for the third undelivered data packet is reduced.

[0079] In some implementations, step (3) above includes:

[0080] 3.1) Obtain the current bandwidth utilization and the round-trip time for a single connection.

[0081] 3.2) Calculate the difference between the retransmission timeout and the round-trip time of a single connection, and calculate the product of the difference and the current bandwidth utilization.

[0082] 3.3) Determine the reduced retransmission timeout based on the sum of the product and the round-trip time of a single connection.

[0083] Specifically, the reduced retransmission timeout Tail_RTO is calculated using the following formula:

[0084] Tail_RTO=(RTO-RTT)*sessionrate+RTT

[0085] Among them, RTO is the retransmission timeout, RTT is the round-trip time for a single connection, and sessionrate is the current bandwidth utilization rate, which ranges from 0 to 1. The lower the bandwidth utilization rate sessionrate, the smaller Tail_RTO, and the faster the timeout retransmission is triggered.

[0086] Estimating retransmission timeout by combining current bandwidth utilization with the round-trip time of a single connection can ensure the reliability of the reduced retransmission timeout.

[0087] Packet loss detection and retransmission are performed using a packet-driven approach. When the detection conditions are met, packets that do not arrive on time or whose flight time exceeds the flight time threshold are immediately retransmitted, which can detect packet loss earlier and reduce data block transmission time. For data that does not arrive on time but whose flight time is less than the flight time threshold, the retransmission timeout is adjusted to shorten the timeout trigger condition.

[0088] The data transmission method provided in this embodiment may have errors in estimating the data block packet loss rate due to network fluctuations, leading to excessive retransmission of data by the packet-driven packet loss detection and retransmission mechanism. Therefore, a time-of-flight threshold is used to constrain this process and avoid excessive retransmission.

[0089] This embodiment provides a data transmission method that can be used in electronic devices, such as mobile terminals and computers. Figure 3 This is a flowchart of a data transmission method according to an embodiment of the present disclosure, such as... Figure 3 As shown, the process includes the following steps:

[0090] S31, obtain the size of the current data block and the historical packet loss rate of historical data blocks.

[0091] The current data block includes at least one data packet, and the historical data block includes at least two.

[0092] Specifically, S31 includes:

[0093] S311, obtain the packet loss weight of each historical data block.

[0094] The number of historical data blocks is set according to actual needs. For example, the most recent N data blocks can be used as N historical data blocks. Furthermore, the packet loss weight of historical data blocks decays over time; that is, the closer the completion time of a historical data block is to the current time, the greater its packet loss weight. This ensures that the packet loss rate of the current data block is consistent with the latest network conditions.

[0095] S312, determine the packet loss rate of the current data block based on the weighted average of the packet loss weight and the corresponding historical packet loss rate.

[0096] During data packet transmission, the packet loss rate of each data block is calculated after it is downloaded. The historical packet loss rate l of historical data block i is calculated using the following formula. i :

[0097] l i =(send_data_size i -recv_data_size i ) / send_data_size i *100%

[0098] Among them, send_data_size i recv_data_size represents the number of data packets sent for historical data block i. i This represents the number of data packets received in historical data block i.

[0099] Furthermore, the packet loss rate of the current data block is calculated using the following formula:

[0100] S313. Determine the current packet loss detection threshold based on the product of the current data block's packet loss rate and the current data block's size.

[0101] As mentioned above, a counter C and a packet loss detection threshold P are maintained for each data block. C represents the number of data packets that have arrived, and P represents the threshold number of data packets that have not yet arrived. Each time a data packet is received, it is determined whether the number of remaining data packets that have not yet arrived is less than or equal to P. If it is less than or equal to P, packet loss detection is performed.

[0102] The packet loss threshold P is recalculated at the beginning of data block transmission and each time packet loss detection is triggered, until P reaches zero or all data packets arrive. During the transmission of data packets for the current data block, the packet loss detection threshold P decreases, thus achieving multiple packet loss detections.

[0103] After calculating the packet loss rate of the current data block, the product of the packet loss rate of the current data block and the size of the current data block is calculated to determine the current packet loss detection threshold P.

[0104] In some implementations, if the number of lost packets in the current data block is lower than the packet loss detection threshold P, redundant data may be repeatedly injected. Based on this, the time-of-flight threshold is used to control the amount of redundancy in the embodiments described above.

[0105] If the number of lost packets in the current data block exceeds the packet loss detection threshold P, packet loss detection may not be triggered for an extended period. In this case, the remaining undelivered packets will fall back to the RTO (Retransmission Timeout) to trigger a retransmission mechanism. To address this, a timeout is added to ensure that packet loss detection is triggered even under these circumstances. Specifically, during the reception of packets for the current data block, the flight time of the received packets is recorded and compared with the timeout. If the flight time exceeds the timeout, packet loss detection is triggered as well.

[0106] S32, Based on the size of the current data block and the historical packet loss rate, determine the current packet loss detection threshold for the current data block.

[0107] Please see details Figure 1 S12 of the illustrated embodiment will not be described again here.

[0108] S33, when the number of the first received data packets of the current data block determines that the current packet loss detection threshold is met, packet loss detection is performed on the current data block to determine the first undelivered data packet of the current data block.

[0109] Please see details Figure 1 S13 of the illustrated embodiment will not be described again here.

[0110] S34, obtain the first undelivered data packet to obtain the data packet of the current data block.

[0111] Specifically, S34 includes:

[0112] S341, when the current packet loss detection threshold is greater than the lower limit of the packet loss detection threshold, the current packet loss detection threshold is updated based on the product of the packet loss rate of the current data block and the current packet loss detection threshold, and the updated packet loss detection threshold is determined.

[0113] By setting a lower limit for packet loss detection, multiple rounds of packet loss detection can be triggered. When the current packet loss detection threshold exceeds the lower limit, it indicates that packet loss detection needs to be performed again. This involves two steps: firstly, triggering the acquisition of the first undelivered data packet based on the current packet loss threshold; secondly, updating the current packet loss detection threshold based on the product of the current data block's packet loss rate and the current packet loss detection threshold, resulting in an updated packet loss detection threshold, which is then used for packet loss detection.

[0114] S342, when it is determined that the updated current packet loss detection threshold is met based on the number of second received data packets of the current data block, packet loss detection is performed on the current data block to determine the fourth undelivered data packet of the current data block.

[0115] After the processing described in the first aspect above, a new data packet is obtained; this received data packet is referred to as the second received data packet. The number of the second received data packets is counted, and the remaining undelivered data packets are calculated. When the number of remaining undelivered data packets meets the updated current packet loss detection threshold, the fourth undelivered data packet of the current data block is determined. The method for determining the fourth undelivered data packet is similar to the method for determining the first undelivered data packet described above, and will not be repeated here.

[0116] S343, retrieve the fourth undelivered data packet to obtain the data packet for the current data block.

[0117] The method for obtaining the fourth undelivered data packet is similar to that for the first undelivered data packet. Both methods combine time-of-flight thresholds to divide undelivered data packets into those requiring retransmission and those requiring waiting. For undelivered data packets requiring retransmission, retransmission is triggered. For undelivered data packets requiring waiting, the RTO of the undelivered data packet is reduced, and retransmission detection is performed based on the reduced RTO.

[0118] The data transmission method provided in this embodiment weights the historical packet loss rates of at least two previous historical data blocks, so that the packet loss rate of the current data block is obtained by fusing the historical packet loss rates of at least two previous data blocks. Further combining this with the size of the current data block yields a more accurate current packet loss detection threshold. For retransmitted data packets, there is also a certain probability of packet loss. Based on this, multiple rounds of packet loss detection are performed to detect packet loss as early as possible and retransmit it.

[0119] As a specific application example of the embodiments of this disclosure, such as Figure 4 As shown, data is transmitted between the client and the sender via multiple transmission paths. In this implementation, the data block is a video frame, meaning a video frame is divided into at least one data packet for transmission, and each data packet records an identifier indicating its video frame and its position within the video frame. After receiving the data packet, the client sends it to the packet loss detection module for packet loss detection. Specifically, the number of received data packets is first counted, the integrity of the current data block is checked, and the current packet loss threshold is calculated. When the number of missing data packets is less than or equal to the current packet loss threshold, packet loss detection is triggered. Missing data packets are identified based on the identifiers of the received data packets, and their time-of-flight (RTO) is compared to a time-of-flight threshold k. If the RTO is greater than k, a transmission path is selected for retransmission; if the RTO is less than or equal to the threshold, the RTO of the missing data packets is reduced, and retransmission detection is performed using the reduced RTO. The detection results from the packet loss detection module and the retransmission module are used to form a send request packet based on a callback function, and this send request packet is sent to the sender so that the sender can perform corresponding processing based on the send request packet.

[0120] During task download, the client establishes connections with multiple servers deploying relevant file resources and then sends data download requests to each server. By default, it requests data from the request queue to each server in a round-robin fashion. Each server issues the corresponding data packet based on the request. The client receives and integrates the data packets transmitted through various paths, and delivers the complete data block to the application layer. The client dynamically calculates the packet loss detection threshold P for the j-th round of packet loss detection. j Each received data packet triggers a check to determine if the number of missing data blocks meets the packet loss detection threshold. If the number of missing data blocks meets the threshold, packet loss detection is performed, and P is updated. j+1 Initiate the next round of detection until all data blocks arrive. If the packet loss detection logic is entered, the receiver will generate a list of undelivered data packets based on the data block cache, and calculate the flight time for each undelivered data packet in turn. If the flight time exceeds the flight time threshold, the data packet is determined to be lost and is immediately retransmitted; otherwise, the RTO is adaptively reduced.

[0121] As a specific application example of this disclosure, let's take a single packet loss detection as an example. Data blocks 1, 2, and 3 are transmitted sequentially using two transmission paths. Each data block is 512KB in size. The packet loss rates for data blocks 1 and 2 are 1% and 2%, respectively. The packet loss detection threshold P0 for data block 3 is calculated using the packet loss rate of data block 2. That is, P0 = 512 * 2% = 10. Based on this, retransmission detection is triggered when data block 3 receives the 502nd (i.e., 512 - 10 = 502) data packet. After processing by the packet loss detection logic, the packets that did not arrive during the packet loss detection are identified as follows: 10, 11, 12, 77, 78, 79, 80, 509, 510, and 511. The flight times of these unarrived data packets are 200ms, 200ms, 201ms, 150ms, 150ms, 151ms, 151ms, 5ms, 5ms, and 4ms, respectively. If the flight time threshold is 150ms, the flight time of each missing data packet is compared with the flight time threshold. The missing data packets that need to be retransmitted are labeled as follows: 10, 11, 12, 77, 78, 79, 80; the missing data packets that need to adaptively reduce RTO are labeled as follows: 509, 510, 511.

[0122] As another specific application example of this disclosure, data blocks 1, 2, and 3 are transmitted sequentially using two transmission paths. The data block size is 512KB, and the packet loss rates for data blocks 1 and 2 are 10% and 15%, respectively. The packet loss rate of data block 2 is used to calculate the packet loss detection threshold for the first round of packet loss detection. That is, P0 = 512 * 15% = 76. In this embodiment, the lower limit of the packet loss detection threshold is 1. Since P0 > 0, a second round of packet loss detection is required. The packet loss detection threshold for the second round is: P1 = P0 * 15% = 76 * 15% = 11. Similarly, since P1 > 0, a third round of packet loss detection is required. The packet loss detection threshold for the third round is: P2 = P1 * 15% = 11 * 15% = 2. Since the packet loss detection threshold P3 = P2 * 15% = 2 * 15% = 0.3 is less than 1 during the fourth round of packet loss detection, it means that a total of three rounds of packet loss retransmission detection are required.

[0123] Since P0 = 76, P1 = 11, and P2 = 2, the data block will trigger retransmission detection when it receives the 436th, 501st, and 510th data packets, respectively. If the labels of the missing data packets in the first round of packet loss detection are: 51-56, 201-230, 472-511; the labels of the missing data packets in the second round of packet loss detection are: 223-231, 473, 501; and the labels of the missing data packets in the third round of packet loss detection are: 231, 473.

[0124] In the first round of packet loss detection, packets 51-56, 201-230, and 472-511 were not received. The flight time for packets 51-56 was 400+ ms, for packets 201-230 it was 200+ ms, and for packets 472-511 it was 10+ ms. Since the flight time threshold is 150 ms, packets 51-56 and 201-230 need to be retransmitted, and the RTO for packets 472-511 needs to be adaptively reduced.

[0125] If data packets 223-231, 473, and 501 are not received during the second round of packet loss detection, and the flight time is 200ms+, then all of the missing data packets 223-231, 473, and 501 need to be retransmitted.

[0126] In the third round of packet loss detection, packets 231 and 473 did not arrive, with flight times of 250ms and 360ms respectively. Since the flight time is greater than the flight time threshold of 150ms, packets 231 and 473 that did not arrive need to be retransmitted.

[0127] As another specific application example of this disclosure, data blocks 1, 2, and 3 are transmitted sequentially using two transmission paths. The data block size is 512KB, and the packet loss rates for data blocks 1 and 2 are 0% and 0%, respectively. The packet loss detection threshold for data block 3 is calculated using the packet loss rate of data block 2, i.e., P0 = 512 * 0% = 0. Based on this, no packet loss detection retransmission is triggered during the transmission of data block 3, and the retransmission mechanism is triggered only after the RTO timeout.

[0128] As another specific application example of this disclosure, data blocks 1, 2, and 3 are transmitted sequentially using two transmission paths. Each data block is 100KB in size, and the packet loss rates for data blocks 1 and 2 are 5% and 5%, respectively. The packet loss detection threshold for data block 3 is calculated using the packet loss rate of data block 2, i.e., P0 = 100 * 5% = 5. Therefore, retransmission detection is triggered when the 95th data packet is received for data block 3. After packet loss detection, the missing data packets are identified as 10, 15-17, and 40, with flight times of 300ms, 280ms, 281ms, 282ms, and 220ms, respectively. The flight time threshold is 150ms, therefore, missing data packets 10, 15-17, and 40 all need to be retransmitted.

[0129] This embodiment also provides a data transmission device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0130] This embodiment provides a data transmission device, such as... Figure 5 As shown, it includes:

[0131] The first acquisition module 41 is used to acquire the size of the current data block and the historical packet loss rate of the historical data block, wherein the current data block includes at least one data packet;

[0132] The first determining module 42 is used to determine the current packet loss detection threshold of the current data block based on the size of the current data block and the historical packet loss rate.

[0133] The second determining module 43 is used to perform packet loss detection on the current data block and determine the first undelivered data packet of the current data block when the current packet loss detection threshold is satisfied based on the number of the first received data packets of the current data block.

[0134] The second acquisition module 44 is used to acquire the first undelivered data packet in order to obtain the data packet of the current data block.

[0135] In some implementations, the historical data block includes at least two, and the first determining module 42 includes:

[0136] The first acquisition unit is used to acquire the packet loss weight of each of the historical data blocks;

[0137] The first determining unit is used to determine the packet loss rate of the current data block based on the weighted average of the packet loss weight and the corresponding historical packet loss rate.

[0138] The second determining unit is used to determine the current packet loss detection threshold based on the product of the packet loss rate of the current data block and the size of the current data block.

[0139] In some implementations, the second determining module 43 includes:

[0140] The statistics unit is used to count the number of first received data packets of the current data block in order to determine the number of first undelivered data packets of the current data block;

[0141] The third determining unit is used to determine the first undelivered data packet of the current data block based on the identifiers of each data packet of the current data block and the identifier of the first received data packet when the number of the first undelivered data packets reaches the packet loss detection threshold.

[0142] In some implementations, the second acquisition module 44 includes:

[0143] The second acquisition unit is used to acquire the sending time of the first undelivered data packet and the current time, and to determine the flight time of the first undelivered data packet;

[0144] The fourth determining unit is used to determine the method of obtaining the first undelivered data packet based on the relationship between the flight time and the flight time threshold, and to obtain the undelivered data packet using the first method of obtaining the undelivered data packet, so as to obtain the data packet of the current data block.

[0145] In some implementations, the fourth determining unit includes:

[0146] A filtering subunit is used to filter out a second undelivered data packet with a flight time greater than the flight time threshold and a third undelivered data packet with a flight time less than the flight time threshold from the first undelivered data packet;

[0147] The triggering subunit is used to trigger the retransmission of the second undelivered data packet;

[0148] The reduction subunit is used to reduce the retransmission timeout of the third undelivered data packet and obtain the third undelivered data packet based on the reduced retransmission timeout.

[0149] In some implementations, the module for determining the time-of-flight threshold includes:

[0150] The fifth determining unit is used to determine the flight time threshold based on the current service type;

[0151] or,

[0152] The sixth determining unit is used to obtain the excessive retransmission coefficient of the historical data block in order to determine the flight time threshold. The flight time threshold is positively correlated with the excessive retransmission coefficient, and the excessive retransmission coefficient is used to represent the proportion of the same retransmitted data packet repeatedly received in the historical data block.

[0153] In some implementations, the trigger subunit includes:

[0154] The first acquisition subunit is used to acquire the packet loss rate of each transmission path;

[0155] The retransmission subunit is used to retransmit the second undelivered data packet based on the transmission path with the lowest packet loss rate.

[0156] In some implementations, the reduction subunit includes:

[0157] The second acquisition subunit is used to acquire the current bandwidth utilization and the round-trip time of a single connection.

[0158] A calculation subunit is used to calculate the difference between the retransmission timeout time and the round-trip time of a single connection, and to calculate the product of the difference and the current bandwidth utilization.

[0159] A subunit is determined to determine the reduced retransmission timeout based on the sum of the product and the round-trip time of the single connection.

[0160] In some embodiments, the second acquisition module 44 further includes:

[0161] The update unit is used to update the current packet loss detection threshold based on the product of the packet loss rate of the current data block and the current packet loss detection threshold when the current packet loss detection threshold is greater than the lower limit of the packet loss detection threshold, and to determine the updated packet loss detection threshold.

[0162] The packet loss detection unit is used to perform packet loss detection on the current data block and determine the fourth undelivered data packet of the current data block when the updated current packet loss detection threshold is met based on the number of the second received data packets of the current data block.

[0163] The third acquisition unit is used to acquire the fourth undelivered data packet in order to obtain the data packet of the current data block.

[0164] In this embodiment, the data transmission device is presented in the form of a functional unit. Here, a unit refers to an ASIC circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above-mentioned functions.

[0165] Further functional descriptions of the above modules are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0166] This disclosure also provides an electronic device having the above-described features. Figure 5 The data transmission device shown.

[0167] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of an electronic device provided in an optional embodiment of this disclosure, such as... Figure 6As shown, the electronic device may include: at least one processor 51, such as a CPU (Central Processing Unit), at least one communication interface 53, memory 54, and at least one communication bus 52. The communication bus 52 is used to enable communication between these components. The communication interface 53 may include a display screen or a keyboard; optionally, the communication interface 53 may also include a standard wired interface or a wireless interface. The memory 54 may be high-speed RAM (Random Access Memory) or non-volatile memory, such as at least one disk storage device. Optionally, the memory 54 may also be at least one storage device located remotely from the aforementioned processor 51. The processor 51 may be combined with... Figure 5 The described apparatus has an application program stored in memory 54, and the processor 51 calls the program code stored in memory 54 to perform any of the above method steps.

[0168] The communication bus 52 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The communication bus 52 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0169] The memory 54 may include volatile memory, such as random-access memory (RAM); the memory may also include non-volatile memory, such as flash memory, hard disk drive (HDD) or solid-state drive (SSD); the memory 54 may also include a combination of the above types of memory.

[0170] The processor 51 can be a central processing unit (CPU), a network processor (NP), or a combination of CPU and NP.

[0171] The processor 51 may further include a hardware chip. This hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0172] Optionally, memory 54 is also used to store program instructions. Processor 51 can invoke program instructions to implement the data transfer method as shown in any embodiment of this application.

[0173] This disclosure also provides a non-transitory computer storage medium storing computer-executable instructions that can execute the data transmission method in any of the above-described method embodiments. The storage medium may be a magnetic disk, optical disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk drive (HDD), or solid-state drive (SSD), etc.; the storage medium may also include combinations of the above types of memory.

[0174] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the method embodiments are basically similar to the device and system embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the device and system embodiments.

[0175] It is understood that in the specific embodiments of this disclosure, data blocks and other related data are involved. When the above embodiments of this disclosure are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0176] Although embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A data transmission method, characterized in that, include: Obtain the size of the current data block and the historical packet loss rate of the historical data blocks, wherein the current data block includes at least one data packet and the historical data blocks include at least two; Based on the size of the current data block and the historical packet loss rate, determine the current packet loss detection threshold for the current data block; When the number of the first received data packets of the current data block determines that the current packet loss detection threshold is met, packet loss detection is performed on the current data block to determine the first undelivered data packet of the current data block; Obtain the first undelivered data packet to obtain the data packet of the current data block; The step of determining the current packet loss detection threshold for the current data block based on the size of the current data block and the historical packet loss rate includes: Obtain the packet loss weight of each of the aforementioned historical data blocks; The packet loss rate of the current data block is determined by weighting the packet loss weight with the corresponding historical packet loss rate. The current packet loss detection threshold is determined based on the product of the packet loss rate of the current data block and the size of the current data block.

2. The method according to claim 1, characterized in that, When the number of first received data packets of the current data block determines that the packet loss detection threshold is met, packet loss detection is performed on the current data block to determine the first undelivered data packet of the current data block, including: The number of first received data packets for the current data block is counted to determine the number of first undelivered data packets for the current data block. When the number of the first undelivered data packets reaches the packet loss detection threshold, the first undelivered data packet of the current data block is determined based on the identifiers of each data packet in the current data block and the identifier of the first received data packet.

3. The method according to claim 1, characterized in that, The step of obtaining the first undelivered data packet to obtain the data packet of the current data block includes: Obtain the sending time of the first undelivered data packet and the current time, and determine the flight time of the first undelivered data packet; Based on the relationship between the flight time and the flight time threshold, the method for obtaining the first undelivered data packet is determined, and the first undelivered data packet is obtained using the method for obtaining the first undelivered data packet, so as to obtain the data packet of the current data block.

4. The method according to claim 3, characterized in that, The step of determining the method for obtaining the first undelivered data packet based on the relationship between the flight time and the flight time threshold, and obtaining the first undelivered data packet using the method for obtaining the first undelivered data packet, to obtain the data packet of the current data block, includes: Filter out the second undelivered data packets whose flight time is greater than the flight time threshold and the third undelivered data packets whose flight time is less than the flight time threshold from the first undelivered data packets; Trigger the retransmission of the second undelivered data packet; Reduce the retransmission timeout of the third undelivered data packet, and obtain the third undelivered data packet based on the reduced retransmission timeout.

5. The method according to claim 4, characterized in that, The methods for determining the flight time threshold include: The flight time threshold is determined based on the current business type; or, The excessive retransmission coefficient of the historical data block is obtained to determine the time-of-flight threshold. The time-of-flight threshold is positively correlated with the excessive retransmission coefficient, which represents the proportion of the same retransmitted data packet repeatedly received in the historical data block.

6. The method according to claim 4, characterized in that, The triggering of the retransmission of the second undelivered data packet includes: Obtain the packet loss rate for each transmission path; The second undelivered data packet is retransmitted based on the transmission path with the lowest packet loss rate.

7. The method according to claim 4, characterized in that, The reduction of the retransmission timeout time for the third undelivered data packet includes: Get the current bandwidth utilization and the round-trip time for a single connection; Calculate the difference between the retransmission timeout and the round-trip time of the single connection, and calculate the product of the difference and the current bandwidth utilization. The reduced retransmission timeout is determined based on the sum of the product and the round-trip time of the single connection.

8. The method according to claim 1, characterized in that, The step of obtaining the first undelivered data packet to obtain the data packet of the current data block further includes: When the current packet loss detection threshold is greater than the lower limit of the packet loss detection threshold, the current packet loss detection threshold is updated based on the product of the packet loss rate of the current data block and the current packet loss detection threshold, and the updated packet loss detection threshold is determined. When it is determined that the updated current packet loss detection threshold is met based on the number of second received data packets of the current data block, packet loss detection is performed on the current data block to determine the fourth undelivered data packet of the current data block; Obtain the fourth undelivered data packet to obtain the data packet of the current data block.

9. A data transmission device, characterized in that, include: The first acquisition module is used to acquire the size of the current data block and the historical packet loss rate of the historical data block. The current data block includes at least one data packet, and the historical data block includes at least two. The first determining module is used to determine the current packet loss detection threshold of the current data block based on the size of the current data block and the historical packet loss rate. The second determining module is used to perform packet loss detection on the current data block and determine the first undelivered data packet of the current data block when the current packet loss detection threshold is satisfied based on the number of the first received data packets of the current data block. The second acquisition module is used to acquire the first undelivered data packet in order to obtain the data packet of the current data block; The first determining module includes: The first acquisition unit is used to acquire the packet loss weight of each of the historical data blocks; The first determining unit is used to determine the packet loss rate of the current data block based on the weighted average of the packet loss weight and the corresponding historical packet loss rate. The second determining unit is used to determine the current packet loss detection threshold based on the product of the packet loss rate of the current data block and the size of the current data block.

10. An electronic device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform the data transmission method of any one of claims 1-8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to perform the data transmission method according to any one of claims 1-8.

Citation Information

Patent Citations

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

    CN111585776A