CN107483990B - Dynamic code rate adjusting method and device for streaming media transmission and transmission system - Google Patents
Dynamic code rate adjusting method and device for streaming media transmission and transmission system Download PDFInfo
- Publication number
- CN107483990B CN107483990B CN201710718172.6A CN201710718172A CN107483990B CN 107483990 B CN107483990 B CN 107483990B CN 201710718172 A CN201710718172 A CN 201710718172A CN 107483990 B CN107483990 B CN 107483990B
- Authority
- CN
- China
- Prior art keywords
- code rate
- rtt
- network
- bandwidth
- client
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 230000005540 biological transmission Effects 0.000 title claims abstract description 51
- 238000000034 method Methods 0.000 title claims abstract description 22
- 230000001186 cumulative effect Effects 0.000 claims description 50
- 238000005315 distribution function Methods 0.000 claims description 36
- 230000003993 interaction Effects 0.000 claims description 21
- 238000004364 calculation method Methods 0.000 claims description 16
- 238000013441 quality evaluation Methods 0.000 claims description 10
- 238000004891 communication Methods 0.000 abstract description 6
- 238000010586 diagram Methods 0.000 description 6
- 238000011156 evaluation Methods 0.000 description 4
- 230000007547 defect Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000006872 improvement Effects 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 241000251468 Actinopterygii Species 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000001105 regulatory effect Effects 0.000 description 1
- 238000000638 solvent extraction Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/25—Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
- H04N21/266—Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel
- H04N21/2662—Controlling the complexity of the video stream, e.g. by scaling the resolution or bitrate of the video stream based on the client capabilities
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client
- H04N21/63—Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
- H04N21/643—Communication protocols
- H04N21/6437—Real-time Transport Protocol [RTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client
- H04N21/63—Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
- H04N21/647—Control signaling between network components and server or clients; Network processes for video distribution between server and clients, e.g. controlling the quality of the video stream, by dropping packets, protecting content from unauthorised alteration within the network, monitoring of network load, bridging between two different networks, e.g. between IP and wireless
- H04N21/64723—Monitoring of network processes or resources, e.g. monitoring of network load
- H04N21/64738—Monitoring network characteristics, e.g. bandwidth, congestion level
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client
- H04N21/63—Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
- H04N21/647—Control signaling between network components and server or clients; Network processes for video distribution between server and clients, e.g. controlling the quality of the video stream, by dropping packets, protecting content from unauthorised alteration within the network, monitoring of network load, bridging between two different networks, e.g. between IP and wireless
- H04N21/64746—Control signals issued by the network directed to the server or the client
- H04N21/64761—Control signals issued by the network directed to the server or the client directed to the server
- H04N21/64769—Control signals issued by the network directed to the server or the client directed to the server for rate control
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Computer Security & Cryptography (AREA)
- Databases & Information Systems (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention provides a dynamic code rate adjusting method for streaming media transmission, which comprises the following steps: s1: dividing the code rate into a plurality of corresponding network bandwidth intervals according to different code rates; s2: calculating the conditional probability of the bandwidth interval to which the current period code rate belongs, and respectively calculating the ratio of the conditional probability of the non-current bandwidth interval; s3: obtaining the maximum conditional probability ratio and comparing the maximum conditional probability ratio with a set threshold; if the bandwidth is larger than the set threshold, switching to the code rate corresponding to the bandwidth interval; if not, no switching is performed. Compared with the prior art, the method and the device are simple to implement, do not need a server to participate, have wide applicability, and can effectively ensure the instant communication quality in different network transmission environments. In addition, the invention also provides a dynamic code rate adjusting device and a transmission system for realizing the method.
Description
Technical Field
The present invention relates to the field of communications, and in particular, to a dynamic code rate adjustment method, apparatus, and transmission system suitable for streaming media transmission.
Background
The streaming media technology is widely applied to various audio and video instant messaging scenes. However, the Internet only provides best-effort (best-effort) services, and cannot provide Qos guarantees. When streaming media data is transmitted in a complex network environment, delay, jitter and packet loss are generated, and improper processing can seriously affect user experience.
In a streaming media transmission environment, when a network condition is poor, a higher code rate may lead to poor user experience, and therefore, the code rate needs to be reduced, which is helpful for counteracting a negative effect caused by poor network quality. Therefore, how to dynamically adjust the code rate during streaming media transmission is a problem that needs to be solved urgently.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a dynamic code rate adjusting method, a device and a transmission system suitable for streaming media transmission.
The invention is realized by the following scheme: a dynamic code rate adjusting method for streaming media transmission comprises the following steps:
s1: dividing the code rate into a plurality of corresponding network bandwidth intervals according to different code rates; wherein, the code rates are respectively from low to high: r1、R2、…RnThe corresponding network bandwidth intervals are respectively: (-infinity, b)1),(b1,b2),…(bn,+∞);
S2: calculating the conditional probability of the bandwidth interval to which the current period code rate belongs, and respectively calculating the ratio of the conditional probability of the bandwidth interval to which the current period code rate belongs to the conditional probability of the bandwidth interval to the non-current bandwidth interval; the conditional probabilities of the bandwidth intervals to which different code rates belong are respectively as follows:
(-∞,b1]:Φ(b1,t)=P(B<b1,t)=P{B<b1|J(t),RTT(t),L(t)};
…
(bn,+∞):1-Φ(bn,t)=1-P(B<bn,t)=1-P{B<bn|J(t),RTT(t),L(t)};
p { J (t), RTT (t), L (t) } is the probability of the current network performance parameter,
p { B < B | J (t), RTT (t), L (t) } is the probability that the network bandwidth B is less than B under the given network performance parameters;
p { J (t), RTT (t), L (t) | B < B } is the conditional probability of a network performance parameter given network bandwidth requirements,
p { B < B } represents the probability that bandwidth B is less than B;
j (t) represents jitter, RTT (t) represents RTT duration, and l (t) represents packet loss rate;
the P { J (t), RTT (t), L (t) } is obtained by calculation according to respective prior distribution;
s3: obtaining the maximum conditional probability ratio and comparing the maximum conditional probability ratio with a set threshold; if the bandwidth is larger than the set threshold, switching to the code rate corresponding to the bandwidth interval; if not, no switching is performed.
As a further improvement of the present invention, when P { J < J (t) | B < B } is calculated, it is specifically:
the JITTER value JITTER satisfying a certain bandwidth interval is regarded as a random variable, x1,x2,…xnIs the observed value of the sample of the random variable, and the observed value is sorted from big to small and is x after being sorted1,x2,…xnIs provided with kiIs less than xi+1The cumulative frequency of occurrence of the sample values, n being the sample capacity, the sample cumulative frequency distribution function can be obtained:
the accumulated frequency distribution function can be used as the estimation of the prior distribution of the jitter value meeting a certain bandwidth interval, and P { J < J (t) | B < B } can be calculated according to the estimated prior distribution and J (t) of the current period;
when P { RTT < RTT (t) | B < B } is calculated, the following is specifically performed:
regarding the time length RTT satisfying a certain bandwidth interval as a random variable, x1,x2,…xnIs the observed value of the sample of the random variable, and the observed value is sorted from big to small and is x after being sorted1,x2,…xnIs provided with kiIs less than xi+1The cumulative frequency of occurrence of the sample values, n being the sample capacity, the sample cumulative frequency distribution function can be obtained:
the cumulative frequency distribution function can be used as the estimation of the prior distribution of the jitter value meeting a certain bandwidth interval, and P { RTT < RTT (t) | B < B } can be calculated according to the estimated prior distribution and the RTT (t) of the current period;
when P { L < L (t) | B < B } is calculated, it is specifically:
the packet loss rate L meeting a certain bandwidth interval is regarded as a random variable x1,x2,…xnIs the observed value of the sample of the random variable, and the observed value is sorted from big to small and is x after being sorted1,x2,…xnIs provided with kiIs less than xi+1The cumulative frequency of occurrence of the sample values, n being the sample capacity, the sample cumulative frequency distribution function can be obtained:
the cumulative frequency distribution function can be used as an estimation of prior distribution of jitter values satisfying a certain bandwidth interval, and P { L < L (t) | B < B } can be calculated according to the estimated prior distribution and L (t) of the current period.
The invention also provides a dynamic code rate adjusting device for streaming media transmission, which comprises
The dividing module is used for dividing the code rate into a plurality of corresponding network bandwidth intervals according to different code rates; in the dividing module, the code rates are respectively from low to high: r1、R2、…RnThe corresponding network bandwidth intervals are respectively: (-infinity, b)1),(b1,b2),…(bn,+∞);
The calculation module is used for calculating the conditional probability of the bandwidth interval to which the current period code rate belongs and respectively calculating the ratio of the conditional probability of the non-current bandwidth interval; the conditional probabilities of the bandwidth intervals to which different code rates belong are respectively as follows:
(-∞,b1]:Φ(b1,t)=P(B<b1,t);
(b1,b2]:Φ(b2,t)-Φ(b1,t)=P(b1<B<b2,t)=P(B<b2,t)-P(B<b1,t);
…
(bn,+∞):1-Φ(bn,t)=1-P(B<bn,t);
p { J (t), RTT (t), L (t) } is the probability of the current network performance parameter,
p { B < B | J (t), RTT (t), L (t) } is the probability that the network bandwidth B is less than B under the given network performance parameters;
p { J (t), RTT (t), L (t) | B < B } is the conditional probability of a network performance parameter given network bandwidth requirements,
p { B < B } represents the probability that bandwidth B is less than B;
j (t) represents jitter, RTT (t) represents RTT duration, and l (t) represents packet loss rate;
the P { J (t), RTT (t), L (t) } is obtained by calculation according to respective prior distribution;
the switching module is used for acquiring the maximum conditional probability ratio and comparing the maximum conditional probability ratio with a set threshold; if the bandwidth is larger than the set threshold, switching to the code rate corresponding to the bandwidth interval; if not, no switching is performed.
As a further improvement of the present invention, when P { J < J (t) | B < B } is calculated, it is specifically:
the JITTER value JITTER satisfying a certain bandwidth interval is regarded as a random variable, x1,x2,…xnIs the observed value of the sample of the random variable, and the observed value is sorted from big to small and is x after being sorted1,x2,…xnIs provided with kiIs less than xi+1The cumulative frequency of occurrence of the sample values, n being the sample capacity, the sample cumulative frequency distribution function can be obtained:
the accumulated frequency distribution function can be used as the estimation of the prior distribution of the jitter value meeting a certain bandwidth interval, and P { J < J (t) | B < B } can be calculated according to the estimated prior distribution and J (t) of the current period;
when P { RTT < RTT (t) | B < B } is calculated, the following is specifically performed:
regarding the time length RTT satisfying a certain bandwidth interval as a random variable, x1,x2,…xnIs the observed value of the sample of the random variable, and the observed value is sorted from big to small and is x after being sorted1,x2,…xnIs provided with kiIs less than xi+1The cumulative frequency of occurrence of the sample values, n being the sample capacity, the sample cumulative frequency distribution function can be obtained:
the cumulative frequency distribution function can be used as the estimation of the prior distribution of the jitter value meeting a certain bandwidth interval, and P { RTT < RTT (t) | B < B } can be calculated according to the estimated prior distribution and the RTT (t) of the current period;
when P { L < L (t) | B < B } is calculated, it is specifically:
the packet loss rate L meeting a certain bandwidth interval is regarded as a random variable x1,x2,…xnIs the observed value of the sample of the random variable, and the observed value is sorted from big to small and is x after being sorted1,x2,…xnIs provided with kiIs less than xi+1The cumulative frequency of occurrence of the sample values, n being the sample capacity, the sample cumulative frequency distribution function can be obtained:
the cumulative frequency distribution function can be used as an estimation of prior distribution of jitter values satisfying a certain bandwidth interval, and P { L < L (t) | B < B } can be calculated according to the estimated prior distribution and L (t) of the current period.
The invention also provides a streaming media transmission system, which comprises a first client and a second client;
the first client comprises a first network downlink quality evaluation module, a first client network control interaction module, a first calculation parameter module and a first network transceiver module; the first client network control interaction module comprises a dynamic code rate adjusting device for streaming media transmission;
the second client comprises a second network downlink quality evaluation module, a second client network control interaction module, a second calculation parameter module and a second network transceiver module; the second client network control interaction module comprises a dynamic code rate adjusting device for streaming media transmission;
when a first client receives data from a second client, the downlink quality of the current network is evaluated through the first network downlink quality evaluation module to obtain required network performance parameters, and the current code rate of the second client is obtained through the first client network interaction control module and the code rate which should be modified is fed back to the second client; obtaining the current code rate of the opposite side according to the current network performance parameters of the current downlink network, and calculating to obtain the code rate which the opposite side should modify; the second client receives and analyzes the code rate which needs to be modified by the first client, judges whether the code rate is consistent with the current actual code rate, and modifies the code rate if the code rate is not consistent with the current actual code rate;
when the second client receives data from the first client, the downlink quality of the current network is evaluated through the downlink quality evaluation module of the second network to obtain required network performance parameters, and the current code rate of the first client is obtained through the network interaction control module of the second client and the code rate which should be modified is fed back to the first client; obtaining the current code rate of the opposite side according to the current network performance parameters of the current downlink network, and calculating to obtain the code rate which the opposite side should modify; and the first client receives and analyzes the code rate which needs to be modified by the second client, judges whether the code rate is consistent with the current actual code rate, and modifies the code rate if the code rate is not consistent with the current actual code rate.
Compared with the prior art, the dynamic code rate adjusting method provided by the invention is a real-time streaming media transmission mechanism capable of adapting to the network condition, and the network performance evaluation and code rate adjusting strategies are two important modules for dynamic code rate adjustment, and the performance of the two important modules directly influences the effect of dynamic code rate adjustment.
Meanwhile, the invention is simple to realize, does not need a server to participate, has wide applicability and can effectively ensure the instant communication quality under different network transmission environments.
For a better understanding and practice, the invention is described in detail below with reference to the accompanying drawings.
Drawings
Fig. 1 is an overall block diagram of end-to-end instant network communications.
Fig. 2 is a flowchart illustrating steps of a dynamic rate adjustment method for streaming media transmission according to the present invention.
FIG. 3 is a block diagram of a dynamic rate adjustment apparatus according to the present invention.
Fig. 4 is a block diagram of a streaming media transmission system of the present invention.
Detailed Description
The present invention will be described in further detail with reference to examples and drawings, but the present invention is not limited thereto.
Please refer to fig. 1, which is a block diagram of an end-to-end instant network communication. During the network transmission process, the RTP data stream may generate packet loss, delay and jitter, and when the packet loss, delay or jitter is too large, the user experience is deteriorated. Therefore, the RTP data stream is regulated through the network interaction control module in the invention, the transmission quality of the streaming media can be improved, and the user experience is improved. Aiming at the defects of the prior art, the invention provides a dynamic code rate adjusting method, a device and a transmission system suitable for streaming media transmission, which are introduced by the following embodiments:
example 1
First, the basic flow of the dynamic code rate adjustment method for streaming media transmission of the present invention is introduced. Please refer to fig. 2, which is a flowchart illustrating a method for adjusting dynamic bit rate in streaming media transmission according to the present invention.
The invention provides a dynamic code rate adjusting method for streaming media transmission, which comprises the following steps:
s1: and dividing the code rate into a plurality of corresponding network bandwidth intervals according to different code rates.
Specifically, in step S1, the code rates are from low to high: r1、R2、…RnThe corresponding network bandwidth intervals are respectively: (-infinity, b)1),(b1,b2),…(bn, + ∞). In practical application, the bandwidth interval division can be performed according to the code rate.
S2: and calculating the conditional probability of the bandwidth interval to which the current period code rate belongs, and respectively calculating the ratio of the conditional probability of the non-current bandwidth interval.
Specifically, in step S2, the conditional probabilities of the bandwidth intervals to which different code rates belong are respectively:
(-∞,b1]:Φ(b1,t)=P(B<b1,t);
(b1,b2]:Φ(b2,t)-Φ(b1,t)=P(b1<B<b2,t)=P(B<b2,t)-P(B<b1,t);
…
(bn,+∞):1-Φ(bn,t)=1-P(B<bn,t)。
p { J (t), RTT (t), L (t) } is the probability of the current network performance parameter,
p { J (t), RTT (t), L (t) | B < B } is the conditional probability of a network performance parameter given network bandwidth requirements,
p { B < B } represents the probability that bandwidth B is less than B;
j (t) represents jitter, RTT (t) represents RTT duration, and l (t) represents packet loss rate;
and P { J (t), RTT (t), L (t) } is obtained by calculation according to respective prior distribution.
How to calculate the probabilities of P { j (t), rtt (t), l (t) } is described in detail below:
first, when P { J < J (t) | B < B } is calculated, specifically:
the JITTER value JITTER satisfying a certain bandwidth interval is regarded as a random variable, x1,x2,…xnIs the observed value of the sample of the random variable, and the observed value is sorted from big to small and is x after being sorted1,x2,…xnIs provided with kiIs less than xi+1The cumulative frequency of occurrence of the sample values, n being the sample capacity, the sample cumulative frequency distribution function can be obtained:
the cumulative distribution function can be used as the estimation of the prior distribution of the jitter value meeting a certain bandwidth interval, and P { J < J (t) | B < B } can be calculated according to the estimated prior distribution and the J (t) of the current period;
secondly, similarly, when P { RTT < RTT (t) | B < B } is calculated, the following is specifically performed:
regarding the time length RTT satisfying a certain bandwidth interval as a random variable, x1,x2,…xnIs the observed value of the sample of the random variable, and the observed value is sorted from big to small and is x after being sorted1,x2,…xnIs provided with kiIs less than xi+1The cumulative frequency of occurrence of the sample values, n being the sample capacity, the sample cumulative frequency distribution function can be obtained:
the cumulative distribution function can be used as the estimation of the prior distribution of the jitter value meeting a certain bandwidth interval, and P { RTT < RTT (t) | B < B } can be calculated according to the estimated prior distribution and the RTT (t) of the current period;
thirdly, similarly, when P { L < L (t) | B < B } is calculated, it is specifically:
the packet loss rate L meeting a certain bandwidth interval is regarded as a random variable x1,x2,…xnIs the observed value of the sample of the random variable, and the observed value is sorted from big to small and is x after being sorted1,x2,…xnIs provided with kiIs less than xi+1The cumulative frequency of occurrence of the sample values, n being the sample capacity, the sample cumulative frequency distribution function can be obtained:
the cumulative distribution function can be used as an estimation of the prior distribution of the jitter values satisfying a certain bandwidth interval, and P { L < L (t) | B < B } can be calculated according to the estimated prior distribution and L (t) of the current period.
S3: obtaining the maximum conditional probability ratio and comparing the maximum conditional probability ratio with a set threshold; if the bandwidth is larger than the set threshold, switching to the code rate corresponding to the bandwidth interval; if not, no switching is performed.
The principle of the dynamic rate adjustment method for streaming media transmission according to the present invention is described as follows by a specific example:
the invention realizes dynamic code rate adjustment according to the size of the network bandwidth estimation value. The network performance parameters adopted by the network bandwidth estimation comprise packet loss rate, jitter and RTT duration, wherein the packet loss rate can be obtained by calculation according to the packet sequence of an RTP packet, the jitter can be obtained by calculation according to the packet sending timestamp and the packet receiving time of the RTP packet, and the RTT duration is obtained by the round trip time of the packet. And after the required network performance parameters are obtained every period T, calculating the conditional probability of different network bandwidth intervals under the network condition, and obtaining the conditional distribution of the code rate. As shown in equation (1):
Φ(b,t)=P(B<b,t)=P{B<b|J(t),RTT(t),L(t)} (1)
it represents the conditional probability of the current network bandwidth B, small fish B (unit kps), j (t) represents jitter, RTT (t) represents RTT duration, and l (t) is packet loss rate.
In this example, three code rates of high, medium and low are assumed: rh,Rm,RlDifferent code rate transmission needs to provide different network bandwidths, so thatThe network bandwidth is divided into different intervals according to different code rates, as shown in formula (2):
Rl:(-∞,b1];Rm:(b1,b2];Rh:(b2,+∞) (2)
the conditional probabilities for different bandwidth intervals can thus be expressed as follows:
(-∞,b1]:Φ(b1,t)=P(B<b1,t)
(b1,b2]:Φ(b2,t)-Φ(b1,t)=P(b1<B<b2,t)=P(B<b2,t)-P(B<b1,t)
(b2,+∞):1-Φ(b2,t)=1-P(B<b2,t)
wherein, b1<b2。
The conditional probability is as described in step S2 above, and is not described here in detail.
Recording the code rate of the current period as RpIf the network bandwidth estimation interval of the current period is (b)1,b2]Then there is Rp=Rm. When the code rate which needs to be modified by the other party in the next period is judged, the following steps are followed:
the method comprises the following steps: calculating the ratio of the conditional probability of the current network bandwidth interval to the conditional probability of the non-current network bandwidth interval, and expressing by k:
step two: calculating k1,k2Maximum value k ofmax;
Step three: if k ismax=k1Then, it represents the current code rate RpMay want to switch to RlIf the k is equal to the threshold, the threshold needs to be determined, and different thresholds can be set for switching between different code ratesmax>The switch _ threshold needs to be switched to the corresponding code rate.
Example 2
Fig. 3 is a block diagram of a dynamic bitrate adjustment apparatus according to the present invention. In order to implement the above method for adjusting dynamic code rate, the present invention further provides a device 1 for adjusting dynamic code rate for streaming media transmission, which includes a partitioning module 11, a calculating module 12, and a switching module 13.
The dividing module 11 is configured to divide the code rate into a plurality of corresponding network bandwidth intervals according to different code rates.
Specifically, in the dividing module, the code rates are respectively from low to high: r1、R2、…RnThe corresponding network bandwidth intervals are respectively: (-infinity, b)1),(b1,b2),…(bn,+∞)。
The calculating module 12 is configured to calculate a conditional probability of a bandwidth interval to which a current period code rate belongs, and calculate a ratio of the conditional probability to a non-current bandwidth interval.
Specifically, in the calculating module, the conditional probabilities of the bandwidth intervals to which different code rates belong are calculated as follows:
(-∞,b1]:Φ(b1,t)=P(B<b1,t);
(b1,b2]:Φ(b2,t)-Φ(b1,t)=P(b1<B<b2,t)=P(B<b2,t)-P(B<b1,t);
…
(bn,+∞):1-Φ(bn,t)=1-P(B<bn,t);
p { J (t), RTT (t), L (t) } is the probability of the current network performance parameter,
p { J (t), RTT (t), L (t) | B < B } is the conditional probability of a network performance parameter given network bandwidth requirements,
p { B < B } represents the probability that bandwidth B is less than B;
j (t) represents jitter, RTT (t) represents RTT duration, and l (t) represents packet loss rate;
and P { J (t), RTT (t), L (t) } is obtained by calculation according to respective prior distribution.
When P { J < J (t) | B < B } is calculated, it is specifically:
the JITTER value JITTER satisfying a certain bandwidth interval is regarded as a random variable, x1,x2,…xnIs the observed value of the sample of the random variable, and the observed value is sorted from big to small and is x after being sorted1,x2,…xnIs provided with kiIs less than xi+1The cumulative frequency of occurrence of the sample values, n being the sample capacity, the sample cumulative frequency distribution function can be obtained:
the cumulative distribution function can be used as the estimation of the prior distribution of the jitter value meeting a certain bandwidth interval, and P { J < J (t) | B < B } can be calculated according to the estimated prior distribution and the J (t) of the current period;
when P { RTT < RTT (t) | B < B } is calculated, the following is specifically performed:
regarding the time length RTT satisfying a certain bandwidth interval as a random variable, x1,x2,…xnIs the observed value of the sample of the random variable, and the observed value is sorted from big to small and is x after being sorted1,x2,…xnIs provided with kiIs less than xi+1The cumulative frequency of occurrence of the sample values, n being the sample capacity, the sample cumulative frequency distribution function can be obtained:
the cumulative distribution function can be used as the estimation of the prior distribution of the jitter value meeting a certain bandwidth interval, and P { RTT < RTT (t) | B < B } can be calculated according to the estimated prior distribution and the RTT (t) of the current period;
when P { L < L (t) | B < B } is calculated, it is specifically:
the packet loss rate L meeting a certain bandwidth interval is regarded as a random variable x1,x2,…xnIs the observed value of the sample of the random variable, and the observed value is sorted from big to small and is x after being sorted1,x2,…xnIs provided with kiIs less than xi+1The cumulative frequency of occurrence of the sample values, n being the sample capacity, the sample cumulative frequency distribution function can be obtained:
the cumulative distribution function can be used as an estimation of the prior distribution of the jitter values satisfying a certain bandwidth interval, and P { L < L (t) | B < B } can be calculated according to the estimated prior distribution and L (t) of the current period.
The switching module 13 is configured to obtain a maximum conditional probability ratio and compare the maximum conditional probability ratio with a set threshold; if the bandwidth is larger than the set threshold, switching to the code rate corresponding to the bandwidth interval; if not, no switching is performed.
The working principle and process of the dynamic rate adjustment apparatus in this embodiment 2 are the same as those in embodiment 1, and therefore are not described in detail.
Example 3
In this embodiment, the dynamic rate adjustment device in embodiment 2 is applied to the existing streaming media transmission system to solve the defect of the prior art in the transmission process. Fig. 4 is a block diagram of a streaming media transmission system according to the present invention. The invention also provides a streaming media transmission system, which comprises a first client terminal 2 and a second client terminal 3.
The first client 2 comprises a first network downlink quality evaluation module 21, a first client network control interaction module 22, a first calculation parameter module 23 and a first network transceiver module 24; the first client network control interaction module 22 includes the dynamic rate adjustment apparatus 1 suitable for streaming media transmission as described in embodiment 2.
The second client 3 includes a second network downlink quality evaluation module 31, a second client network control interaction module 32, a second parameter calculation module 33, and a second network transceiver module 34. The second client network control interaction module 32 includes the dynamic rate adjustment apparatus 1 suitable for streaming media transmission as described in embodiment 2.
The dynamic rate adjustment apparatus used in this embodiment 3 is the same as that in embodiment 2, and therefore is not described in detail. The following briefly introduces the data transmission process of the first client and the second client in this embodiment 3:
when the first client 2 receives data from the second client 3, the first network downlink evaluation module 21 evaluates the current network downlink quality to obtain the required network performance parameters, and the first client network interaction control module 22 obtains the current code rate of the second client 3 and feeds back the code rate to be modified to the second client. Obtaining the current code rate of the opposite side according to the current network performance parameters of the current downlink network, and calculating to obtain the code rate which the opposite side should modify; and the second client receives and analyzes the code rate which needs to be modified by the first client, judges whether the code rate is consistent with the current actual code rate, and modifies the code rate if the code rate is not consistent with the current actual code rate.
Similarly, when the second client 3 receives data from the first client, the downlink quality of the current network is evaluated by the downlink evaluation module 31 of the second network to obtain the required network performance parameters, and the current code rate of the first client 2 is obtained by the network interaction control module 32 of the second client and the code rate to be modified is fed back to the first client; obtaining the current code rate of the opposite side according to the current network performance parameters of the current downlink network, and calculating to obtain the code rate which the opposite side should modify; and the first client receives and analyzes the code rate which needs to be modified by the second client, judges whether the code rate is consistent with the current actual code rate, and modifies the code rate if the code rate is not consistent with the current actual code rate.
Further, the first client network interaction control module 22 sends the code rate to be modified to the second client 3 through an end-to-end transparent transmission protocol, where the transparent transmission protocol is sent once every 1/3T duration.
The second client network interaction control module 32 sends the code rate to be modified to the first client 2 through an end-to-end transparent transmission protocol, where the transparent transmission protocol is sent once every 1/3T.
Compared with the prior art, the dynamic code rate adjusting method provided by the invention is a real-time streaming media transmission mechanism capable of adapting to the network condition, and the network performance evaluation and code rate adjusting strategies are two important modules for dynamic code rate adjustment, and the performance of the two important modules directly influences the effect of dynamic code rate adjustment.
Meanwhile, the invention is simple to realize, does not need a server to participate, has wide applicability and can effectively ensure the instant communication quality under different network transmission environments.
The above embodiments are preferred embodiments of the present invention, but the present invention is not limited to the above embodiments, and any other changes, modifications, substitutions, combinations, and simplifications which do not depart from the spirit and principle of the present invention should be construed as equivalents thereof, and all such changes, modifications, substitutions, combinations, and simplifications are intended to be included in the scope of the present invention.
Claims (5)
1. A dynamic code rate adjusting method for streaming media transmission is characterized in that: the method comprises the following steps:
s1: dividing the code rate into a plurality of corresponding network bandwidth intervals according to different code rates; wherein, the code rates are respectively from low to high: r1、R2、…RnThe corresponding network bandwidth intervals are respectively: (-infinity, b)1),(b1,b2),…(bn,+∞);
S2: calculating the conditional probability of the bandwidth interval to which the current period code rate belongs, and respectively calculating the ratio of the conditional probability of the bandwidth interval to which the current period code rate belongs to the conditional probability of the bandwidth interval to the non-current bandwidth interval; the conditional probabilities of the bandwidth intervals to which different code rates belong are respectively as follows:
(bn,+∞):1-Φ(bn,t)=1-P(B<bn,t)=1-P{B<bn|J(t),RTT(t),L(t)};
p { J (t), RTT (t), L (t) } is the probability of the current network performance parameter,
p { B < B | J (t), RTT (t), L (t) } is the probability that the network bandwidth B is less than B under the given network performance parameters;
p { J (t), RTT (t), L (t) | B < B } is the conditional probability of a network performance parameter given network bandwidth requirements,
p { B < B } represents the probability that bandwidth B is less than B;
j (t) represents jitter, RTT (t) represents RTT duration, and l (t) represents packet loss rate;
the P { J (t), RTT (t), L (t) } is obtained by calculation according to respective prior distribution;
s3: obtaining the maximum conditional probability ratio and comparing the maximum conditional probability ratio with a set threshold; if the bandwidth is larger than the set threshold, switching to the code rate corresponding to the bandwidth interval; if not, no switching is performed.
2. The method for dynamic rate adjustment for streaming media transmission according to claim 1, wherein: when P { J < J (t) | B < B } is calculated, it is specifically:
the JITTER value JITTER satisfying a certain bandwidth interval is regarded as a random variable, x1,x2,…xnIs the observed value of the sample of the random variable, and the observed value is sorted from big to small and is x after being sorted1,x2,…xnIs provided with kiIs less than xi+1The cumulative frequency of occurrence of the sample values, n being the sample capacity, the sample cumulative frequency distribution function can be obtained:
the accumulated frequency distribution function can be used as the estimation of the prior distribution of the jitter value meeting a certain bandwidth interval, and P { J < J (t) | B < B } can be calculated according to the estimated prior distribution and J (t) of the current period;
when P { RTT < RTT (t) | B < B } is calculated, the following is specifically performed:
regarding the time length RTT satisfying a certain bandwidth interval as a random variable, x1,x2,…xnIs the observed value of the sample of the random variable, and the observed value is sorted from big to small and is x after being sorted1,x2,…xnIs provided with kiIs less than xi+1The cumulative frequency of occurrence of the sample values, n being the sample capacity, the sample cumulative frequency distribution function can be obtained:
the cumulative frequency distribution function can be used as the estimation of the prior distribution of the jitter value meeting a certain bandwidth interval, and P { RTT < RTT (t) | B < B } can be calculated according to the estimated prior distribution and the RTT (t) of the current period;
when P { L < L (t) | B < B } is calculated, it is specifically:
the packet loss rate L meeting a certain bandwidth interval is regarded as a random variable x1,x2,…xnIs the observed value of the sample of the random variable, and the observed value is sorted from big to small and is x after being sorted1,x2,…xnIs provided with kiIs less than xi+1The cumulative frequency of occurrence of the sample values, n being the sample capacity, the sample cumulative frequency distribution function can be obtained:
the cumulative frequency distribution function can be used as an estimation of prior distribution of jitter values satisfying a certain bandwidth interval, and P { L < L (t) | B < B } can be calculated according to the estimated prior distribution and L (t) of the current period.
3. A dynamic code rate adjusting device for streaming media transmission is characterized in that: comprises that
The dividing module is used for dividing the code rate into a plurality of corresponding network bandwidth intervals according to different code rates; in the dividing module, the code rates are respectively from low to high: r1、R2、…RnThe corresponding network bandwidth intervals are respectively: (-infinity, b)1),(b1,b2),…(bn,+∞);
The calculation module is used for calculating the conditional probability of the bandwidth interval to which the current period code rate belongs and respectively calculating the ratio of the conditional probability of the bandwidth interval to which the current period code rate belongs to the conditional probability of the bandwidth interval to the non-current bandwidth interval; the conditional probabilities of the bandwidth intervals to which different code rates belong are respectively as follows:
(bn,+∞):1-Φ(bn,t)=1-P(B<bn,t)=1-P{B<bn|J(t),RTT(t),L(t)};
p { J (t), RTT (t), L (t) } is the probability of the current network performance parameter,
p { B < B | J (t), RTT (t), L (t) } is the probability that the network bandwidth B is less than B under the given network performance parameters;
p { J (t), RTT (t), L (t) | B < B } is the conditional probability of a network performance parameter given network bandwidth requirements,
p { B < B } represents the probability that bandwidth B is less than B;
j (t) represents jitter, RTT (t) represents RTT duration, and l (t) represents packet loss rate;
the P { J (t), RTT (t), L (t) } is obtained by calculation according to respective prior distribution;
the switching module is used for acquiring the maximum conditional probability ratio and comparing the maximum conditional probability ratio with a set threshold; if the bandwidth is larger than the set threshold, switching to the code rate corresponding to the bandwidth interval; if not, no switching is performed.
4. The dynamic rate adjustment device for streaming media according to claim 3, wherein: when P { J < J (t) | B < B } is calculated, it is specifically:
the JITTER value JITTER satisfying a certain bandwidth interval is regarded as a random variable, x1,x2,…xnIs the observed value of the sample of the random variable, and the observed value is sorted from big to small and is x after being sorted1,x2,…xnIs provided with kiIs less than xi+1The cumulative frequency of occurrence of the sample values, n being the sample capacity, the sample cumulative frequency distribution function can be obtained:
the accumulated frequency distribution function can be used as the estimation of the prior distribution of the jitter value meeting a certain bandwidth interval, and P { J < J (t) | B < B } can be calculated according to the estimated prior distribution and J (t) of the current period;
when P { RTT < RTT (t) | B < B } is calculated, the following is specifically performed:
regarding the time length RTT satisfying a certain bandwidth interval as a random variable, x1,x2,…xnIs the observed value of the sample of the random variable, and the observed value is sorted from big to small and is x after being sorted1,x2,…xnIs provided with kiIs less than xi+1The cumulative frequency of occurrence of the sample values, n being the sample capacity, the sample cumulative frequency distribution function can be obtained:
the cumulative frequency distribution function can be used as the estimation of the prior distribution of the jitter value meeting a certain bandwidth interval, and P { RTT < RTT (t) | B < B } can be calculated according to the estimated prior distribution and the RTT (t) of the current period;
when P { L < L (t) | B < B } is calculated, it is specifically:
the packet loss rate L meeting a certain bandwidth interval is regarded as a random variable x1,x2,…xnIs the observed value of the sample of the random variable, and the observed value is sorted from big to small and is x after being sorted1,x2,…xnIs provided with kiIs less than xi+1The cumulative frequency of occurrence of the sample values, n being the sample capacity, the sample cumulative frequency distribution function can be obtained:
the cumulative frequency distribution function can be used as an estimation of prior distribution of jitter values satisfying a certain bandwidth interval, and P { L < L (t) | B < B } can be calculated according to the estimated prior distribution and L (t) of the current period.
5. A streaming media transmission system, characterized by: the system comprises a first client and a second client;
the first client comprises a first network downlink quality evaluation module, a first client network control interaction module, a first calculation parameter module and a first network transceiver module; the first client network control interaction module comprises a dynamic code rate adjusting device for streaming media transmission according to any one of claims 3 to 4;
the second client comprises a second network downlink quality evaluation module, a second client network control interaction module, a second calculation parameter module and a second network transceiver module; the second client network control interaction module comprises a dynamic rate adjustment device for streaming media transmission according to any one of claims 3 to 4;
when a first client receives data from a second client, the downlink quality of the current network is evaluated through the first network downlink quality evaluation module to obtain required network performance parameters, and the current code rate of the second client is obtained through the first client network interaction control module and the code rate which should be modified is fed back to the second client; obtaining the current code rate of the opposite side according to the current network performance parameters of the current downlink network, and calculating to obtain the code rate which the opposite side should modify; the second client receives and analyzes the code rate which needs to be modified by the first client, judges whether the code rate is consistent with the current actual code rate, and modifies the code rate if the code rate is not consistent with the current actual code rate;
when the second client receives data from the first client, the downlink quality of the current network is evaluated through the downlink quality evaluation module of the second network to obtain required network performance parameters, and the current code rate of the first client is obtained through the network interaction control module of the second client and the code rate which should be modified is fed back to the first client; obtaining the current code rate of the opposite side according to the current network performance parameters of the current downlink network, and calculating to obtain the code rate which the opposite side should modify; and the first client receives and analyzes the code rate which needs to be modified by the second client, judges whether the code rate is consistent with the current actual code rate, and modifies the code rate if the code rate is not consistent with the current actual code rate.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710718172.6A CN107483990B (en) | 2017-08-21 | 2017-08-21 | Dynamic code rate adjusting method and device for streaming media transmission and transmission system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710718172.6A CN107483990B (en) | 2017-08-21 | 2017-08-21 | Dynamic code rate adjusting method and device for streaming media transmission and transmission system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107483990A CN107483990A (en) | 2017-12-15 |
CN107483990B true CN107483990B (en) | 2020-04-14 |
Family
ID=60602014
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710718172.6A Active CN107483990B (en) | 2017-08-21 | 2017-08-21 | Dynamic code rate adjusting method and device for streaming media transmission and transmission system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107483990B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111953622B (en) * | 2020-08-13 | 2023-08-18 | 西安微嗨互动信息科技有限公司 | Dynamic code rate intelligent scheduling system for improving network bandwidth utilization rate |
CN112165636B (en) * | 2020-09-10 | 2021-12-14 | 东北大学 | D2D network multimedia stream code rate adjusting method and multimedia stream real-time transmission system |
CN112565247B (en) * | 2020-12-03 | 2022-02-11 | 东北大学 | IPv 6-based mobile terminal real-time multimedia data stream transmission system and method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0814585A2 (en) * | 1996-06-20 | 1997-12-29 | International Business Machines Corporation | Dynamic bandwidth estimation and adaptation in high speed packet switching networks |
CN103596231A (en) * | 2013-06-20 | 2014-02-19 | 北京邮电大学 | Vertical switching method and vertical switching device |
CN106850277A (en) * | 2017-01-13 | 2017-06-13 | 北京粉笔蓝天科技有限公司 | A kind of direct broadcast server changing method, system and client |
-
2017
- 2017-08-21 CN CN201710718172.6A patent/CN107483990B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0814585A2 (en) * | 1996-06-20 | 1997-12-29 | International Business Machines Corporation | Dynamic bandwidth estimation and adaptation in high speed packet switching networks |
CN103596231A (en) * | 2013-06-20 | 2014-02-19 | 北京邮电大学 | Vertical switching method and vertical switching device |
CN106850277A (en) * | 2017-01-13 | 2017-06-13 | 北京粉笔蓝天科技有限公司 | A kind of direct broadcast server changing method, system and client |
Also Published As
Publication number | Publication date |
---|---|
CN107483990A (en) | 2017-12-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11349900B2 (en) | Voice encoding and sending method and apparatus | |
CN101621351B (en) | Method, device and system for adjusting multimedia encoding rate | |
EP2432175B1 (en) | Method, device and system for self-adaptively adjusting data transmission rate | |
CN103944834B (en) | Audio and video transmission control method and system | |
CN105357592A (en) | Selective frame dropping method for streaming media adaptive transmission | |
JP2006217589A (en) | Video conferencing apparatus, apparatus, video conferencing system, method and device readable medium or waveform comprising instruction program adapted to execute the method | |
US9838209B2 (en) | Method for subscribing to streams from multicast clients | |
EP3103220A1 (en) | System and method for dynamic effective rate estimation for real-time video traffic | |
CN107483990B (en) | Dynamic code rate adjusting method and device for streaming media transmission and transmission system | |
CN111741249B (en) | Network congestion detection method and device | |
CN110996103A (en) | Method for adjusting video coding rate according to network condition | |
CN111741248B (en) | Data transmission method, device, terminal equipment and storage medium | |
CN107809648B (en) | Platform-level video stream self-adaptive smooth playing method and system based on bandwidth detection | |
CN110191060A (en) | A kind of adjustment data packet sends method, apparatus, equipment and the system of code rate | |
CN113891172B (en) | Adaptive code rate control method based on RTT (round trip time) and suitable for wireless Mesh network | |
Gokhale et al. | Opportunistic adaptive haptic sampling on forward channel in telehaptic communication | |
Nihei et al. | QoE maximizing bitrate control for live video streaming on a mobile uplink | |
CN104506453B (en) | A kind of code rate allocation method of user oriented Quality of experience | |
Yan et al. | An analytical model for streaming over TCP | |
Jung et al. | Resource-aware and quality-fair video-streaming using multiple adaptive TCP connections | |
Wakamiya et al. | TCP-friendly video transfer | |
WO2006135250A2 (en) | Method for down-speeding in an ip communication network | |
Jammeh et al. | Rate-adaptive video streaming through packet dispersion feedback | |
Khorov et al. | SAND-inspired Cross-layer Approach for CCTV in 5G Networks | |
Yang et al. | Video transmission control for networked vision system based on RTCP |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |