A data transmission method and device, electronic equipment, and storage medium
By determining the network status before data transmission, establishing the correlation between reception delay and FEC redundancy, and dynamically adjusting the target reception delay and redundancy, the problem of packet loss during data transmission is solved, and data transmission efficiency and quality are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA MOBILEHANGZHOUINFORMATION TECH CO LTD
- Filing Date
- 2022-10-18
- Publication Date
- 2026-08-04
AI Technical Summary
In existing data transmission methods, network packet loss occurs frequently, and the performance of automatic retransmission and forward error correction codes is insufficient, resulting in poor data transmission efficiency and quality.
By determining the network status between the transmitting and receiving devices, a correlation is established between the receiving delay and the redundancy of the forward error correction code (FEC). The target receiving delay and target FEC redundancy are then dynamically adjusted to adapt to different network conditions, thereby improving data transmission efficiency and packet loss resistance.
It enables flexible adjustment of receive latency and FEC redundancy based on network conditions, improving data transmission efficiency and quality, reducing transmission latency and bandwidth waste, and enhancing packet loss resistance.
Smart Images

Figure CN116962307B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data transmission technology, and in particular to a data transmission method and apparatus, electronic device, and storage medium. Background Technology
[0002] With the rapid development of communication networks, data transmission has become an indispensable part of the Internet and is gradually becoming a part of people's daily lives. For example, some real-time multimedia applications such as video conferencing and VoIP not only facilitate information exchange but also enrich people's entertainment life.
[0003] However, data is prone to packet loss during transmission. Relevant network packet loss mitigation methods typically employ Automatic Repeat-reQuest (ARQ) and Forward Error Correction (FEC) for packet loss recovery, but these methods suffer from performance issues. Summary of the Invention
[0004] To address the existing technical problems, embodiments of this disclosure provide a data transmission method and apparatus, an electronic device, and a storage medium.
[0005] To achieve the above objectives, the technical solution of this disclosure embodiment is implemented as follows:
[0006] In a first aspect, this disclosure provides a data transmission method applied to a transmitting device, the method comprising:
[0007] Determine the current network status between yourself and the receiving device;
[0008] Based on the current network status, establish the correlation between reception delay and forward error correction code (FEC) redundancy;
[0009] Based on the aforementioned correlation, determine the target reception delay and target FEC redundancy corresponding to the data to be transmitted;
[0010] The data to be transmitted is transmitted based on the target reception delay and the target FEC redundancy.
[0011] In some embodiments, the current network state includes network latency RTT and network packet loss rate;
[0012] The step of establishing the correlation between reception delay and forward error correction (FEC) redundancy based on the current network state includes:
[0013] Based on the network latency RTT and the network packet loss rate, estimate the first average number of lost packets and the first variance of the number of lost packets in the packet group; wherein, the packet group includes multiple redundant packets;
[0014] Based on the first average number of packet losses and the first variance, and with the preset target packet loss recovery probability and the number of packet losses being less than or equal to the number of redundant data packets as objectives, a correlation is established between the receiving delay and the FEC redundancy.
[0015] In some embodiments, the data packet group further includes multiple media data packets;
[0016] The step of estimating the first average number of packet losses and the first variance of the number of packet losses based on the network latency RTT and the network packet loss rate includes:
[0017] Based on the network latency RTT and the network packet loss rate, determine the second average number of lost packets and the second variance of the number of lost packets for the plurality of media data packets;
[0018] Based on the network packet loss rate, determine the third average number of packet losses and the third difference in the number of packet losses for the multiple redundant data packets;
[0019] The first average packet loss number is determined based on the second average packet loss number and the third average packet loss number;
[0020] The first variance is determined based on the second variance and the third variance.
[0021] In some embodiments, determining the second average number of lost packets and the second variance of the number of lost packets based on the network latency RTT and the network packet loss rate includes:
[0022] Based on the network latency RTT and the network packet loss rate, determine the probability of packet loss for a media data packet within each network latency RTT.
[0023] Based on the fact that the number of lost media data packets within each network latency RTT follows a binomial distribution, the second average sub-number of lost media data packets and the second sub-variance of the number of lost packets within each network latency RTT are determined.
[0024] The sum of the second average number of packet losses within each network latency RTT corresponding to the transmission of multiple media data packets is determined as the second average number of packet losses for multiple media data packets.
[0025] The sum of the second sub-variances within each network latency RTT corresponding to the transmission of multiple media data packets is determined as the second variance of the number of media data packet losses.
[0026] In some embodiments, based on the network packet loss rate, determining a third average number of lost packets and a third difference in the number of lost packets for the plurality of redundant data packets includes:
[0027] Based on the fact that the number of lost packets of the multiple redundant data packets follows a binomial distribution, the third average number of lost packets and the third difference in the number of lost packets are determined according to the network packet loss rate.
[0028] In some embodiments, the method further includes:
[0029] Determine the business scenario corresponding to the data to be transmitted;
[0030] The step of determining the target reception delay and target FEC redundancy corresponding to the data to be transmitted based on the correlation includes:
[0031] Based on the business scenario corresponding to the data to be transmitted and the relevant relationship, determine the target reception delay and the target FEC redundancy corresponding to the data to be transmitted.
[0032] In some embodiments, determining the target reception delay and the target FEC redundancy corresponding to the data to be transmitted based on the service scenario corresponding to the data to be transmitted and the correlation includes:
[0033] Determine the preset weighting factor corresponding to the business scenario; wherein, the preset weighting factor is the ratio between the FEC redundancy and the receiving delay;
[0034] Based on the ratio between the FEC redundancy and the reception delay, and the correlation, the target reception delay and the target FEC redundancy corresponding to the data to be transmitted are determined.
[0035] Secondly, embodiments of this disclosure also provide a data transmission apparatus applied to a transmitting device, the apparatus comprising:
[0036] The first determining module is used to determine the current network status between itself and the receiving device;
[0037] A module is established to establish a correlation between the reception delay and the redundancy of the forward error correction code (FEC) based on the current network state.
[0038] The second determining module is used to determine the target receiving delay and target FEC redundancy corresponding to the data to be transmitted based on the correlation relationship.
[0039] The transmission module is used to transmit the data to be transmitted based on the target reception delay and the target FEC redundancy.
[0040] In some embodiments, the current network state includes network latency RTT and network packet loss rate;
[0041] The establishment module is used to estimate the first average number of packet losses and the first variance of the number of packet losses for a data packet group based on the network latency RTT and the network packet loss rate; wherein, the data packet group includes multiple redundant data packets;
[0042] Based on the first average number of packet losses and the first variance, and with the preset target packet loss recovery probability and the number of packet losses being less than or equal to the number of redundant data packets as objectives, a correlation is established between the receiving delay and the FEC redundancy.
[0043] In some embodiments, the data packet group further includes multiple media data packets;
[0044] The establishment module is used to determine the second average number of lost packets and the second variance of the number of lost packets for the plurality of media data packets based on the network latency RTT and the network packet loss rate.
[0045] Based on the network packet loss rate, determine the third average number of packet losses and the third difference in the number of packet losses for the multiple redundant data packets;
[0046] The first average packet loss number is determined based on the second average packet loss number and the third average packet loss number;
[0047] The first variance is determined based on the second variance and the third variance.
[0048] In some embodiments, the establishing module is configured to determine the probability of packet loss of a media data packet within each network latency RTT based on the network latency RTT and the network packet loss rate;
[0049] Based on the fact that the number of lost media data packets within each network latency RTT follows a binomial distribution, the second average sub-number of lost media data packets and the second sub-variance of the number of lost packets within each network latency RTT are determined.
[0050] The sum of the second average number of packet losses within each network latency RTT corresponding to the transmission of multiple media data packets is determined as the second average number of packet losses for multiple media data packets.
[0051] The sum of the second sub-variances within each network latency RTT corresponding to the transmission of multiple media data packets is determined as the second variance of the number of media data packet losses.
[0052] In some embodiments, the establishing module is used to determine, based on the characteristic that the number of packet losses of the plurality of redundant data packets follows a binomial distribution, a third average number of packet losses of the plurality of redundant data packets and a third difference in the number of packet losses, according to the network packet loss rate.
[0053] In some embodiments, the apparatus further includes:
[0054] The third determining module is used to determine the business scenario corresponding to the data to be transmitted;
[0055] The second determining module is used to determine the target receiving delay and the target FEC redundancy corresponding to the data to be transmitted based on the service scenario corresponding to the data to be transmitted and the relevant relationship.
[0056] In some embodiments, the second determining module is used to determine a preset weighting factor corresponding to the business scenario; wherein, the preset weighting factor is the ratio between the FEC redundancy and the receiving delay;
[0057] Based on the ratio between the FEC redundancy and the reception delay, and the correlation, the target reception delay and the target FEC redundancy corresponding to the data to be transmitted are determined.
[0058] Thirdly, embodiments of this disclosure provide an electronic device, including: a processor and a memory for storing a computer program capable of running on the processor.
[0059] When the processor runs the computer program, it executes the steps of the data transmission method described in the first aspect above.
[0060] Fourthly, embodiments of this disclosure also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the data transmission method described in the first aspect.
[0061] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:
[0062] The technical solution of this disclosure has two advantages. First, it determines the correlation between reception delay and FEC redundancy based on network conditions, and determines the target reception delay and target FEC redundancy based on the correlation. This allows the transmitting device to flexibly adjust the reception delay and FEC redundancy according to network conditions, thereby improving data transmission efficiency. Second, while congestion control algorithms are typically used in transmitting devices to improve transmission quality, this disclosure further enables the transmitting device to combine the target reception delay and target FEC redundancy with its congestion control algorithm to further improve the packet loss resistance and data transmission quality. Attached Figure Description
[0063] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0064] Figure 1 This is a flowchart illustrating the data transmission method according to an embodiment of the present disclosure. Figure 1 ;
[0065] Figure 2 This is a schematic diagram illustrating the relationship between reception delay and FEC redundancy in the embodiments of this disclosure;
[0066] Figure 3 This is a schematic diagram of a data transmission model according to an embodiment of the present disclosure;
[0067] Figure 4 This is a flowchart illustrating the data transmission method according to an embodiment of the present disclosure. Figure 2 ;
[0068] Figure 5 This is a schematic diagram of the structure of a data transmission device according to an embodiment of the present disclosure;
[0069] Figure 6 This is a schematic diagram of the hardware composition structure of an electronic device according to an embodiment of the present disclosure. Detailed Implementation
[0070] The present disclosure will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0071] As mentioned earlier, related technologies can simultaneously employ both FEC and ARQ methods for data packet loss recovery in network data transmission. However, this method typically requires setting a fixed receive delay or a fixed FEC redundancy, making it impossible to flexibly adjust the receive delay or FEC redundancy. Alternatively, the receive delay or FEC redundancy can be adjusted in segments according to network conditions, but usually, to ensure the data packet recovery rate, a larger receive delay or FEC redundancy needs to be set, which may result in excessive receive delay or bandwidth waste.
[0072] Based on this, this disclosure provides a data transmission method applied to a sending device. Figure 1 This is a flowchart illustrating the data transmission method according to an embodiment of the present disclosure. Figure 1 ,like Figure 1 As shown, the method includes:
[0073] S101. Determine the current network status between yourself and the receiving device;
[0074] S102. Based on the current network status, establish the correlation between reception delay and forward error correction code (FEC) redundancy.
[0075] S103. Based on the aforementioned correlation, determine the target receiving delay and target FEC redundancy corresponding to the data to be transmitted;
[0076] S104. Transmit the data to be transmitted according to the target reception delay and the target FEC redundancy.
[0077] It should be noted that, in this embodiment of the disclosure, the receiving delay is the time between the completion of media data packet transmission and the start of data packet group recovery when the receiving device receives transmitted data. The longer the receiving delay, the stronger the anti-packet loss capability, but the transmission efficiency will be reduced accordingly. The forward error correction code (FEC) redundancy is the ratio of the number of redundant data packets to the number of original media data packets. The higher the redundancy, the stronger the anti-packet loss capability, but the transmission efficiency will be reduced accordingly.
[0078] In this embodiment, before transmitting data to the receiving device, the sending device first determines the current network state between itself and the receiving device, thereby providing a basis for subsequently determining the target reception delay and target FEC redundancy. It should be noted that the current network state may include one or more of the following: network latency (Round-Trip Time, RTT), network packet loss rate, and network bandwidth. RTT refers to the time elapsed between the sending device sending data and the receiving device responding to the data reception status; it typically consists of four parts: transmission delay, propagation delay, queuing delay, and processing delay. Network packet loss rate refers to the possibility that some data packets may not be received by the receiving device when the sending device sends multiple data packets to the receiving device; the network packet loss rate is the ratio between the number of lost data packets and the number of sent data packets, i.e., the probability of packet loss for each data packet. Network bandwidth is the maximum bandwidth that the current network can provide for data transmission.
[0079] In this embodiment of the disclosure, when transmitting data between the transmitting device and the receiving device, both FEC and ARQ methods can be used simultaneously to recover data packets lost during data transmission. Before transmitting data, the transmitting device first determines the target receiving delay and the target FEC redundancy.
[0080] In this embodiment of the disclosure, before determining the target receive delay and the target FEC redundancy, the correlation between the receive delay and the forward error correction code (FEC) redundancy is first determined based on the network state. This is because different network states affect data transmission performance, and the receive delay and FEC redundancy set to improve the probability of successful data transmission will also differ. For example, when the network packet loss rate is high, in order to increase the probability of the receiving device recovering the transmitted data, the sending device can increase the number of FEC redundant data packets corresponding to the transmitted data, thereby increasing the FEC redundancy. When the network latency is low, increasing the receive delay can improve the probability of successful data transmission.
[0081] However, increasing FEC redundancy increases the amount of transmitted data, thus requiring greater network bandwidth. If the current network bandwidth is insufficient, it will affect the data transmission efficiency. In addition, the increase in reception latency will also affect the data transmission efficiency. Therefore, this embodiment of the present disclosure determines the correlation between reception latency and FEC redundancy based on the current network status, so that the target reception latency and target FEC redundancy adapted to the data to be transmitted can be determined more reasonably based on this constraint relationship.
[0082] In related technologies, no correlation is established between receive delay and FEC redundancy. Typically, fixed receive delay and fixed FEC redundancy are set. However, excessively small receive delays or FEC redundancy cannot effectively improve the probability of successful data transmission, while excessively large receive delays and FEC redundancy increase data transmission latency and waste data transmission bandwidth. This embodiment of the present disclosure determines the target receive delay and target FEC redundancy corresponding to the data to be transmitted by establishing a correlation between receive delay and FEC redundancy, thereby reducing data transmission latency and minimizing wasted data transmission bandwidth.
[0083] Figure 2 This is a schematic diagram illustrating the correlation between reception delay and FEC redundancy in an embodiment of this disclosure, as shown below. Figure 2 As shown in the figure, b represents the reception delay, and r represents the FEC redundancy. The FEC redundancy can be determined based on the reception delay, or vice versa. For example, based on the correlation between reception delay and FEC redundancy, the target reception delay and target FEC redundancy are determined. When the target reception delay is large, the target FEC redundancy can be small, allowing the determined target reception delay and target FEC redundancy to work together to effectively improve data transmission efficiency.
[0084] In this embodiment of the disclosure, when the transmitting device needs to transmit data, it can determine the target receiving delay and FEC redundancy corresponding to the data to be transmitted based on the correlation between receiving delay and FEC redundancy; or it can determine the target receiving delay and FEC redundancy corresponding to the data to be transmitted based on the correlation between receiving delay and FEC redundancy, as well as other factors related to the data to be transmitted.
[0085] In this embodiment of the disclosure, for example, the target reception delay can be the minimum reception delay when the receiving device receives the data to be transmitted; the target FEC redundancy can be the minimum FEC redundancy when the sending device sends the data to be transmitted.
[0086] In this embodiment of the disclosure, after determining the target reception delay and target FEC redundancy corresponding to the data to be transmitted, a number of FEC redundancy data packets corresponding to the target FEC redundancy are added to the data to be transmitted. The data to be transmitted and the number of FEC redundancy packets corresponding to the target FEC redundancy are sent to the receiving device according to the target reception delay, so that the receiving device can receive the data to be transmitted and the number of FEC redundancy packets corresponding to the target FEC redundancy according to the target reception delay, and recover the transmitted data according to the FEC redundancy packets.
[0087] It is understood that, by adopting the technical solution of this disclosure, on the one hand, the correlation between reception delay and FEC redundancy is determined based on network status, and the target reception delay and target FEC redundancy are determined based on the correlation, enabling the transmitting device to flexibly adjust the reception delay and FEC redundancy according to network status, thereby improving data transmission efficiency; on the other hand, congestion control algorithms are usually used in transmitting devices to improve transmission quality. In this disclosure, by determining the target reception delay and target FEC redundancy by the transmitting device, the transmitting device can also combine the target reception delay and target FEC redundancy with the congestion control algorithm of the transmitting end to further improve the packet loss resistance and data transmission quality of data transmission.
[0088] In some embodiments, the current network state includes network latency RTT and network packet loss rate;
[0089] The step of establishing the correlation between reception delay and forward error correction (FEC) redundancy based on the current network state includes:
[0090] Based on the network latency RTT and the network packet loss rate, estimate the first average number of lost packets and the first variance of the number of lost packets in the packet group; wherein, the packet group includes multiple redundant packets;
[0091] Based on the first average number of packet losses and the first variance, and with the preset target packet loss recovery probability and the number of packet losses being less than or equal to the number of redundant data packets as objectives, a correlation is established between the receiving delay and the FEC redundancy.
[0092] In this embodiment of the disclosure, the packet loss count of the proposed data packet group follows a binomial distribution. Since the packet loss count is related to the RTT and the network packet loss rate when the data packet group is transmitted in the network, the sending device can estimate the first average packet loss count and the first variance of the packet loss count based on the RTT and the network packet loss rate. Furthermore, the receive delay and FEC redundancy are also related to the packet loss count; therefore, both the first average packet loss count and the first variance of the packet loss count are related to the receive delay and FEC redundancy.
[0093] It should be noted that a data packet group may include multiple redundant data packets and multiple media data packets. The number of packet losses of both redundant data packets and media data packets follows a binomial distribution. Therefore, the sending device can comprehensively determine the first average number of packet losses and the first variance of the number of packet losses of the data packet group based on the characteristic that the number of packet losses of each packet follows a binomial distribution.
[0094] In this embodiment of the disclosure, the preset target packet loss recovery probability is the probability that the receiving device needs to recover the data packet. It can also be understood as the probability that the receiving device can successfully receive the data packet. It can be set according to the actual use scenario of the data transmission method, and there is no limitation here.
[0095] In this embodiment of the disclosure, the receiving device can only recover the lost data packets when the number of lost packets in a data packet group is less than or equal to the number of redundant packets.
[0096] In this embodiment of the disclosure, the first average number of packet losses and the first variance of the number of packet losses are determined to follow a normal distribution. Therefore, the correlation between reception delay and FEC redundancy can be determined by combining the 3σ theory, the preset target packet loss recovery probability, and the number of redundant data packets.
[0097] For example, Figure 3 This is a schematic diagram of a data transmission model according to an embodiment of the present disclosure, such as... Figure 3 As shown, a data packet group contains m media data packets and m*r redundant data packets, where r is the FEC redundancy. The transmission time of the media data packets (including retransmission packets) is t_media, and the time between the completion time of media data packet transmission and the start time of data packet group recovery is t_delay. The FEC redundant packets are transmitted within this time period. It should be noted that t_delay is the reception delay.
[0098] Dividing a data packet group into slots every RTT from right to left, the total number of slots in a data packet group is N = (t_media + t_delay) / RTT; assuming the pre-allocated media transmission rate is bw_media and the size of each media data packet is L, the time interval between adjacent media data packets is... The number of data packets contained in each slot is The number of slots included in the receive delay is It should be noted that in subsequent embodiments, the reception delay can be represented by the number of slots b included in the reception delay.
[0099] As mentioned above, the number of packet losses in a data packet group follows a normal distribution. In this embodiment of the disclosure, the number of data packets in the data packet group is denoted as m, and the first average number of packet losses is denoted as μ. a The first variance of the number of lost packets is denoted as Let p be the preset target packet loss recovery probability. target Let the receiving delay be denoted as b, the FEC redundancy as r, and the number of packet losses as X. a Based on the data distribution of packet loss, the total number of packet losses is no greater than [a certain value]. The probability is:
[0100]
[0101] Where Z(k) is the corresponding probability in the standard normal global distribution probability table, for example, Z(0) = 0.5, Z(1) = 0.84, Z(2) = 0.977, Z(3) = 0.9987. k is determined according to the target recovery probability p. target The settings are as shown in formula (2) below:
[0102] Z(k)=p target (2)
[0103] At the same time, the number of lost packets is less than or equal to the number of redundant packets m*r, that is:
[0104]
[0105] In this embodiment of the disclosure, the correlation between reception delay and FEC redundancy can be established according to formulas (1), (2) and (3).
[0106] It is understood that by adopting the technical solution of this disclosure embodiment, based on the current network RTT and network packet loss rate, the first average number of packet losses and the first variance of the number of packet losses are estimated. Based on the first average number of packet losses and the first variance, with the preset target packet loss recovery probability and the number of packet losses being less than or equal to the number of redundant data packets as the target, the correlation between the minimum reception delay and the minimum FEC redundancy can be obtained. Thus, based on the correlation, the target reception delay and target FEC redundancy adapted to the current network state can be determined more reasonably. The determined target reception delay and target FEC redundancy can reduce data transmission delay and waste of data transmission bandwidth.
[0107] In some embodiments, the data packet group further includes multiple media data packets;
[0108] The step of estimating the first average number of packet losses and the first variance of the number of packet losses based on the network latency RTT and the network packet loss rate includes:
[0109] Based on the network latency RTT and the network packet loss rate, determine the second average number of lost packets and the second variance of the number of lost packets for the plurality of media data packets;
[0110] Based on the network packet loss rate, determine the third average number of packet losses and the third difference in the number of packet losses for the multiple redundant data packets;
[0111] The first average packet loss number is determined based on the second average packet loss number and the third average packet loss number;
[0112] The first variance is determined based on the second variance and the third variance.
[0113] In this embodiment of the disclosure, the number of packet losses for multiple media data packets is assumed to follow a binomial distribution. Since the number of packet losses for multiple media data packets is related to the RTT and the network packet loss rate when they are transmitted in the network, the sending device can estimate the second average number of packet losses and the second variance of the number of packet losses based on the RTT and the network packet loss rate. Furthermore, the receive delay and FEC redundancy are also related to the number of packet losses; therefore, both the second average number of packet losses and the second variance of the number of packet losses are related to the receive delay and FEC redundancy.
[0114] In this embodiment of the disclosure, the number of packet losses of multiple redundant data packets is assumed to follow a binomial distribution. Since the number of packet losses of multiple redundant data packets is related to the network packet loss rate when they are transmitted in the network, the sending device can estimate the third average number of packet losses and the third difference in the number of packet losses based on the network packet loss rate. Furthermore, the receiving delay and FEC redundancy are also related to the number of packet losses; therefore, both the third average number of packet losses and the third difference in the number of packet losses are related to the FEC redundancy.
[0115] In this embodiment of the disclosure, since the number of packet losses of the multiple redundant data packets and multiple media data packets included in the data packet group both follow a binomial distribution, the sending device can determine the first average number of packet losses of the data packet group based on the second average number of packet losses of the multiple media data packets and the third average number of packet losses of the multiple redundant data packets; and can determine the first variance of the data packet group based on the second variance of the number of packet losses of the multiple media data packets and the third variance of the number of packet losses of the multiple redundant data packets.
[0116] For example, the second average number of packet losses for multiple media data packets is denoted as μ. m The second variance of the number of lost media data packets is denoted as . The third average number of packet losses among multiple redundant data packets is denoted as μ. r The third-party difference in the number of lost packets among multiple redundant data packets is denoted as... The first average number of packet losses per data group is denoted as μ. a The first variance of the number of lost packets in a data packet group is denoted as . but:
[0117]
[0118] Where b is the receiving delay and r is the FEC redundancy.
[0119] It is understood that by adopting the technical solution of the embodiments of this disclosure, the first average packet loss of a data packet group is determined based on the second average packet loss of multiple media data packets and the third average packet loss of multiple redundant data packets; the first variance of the packet loss of the data packet group is determined based on the second variance of the packet loss of multiple media data packets and the third variance of the packet loss of multiple redundant data packets. Compared with determining the first average packet loss and the first variance of the packet loss of a data packet group based only on one of the media data and redundant data, the results of determining the first average packet loss and the first variance of the packet loss of the data packet group can be more accurate.
[0120] In some embodiments, determining the second average number of lost packets and the second variance of the number of lost packets based on the network latency RTT and the network packet loss rate includes:
[0121] Based on the network latency RTT and the network packet loss rate, determine the probability of packet loss for a media data packet within each network latency RTT.
[0122] Based on the fact that the number of lost media data packets within each network latency RTT follows a binomial distribution, the second average sub-number of lost media data packets and the second sub-variance of the number of lost packets within each network latency RTT are determined.
[0123] The sum of the second average number of packet losses within each network latency RTT corresponding to the transmission of multiple media data packets is determined as the second average number of packet losses for multiple media data packets.
[0124] The sum of the second sub-variances within each network latency RTT corresponding to the transmission of multiple media data packets is determined as the second variance of the number of media data packet losses.
[0125] In this embodiment of the disclosure, the transmitting device determines the packet loss probability of a media data packet within each RTT duration based on the RTT and the network packet loss rate. For example, let the network packet loss rate be denoted as p, the network latency be RTT, and based on the foregoing embodiments, the number of slots included in the reception delay is b. Therefore, the maximum number of transmissions for any media data packet in the i-th slot (counted from right to left in t_media) is i+b. Thus, the packet loss probability of a media data packet within each RTT duration can be determined as follows:
[0126] p si =p (i+b) (5)
[0127] In this embodiment of the disclosure, since the number of lost media data packets within each RTT follows a binomial distribution, the second average number of lost packets and the second sub-variance of the number of lost packets within each RTT can be determined based on the probability of a media data packet being lost within each RTT.
[0128] For example, based on the foregoing embodiments, it is known that the i-th slot contains M media data packets, and the number of packet losses for the M media data packets is X. si X follows a binomial distribution si ~B(M,p si ),but:
[0129]
[0130] Where, p si Let μ be the probability of packet loss for a media data packet. si The second average number of packet losses. This is the second subvariance of the number of lost packets.
[0131] In this embodiment of the disclosure, since the number of lost packets of all media data packets within each RTT duration follows a binomial distribution, the sum of the second average number of lost packets within each RTT duration corresponding to the transmission of multiple media data packets can be determined as the second average number of lost packets of multiple media data packets; the sum of the second sub-variances within each RTT duration corresponding to the transmission of multiple media data packets can be determined as the second variance of the number of lost packets of multiple media data packets.
[0132] For example, based on the foregoing embodiments, it is known that multiple media data packets contain N independent slots, therefore, a second average number of packet losses and a second variance of the number of packet losses can be derived.
[0133]
[0134] Where, p si Let μ be the probability of packet loss for a media data packet. si The second average number of packet losses. μ is the second subvariance of the number of lost packets. m The second average number of packet losses. This represents the second variance of the number of lost packets.
[0135] It is understood that, in the technical solution of this disclosure embodiment, since both reception delay and FEC redundancy are related to RTT and network packet loss rate, the second average number of lost packets and the second variance of the number of lost packets of multiple media data packets are associated with RTT and network packet loss rate, so as to establish the correlation between reception delay and FEC redundancy based on the current network status.
[0136] In some embodiments, based on the network packet loss rate, determining a third average number of lost packets and a third difference in the number of lost packets for the plurality of redundant data packets includes:
[0137] Based on the fact that the number of lost packets of the multiple redundant data packets follows a binomial distribution, the third average number of lost packets and the third difference in the number of lost packets are determined according to the network packet loss rate.
[0138] In this embodiment of the disclosure, since the number of lost packets of multiple redundant data packets in the data packet group follows a binomial distribution, the sending device can determine the third average number of lost packets of multiple redundant data packets and the third difference of the number of lost packets based on the network packet loss rate.
[0139] For example, let FEC redundancy be denoted as r, network packet loss rate as P, and the number of media data packets as m. Then the number of redundant data packets is m*r, and the number of packet losses of m*r redundant data packets is X. r X follows a binomial distribution r ~B(mr,p), thus the third average packet loss number and the third difference between the packet loss number can be determined.
[0140]
[0141] Where, μ r The third average number of packet losses. This is the third-party difference in the number of lost packets.
[0142] It is understood that, by adopting the technical solution of this disclosure embodiment, since both reception delay and FEC redundancy are related to the network packet loss rate, as well as the third average number of lost redundant data packets and the third difference of the number of lost packets, it is convenient to establish the correlation between reception delay and FEC redundancy.
[0143] In some embodiments, the method further includes:
[0144] Determine the business scenario corresponding to the data to be transmitted;
[0145] The step of determining the target reception delay and target FEC redundancy corresponding to the data to be transmitted based on the correlation includes:
[0146] Based on the business scenario corresponding to the data to be transmitted and the relevant relationship, determine the target reception delay and the target FEC redundancy corresponding to the data to be transmitted.
[0147] In this embodiment of the disclosure, different business scenarios have different requirements for reception latency and FEC redundancy during data transmission. For example, when the business scenario is video conferencing, a smaller reception latency is required; when the business scenario is playing short videos, a smaller FEC redundancy is required.
[0148] In this embodiment of the disclosure, the transmitting device can determine the target receiving delay and target FEC redundancy of the data to be transmitted based on the business scenario corresponding to the data to be transmitted and the correlation between receiving delay and FEC redundancy. This can make the target receiving delay and target FEC redundancy correspond to the specific business scenario, thereby improving the user experience.
[0149] In some embodiments, determining the target reception delay and the target FEC redundancy corresponding to the data to be transmitted based on the service scenario corresponding to the data to be transmitted and the correlation includes:
[0150] Determine the preset weighting factor corresponding to the business scenario; wherein, the preset weighting factor is the ratio between the FEC redundancy and the receiving delay;
[0151] Based on the ratio between the FEC redundancy and the reception delay, and the correlation, the target reception delay and the target FEC redundancy corresponding to the data to be transmitted are determined.
[0152] In this embodiment, a weighting factor can be preset according to the business scenario. The preset weighting factor is the ratio between FEC redundancy and reception latency. Here, the preset weighting factor can reflect the degree of bias in the business scenario's requirements for reception latency and FEC redundancy. It should be noted that in this embodiment, when no preset weighting factor corresponding to the business scenario is preset in advance, the preset weighting factor can be a value that can simultaneously balance FEC redundancy and reception latency, for example, 15. An exemplary preset weighting factor is:
[0153]
[0154] Where b is the receiving delay and r is the FEC redundancy.
[0155] In this embodiment of the disclosure, when determining the correlation between FEC redundancy and reception delay, the transmitting device does not depend on the service scenario, but can rely on a preset weighting factor to determine the target reception delay and target FEC redundancy corresponding to the data to be transmitted, so that the target reception delay and target FEC redundancy are adapted to the service scenario, that is, to obtain a better delay and redundancy that meets the service preference, thereby improving data transmission efficiency.
[0156] The data transmission method of this disclosure embodiment will be described in detail below with reference to a specific example. Figure 4 This is a flowchart illustrating the data transmission method implemented in this disclosure. Figure 2 ,like Figure 4 As shown, the method includes:
[0157] S201. Obtain network latency RTT and network packet loss rate, etc.
[0158] In this embodiment, the network latency RTT and network packet loss rate are the current network latency RTT and network packet loss rate between the sending device and the receiving device as determined by the sending device in the previous embodiment.
[0159] S202. Calculate the mathematical relationship between the optimal delay b and redundancy r under the target recovery probability.
[0160] In this embodiment, the target recovery probability is the preset target packet loss recovery probability in the aforementioned embodiment, the optimal delay b is the receiving delay in the aforementioned embodiment, the redundancy r is the FEC redundancy in the aforementioned embodiment, and the mathematical relationship between the optimal delay b and the redundancy r is the correlation between the receiving delay and the forward error correction code FEC redundancy in the aforementioned embodiment.
[0161] In this embodiment, the transmitting device estimates the first average number of lost packets and the first variance of the number of lost packets in a data packet group based on the network latency RTT and the network packet loss rate; wherein, the data packet group includes multiple redundant data packets; based on the first average number of lost packets and the first variance, and with the goal of a preset target packet loss recovery probability and the number of lost packets being less than or equal to the number of redundant data packets, a correlation is established between the receiving delay and the FEC redundancy.
[0162] S203. Calculate b and r based on the latency weighting factor for the specific business scenario.
[0163] In this embodiment, the specific business scenario is the business scenario corresponding to the data to be transmitted in the previous embodiment, and the delay weight factor of the specific business scenario is the preset weight factor corresponding to the business scenario in the previous embodiment. The preset weight factor is the ratio between FEC redundancy and reception delay.
[0164] In this embodiment, the transmitting device determines the preset weighting factor corresponding to the service scenario; based on the ratio between FEC redundancy and reception delay and the correlation, it determines the target reception delay and target FEC redundancy corresponding to the data to be transmitted.
[0165] S204. The sending end performs redundancy calculation and transmission based on b and r.
[0166] In this embodiment, the transmitting device transmits the data to be transmitted based on the target reception delay and the target FEC redundancy.
[0167] It is understood that, by adopting the technical solution of this disclosure, on the one hand, the correlation between reception delay and FEC redundancy is determined based on network status, and the target reception delay and target FEC redundancy are determined based on the correlation, enabling the transmitting device to flexibly adjust the reception delay and FEC redundancy according to network status, thereby improving data transmission efficiency; on the other hand, congestion control algorithms are usually used in transmitting devices to improve transmission quality. In this disclosure, by determining the target reception delay and target FEC redundancy by the transmitting device, the transmitting device can also combine the target reception delay and target FEC redundancy with the congestion control algorithm of the transmitting end to further improve the packet loss resistance and data transmission quality of data transmission.
[0168] Based on the foregoing embodiments, this disclosure also provides a data transmission apparatus, applied to a transmitting device. Figure 5 This is a schematic diagram of the structure of the data transmission device according to an embodiment of the present disclosure, as shown below. Figure 5 As shown, the device 300 includes:
[0169] The first determining module 301 is used to determine the current network status between itself and the receiving device;
[0170] Establishment module 302 is used to establish a correlation between reception delay and forward error correction code (FEC) redundancy based on the current network state;
[0171] The second determining module 303 is used to determine the target receiving delay and target FEC redundancy corresponding to the data to be transmitted based on the correlation relationship.
[0172] The transmission module 304 is used to transmit the data to be transmitted based on the target reception delay and the target FEC redundancy.
[0173] In some embodiments, the current network state includes network latency RTT and network packet loss rate;
[0174] The establishment module 302 is used to estimate the first average number of packet losses and the first variance of the number of packet losses in a data packet group based on the network latency RTT and the network packet loss rate; wherein, the data packet group includes multiple redundant data packets;
[0175] Based on the first average number of packet losses and the first variance, and with the preset target packet loss recovery probability and the number of packet losses being less than or equal to the number of redundant data packets as objectives, a correlation is established between the receiving delay and the FEC redundancy.
[0176] In some embodiments, the data packet group further includes multiple media data packets;
[0177] The establishment module 302 is used to determine the second average number of lost packets and the second variance of the number of lost packets for the plurality of media data packets based on the network latency RTT and the network packet loss rate.
[0178] Based on the network packet loss rate, determine the third average number of packet losses and the third difference in the number of packet losses for the multiple redundant data packets;
[0179] The first average packet loss number is determined based on the second average packet loss number and the third average packet loss number;
[0180] The first variance is determined based on the second variance and the third variance.
[0181] In some embodiments, the establishment module 302 is used to determine the probability of packet loss of a media data packet within each network latency RTT based on the network latency RTT and the network packet loss rate;
[0182] Based on the fact that the number of lost media data packets within each network latency RTT follows a binomial distribution, the second average sub-number of lost media data packets and the second sub-variance of the number of lost packets within each network latency RTT are determined.
[0183] The sum of the second average number of packet losses within each network latency RTT corresponding to the transmission of multiple media data packets is determined as the second average number of packet losses for multiple media data packets.
[0184] The sum of the second sub-variances within each network latency RTT corresponding to the transmission of multiple media data packets is determined as the second variance of the number of media data packet losses.
[0185] In some embodiments, the establishment module 302 is used to determine the third average number of packet losses and the third difference in the number of packet losses of the multiple redundant data packets based on the characteristic that the number of packet losses of the multiple redundant data packets follows a binomial distribution and according to the network packet loss rate.
[0186] In some embodiments, the device 300 further includes:
[0187] The third determining module 305 is used to determine the business scenario corresponding to the data to be transmitted;
[0188] The second determining module 303 is used to determine the target receiving delay and the target FEC redundancy corresponding to the data to be transmitted based on the service scenario corresponding to the data to be transmitted and the relevant relationship.
[0189] In some embodiments, the second determining module 303 is used to determine a preset weighting factor corresponding to the service scenario; wherein, the preset weighting factor is the ratio between the FEC redundancy and the receiving delay;
[0190] Based on the ratio between the FEC redundancy and the reception delay, and the correlation, the target reception delay and the target FEC redundancy corresponding to the data to be transmitted are determined.
[0191] This disclosure also provides an electronic device. Figure 6 This is a schematic diagram of the hardware composition structure of an electronic device according to an embodiment of this disclosure. Figure 6 As shown, the electronic device 400 includes a processor 401 and a memory 402 for storing a computer program that can run on the processor 401, wherein the processor 401 executes the steps of the data transmission method described in the embodiments of this disclosure when running the computer program.
[0192] Optionally, the electronic device 400 may also include at least one network interface 403. Various components in the electronic device 400 are coupled together via a bus system 404. It is understood that the bus system 404 is used to implement communication between these components. In addition to a data bus, the bus system 404 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 6 The general designated all buses as Bus System 404.
[0193] It is understood that memory 402 can be volatile memory or non-volatile memory, or both. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), ferromagnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM); magnetic surface memory can be disk storage or magnetic tape storage. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The memory 402 described in the embodiments of this disclosure is intended to include, but is not limited to, these and any other suitable types of memory.
[0194] The memory 402 in this embodiment is used to store various types of data to support the operation of the electronic device 400.
[0195] The methods disclosed in the above embodiments of this disclosure can be applied to processor 401, or implemented by processor 401. Processor 401 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in processor 401 or by instructions in the form of software. The processor 401 may be a general-purpose processor, DSP, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 401 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this disclosure. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of this disclosure can be directly manifested as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, which is located in memory 402. Processor 401 reads the information in memory 402 and combines its hardware to complete the steps of the aforementioned method.
[0196] In an exemplary embodiment, the electronic device 400 may be implemented by one or more application-specific integrated circuits (ASICs), programmable logic devices (PLDs), complex programmable logic devices (CPLDs), FPGAs, general-purpose processors, controllers, MCUs, microprocessors, or other electronic components to perform the aforementioned method.
[0197] This disclosure also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the data transmission method of this disclosure.
[0198] The methods disclosed in the several method embodiments provided in this disclosure can be arbitrarily combined without conflict to obtain new method embodiments.
[0199] The features disclosed in the several product embodiments provided in this disclosure can be combined arbitrarily without conflict to obtain new product embodiments.
[0200] The features disclosed in the several method or device embodiments provided in this disclosure can be arbitrarily combined without conflict to obtain new method or device embodiments.
[0201] In the several embodiments provided in this disclosure, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components may be combined, or integrated into another system, or some features may be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0202] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.
[0203] In addition, each functional unit in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.
[0204] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0205] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this disclosure, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.
[0206] The above description is merely a specific embodiment of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.
Claims
1. A data transmission method, characterized in that, Applied to a transmitting device, the method includes: Determine the current network status between yourself and the receiving device; the current network status includes network latency RTT and network packet loss rate; Based on the network latency RTT and the network packet loss rate, a first average number of lost packets and a first variance of the number of lost packets are estimated for each packet group; wherein, the packet group includes multiple redundant packets; based on the first average number of lost packets and the first variance, with a preset target packet loss recovery probability and the number of lost packets being less than or equal to the number of redundant packets as objectives, a correlation is established between the reception delay and the redundancy of the forward error correction code (FEC); wherein, the reception delay is the time between the completion of packet transmission and the start of packet group recovery when the receiving device receives transmitted data. Based on the aforementioned correlation, determine the target reception delay and target FEC redundancy corresponding to the data to be transmitted; The data to be transmitted is transmitted based on the target reception delay and the target FEC redundancy.
2. The method according to claim 1, characterized in that, The data packet group also includes multiple media data packets; The step of estimating the first average number of packet losses and the first variance of the number of packet losses based on the network latency RTT and the network packet loss rate includes: Based on the network latency RTT and the network packet loss rate, determine the second average number of lost packets and the second variance of the number of lost packets for the plurality of media data packets; Based on the network packet loss rate, determine the third average number of packet losses and the third difference in the number of packet losses for the multiple redundant data packets; The first average packet loss number is determined based on the second average packet loss number and the third average packet loss number; The first variance is determined based on the second variance and the third variance.
3. The method according to claim 2, characterized in that, The step of determining the second average number of lost packets and the second variance of the number of lost packets based on the network latency RTT and the network packet loss rate includes: Based on the network latency RTT and the network packet loss rate, determine the probability of packet loss for a media data packet within each network latency RTT. Based on the fact that the number of lost media data packets within each network latency RTT follows a binomial distribution, the second average sub-number of lost media data packets and the second sub-variance of the number of lost packets within each network latency RTT are determined. The sum of the second average number of packet losses within each network latency RTT corresponding to the transmission of multiple media data packets is determined as the second average number of packet losses for multiple media data packets. The sum of the second sub-variances within each network latency RTT corresponding to the transmission of multiple media data packets is determined as the second variance of the number of media data packet losses.
4. The method according to claim 2, characterized in that, Based on the network packet loss rate, determine the third average number of packet losses and the third difference in the number of packet losses for the plurality of redundant data packets, including: Based on the fact that the number of lost packets of the multiple redundant data packets follows a binomial distribution, the third average number of lost packets and the third difference in the number of lost packets are determined according to the network packet loss rate.
5. The method according to claim 1, characterized in that, The method further includes: Determine the business scenario corresponding to the data to be transmitted; The step of determining the target reception delay and target FEC redundancy corresponding to the data to be transmitted based on the correlation includes: Based on the business scenario corresponding to the data to be transmitted and the relevant relationship, determine the target reception delay and the target FEC redundancy corresponding to the data to be transmitted.
6. The method according to claim 5, characterized in that, The step of determining the target reception delay and the target FEC redundancy corresponding to the data to be transmitted based on the service scenario corresponding to the data to be transmitted and the relevant relationship includes: Determine the preset weighting factor corresponding to the business scenario; wherein, the preset weighting factor is the ratio between the FEC redundancy and the receiving delay; Based on the ratio between the FEC redundancy and the reception delay, and the correlation, the target reception delay and the target FEC redundancy corresponding to the data to be transmitted are determined.
7. A data transmission device, characterized in that, Applied to a transmitting device, the apparatus includes: The first determining module is used to determine the current network status between itself and the receiving device; the current network status includes network latency RTT and network packet loss rate; A module is established to estimate the first average number of lost packets and the first variance of the number of lost packets in a data packet group based on the network latency RTT and the network packet loss rate; based on the first average number of lost packets and the first variance, and with a preset target packet loss recovery probability and the number of lost packets being less than or equal to the number of redundant data packets as objectives, a correlation is established between the reception delay and the redundancy of the forward error correction code (FEC); wherein, the data packet group includes multiple redundant data packets; and the reception delay is the time between the completion of data packet transmission and the start of data packet group recovery when the receiving device receives transmitted data. The second determining module is used to determine the target receiving delay and target FEC redundancy corresponding to the data to be transmitted based on the correlation relationship. The transmission module is used to transmit the data to be transmitted based on the target reception delay and the target FEC redundancy.
8. An electronic device, characterized in that, This includes a processor and memory for storing computer programs that can run on the processor. When the processor is used to run the computer program, it performs the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program performs the steps of the method according to any one of claims 1 to 6.