WO2009106015A1 - Dynamic bit rate allocation method, packet-domain streaming media server - Google Patents
Dynamic bit rate allocation method, packet-domain streaming media server Download PDFInfo
- Publication number
- WO2009106015A1 WO2009106015A1 PCT/CN2009/070584 CN2009070584W WO2009106015A1 WO 2009106015 A1 WO2009106015 A1 WO 2009106015A1 CN 2009070584 W CN2009070584 W CN 2009070584W WO 2009106015 A1 WO2009106015 A1 WO 2009106015A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- trip time
- rate
- packet
- round
- switching
- Prior art date
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/80—Responding to QoS
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0896—Bandwidth or capacity management, i.e. automatically increasing or decreasing capacities
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/60—Network streaming of media packets
- H04L65/75—Media network packet handling
- H04L65/756—Media network packet handling adapting media to device capabilities
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/60—Network streaming of media packets
- H04L65/61—Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio
- H04L65/612—Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio for unicast
Definitions
- the present invention relates to the field of communications technologies, and in particular, to a Dynamic Bandwidth Allocation (DBA) method and a packet domain streaming media server.
- DBA Dynamic Bandwidth Allocation
- Streaming media is a technology that compresses video and audio information and provides it to users for viewing in the form of media streams.
- Streaming media services in the field of mobile communications are called mobile streaming media, and mobile streaming media is common.
- the end-to-end networking structure includes: a User Equipment (UE) located in a packet domain, a Radio Network Controller (RNC) 102, and a General Packet Radio Service Support Node (GGSN).
- Gateway GPRS Support Node 103 Gateway GPRS Support Node 103; a packet-switched streaming server (PSS) 104 and a portal 105 located in an Internet Protocol (IP) network.
- IP Internet Protocol
- the UE 101 is controlled by the RNC 102, and allocates radio resources through the RNC 102, including the quality of service (QoS) of the wireless connection, accesses the IP network through the GGSN 103, and connects to the server PSS 104 that provides the mobile streaming service through the Internet (Internet), showing the mobile Streaming service server Portall05.
- QoS quality of service
- Video on Demand (VOD, Video On Demand) and Live TV (Live TV) are two of the more common mobile streaming services.
- the PSS 104 pushes the media stream to the client at a specified bit rate, ie UE10K in an ideal situation, UE
- the receiving and processing capabilities are consistent with the bit rate of the PSS sending streaming media to achieve optimal playback.
- the receiving capability of the UE is determined by the bandwidth of the UE. Generally, due to the mobility of the UE, the bandwidth of the UE is often fluctuated. Therefore, the quality of the UE may be good or bad when playing the streaming media service.
- DBA technology is proposed, which assigns different code rates according to the bandwidth that the client can support.
- the more common DBA technology is to use the packet loss rate to determine whether to change the code rate and how to change the code rate.
- the technical problem to be solved by the embodiments of the present invention is to provide a dynamic rate allocation method and a packet domain streaming media server, so that the playback of the mobile streaming media is smoother when switching.
- an aspect of an embodiment of the present invention provides a dynamic rate allocation method, including:
- the code rate is switched; and the media data after the switching code rate is sent.
- a packet domain streaming server including:
- a unit for transmitting media data after switching the code rate is
- a packet domain streaming server including:
- a round-trip time obtaining unit configured to obtain a round-trip time of the sender report packet
- a first round-trip time determining unit configured to determine whether the round-trip time meets a predetermined condition
- a first switching unit configured to perform a code rate switching when the round-trip time satisfies a predetermined condition
- a sending unit configured to send a switching code rate After the media data.
- the round-trip time of the sender report packet is used to determine the switching timing, thereby avoiding the use of the packet loss rate for judging, and when the data is lost, the undercut is performed, resulting in the mosaic. phenomenon.
- a packet domain streaming server including:
- a bandwidth determining unit configured to determine, according to a change in bandwidth of the user equipment, whether the code rate needs to be adjusted
- a second complete frame determining unit configured to determine whether the current transmission frame is a complete frame
- the second switching unit is configured to: when the code rate needs to be adjusted, and the current transmission frame is a complete frame, perform rate switching, and send the media data after the switching rate.
- the embodiment of the present invention selects an I frame for switching during handover, quality problems such as unsmooth playback or mosaic caused by switching in a B frame or a P frame are avoided.
- DRAWINGS 1 is a schematic diagram of an end-to-end networking structure of a mobile streaming media in the prior art; a schematic diagram of an input embodiment; a wide variation curve, a PSS packet rate change curve, an RNC buffer data change curve, and a UE buffer data change curve;
- FIG. 4 is a structural diagram of an embodiment of a packet domain streaming media server according to an embodiment of the present invention.
- FIG. 5 is a structural diagram of another embodiment of a packet domain streaming server according to an embodiment of the present invention.
- the embodiment of the invention provides a dynamic rate allocation method and a packet domain streaming media server, which can effectively improve the playback quality of the mobile streaming media service.
- the packet loss rate is used as the basis for adjusting the code rate.
- the handover is performed.
- the handover is lagging behind, and the playback quality is often poor and has been adjusted for a while.
- the code rate needs to be adjusted downward, that is, the code rate is cut
- the code rate is lowered when the packet loss rate reaches a certain level, indicating that the bandwidth of the UE side is lower than the code rate and the packet loss occurs for a period of time.
- the media server only noticed that the bit rate was cut.
- the feeling for the user was that the picture returned to normal after a period of mosaic, and the experience brought to the user was very poor.
- the dynamic rate allocation method provided by the present invention includes:
- the code rate is switched; and the media data after the switching code rate is sent.
- RTSP Real Time Streaming Protocol
- RTP Real Time Transport Protocol
- RTCP Real Time Control Protocol
- RTSP is used to establish and control the time synchronization stream of continuous media.
- RTSP is a text protocol and is similar to the Hypertext Transfer Protocol (HTTP).
- HTTP Hypertext Transfer Protocol
- RTSP is a standard streaming protocol and usually uses an independent transport protocol such as RTP to transmit media data.
- RTP is used to provide time information and to synchronize audio/video streams.
- RTP does not process resource reservations and does not guarantee the quality of service for real-time services.
- the main function of RTCP is to provide feedback on the transmission of data.
- the RTCP sender report (SR, Sender Report) packet is sent at regular intervals to perform statistics on the sender data transmission.
- the receiving end periodically sends a message receiver (RR, Receiver Report) packet to the sender.
- the PSS When sending an SR packet, the PSS adds the timestamp of the transmission time to record the time when the SR packet is sent.
- the UE receives the SR packet, it does not immediately return the RR packet. Usually, it waits for a period of time. After processing, the RR packet is sent again.
- the UE sends the RR packet, the UE records the time (LSR, Last SR) of the last received SR packet sent from the PSS in the RR packet, that is, the SR recorded in the SR packet.
- the packet transmission time also records in the RR how long the UE waits for the SR packet to be sent after receiving the SR packet, that is, the delay of receiving the SR packet to the transmission time (DLSR, delay since last SR).
- the PSS after receiving the RR packet, the PSS reads the LSR and the DLSR, calculates the RTT, and determines whether the code rate needs to be switched through the RTT.
- Both LSR and DLSR can be read directly from the corresponding fields of the standard RTCP RR packet.
- the first embodiment of the dynamic rate allocation method provided by the embodiment of the present invention can be divided into two steps: an RTCP analysis phase and a bandwidth adjustment.
- the reported RTCP packet is analyzed in the RTCP analysis phase to calculate the RTT.
- RTTi Ai - LSRi - DLSRi; i indicates that the i-pack RR packet is received.
- RTT RTT range
- RTTmax the maximum value of the RTT range
- RTTmin the minimum value
- RTTi > RTTmax and RTTi > RTTi-1 it indicates that the SR packet has serious delay and becomes more and more serious.
- the media stream is adjusted to the low code rate, that is, the undercut is performed.
- n times RTTi > RTTmax means that RTT exceeds the upper limit for consecutive n time periods, and the delay is more serious.
- RTTi > RTTi-1 indicates that the RTT of this time period is greater than the RTT of the previous time period. The reason why this condition needs to be increased is because when the RTTi > RTTmax is continuously n times, the RTT is adjusted to the low bit rate media stream. It can't return to less than RTTmax in a short time.
- RTTi is still greater than or equal to RTTmax. If RTTi > RTTi-1 is not added, the system may continue to perform unnecessary switching. Therefore, after judging the continuous n times RTTi > RTTmax, it is necessary to determine whether RTTi is greater than RTTi-1. If the undercut operation adjusted to the low bit rate media stream has started, then RTTi will be less than RTTi-1, and no undercut is required. If the result is that RTTi is greater than RTTi-1, it indicates that the SR packet has a serious delay and is getting more and more serious. It needs to be adjusted to the low-rate media stream.
- n is to prevent the value set by the normal jitter of the network. It can be configured according to the actual situation. It can be one time or multiple times. When the value of n is greater than "1", it will not occur when RTTi > RTTmax Immediately adjust to low bit rate media streams to prevent the effects of normal jitter on the network.
- RTTi ⁇ RTTmin is continuous for m times, it indicates that the network is in a smooth state for a long time. At this time, the media stream is adjusted to the high code rate, that is, the upper cut is performed.
- m is the value set to prevent the normal jitter of the network, and can be configured according to the actual situation, either once or multiple times; when the value of m is greater than "1", it will not occur when RTT RTTmin occurs.
- m is the value set to prevent the normal jitter of the network, and can be configured according to the actual situation, either once or multiple times; when the value of m is greater than "1", it will not occur when RTT RTTmin occurs.
- RTTmin ⁇ RTTi ⁇ RTTmax it indicates that the network is in a normal state. At this time, the current code rate state is maintained.
- the value of ⁇ is greater than "1"
- the number of RTTi > RTTmax is less than n times, which can be considered as a network.
- the normal jitter can also maintain the current bit rate state; when the value of m is greater than "1”, the number of RTTi ⁇ RTTmin is less than n times, which can also be considered as the normal jitter of the network, and can also maintain the current bit rate state.
- n In actual use, the value of n needs to consider the buffer size of the RNC and the UE. After the continuous RTTi > RTTmax, the RNC and the UE buffer can save all the data that cannot be sent, usually continuous.
- the time taken for n times RTTi > RTTmax can be 2 or 3 RTCP packet transmission/reception cycles.
- the data of the mobile streaming media generally includes three data frames: an I frame, a P frame, and a B frame.
- the I frame is a frame completely encoded by the entire picture, and is also called an internal frame, a complete frame, and a key frame. I frames can be decoded independently.
- the I frame can also provide a reference for the decoding of the associated P frame and B frame.
- a P frame is a frame that encodes a difference from the previous frame. Only the difference data with the previous frame is recorded, and the display cannot be decoded independently. It must be decoded before the I frame it refers to.
- a B frame is a frame that encodes a difference from a previous frame and a subsequent I frame.
- the B frame cannot be decoded independently, and must be decoded when the I frame it refers to is received in advance.
- the subsequent I frame referenced by the B frame will not be received.
- quality problems such as unsmooth playback or mosaic will occur.
- the P frame that is encoded after the handover is used for encoding, and the P frame after the handover is different from the previous I frame, and may not be able to refer to the previous frame.
- An I frame decodes the complete image, and at the same time there will be quality problems such as unsmooth playback or mosaic.
- the prior art only considers switching when the packet loss rate reaches a certain level, and it is very common to switch between B frames or P frames. Therefore, quality problems such as unsmooth playback or mosaic due to switching often occur.
- a technical solution for switching in an I frame is given. After determining that the frame to be transmitted is an I frame after determining that the handover is required according to the RTT size, Switching, since the I frame is a completely encoded frame of the entire picture, it can be decoded and displayed independently. Do not refer to the data before and after, so there is no problem that the complete image cannot be produced, and the switching between B frames or P frames is avoided. Play quality problems such as smooth or mosaic.
- the two forms of switching are mentioned above: upper and lower cuts.
- the bit rate is cut upwards, and the high-rate media stream is adjusted to indicate that the UE bandwidth is much larger than the current code rate and the upper code rate is required.
- the code rate is cut down, and the adjustment to the low bit rate media stream indicates that the UE bandwidth cannot meet the current code rate requirement, resulting in a down code rate, which is complicated.
- the code rate undercut method given in Embodiment 1 of the dynamic rate allocation method provided by the embodiment is as follows:
- the RNC sets a buffer for each UE, and the buffer size is preferably a program that can store the maximum buffer data that may appear in the RNC, in each case.
- the maximum buffer data that may appear in the RNC actually relates to the transmission period of the RTCP packet, and the above mentioned n, that is, the maximum data that the RNC may buffer after consecutive n times of RTTi > RTTmax.
- n that is, the maximum data that the RNC may buffer after consecutive n times of RTTi > RTTmax.
- the time it takes to transmit a packet is considered to be very short. Under normal circumstances, it will not exceed the second level, but in the case of a network failure, the packet will be stuffed into the buffer.
- a buffer is also required on the UE to buffer media data, and the size of the buffer also needs to be able to store the UE.
- the maximum buffered data that may appear in practice.
- the PSS switches from a high code rate to a low code rate
- the SR packet has a serious delay and becomes more and more serious.
- the buffer of the RNC has accumulated a large amount of data, and the bandwidth of the UE has dropped to a short time. The above accumulated data is transmitted to the UE. If the UE does not have a buffer or the buffer is relatively small, it will definitely cause the UE to play unsmoothly or even mosaic due to the inability to obtain the media data to be played in time.
- FIG. 2 a schematic diagram of the data transmission embodiment when performing the undercut is shown in FIG. 2:
- the vertical axis of the coordinate indicates the size of the buffer.
- the unit is Kbit.
- the PSS has just switched from 384Kbit to 128Kbit.
- the media rate of the RNC is 128Kbit.
- the receiving rate is
- the received media data is buffered in the RNC buffer.
- the media data rate of the UE buffer buffer is still 384Kbit, and the rate of transmitting media data to the player is still
- the UE bandwidth has dropped to 150 Kbit/s, and the rate of data transmission between the RNC buffer and the UE buffer is 150 Kbit/s.
- the RNC buffers 3840Kbit of data, that is, buffers the data rate of 384Kbit for 10 seconds. This time is the time for the PSS to detect the RTT abnormality and the next code rate, that is, after n consecutive RTTi > RTTmax Cached data.
- the UE buffers 1536Kbit data, that is, the buffer rate is 4 seconds.
- the bandwidth of the UE side has been reduced to 150 Kbit/s, and the code rate of the PSS is cut to 128 Kbit/s.
- the data rate of the RNC buffer buffer is still 384Kbit.
- the UE buffer and RNC buffer size are configured to a ratio according to the bit rate level that the PSS can support and the bandwidth level supported by the RAN network.
- the PSS is switched from a high code rate to a low code rate, that is, when the undercut is performed, the UE bandwidth change curve, the PSS packet rate change curve, the RNC buffer data change curve, and the UE buffer data change curve are shown in FIG. :
- Curve 1 is a curve indicating the change of UE bandwidth
- curve 2 is a curve indicating the change of PSS packet rate.
- the coordinate system is located, the horizontal axis is the time axis, the unit is seconds, and the vertical axis is the bandwidth/code rate, and the unit is Kbit/S.
- UEBWup indicates a relatively high bandwidth of the UE before the bandwidth is dropped, UEBWup may also be referred to as a high bandwidth of the UE;
- PSSBWup indicates a code rate corresponding to the PSS and the UEBWup, that is, a higher code rate matching the high bandwidth of the UE.
- PSSBWup may also be referred to as a high code rate;
- UEBWlow indicates a relatively low bandwidth of the UE after the bandwidth is dropped, and UEBWlow may also be referred to as a low bandwidth of the UE;
- PSSBWlow indicates the bit rate corresponding to PSS and UEBWlow, that is, the lower bit rate that matches the low bandwidth of the UE.
- PSSBWlow can also be called low bit rate.
- Curve 3 is a curve showing the RNC buffer change, its coordinate system, the horizontal axis is the time axis, the unit is seconds, the vertical axis is the RNC cache data amount;
- RNCBUFmax represents the maximum buffer capacity of the RNC, that is, the RNC buffer Maximum capacity;
- RNCRBUFmax represents the actual maximum buffered data of the RNC, that is, the maximum amount of data buffered by the RNC buffer.
- the curve 456 is a curve indicating the UE buffer change; the UEBUFmax indicates the maximum buffer capacity of the UE, that is, the maximum capacity of the UE buffer, and the UERBUFmax indicates the actual maximum buffer data of the UE, that is, the UE buffer buffer actually. The maximum amount of data.
- the time point T0 indicates the time when the UE bandwidth drops from the high bandwidth to the low bandwidth
- the time point T1 indicates
- the PSS detects that the bandwidth change of the UE actively switches the code rate from the high code rate to the low code rate.
- the time point T2' indicates the time when the RNC transmits the high code rate data, and the time point ⁇ 2 indicates that the UE plays the high code rate data.
- the buffer is also cleared.
- the time point T3 indicates the time when the buffer of the RNC is cleared. At this point, the end-to-end network is officially restored to normal.
- the PSS detects the change of the UE bandwidth and actively adjusts the code rate during this time period;
- RNC receives the low bit rate data at the speed of PSSBWlow, and transmits the high bit rate data at the speed of UEBWlow. Because UEBWlow > PSSBWlow, the buffer data of RNC is gradually reduced, and it is not high until T2' time. The rate rate output is completed;
- the UE plays the high bit rate data at the speed of PSSBWup, and receives the high bit rate data at the speed of UEBWlow. Because PSSBWup > UEBWlow, the buffered data of the UE is gradually reduced until the T2 time, the UE buffer is reduced. Is 0.
- T2 T2'
- the rate data, the curve of the UE buffer change curve is shown as curve 6 in the figure.
- T2 ⁇ T2' it indicates that the RNC clears the buffer before the RNC transmits the high bit rate data, so during the period ⁇ 2 ⁇ ⁇ 2', the high bit rate data is transmitted to the UE by the low bandwidth, and the UE The buffer is empty, and the received high bit rate data can only be played at a low bit rate. In this case, the playback is certainly not smooth, and the user experience is that the play has a pause.
- DT T1-T0. It can be seen from Figure 3 that the size of DT will affect RNCRBUFmax. The larger DT is, the larger the RNCRBUFmax is.
- the R packet of R packets is assumed to be P, and the number of consecutive RTTis is > When RTTmax is detected, the PSS detects that the UE bandwidth transmission abnormality needs to be cut.
- the relationship between DT, n, and P can be expressed as:
- the RNC buffer receives the high bit rate data at the PSSBWup speed and outputs the data to the UE at the UEBWlow speed.
- the difference between the two is multiplied by the time interval DT, which is RNCRBUFmax.
- the relationship can be expressed. For:
- RNCRBUFmax DT x (PSSBWup - UEBWlow) ( 2 )
- the data before T2 is the PSSBWup data of the bit rate, so the playback speed of the UE player is also PSSBWup, but at this time, the transmission speed of the UE has dropped to UEBWlow, so padding
- the speed of the UE buffer is UEBWlow. Therefore, the current UE actual buffer is divided by the difference between the above two speeds, that is, the time required for the UE to clear the buffer.
- the time required for the UE to clear the buffer is CTUE, and the CTUE can be expressed as :
- CUTRNC UERBUFmax / (PSSBWup - UEBWlow) (3)
- ⁇ 2 > ⁇ 2' can ensure that there is no quality problem, ie CTUE > CUTRNC, according to equation (3), formula (4) ), Available:
- UERBUFmax > RNCRBUFmax x (PSSBWup - UEBWlow ) / ( UEBWlow - PSSBWlow ) ( 5 )
- the code rate of each level such as PSSBWup, PSSBWlow, etc.
- the receiving bandwidth of the UE such as UEBWup and UEBWlow. Therefore, the dynamic code provided by the embodiment of the present invention is
- the first embodiment of the rate allocation method further provides the following solutions:
- the sizes of UERBUFmax and RNCRBUFmax are controlled so as to satisfy the relationship of equation (5), and generally the larger the UERBUFmax or the smaller the RNCRBUFmax, the better.
- n the DT is made smaller to achieve RNCRBUFmax. The purpose of reduction.
- the timing of the handover is determined according to the round trip time RTT of the SR packet, and how to switch, and when the undercut is needed, the packet loss does not wait. Switching again, avoiding quality problems such as mosaics and pauses caused by packet loss.
- the I frame is selected for switching at the time of switching, thereby avoiding quality problems such as unsmooth playback or mosaic caused by switching in the B frame or the P frame.
- the playback is not smooth, and the maximum buffered data by controlling the RNC is given.
- the UE actually buffers the largest amount of data to avoid the UE buffer area being emptied before the RNC sends the high code rate data.
- the second embodiment of the dynamic code rate allocation method provided by the embodiment of the present invention can be judged in the second embodiment of the dynamic code rate allocation method provided by the embodiment of the present invention.
- the code rate When it is judged that the code rate needs to be adjusted, it is judged whether the frame to be transmitted is an I frame, and when the current transmission frame is a complete frame, the code rate is switched. According to the change of the bandwidth of the user equipment, it is determined that the code rate needs to be adjusted, and the bandwidth change may be determined according to the round-trip time, that is, the round-trip time of the sender report packet is obtained; when the round-trip time meets the predetermined condition, it is determined that the code rate needs to be adjusted. In this case, the detailed agreement is not repeated here.
- the streaming media server analyzes the reported RTCP packets and calculates the packet loss rate.
- Ri f_lost/(Seq_numberi-Seq_numberi-l); where f_lost is the total number of RTP drops between adjacent RTCP RR fields; Seq_numberi is the i-th RTCP packet Report the received RTP packet sequence number; Seq_numberi-1 is the RTP packet sequence number reported by the i-1th RTCP packet;
- m is a predetermined value, which belongs to long time without packet loss, and chooses to adjust to high code stream.
- an I frame is selected for switching during handover, which avoids quality problems such as unsmooth playback or mosaic caused by switching in a B frame or a P frame.
- a dynamic rate allocation method includes:
- a dynamic rate allocation method includes:
- the code rate when it is determined that the code rate needs to be adjusted, when the current transmission frame is a complete frame, the code rate is switched, and the number of media after the switching code rate is transmitted.
- the above-mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
- the structure of the packet domain streaming server according to the embodiment of the present invention is as shown in FIG. 4, and includes: a round-trip time obtaining unit 410, configured to acquire a round-trip time of a sender report packet;
- the first round-trip time determining unit 420 is configured to determine whether the round-trip time meets a predetermined condition.
- the first switching unit 430 is configured to perform code rate switching when the round-trip time meets a predetermined condition, and the sending unit 440 is configured to send Switch the media data after the bit rate.
- the first complete frame determining unit 450 is configured to determine whether the current transmission frame is a complete frame. When the current transmission frame is a complete frame, the first switching unit 440 is further controlled to perform rate switching.
- the round trip time obtaining unit 410 includes:
- the sending time obtaining unit 411 is configured to acquire a sending time of the sender report packet carried in the receiver report packet.
- the delay obtaining unit 412 is configured to obtain a delay of the last received sender report packet carried in the receiver report packet to the sending time;
- the processing unit 413 is configured to obtain a round trip time of the sender report packet according to a sending time of the sender report packet carried in the receiver report packet, and a delay of receiving the sender report packet to the sending time.
- the first round trip time judging unit 420 includes:
- the upper cut determining unit 421 is configured to determine whether the round trip time is continuously less than or equal to a preset minimum round trip time minimum number of times;
- the undercut determination unit 422 is configured to determine whether the round trip time is continuously greater than or equal to the preset maximum round trip time maximum number of times, and whether the round trip time of the current time period is greater than the round trip time of the previous time period;
- the first switching unit 430 includes:
- the upper cut unit 431 is configured to adjust to the high code rate media stream when the round trip time is continuously less than or equal to the preset minimum round trip time minimum number of times.
- the undercut unit 432 is configured to adjust the round trip time to be greater than or equal to the preset round trip time maximum value by a predetermined number of times, and adjust the low round rate media stream when the round trip time of the current time period is greater than the round trip time of the previous time period .
- the bandwidth judging unit judges whether the bandwidth between the radio network controller and the user equipment decreases; and the buffer unit uses buffer buffer data preset for each user equipment when the judgment result is decreased.
- the structure of the packet domain streaming server according to the embodiment of the present invention is as shown in FIG. 5, and includes: a bandwidth determining unit 510, configured to determine, according to a bandwidth change of the user equipment, whether the code rate needs to be adjusted;
- a second complete frame determining unit 520 configured to determine whether the current transmission frame is a complete frame
- the second switching unit 530 is configured to: when the code rate needs to be adjusted, and the current transmission frame is a complete frame, The code rate is switched, and the media data after the switching code rate is transmitted.
- the bandwidth determining unit 510 includes:
- the second round-trip time determining unit 511 is configured to obtain a round-trip time of the sender report packet; when the round-trip time meets the predetermined condition, determine that the code rate needs to be adjusted;
- the packet loss rate determining unit 512 is configured to obtain a packet loss rate. When the packet loss rate meets a predetermined condition, it is determined that the code rate needs to be adjusted.
- a unit for transmitting media data after switching the code rate is
- the unit for performing rate switching according to the change of the bandwidth of the user equipment and determining that the code rate needs to be adjusted is further used to:
- rate switching is performed.
- the unit is configured to: when the bandwidth of the user equipment changes, and determine that the code rate needs to be adjusted, the unit for performing rate switching is further configured to:
- the dynamic bit rate allocation method and the packet domain streaming media server provided by the embodiments of the present invention may The timing of the handover is determined according to the round trip time RTT of the SR packet, and how to switch, or I frame is selected for switching at the time of switching, thereby improving the quality of the playback.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
A dynamic bit rate allocation method and a packet-domain streaming media server, in which the method includes that: when judging that the bit rate needs to be adjusted according to the change of the bandwidth of the user equipment, the bit rate switching is performed; sending the switched bit rate media data.
Description
动态码率分配方法、 ^且域流媒体服务器 Dynamic rate allocation method, ^ and domain streaming server
本申请要求于 2008 年 02 月 27 日提交中国专利局、 申请号为 200810005294.1、 发明名称为 "动态码率分配方法、 分组域流媒体服务器" 的 中国专利申请的优先权, 其全部内容通过引用结合在本申请中。 This application claims priority to Chinese Patent Application No. 200810005294.1, entitled "Dynamic Bit Rate Allocation Method, Packet Domain Streaming Media Server", filed on February 27, 2008, the entire contents of which are incorporated by reference. In this application.
技术领域 Technical field
本发明涉及通信技术领域, 尤其涉及一种动态码率分配(DBA, Dynamic Bandwidth Allocation )方法、 分组域流媒体服务器。 The present invention relates to the field of communications technologies, and in particular, to a Dynamic Bandwidth Allocation (DBA) method and a packet domain streaming media server.
背景技术 Background technique
流媒体是一种把影像和声音信息进行压缩处理后,以媒体流的方式提供给 用户观赏的技术,在移动通信领域进行的流媒体业务被称为移动流媒体, 常见 的进行移动流媒体的端对端组网结构如图 1所示, 包括:位于分组域的用户设 备( UE, User Equipment )101、无线网络控制器( RNC, Radio Network Controller ) 102、 网关通用分组无线业务支持节点(GGSN, Gateway GPRS Support Node ) 103; 位于网际协议 ( IP, Internet Protocol ) 网的分组域流媒体月良务器 ( PSS, Packet-switched Streaming Server ) 104、 门户 (Portal ) 105。 Streaming media is a technology that compresses video and audio information and provides it to users for viewing in the form of media streams. Streaming media services in the field of mobile communications are called mobile streaming media, and mobile streaming media is common. As shown in FIG. 1 , the end-to-end networking structure includes: a User Equipment (UE) located in a packet domain, a Radio Network Controller (RNC) 102, and a General Packet Radio Service Support Node (GGSN). Gateway GPRS Support Node 103; a packet-switched streaming server (PSS) 104 and a portal 105 located in an Internet Protocol (IP) network.
UE101受 RNC102控制, 通过 RNC102分配无线资源, 包括无线连接的 服务质量(QoS, Quality of Service ), 通过 GGSN103接入 IP网络, 通过互联 网 (Internet )连接到提供移动流媒体业务的服务器 PSS104, 示移动流媒 体业务的服务器 Portall05。 The UE 101 is controlled by the RNC 102, and allocates radio resources through the RNC 102, including the quality of service (QoS) of the wireless connection, accesses the IP network through the GGSN 103, and connects to the server PSS 104 that provides the mobile streaming service through the Internet (Internet), showing the mobile Streaming service server Portall05.
视频点播 ( VOD, Video On Demand )和直播电视 ( Live TV )是两种较常 见的移动流媒体业务, PSS104 把媒体流按规定的码率推送到客户端, 即 UE10K 在理想的情况下, UE的接收和处理能力与 PSS发送流媒体的码率相 一致才能达到最佳的播放效果。 而 UE的接收能力是由 UE的带宽决定, 通常 情况下, 由于 UE的移动性, 决定了 UE带宽会经常波动, 因此 UE在播放流 媒体业务时质量会时好时坏, 为了解决此问题, 提出了 DBA技术, 即根据客 户端所能支持的带宽情况分配不同的码率。 Video on Demand (VOD, Video On Demand) and Live TV (Live TV) are two of the more common mobile streaming services. The PSS 104 pushes the media stream to the client at a specified bit rate, ie UE10K in an ideal situation, UE The receiving and processing capabilities are consistent with the bit rate of the PSS sending streaming media to achieve optimal playback. The receiving capability of the UE is determined by the bandwidth of the UE. Generally, due to the mobility of the UE, the bandwidth of the UE is often fluctuated. Therefore, the quality of the UE may be good or bad when playing the streaming media service. To solve this problem, DBA technology is proposed, which assigns different code rates according to the bandwidth that the client can support.
现在较为通用的 DBA技术是, 利用丢包率来决定是否改变码率以及如何 改变码率。 The more common DBA technology is to use the packet loss rate to determine whether to change the code rate and how to change the code rate.
发明内容
本发明实施例要解决的技术问题是提供一种动态码率分配方法、分组域流 媒体服务器, 使移动流媒体在切换时的播放更加流畅。 Summary of the invention The technical problem to be solved by the embodiments of the present invention is to provide a dynamic rate allocation method and a packet domain streaming media server, so that the playback of the mobile streaming media is smoother when switching.
为解决上述技术问题,本发明实施例一方面,提供了一种动态码率分配方 法, 包括: To solve the above technical problem, an aspect of an embodiment of the present invention provides a dynamic rate allocation method, including:
根据用户设备的带宽发生变化, 判断需要调整码率时, 进行码率切换; 发送切换码率后的媒体数据。 According to the change of the bandwidth of the user equipment, when it is determined that the code rate needs to be adjusted, the code rate is switched; and the media data after the switching code rate is sent.
另一方面, 提供了一种分组域流媒体服务器, 包括: In another aspect, a packet domain streaming server is provided, including:
用于根据用户设备的带宽发生变化,判断需要调整码率时,进行码率切换 的单元; A unit for performing rate switching when determining that a code rate needs to be adjusted according to a change in bandwidth of the user equipment;
用于发送切换码率后的媒体数据的单元。 A unit for transmitting media data after switching the code rate.
由以上技术方案可以看出,由于本发明实施例根据用户设备的带宽发生变 化, 判断需要调整码率时, 进行码率切换, 有效提高了传输的质量。 It can be seen from the above technical solution that, according to the embodiment of the present invention, when the bandwidth of the user equipment changes, it is determined that the code rate needs to be adjusted, and the code rate is switched, thereby effectively improving the quality of the transmission.
另一方面, 提供了一种分组域流媒体服务器, 包括: In another aspect, a packet domain streaming server is provided, including:
往返时间获取单元, 用于获取发送者报告包的往返时间; a round-trip time obtaining unit, configured to obtain a round-trip time of the sender report packet;
第一往返时间判断单元, 用于判断所述往返时间是否满足预定条件; 第一切换单元, 用于在所述往返时间满足预定条件时, 进行码率切换; 发送单元, 用于发送切换码率后的媒体数据。 a first round-trip time determining unit, configured to determine whether the round-trip time meets a predetermined condition; a first switching unit, configured to perform a code rate switching when the round-trip time satisfies a predetermined condition; and a sending unit, configured to send a switching code rate After the media data.
由以上技术方案可以看出,由于本发明实施例使用发送者报告包的往返时 间进行切换时机的判断, 避免了使用丢包率进行判断, 导在有数据丢失时, 才 进行下切, 导致的马赛克现象。 It can be seen from the above technical solution that, according to the embodiment of the present invention, the round-trip time of the sender report packet is used to determine the switching timing, thereby avoiding the use of the packet loss rate for judging, and when the data is lost, the undercut is performed, resulting in the mosaic. phenomenon.
另一方面, 提供了一种分组域流媒体服务器, 包括: In another aspect, a packet domain streaming server is provided, including:
带宽判断单元, 用于根据用户设备的带宽发生变化, 判断是否需要调整码 率; a bandwidth determining unit, configured to determine, according to a change in bandwidth of the user equipment, whether the code rate needs to be adjusted;
第二完整帧判断单元, 用于判断当前传输帧是否为完整帧; a second complete frame determining unit, configured to determine whether the current transmission frame is a complete frame;
第二切换单元, 用于在需要调整码率时, 且当前传输帧为完整帧时, 进行 码率切换, 发送切换码率后的媒体数据。 The second switching unit is configured to: when the code rate needs to be adjusted, and the current transmission frame is a complete frame, perform rate switching, and send the media data after the switching rate.
由以上技术方案可以看出,由于本发明实施例在切换时选择 I帧进行切换, 避免了在 B帧或 P帧时切换导致的播放不流畅或马赛克等质量问题。 As can be seen from the above technical solution, since the embodiment of the present invention selects an I frame for switching during handover, quality problems such as unsmooth playback or mosaic caused by switching in a B frame or a P frame are avoided.
附图说明
图 1为现有技术进行移动流媒体的端对端组网结构图; 输实施例示意图; 宽变化曲线、 PSS发包码率变化曲线、 RNC緩冲数据变化曲线、 UE緩冲数据 变化曲线示意图; DRAWINGS 1 is a schematic diagram of an end-to-end networking structure of a mobile streaming media in the prior art; a schematic diagram of an input embodiment; a wide variation curve, a PSS packet rate change curve, an RNC buffer data change curve, and a UE buffer data change curve;
图 4为本发明实施例提供的分组域流媒体服务器实施例结构图; 4 is a structural diagram of an embodiment of a packet domain streaming media server according to an embodiment of the present invention;
图 5为本发明实施例提供的分组域流媒体服务器另一实施例结构图。 FIG. 5 is a structural diagram of another embodiment of a packet domain streaming server according to an embodiment of the present invention.
具体实施方式 detailed description
本发明实施例提供了一种动态码率分配方法、分组域流媒体服务器,可以 有效地提高移动流媒体业务的播放质量。 The embodiment of the invention provides a dynamic rate allocation method and a packet domain streaming media server, which can effectively improve the playback quality of the mobile streaming media service.
采用丢包率作为调整码率的依据, 在已经发生丢包的情况下才进行切换, 切换较为滞后,往往是出现播放质量比较差的状况并持续一段时间才被调整过 来。 特别对于需要向下调整码率, 即码率下切的情况, 丢包率达到一定程度时 才把码率降低下去,说明此时 UE侧的带宽已经低于码率并且有一段时间产生 丢包了, 媒体服务器才察觉到把码率切下去, 对于用户的感受就是, 持续一段 时间马赛克后画面才恢复正常, 带给用户的体验很差。 The packet loss rate is used as the basis for adjusting the code rate. When the packet loss has occurred, the handover is performed. The handover is lagging behind, and the playback quality is often poor and has been adjusted for a while. Especially for the case where the code rate needs to be adjusted downward, that is, the code rate is cut, the code rate is lowered when the packet loss rate reaches a certain level, indicating that the bandwidth of the UE side is lower than the code rate and the packet loss occurs for a period of time. The media server only noticed that the bit rate was cut. The feeling for the user was that the picture returned to normal after a period of mosaic, and the experience brought to the user was very poor.
本发明提供的动态码率分配方法包括: The dynamic rate allocation method provided by the present invention includes:
根据用户设备的带宽发生变化, 判断需要调整码率时, 进行码率切换; 发送切换码率后的媒体数据。 According to the change of the bandwidth of the user equipment, when it is determined that the code rate needs to be adjusted, the code rate is switched; and the media data after the switching code rate is sent.
可以有效提高传输的质量。 Can effectively improve the quality of transmission.
目前流媒体一般使用实时流协议 ( RTSP, Real Time Streaming Protocol ) I 实时传输协议 ( RTP, Real Time Transport Protocol ) /RTP控制协议( RTCP, RTP Control Protocol )协议簇来控制 /传输流媒体数据。 其中, RTSP被用于建 立和控制连续媒体的时间同步流。 RTSP是文本协议并且类似超文本传输协议 ( HTTP, Hypertext Transfer Protocol ),其主要不同之处在于 RTSP是标准的流 媒体协议, 并通常利用独立传输协议, 例如 RTP来传输媒体数据。 RTP用于 提供时间信息和实现音频 /视频流同步。 RTP 不处理资源预定, 并且不保证实 时服务的服务质量。 RTCP的主要功能是为数据的传送情况提供反馈。 发送端
在用户点播成功后在发送 RTP数据包的同时, 每隔一定时间发送一次 RTCP 的发送者报告(SR, Sender Report ) 包进行发送端数据发送情况统计。 接收端 定期将 告信息接收者 4艮告 ( RR, Receiver Report ) 包发送给发送端。 Currently, streaming media generally uses Real Time Streaming Protocol (RTSP) I Real Time Transport Protocol (RTP)/RTP Control Protocol (RTCP) protocol cluster to control/transmit streaming media data. Among them, RTSP is used to establish and control the time synchronization stream of continuous media. RTSP is a text protocol and is similar to the Hypertext Transfer Protocol (HTTP). The main difference is that RTSP is a standard streaming protocol and usually uses an independent transport protocol such as RTP to transmit media data. RTP is used to provide time information and to synchronize audio/video streams. RTP does not process resource reservations and does not guarantee the quality of service for real-time services. The main function of RTCP is to provide feedback on the transmission of data. Sending end After the user clicks on the RTP data packet, the RTCP sender report (SR, Sender Report) packet is sent at regular intervals to perform statistics on the sender data transmission. The receiving end periodically sends a message receiver (RR, Receiver Report) packet to the sender.
PSS在发送一个 SR包时,会在其中加上发送时的时间戳,记录发送该 SR 包的时间, UE收到该 SR包时, 并不会立刻返回 RR包, 通常要等待一段时 间进行相应处理, 再发出 RR包, UE在发送 RR包时, 会在 RR包中记录最后 收到的 SR包从 PSS中发送出来的时间 (LSR, Last SR ), 也就是该 SR包中 记录的该 SR包发送时间,还会在 RR中记录 UE收到该 SR包后等待了多长时 间发出了该 RR包,即最后接收 SR包到发送时间的延迟 ( DLSR, delay since last SR )。 从 PSS发出一个 SR包到 UE经历的时间, 加上 UE返回 RR包到 PSS 经历的时间, 可以称为 SR包的往返时间 (RTT, Round-Trip Time ), RTT不 包括 UE收到 SR包后等待的时间, 因此假设 PSS收到此 RR包的当前时间是 A, 则 RTT的计算公式为: RTT = A - LSR - DLSR。 When sending an SR packet, the PSS adds the timestamp of the transmission time to record the time when the SR packet is sent. When the UE receives the SR packet, it does not immediately return the RR packet. Usually, it waits for a period of time. After processing, the RR packet is sent again. When the UE sends the RR packet, the UE records the time (LSR, Last SR) of the last received SR packet sent from the PSS in the RR packet, that is, the SR recorded in the SR packet. The packet transmission time also records in the RR how long the UE waits for the SR packet to be sent after receiving the SR packet, that is, the delay of receiving the SR packet to the transmission time (DLSR, delay since last SR). The time that the SR packet is sent from the PSS to the UE, plus the time that the UE returns the RR packet to the PSS, may be called the round-trip time of the SR packet (RTT, Round-Trip Time), and the RTT does not include the UE receiving the SR packet. Waiting time, therefore, assuming that the current time that the PSS receives this RR packet is A, the RTT is calculated as: RTT = A - LSR - DLSR.
本发明实施例中, PSS收到 RR包后, 读取其中的 LSR、 DLSR, 计算出 RTT, 通过 RTT来判断是否需要切换码率。 In the embodiment of the present invention, after receiving the RR packet, the PSS reads the LSR and the DLSR, calculates the RTT, and determines whether the code rate needs to be switched through the RTT.
其中 , LSR和 DLSR均可从标准 RTCP的 RR包的相应字段直接读取。 本发明实施例提供的动态码率分配方法实施例一可以被分为两个步骤: RTCP分析阶段 ( RTCP analysis )和带宽状态调整( bandwidth adjust )。 Both LSR and DLSR can be read directly from the corresponding fields of the standard RTCP RR packet. The first embodiment of the dynamic rate allocation method provided by the embodiment of the present invention can be divided into two steps: an RTCP analysis phase and a bandwidth adjustment.
在 RTCP分析阶段对上报的 RTCP包进行分析, 计算 RTT。 The reported RTCP packet is analyzed in the RTCP analysis phase to calculate the RTT.
在 i时间段 RTT的计算公式可以表述为: RTTi = Ai - LSRi - DLSRi; i表 示收到第 i包 RR包。 The calculation formula of RTT in i time period can be expressed as: RTTi = Ai - LSRi - DLSRi; i indicates that the i-pack RR packet is received.
在带宽状态调整阶段, 根据 RTT大小, 选择合适的码率调整策略。 In the bandwidth state adjustment phase, according to the RTT size, select an appropriate rate adjustment strategy.
根据网络的实际情况设置一个 RTT范围, RTT大小在该范围内时, 属于 网络的正常状态, 可以不作调整, RTT大小在该范围外时, 需要 ^居实际情况 对码率进行调整。 假设 RTT范围的最大值为 RTTmax, 最小值为 RTTmin, 在 不同情况下调整码率的方法如下所述: Set an RTT range according to the actual situation of the network. When the RTT size is within the range, it belongs to the normal state of the network. You can adjust it without adjustment. When the RTT size is outside the range, you need to adjust the code rate. Assume that the maximum value of the RTT range is RTTmax and the minimum value is RTTmin. The method of adjusting the code rate under different conditions is as follows:
1、 当连续 n次 RTTi > RTTmax , 并且 RTTi > RTTi-1 , 表示 SR包出现严 重时延并越来越严重, 此时, 选择向低码率媒体流调整, 即进行下切。 其中连 续 n次 RTTi > RTTmax表示连续 n个时间段 RTT超出了上限, 时延较严重需
要进行下切, RTTi > RTTi-1表示本时间段的 RTT大于前一个时间段的 RTT, 之所以需要增加这个条件, 是由于当连续 n次 RTTi > RTTmax, 向低码率媒体 流调整后, RTT并不能在短时间内回复到小于 RTTmax, 此时通常会有一小段 时间, RTTi仍然大于等于 RTTmax, 假如不加入 RTTi > RTTi-1的条件, 系统 有可能继续进行不必要的切换。 因此, 在判断连续 n次 RTTi > RTTmax后, 还需判断 RTTi是否大于 RTTi-1,如果向低码率媒体流调整的下切操作已经开 始进行, 则此时 RTTi将小于 RTTi-1 , 不要进行下切; 如果结果为 RTTi 大于 RTTi-1 , 说明 SR包出现严重时延, 并越来越严重, 需要向低码率媒体流调整 进行下切。 1. When RTTi > RTTmax and RTTi > RTTi-1, it indicates that the SR packet has serious delay and becomes more and more serious. At this time, the media stream is adjusted to the low code rate, that is, the undercut is performed. Among them, n times RTTi > RTTmax means that RTT exceeds the upper limit for consecutive n time periods, and the delay is more serious. To perform the undercut, RTTi > RTTi-1 indicates that the RTT of this time period is greater than the RTT of the previous time period. The reason why this condition needs to be increased is because when the RTTi > RTTmax is continuously n times, the RTT is adjusted to the low bit rate media stream. It can't return to less than RTTmax in a short time. At this time, there will usually be a short period of time. RTTi is still greater than or equal to RTTmax. If RTTi > RTTi-1 is not added, the system may continue to perform unnecessary switching. Therefore, after judging the continuous n times RTTi > RTTmax, it is necessary to determine whether RTTi is greater than RTTi-1. If the undercut operation adjusted to the low bit rate media stream has started, then RTTi will be less than RTTi-1, and no undercut is required. If the result is that RTTi is greater than RTTi-1, it indicates that the SR packet has a serious delay and is getting more and more serious. It needs to be adjusted to the low-rate media stream.
n是为了防止由于网络的正常抖动而设定的值, 可以根据实际情况进行配 置,可以是一次,也可以是多次; n取值大于 " 1"时,不会在出现 RTTi > RTTmax 时就即刻向低码率媒体流调整, 防止由于网络的正常抖动带来的影响。 n is to prevent the value set by the normal jitter of the network. It can be configured according to the actual situation. It can be one time or multiple times. When the value of n is greater than "1", it will not occur when RTTi > RTTmax Immediately adjust to low bit rate media streams to prevent the effects of normal jitter on the network.
2、 当连续 m次 RTTi < RTTmin, 表示网络长时间处于畅通状态 , 此时 , 选择向高码率媒体流调整, 即进行上切。 其中, m是为了防止由于网络的正常 抖动而设定的值, 可以根据实际情况进行配置, 可以是一次, 也可以是多次; m取值大于 "1" 时, 不会在出现 RTT RTTmin时就即刻向低码率媒体流调 整, 防止由于网络的正常抖动带来的影响。 2. When RTTi < RTTmin is continuous for m times, it indicates that the network is in a smooth state for a long time. At this time, the media stream is adjusted to the high code rate, that is, the upper cut is performed. Where m is the value set to prevent the normal jitter of the network, and can be configured according to the actual situation, either once or multiple times; when the value of m is greater than "1", it will not occur when RTT RTTmin occurs. Immediately adjust to low bit rate media streams to prevent the effects of normal jitter on the network.
3、 当 RTTmin <RTTi < RTTmax时 , 表示网络处于正常状态, 此时, 维持 目前码率状态; 在 η的取值大于 "1" 时, RTTi > RTTmax的次数低于 n次, 可以认为是网络的正常抖动,也可以维持目前码率状态;在 m的取值大于 "1" 时, RTTi < RTTmin的次数低于 n次, 同样可以认为是网络的正常抖动, 也 可以维持目前码率状态。 3. When RTTmin <RTTi < RTTmax, it indicates that the network is in a normal state. At this time, the current code rate state is maintained. When the value of η is greater than "1", the number of RTTi > RTTmax is less than n times, which can be considered as a network. The normal jitter can also maintain the current bit rate state; when the value of m is greater than "1", the number of RTTi < RTTmin is less than n times, which can also be considered as the normal jitter of the network, and can also maintain the current bit rate state.
在实际使用中, n的取值需要考虑 RNC与 UE的緩冲区大小, 尽量使出 现连续 n次 RTTi > RTTmax后, RNC与 UE的緩冲区能够保存全部无法发出 的数据为宜 , 通常连续 n次 RTTi > RTTmax所耗费的时间可以为 2个或 3个 RTCP数据包发送 /接收周期。 In actual use, the value of n needs to consider the buffer size of the RNC and the UE. After the continuous RTTi > RTTmax, the RNC and the UE buffer can save all the data that cannot be sent, usually continuous. The time taken for n times RTTi > RTTmax can be 2 or 3 RTCP packet transmission/reception cycles.
进一步, 由于移动流媒体的数据通常包括三种数据帧: I帧、 P帧、 B帧。 其中, I帧是整个画面完整编码的帧, 又称为内部帧、 完整帧、 关键帧。 I 帧可以独立解码显示。 I帧也能为相关的 P帧、 B帧的解码提供参照。
P帧是编码与前一帧差异的帧。 只纪录了与前一帧的差异数据, 不能独立 解码显示, 必须在它参照的 I帧预先收到时才能解码显示。 Further, since the data of the mobile streaming media generally includes three data frames: an I frame, a P frame, and a B frame. The I frame is a frame completely encoded by the entire picture, and is also called an internal frame, a complete frame, and a key frame. I frames can be decoded independently. The I frame can also provide a reference for the decoding of the associated P frame and B frame. A P frame is a frame that encodes a difference from the previous frame. Only the difference data with the previous frame is recorded, and the display cannot be decoded independently. It must be decoded before the I frame it refers to.
B帧是编码与前一帧和后面的 I帧的差异的帧。 B帧同样不能独立解码显 示, 必须在它参照的 I帧预先收到时才能解码显示。 A B frame is a frame that encodes a difference from a previous frame and a subsequent I frame. The B frame cannot be decoded independently, and must be decoded when the I frame it refers to is received in advance.
假如切换时, 正在传输 B帧, 则不会收到该 B帧参照的后面的 I帧, 播 放该 B帧时, 就会出现播放不流畅或马赛克等质量问题。 If the B frame is being transmitted while switching, the subsequent I frame referenced by the B frame will not be received. When the B frame is played, quality problems such as unsmooth playback or mosaic will occur.
假如切换时,正在传输 P帧,切换后继续传输的为使用切换后的码率进行 编码的 P帧, 该切换后的 P帧由于与前一个 I帧的码率不同, 艮有可能无法参 考前一个 I帧解码出完整的图像,此时同样会出现播放不流畅或马赛克等质量 问题。 If the P frame is being transmitted during handover, the P frame that is encoded after the handover is used for encoding, and the P frame after the handover is different from the previous I frame, and may not be able to refer to the previous frame. An I frame decodes the complete image, and at the same time there will be quality problems such as unsmooth playback or mosaic.
现有技术只考虑了在丢包率达到一定程度时进行切换, 在 B帧或 P帧时 切换的情况非常常见,因此时常会出现由于切换导致的播放不流畅或马赛克等 质量问题。 The prior art only considers switching when the packet loss rate reaches a certain level, and it is very common to switch between B frames or P frames. Therefore, quality problems such as unsmooth playback or mosaic due to switching often occur.
因此, 在本发明实施例提供的动态码率分配方法实施例一中给出了在 I 帧进行切换的技术方案, 在根据 RTT大小判断需要切换后, 判断当前要传输 的帧为 I帧时, 进行切换, 由于 I帧是整个画面完整编码的帧, 可以独立解码 显示, 不要参考前后的数据, 也就不会出现无法出完整的图像的问题, 避免了 在 B帧或 P帧时切换导致的播放不流畅或马赛克等质量问题。 Therefore, in the first embodiment of the dynamic rate allocation method provided by the embodiment of the present invention, a technical solution for switching in an I frame is given. After determining that the frame to be transmitted is an I frame after determining that the handover is required according to the RTT size, Switching, since the I frame is a completely encoded frame of the entire picture, it can be decoded and displayed independently. Do not refer to the data before and after, so there is no problem that the complete image cannot be produced, and the switching between B frames or P frames is avoided. Play quality problems such as smooth or mosaic.
上文提到了切换的两种形式: 上切和下切。 码率上切, 向高码率媒体流调 整表示 UE带宽远大于当前码率而要求上调码率, 此时只要做到 I帧切换, 就 可以避免出现播放不流畅或马赛克等质量问题。码率下切, 向低码率媒体流调 整表示 UE带宽不能满足当前的码率要求而导致下调码率, 情况比较复杂, 为 了尽可能避免可能会出现的播放不流畅或马赛克等质量问题,本发明实施例提 供的动态码率分配方法实施例一给出的码率下切方法如下所述: The two forms of switching are mentioned above: upper and lower cuts. The bit rate is cut upwards, and the high-rate media stream is adjusted to indicate that the UE bandwidth is much larger than the current code rate and the upper code rate is required. At this time, as long as the I frame is switched, quality problems such as unsmooth playback or mosaic can be avoided. The code rate is cut down, and the adjustment to the low bit rate media stream indicates that the UE bandwidth cannot meet the current code rate requirement, resulting in a down code rate, which is complicated. In order to avoid possible quality problems such as unsmooth playback or mosaic, the present invention The code rate undercut method given in Embodiment 1 of the dynamic rate allocation method provided by the embodiment is as follows:
在无线接入网络( RAN , Radio Access Network ) 中 RNC针对每个 UE设 置一个緩冲区, 该緩冲大小以可存储 RNC实际中可能出现的最大緩冲数据为 较佳的方案, 在每一个 UE与 RNC建立连接关系时设立。 RNC实际中可能出 现的最大緩冲数据与 RTCP数据包的发送周期, 及上文提到的 n有关, 即在连 续 n次 RTTi > RTTmax后, RNC可能緩冲到的最大数据。 在网络畅通情况下,
传送数据包所消耗的时间认为是很短的, 一般情况下不会超出秒级,但在网络 不畅通情况下,数据包将被塞进緩冲区。 为了防止网络抖动或其它稍微不稳定 的因素导致播放不流畅或播放质量下降问题,在 UE上也要求设立一个緩冲区 , 用来緩冲媒体数据,该緩冲区的大小同样需要可以存储 UE实际中可能出现的 最大緩冲数据。 同时, 在 PSS从高码率切换到低码率时, 此时 SR包出现严重 时延, 并越来越严重, RNC的緩冲区已经堆积大量数据, 而且 UE的带宽已 经下降到无法短时间把上述堆积的数据传送到 UE, 如果 UE没有緩冲区或緩 冲区比较小,肯定会导致 UE因无法及时得到要播放的媒体数据而播放不流畅 甚至出现马赛克。 In the radio access network (RAN, Radio Access Network), the RNC sets a buffer for each UE, and the buffer size is preferably a program that can store the maximum buffer data that may appear in the RNC, in each case. Established when the UE establishes a connection relationship with the RNC. The maximum buffer data that may appear in the RNC actually relates to the transmission period of the RTCP packet, and the above mentioned n, that is, the maximum data that the RNC may buffer after consecutive n times of RTTi > RTTmax. In the case of a smooth network, The time it takes to transmit a packet is considered to be very short. Under normal circumstances, it will not exceed the second level, but in the case of a network failure, the packet will be stuffed into the buffer. In order to prevent network jitter or other slightly unstable factors from causing unsmooth playback or degradation of playback quality, a buffer is also required on the UE to buffer media data, and the size of the buffer also needs to be able to store the UE. The maximum buffered data that may appear in practice. At the same time, when the PSS switches from a high code rate to a low code rate, the SR packet has a serious delay and becomes more and more serious. The buffer of the RNC has accumulated a large amount of data, and the bandwidth of the UE has dropped to a short time. The above accumulated data is transmitted to the UE. If the UE does not have a buffer or the buffer is relatively small, it will definitely cause the UE to play unsmoothly or even mosaic due to the inability to obtain the media data to be played in time.
现举例说明 PSS从高码率切换到低码率, 即进行下切时数据传输的状况, 进行下切时数据传输实施例示意图如图 2所示: Now, an example is shown to switch the PSS from a high code rate to a low code rate, that is, the data transmission condition when performing the undercut, and a schematic diagram of the data transmission embodiment when performing the undercut is shown in FIG. 2:
图 2中坐标纵轴表示緩冲区大小, 其单位为 Kbit, PSS刚从 384Kbit码率 切换到 128Kbit码率, RNC接收的媒体数据码率为 128Kbit, 接收速率为 In Fig. 2, the vertical axis of the coordinate indicates the size of the buffer. The unit is Kbit. The PSS has just switched from 384Kbit to 128Kbit. The media rate of the RNC is 128Kbit. The receiving rate is
128Kbit/S , 接收到的媒体数据被緩存在 RNC的緩冲区, 此时 UE緩冲区緩存 的媒体数据码率仍然为 384Kbit, 向播放器传送媒体数据的速率仍然为128Kbit/S, the received media data is buffered in the RNC buffer. At this time, the media data rate of the UE buffer buffer is still 384Kbit, and the rate of transmitting media data to the player is still
384Kbit/S , 而 UE带宽已经下降为 150Kbit/S, RNC緩冲区与 UE緩冲区之间 传输数据的速率为 150Kbit/S。 At 384 Kbit/s, the UE bandwidth has dropped to 150 Kbit/s, and the rate of data transmission between the RNC buffer and the UE buffer is 150 Kbit/s.
此时, RNC緩冲了 3840Kbit的数据, 即緩冲了 10秒的码率为 384Kbit的 数据,此时间是 PSS用来检测 RTT异常而下切码率的时间,即在连续 n次 RTTi > RTTmax后緩存的数据。 UE緩冲了 1536Kbit数据, 即緩冲了 4秒的码率为 At this time, the RNC buffers 3840Kbit of data, that is, buffers the data rate of 384Kbit for 10 seconds. This time is the time for the PSS to detect the RTT abnormality and the next code rate, that is, after n consecutive RTTi > RTTmax Cached data. The UE buffers 1536Kbit data, that is, the buffer rate is 4 seconds.
384Kbit 的数据, 由于此数据是 384Kbit码率的数据, 因此播放速度还是384Kbit of data, since this data is 384Kbit code rate data, so the playback speed is still
384Kbit/S。 384Kbit/S.
而此时, UE侧带宽已经下降为 150Kbit/S , PSS的码率下切为 128Kbit/S。 4秒后, UE把最先緩冲的 1536Kbit数据播放完毕时, 又緩冲了 150 Kbit χ 4 = 600Kbit的数据 , 即 RNC传输了 600Kbit数据到 UE,但 RNC同时又緩存了 128 Kbit X 4 = 512Kbit的数据; 如此类推, 再过大约 600/(384 - 150) = 1.65秒, UE就能把 UE緩冲区的数据全部播放完毕。 此时, RNC緩冲区緩存的数据码 率仍然为 384Kbit, 由于 UE緩冲区已经为空, UE接收到用 150K码率传输的 384Kbit码率的数据只能立刻播放出去, 因此有一段时间会出现 384Kbit码率
的数据用 150K码率传输的局面, 虽然能保证不丢包,但播放肯定不流畅。 PSS 把码率再向下调整可以减小出现此情况的时间, 为了彻底解决此问题, 需要At this time, the bandwidth of the UE side has been reduced to 150 Kbit/s, and the code rate of the PSS is cut to 128 Kbit/s. After 4 seconds, when the UE plays the first buffered 1536Kbit data, it buffers 150 Kbit χ 4 = 600Kbit data, that is, the RNC transmits 600Kbit data to the UE, but the RNC also buffers 128 Kbit X 4 = 512Kbit of data; and so on, after about 600/(384 - 150) = 1.65 seconds, the UE can play the data of the UE buffer. At this time, the data rate of the RNC buffer buffer is still 384Kbit. Since the UE buffer is already empty, the data received by the UE at a rate of 384Kbit transmitted at a code rate of 150K can only be played out immediately, so there will be some time. 384Kbit code rate The data is transmitted at a rate of 150K, although it can be guaranteed not to lose packets, but the playback is certainly not smooth. PSS adjusts the bit rate down to reduce the time for this to happen. In order to completely solve this problem, you need
UE緩冲区与 RNC緩冲区大小根据 PSS能支持的码率等级以及 RAN网络所支 持带宽等级情况配置到一个比例。 The UE buffer and RNC buffer size are configured to a ratio according to the bit rate level that the PSS can support and the bandwidth level supported by the RAN network.
现举例说明 PSS从高码率切换到低码率, 即进行下切时, UE带宽变化 曲线、 PSS发包码率变化曲线、 RNC緩冲数据变化曲线、 UE緩冲数据变化曲 线示意图如图 3所示: For example, the PSS is switched from a high code rate to a low code rate, that is, when the undercut is performed, the UE bandwidth change curve, the PSS packet rate change curve, the RNC buffer data change curve, and the UE buffer data change curve are shown in FIG. :
曲线①为表示 UE带宽变化的曲线,曲线②为表示 PSS发包码率变化的曲 线,其所在坐标系,横轴为时间轴,单位为秒,纵轴为带宽 /码率,单位为 Kbit/S; UEBWup表示 UE在带宽下降前相对较高的带宽, UEBWup也可以被称为 UE 的高带宽; PSSBWup表示 PSS与 UEBWup对应的码率, 也即与 UE的高带 宽相匹配的较高的码率, PSSBWup也可以被称为高码率; UEBWlow表示 UE 在带宽下降后相对较低的带宽, UEBWlow 也可以被称为 UE 的低带宽; Curve 1 is a curve indicating the change of UE bandwidth, and curve 2 is a curve indicating the change of PSS packet rate. The coordinate system is located, the horizontal axis is the time axis, the unit is seconds, and the vertical axis is the bandwidth/code rate, and the unit is Kbit/S. UEBWup indicates a relatively high bandwidth of the UE before the bandwidth is dropped, UEBWup may also be referred to as a high bandwidth of the UE; PSSBWup indicates a code rate corresponding to the PSS and the UEBWup, that is, a higher code rate matching the high bandwidth of the UE. PSSBWup may also be referred to as a high code rate; UEBWlow indicates a relatively low bandwidth of the UE after the bandwidth is dropped, and UEBWlow may also be referred to as a low bandwidth of the UE;
PSSBWlow表示 PSS与 UEBWlow对应的码率,也即与 UE的低带宽相匹配的 较低的码率, PSSBWlow也可以被称为低码率。 PSSBWlow indicates the bit rate corresponding to PSS and UEBWlow, that is, the lower bit rate that matches the low bandwidth of the UE. PSSBWlow can also be called low bit rate.
曲线③为表示 RNC緩冲变化的曲线, 其所在坐标系, 横轴为时间轴, 单 位为秒, 纵轴为 RNC緩存数据量; RNCBUFmax表示 RNC最大的緩冲容量, 也即 RNC緩冲区的最大容量; RNCRBUFmax表示 RNC实际最大的緩冲数据 , 也即实际上 RNC緩冲区緩冲的最大数据量。 Curve 3 is a curve showing the RNC buffer change, its coordinate system, the horizontal axis is the time axis, the unit is seconds, the vertical axis is the RNC cache data amount; RNCBUFmax represents the maximum buffer capacity of the RNC, that is, the RNC buffer Maximum capacity; RNCRBUFmax represents the actual maximum buffered data of the RNC, that is, the maximum amount of data buffered by the RNC buffer.
曲线④⑤⑥为表示 UE緩冲变化的曲线; UEBUFmax表示 UE的最大緩冲 容量, 也即 UE緩冲区的最大容量, UERBUFmax表示 UE实际最大的緩冲数 据, 也即实际上 UE緩冲区緩冲的最大数据量。 The curve 456 is a curve indicating the UE buffer change; the UEBUFmax indicates the maximum buffer capacity of the UE, that is, the maximum capacity of the UE buffer, and the UERBUFmax indicates the actual maximum buffer data of the UE, that is, the UE buffer buffer actually. The maximum amount of data.
时间点 T0表示 UE带宽从高带宽下降到低带宽的时刻, 时间点 T1表示 The time point T0 indicates the time when the UE bandwidth drops from the high bandwidth to the low bandwidth, and the time point T1 indicates
PSS检测到 UE的带宽变化主动把码率从高码率切换到低码率的时刻, 时间点 T2' 表示 RNC把高码率数据传输完毕的时刻,时间点 Τ2表示 UE把高码率数 据播放完毕同时也把緩冲清空的时刻, 时间点 T3表示 RNC的緩冲被清空的 时刻, 此时表示端对端网络正式恢复到正常了。 The PSS detects that the bandwidth change of the UE actively switches the code rate from the high code rate to the low code rate. The time point T2' indicates the time when the RNC transmits the high code rate data, and the time point Τ2 indicates that the UE plays the high code rate data. At the same time, the buffer is also cleared. The time point T3 indicates the time when the buffer of the RNC is cleared. At this point, the end-to-end network is officially restored to normal.
如图 3所示, 从 T0时刻到 T3时刻 , 即从 UE发生带宽变化到 PSS及时 调整码率并稳定下来的期间, 由于 RNCRBUFmax<RNCBUFmax 以及
UERBUFmax < UEBUFmax, 因此, 不会丢失数据包, 没能及时发送或者播出 的数据都被存储在緩存区, 在数据完整的情况下, 只要保证在 I帧进行切换, 就可以避免出现马赛克等质量问题。 As shown in FIG. 3, from time T0 to time T3, that is, from the time when the UE changes bandwidth to when the PSS adjusts the code rate in time and stabilizes, RNCRBUFmax<RNCBUFmax and UERBUFmax < UEBUFmax, therefore, data packets are not lost, and data that cannot be sent or broadcast in time is stored in the buffer area. In the case of complete data, as long as the I frame is switched, the quality such as mosaic can be avoided. problem.
在 TO ~ T1时间段: PSS在此时间段内检测到 UE带宽发生变化主动调整 码率; During the TO~T1 time period, the PSS detects the change of the UE bandwidth and actively adjusts the code rate during this time period;
在 Τ1 ~ Τ2' 时间段: RNC 以 PSSBWlow 的速度接收低码率数据, 以 UEBWlow的速度传出高码率数据, 因 UEBWlow > PSSBWlow, RNC的緩冲 数据逐渐减少, 直到 T2' 时刻才把高码率数率输出完毕; In the period of Τ1 ~ Τ2': RNC receives the low bit rate data at the speed of PSSBWlow, and transmits the high bit rate data at the speed of UEBWlow. Because UEBWlow > PSSBWlow, the buffer data of RNC is gradually reduced, and it is not high until T2' time. The rate rate output is completed;
在 Tl ~ T2时间段: UE以 PSSBWup的速度播放高码率数据,以 UEBWlow 的速度接收高码率数据 , 因 PSSBWup > UEBWlow , UE的緩冲数据逐渐减少, 直到 T2时刻, UE緩冲区减为 0。 During the period from T1 to T2: The UE plays the high bit rate data at the speed of PSSBWup, and receives the high bit rate data at the speed of UEBWlow. Because PSSBWup > UEBWlow, the buffered data of the UE is gradually reduced until the T2 time, the UE buffer is reduced. Is 0.
当 T2 > T2'时, 表示 RNC在 UE緩冲还没清空前已经把高码率数据传输 完毕了, 在 T2'时间点后, UE以 UEBWlow的速度接收新的低码率数据, 在再 以 PSSBWup的速度播放完緩存的码率为 PSSBWup的旧数据后 ,以 PSSBWlow 的速度播放新的低码率数据 , 因 PSSBWlow < UEBWlow,在 T2'后 UE緩冲区 緩存的数据就逐渐增加,直到 T3时间点以后, RNC把緩冲的数据清空了, RNC 进多少数据就出多少数据, 此时网络通畅了, UE緩冲稳定了。 UE在 T2'时间 点后的 UE緩冲变化的曲线走势如图中曲线⑤所示。 上述过程中, 对于 UE播 放器来说, 它的数据流一直都是流畅的, 因此播放不存在质量问题。 When T2 > T2', it indicates that the RNC has transmitted the high bit rate data before the UE buffer has not been cleared. After the T2' time point, the UE receives the new low bit rate data at the speed of UEBWlow. After the PSSBWup speed is played, the buffered code rate is the old data of PSSBWup, and the new low bit rate data is played at the speed of PSSBWlow. Because PSSBWlow < UEBWlow, the data buffered by the UE buffer is gradually increased after T2' until T3. After the time point, the RNC clears the buffered data, and how much data is output by the RNC. At this point, the network is unobstructed and the UE buffer is stable. The curve of the UE buffer change after the T2' time point of the UE is shown as curve 5 in the figure. In the above process, for the UE broadcaster, its data stream is always smooth, so there is no quality problem in playback.
当 T2 = T2'时, 表示 RNC把高码率数据传输完毕的同时, UE刚好把緩冲 清空了,此后 UE以 UEBWlow的速度接收新的低码率数据, 以 PSSBWlow的 速度播放新的低码率数据, UE緩冲变化的曲线走势如图中曲线⑥所示。 上述 过程中, 对于 UE播放器来说, 它的数据流也是一直流畅的, 因此播放不存在 质量问题。 When T2 = T2', it indicates that the RNC has finished transmitting the high bit rate data, and the UE just clears the buffer. After that, the UE receives the new low bit rate data at the speed of UEBWlow, and plays the new low code at the speed of PSSBWlow. The rate data, the curve of the UE buffer change curve is shown as curve 6 in the figure. In the above process, for the UE player, its data stream is always smooth, so there is no quality problem in playback.
当 T2 < T2'时, 表示 RNC在没有把高码率数据传输完毕之前, UE就把緩 冲清空了, 因此在 Τ2 ~ Τ2'期间, 高码率数据被低带宽传输到 UE, 并且 UE 的緩冲区为空, 只能以低码率播放收到的高码率数据, 此情况下, 播放肯定不 流畅 , 用户的体验就是播放有停顿。 When T2 < T2', it indicates that the RNC clears the buffer before the RNC transmits the high bit rate data, so during the period Τ2 ~ Τ2', the high bit rate data is transmitted to the UE by the low bandwidth, and the UE The buffer is empty, and the received high bit rate data can only be played at a low bit rate. In this case, the playback is certainly not smooth, and the user experience is that the play has a pause.
记 PSS检测到 UE带宽传输异常所需要的时间( DT, Detect Time )为 DT,
DT使用公式可以表述为: DT = T1-T0, 从图 3 可看出 DT的大小将影响到 RNCRBUFmax, DT越大, RNCRBUFmax越大, 假设 RTCP的 RR包发包周 期为 P, 连续 n次 RTTi > RTTmax时, PSS检测到 UE带宽传输异常需要进行 下切, DT、 n、 P的关系可以表述为: Note that the time (DT, Detect Time) required by the PSS to detect the UE bandwidth transmission abnormality is DT. DT can be expressed as: DT = T1-T0. It can be seen from Figure 3 that the size of DT will affect RNCRBUFmax. The larger DT is, the larger the RNCRBUFmax is. The R packet of R packets is assumed to be P, and the number of consecutive RTTis is > When RTTmax is detected, the PSS detects that the UE bandwidth transmission abnormality needs to be cut. The relationship between DT, n, and P can be expressed as:
DT = n X P ( 1 ) 在 TO 到 T1 期间, RNC緩冲以 PSSBWup速度接收高码率数据, 以 UEBWlow 速度输出数据到 UE , 两者之差乘以时间间隔 DT 即为 RNCRBUFmax, 其关系可以表述为: DT = n XP ( 1 ) During TO to T1, the RNC buffer receives the high bit rate data at the PSSBWup speed and outputs the data to the UE at the UEBWlow speed. The difference between the two is multiplied by the time interval DT, which is RNCRBUFmax. The relationship can be expressed. For:
RNCRBUFmax = DT x ( PSSBWup - UEBWlow ) ( 2 ) T2前的数据都是码率为的 PSSBWup数据,因此 UE的播放器播放的速度 也是 PSSBWup, 但此时 UE的传输速度已经下降为 UEBWlow, 因此填充 UE 緩冲区的速度为 UEBWlow, 所以当前 UE实际緩冲除以上述 2个速度的差值 即 UE清空緩冲所需要的时间,记 UE清空緩冲所需要的时间为 CTUE, CTUE 可以表述为: RNCRBUFmax = DT x (PSSBWup - UEBWlow) ( 2 ) The data before T2 is the PSSBWup data of the bit rate, so the playback speed of the UE player is also PSSBWup, but at this time, the transmission speed of the UE has dropped to UEBWlow, so padding The speed of the UE buffer is UEBWlow. Therefore, the current UE actual buffer is divided by the difference between the above two speeds, that is, the time required for the UE to clear the buffer. The time required for the UE to clear the buffer is CTUE, and the CTUE can be expressed as :
CTUE = T2 - TO = UERBUFmax/ ( PSSBWup - UEBWlow ) ( 3 ) 同理记 RNC清空码率为 PSSBWup数据所需的时间为 CUTRNC , CUTRNC 可以表述为: CTUE = T2 - TO = UERBUFmax / (PSSBWup - UEBWlow) (3) The same time required for RNC to clear the code rate for PSSBWup data is CUTRNC, CUTRNC can be expressed as:
CUTRNC = T2' - T1 = RNCRBUFmax I ( UEBWlow - PSSBWlow ) ( 4 ) 根据上文分析可知, Τ2 > Τ2'时播放才能保证不存在质量问题, 即 CTUE > CUTRNC, 根据式(3 )、 式(4 ), 可得: CUTRNC = T2' - T1 = RNCRBUFmax I ( UEBWlow - PSSBWlow ) ( 4 ) According to the above analysis, 播放2 > Τ2' can ensure that there is no quality problem, ie CTUE > CUTRNC, according to equation (3), formula (4) ), Available:
UERBUFmax > RNCRBUFmax x ( PSSBWup - UEBWlow ) / ( UEBWlow - PSSBWlow ) ( 5 ) UERBUFmax > RNCRBUFmax x (PSSBWup - UEBWlow ) / ( UEBWlow - PSSBWlow ) ( 5 )
由于在实际应用中, 各等级的码率, 如 PSSBWup、 PSSBWlow等, 是相 对固定的, 而 UE的接收带宽, 如 UEBWup 、 UEBWlow是变化的不可控的, 因此,本发明实施例提供的动态码率分配方法实施例一进一步给出了如下解决 方案: In practical applications, the code rate of each level, such as PSSBWup, PSSBWlow, etc., is relatively fixed, and the receiving bandwidth of the UE, such as UEBWup and UEBWlow, is uncontrollable. Therefore, the dynamic code provided by the embodiment of the present invention is The first embodiment of the rate allocation method further provides the following solutions:
控制 UERBUFmax和 RNCRBUFmax的大小 , 使其满足式( 5 ) 的关系, 通常使 UERBUFmax越大或者 RNCRBUFmax越小越好。 The sizes of UERBUFmax and RNCRBUFmax are controlled so as to satisfy the relationship of equation (5), and generally the larger the UERBUFmax or the smaller the RNCRBUFmax, the better.
根据式( 2 ), RNCRBUFmax大小与 PSS检测到 UE带宽变化所需的时间
DT有关, PSS是才艮据接收到 RTCP的 RR包来检测的, 因此 DT跟发送 RTCP 数据包的周期 P和 n有关, 可以通过减小 n的取值, 使 DT变小, 以达到使 RNCRBUFmax减小的目的。 According to the formula (2), the RNCRBUFmax size and the time required for the PSS to detect the UE bandwidth change DT related, PSS is detected according to the RR packet received by RTCP, so DT is related to the period P and n of sending RTCP packets. By reducing the value of n, the DT is made smaller to achieve RNCRBUFmax. The purpose of reduction.
在本发明实施例提供的动态码率分配方法实施例一中, 根据 SR包的往返 时间 RTT的大小来判断切换的时机, 及如何切换, 在需要进行下切时, 不会 等待出现丢包的现象时再进行切换,避免了由于丢包带来的马赛克、停顿等质 量问题。 In the first embodiment of the dynamic rate allocation method provided by the embodiment of the present invention, the timing of the handover is determined according to the round trip time RTT of the SR packet, and how to switch, and when the undercut is needed, the packet loss does not wait. Switching again, avoiding quality problems such as mosaics and pauses caused by packet loss.
进一步,在切换时选择 I帧进行切换,避免了在 B帧或 P帧时切换导致的 播放不流畅或马赛克等质量问题。 Further, the I frame is selected for switching at the time of switching, thereby avoiding quality problems such as unsmooth playback or mosaic caused by switching in the B frame or the P frame.
进一步,为了避免由于 UE緩存区在 RNC发送完高码率数据之前被清空, 以低码率播放收到的高码率数据, 导致的播放不流畅, 给出了通过控制 RNC 最大的緩冲数据、 UE实际最大的緩冲数据, 来避免 UE緩存区在 RNC发送完 高码率数据之前被清空的方法。 Further, in order to avoid that the UE buffer area is emptied before the RNC transmits the high code rate data, and the received high code rate data is played at a low code rate, the playback is not smooth, and the maximum buffered data by controlling the RNC is given. The UE actually buffers the largest amount of data to avoid the UE buffer area being emptied before the RNC sends the high code rate data.
由于在 I帧进行切换即可避免在 B帧或 P帧时切换导致的播放不流畅或马 赛克等质量问题, 因此本发明实施例提供的动态码率分配方法实施例二,给出 了可以在判断 UE带宽变化, 需要切换时, 选择 I帧进行切换的方法: Therefore, the second embodiment of the dynamic code rate allocation method provided by the embodiment of the present invention can be judged in the second embodiment of the dynamic code rate allocation method provided by the embodiment of the present invention. When the bandwidth of the UE changes, when I need to switch, select the I frame to switch:
首先根据用户设备的带宽发生变化 , 判断是否需要调整码率; First, according to the change of the bandwidth of the user equipment, it is determined whether the code rate needs to be adjusted;
判断需要调整码率时, 判断当前要传输的帧是否为 I帧, 在当前传输帧为 完整帧时, 进行码率切换。 其中, 根据用户设备的带宽发生变化, 判断需要调 整码率,可能是根据往返时间判断带宽变化,即获取发送者报告包的往返时间; 在所述往返时间满足预定条件时, 判断需要调整码率; 在这种情况下, 详细的 本一致, 在此不再重复。 When it is judged that the code rate needs to be adjusted, it is judged whether the frame to be transmitted is an I frame, and when the current transmission frame is a complete frame, the code rate is switched. According to the change of the bandwidth of the user equipment, it is determined that the code rate needs to be adjusted, and the bandwidth change may be determined according to the round-trip time, that is, the round-trip time of the sender report packet is obtained; when the round-trip time meets the predetermined condition, it is determined that the code rate needs to be adjusted. In this case, the detailed agreement is not repeated here.
也可能是根据丢包率判断带宽变化, 即获取丢包率; 在所述丢包率满足预 定条件时, 判断需要调整码率。 It is also possible to determine the bandwidth change according to the packet loss rate, that is, to obtain the packet loss rate; when the packet loss rate satisfies the predetermined condition, it is determined that the code rate needs to be adjusted.
通过丢包率判断带宽变化, 进行码率调整的详细方法如下所述: The detailed method of performing rate adjustment by determining the bandwidth change by the packet loss rate is as follows:
流媒体服务器对上报的 RTCP包进行分析, 计算丢包率。 The streaming media server analyzes the reported RTCP packets and calculates the packet loss rate.
i时间段丢包率算法: Ri=f_lost/(Seq_numberi-Seq_numberi-l);其中, f_lost 是相邻 RTCP RR字段之间的 RTP丢包总数; Seq_numberi是第 i个 RTCP包上
报收到的 RTP包序号; Seq_numberi-1是第 i-1个 RTCP包上报收到的 RTP包 序号; i time period packet loss rate algorithm: Ri=f_lost/(Seq_numberi-Seq_numberi-l); where f_lost is the total number of RTP drops between adjacent RTCP RR fields; Seq_numberi is the i-th RTCP packet Report the received RTP packet sequence number; Seq_numberi-1 is the RTP packet sequence number reported by the i-1th RTCP packet;
根据丢包程度: According to the degree of packet loss:
当连续 n次 Ri>=Rmax, n为预定值, 属于严重丢包, 选择向低码流调整; 当 0<Ri< = Rmax, 或者偶尔 Ri = 0 , 或者偶尔 Ri>=Rmax , 属于轻度丢 包, 维持目前码率状态; When Ri>=Rmax for n consecutive times, n is a predetermined value, which is a serious packet loss, and is selected to adjust to the low code stream; when 0<Ri<=Rmax, or occasionally Ri=0, or occasionally Ri>=Rmax, it is mild. Lose the packet and maintain the current bit rate status;
当连续 m次 Ri = 0 , m为预定值, 属于长时无丢包, 选择向高码流调整。 在本发明实施例提供的动态码率分配方法实施例二中,在切换时选择 I帧 进行切换, 避免了在 B帧或 P帧时切换导致的播放不流畅或马赛克等质量问 题。 When n times for Ri = 0, m is a predetermined value, which belongs to long time without packet loss, and chooses to adjust to high code stream. In the second embodiment of the dynamic bit rate allocation method provided by the embodiment of the present invention, an I frame is selected for switching during handover, which avoids quality problems such as unsmooth playback or mosaic caused by switching in a B frame or a P frame.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步骤 是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可 读存储介质中, 该程序在执行时, 包括如下步骤: It will be understood by those skilled in the art that all or part of the steps of implementing the foregoing embodiments may be performed by a program to instruct related hardware, and the program may be stored in a computer readable storage medium. , including the following steps:
一种动态码率分配方法, 包括: A dynamic rate allocation method includes:
获取发送者报告包的往返时间; Get the round trip time of the sender report package;
判断所述往返时间是否满足预定条件; Determining whether the round trip time meets a predetermined condition;
在所述往返时间满足预定条件时, 进行码率切换; Performing code rate switching when the round trip time satisfies a predetermined condition;
发送切换码率后的媒体数据。 Send the media data after switching the bit rate.
一种动态码率分配方法, 包括: A dynamic rate allocation method includes:
根据用户设备的带宽发生变化, 判断需要调整码率时,在当前传输帧为完 整帧时, 进行码率切换, 发送切换码率后的媒体数。 According to the change of the bandwidth of the user equipment, when it is determined that the code rate needs to be adjusted, when the current transmission frame is a complete frame, the code rate is switched, and the number of media after the switching code rate is transmitted.
上述提到的存储介质可以是只读存储器, 磁盘或光盘等。 The above-mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
本发明实施例提供的分组域流媒体服务器实施例结构如图 4所示, 包括: 往返时间获取单元 410, 用于获取发送者报告包的往返时间; The structure of the packet domain streaming server according to the embodiment of the present invention is as shown in FIG. 4, and includes: a round-trip time obtaining unit 410, configured to acquire a round-trip time of a sender report packet;
第一往返时间判断单元 420, 用于判断所述往返时间是否满足预定条件; 第一切换单元 430,用于在所述往返时间满足预定条件时,进行码率切换; 发送单元 440, 用于发送切换码率后的媒体数据。 The first round-trip time determining unit 420 is configured to determine whether the round-trip time meets a predetermined condition. The first switching unit 430 is configured to perform code rate switching when the round-trip time meets a predetermined condition, and the sending unit 440 is configured to send Switch the media data after the bit rate.
第一完整帧判断单元 450, 用于判断当前传输帧是否为完整帧, 在当前传 输帧为完整帧时, 再控制所述第一切换单元 440进行码率切换。
其中 , 往返时间获取单元 410包括: The first complete frame determining unit 450 is configured to determine whether the current transmission frame is a complete frame. When the current transmission frame is a complete frame, the first switching unit 440 is further controlled to perform rate switching. The round trip time obtaining unit 410 includes:
发送时间获取单元 411, 用于获取接收者报告包中携带的所述发送者报告 包的发送时间; The sending time obtaining unit 411 is configured to acquire a sending time of the sender report packet carried in the receiver report packet.
延迟获取单元 412, 用于获取接收者报告包中携带的最后接收发送者报告 包到发送时间的延迟; The delay obtaining unit 412 is configured to obtain a delay of the last received sender report packet carried in the receiver report packet to the sending time;
处理单元 413, 用于根据接收者报告包中携带的所述发送者报告包的发送 时间,及最后接收发送者报告包到发送时间的延迟,获取所述发送者报告包的 往返时间。 The processing unit 413 is configured to obtain a round trip time of the sender report packet according to a sending time of the sender report packet carried in the receiver report packet, and a delay of receiving the sender report packet to the sending time.
第一往返时间判断单元 420包括: The first round trip time judging unit 420 includes:
上切判断单元 421, 用于判断所述往返时间连续小于等于预设的往返时间 最小值的次数是否达到预定次数; The upper cut determining unit 421 is configured to determine whether the round trip time is continuously less than or equal to a preset minimum round trip time minimum number of times;
下切判断单元 422, 用于判断所述往返时间连续大于等于预设的往返时间 最大值的次数是否达到预定次数,本时间段的往返时间是否大于前一个时间段 的往返时间; The undercut determination unit 422 is configured to determine whether the round trip time is continuously greater than or equal to the preset maximum round trip time maximum number of times, and whether the round trip time of the current time period is greater than the round trip time of the previous time period;
第一切换单元 430包括: The first switching unit 430 includes:
上切单元 431, 用于在所述往返时间连续小于等于预设的往返时间最小值 的次数达到预定次数时, 向高码率媒体流调整。 The upper cut unit 431 is configured to adjust to the high code rate media stream when the round trip time is continuously less than or equal to the preset minimum round trip time minimum number of times.
下切单元 432, 用于所述往返时间连续大于等于预设的往返时间最大值的 次数达到预定次数, 且本时间段的往返时间大于前一个时间段的往返时间时 , 向低码率媒体流调整。 The undercut unit 432 is configured to adjust the round trip time to be greater than or equal to the preset round trip time maximum value by a predetermined number of times, and adjust the low round rate media stream when the round trip time of the current time period is greater than the round trip time of the previous time period .
本发明实施例提供的无线网络控制器实施例包括: The radio network controller embodiment provided by the embodiment of the present invention includes:
带宽判断单元 , 判断所述无线网络控制器与用户设备之间带宽是否下降; 緩冲单元,在判断结果为下降时,使用为每一个用户设备预设的緩冲区緩 存数据。 The bandwidth judging unit judges whether the bandwidth between the radio network controller and the user equipment decreases; and the buffer unit uses buffer buffer data preset for each user equipment when the judgment result is decreased.
本发明实施例提供的分组域流媒体服务器实施例结构如图 5所示, 包括: 带宽判断单元 510, 用于根据用户设备的带宽发生变化, 判断是否需要调 整码率; The structure of the packet domain streaming server according to the embodiment of the present invention is as shown in FIG. 5, and includes: a bandwidth determining unit 510, configured to determine, according to a bandwidth change of the user equipment, whether the code rate needs to be adjusted;
第二完整帧判断单元 520, 用于判断当前传输帧是否为完整帧; a second complete frame determining unit 520, configured to determine whether the current transmission frame is a complete frame;
第二切换单元 530, 用于在需要调整码率时, 且当前传输帧为完整帧时,
进行码率切换, 发送切换码率后的媒体数据。 The second switching unit 530 is configured to: when the code rate needs to be adjusted, and the current transmission frame is a complete frame, The code rate is switched, and the media data after the switching code rate is transmitted.
其中, 带宽判断单元 510包括: The bandwidth determining unit 510 includes:
第二往返时间判断单元 511, 用于获取发送者报告包的往返时间; 在所述 往返时间满足预定条件时, 判断需要调整码率; The second round-trip time determining unit 511 is configured to obtain a round-trip time of the sender report packet; when the round-trip time meets the predetermined condition, determine that the code rate needs to be adjusted;
或, 丢包率判断单元 512, 用于获取丢包率; 在所述丢包率满足预定条件 时, 判断需要调整码率。 Or, the packet loss rate determining unit 512 is configured to obtain a packet loss rate. When the packet loss rate meets a predetermined condition, it is determined that the code rate needs to be adjusted.
本发明实施例提供的分组域流媒体服务器实施例包括: The packet domain streaming server embodiment provided by the embodiment of the present invention includes:
用于根据用户设备的带宽发生变化,判断需要调整码率时,进行码率切换 的单元; A unit for performing rate switching when determining that a code rate needs to be adjusted according to a change in bandwidth of the user equipment;
用于发送切换码率后的媒体数据的单元。 A unit for transmitting media data after switching the code rate.
其中, 所述用于根据用户设备的带宽发生变化, 判断需要调整码率时, 进 行码率切换的单元还用于: The unit for performing rate switching according to the change of the bandwidth of the user equipment and determining that the code rate needs to be adjusted is further used to:
获取发送者报告包的往返时间; Get the round trip time of the sender report package;
判断所述往返时间是否满足预定条件; Determining whether the round trip time meets a predetermined condition;
在所述往返时间满足预定条件时, 进行码率切换。 When the round-trip time satisfies a predetermined condition, rate switching is performed.
所述用于根据用户设备的带宽发生变化, 判断需要调整码率时,进行码率 切换的单元还用于: The unit is configured to: when the bandwidth of the user equipment changes, and determine that the code rate needs to be adjusted, the unit for performing rate switching is further configured to:
在当前传输帧为完整帧时, 进行码率切换。。 When the current transmission frame is a complete frame, rate switching is performed. .
本发明实施例提供的分组域流媒体服务器实施例及无线网络控制器实施 例的具体使用方式,可参考上文对本发明实施例提供的动态码率分配方法实施 例的描述, 在此不再重复。 For the specific usage of the packet domain streaming server embodiment and the radio network controller embodiment provided by the embodiment of the present invention, reference may be made to the foregoing description of the dynamic rate allocation method embodiment provided by the embodiment of the present invention, which is not repeated here. .
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到本发明 可借助软件加必需的硬件平台的方式来实现, 当然也可以全部通过硬件来实 施。基于这样的理解,本发明的技术方案对背景技术做出贡献的全部或者部分 可以以软件产品的形式体现出来, 该计算机软件产品可以存储在存储介质中, 如 ROM/RAM、磁碟、 光盘等, 包括若干指令用以使得一台计算机设备(可以 是个人计算机, 服务器, 或者网络设备等)执行本发明各个实施例或者实施例 的某些部分所述的方法。 Through the description of the above embodiments, those skilled in the art can clearly understand that the present invention can be implemented by means of software plus a necessary hardware platform, and of course, all can be implemented by hardware. Based on such understanding, all or part of the technical solution of the present invention contributing to the background art may be embodied in the form of a software product, which may be stored in a storage medium such as a ROM/RAM, a magnetic disk, an optical disk, or the like. A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments of the present invention or portions of the embodiments.
由于本发明实施例提供的动态码率分配方法、分组域流媒体服务器,可以
根据 SR包的往返时间 RTT的大小来判断切换的时机,及如何切换,或者在切 换时选择 I帧进行切换, 提高了播放的质量。 The dynamic bit rate allocation method and the packet domain streaming media server provided by the embodiments of the present invention may The timing of the handover is determined according to the round trip time RTT of the SR packet, and how to switch, or I frame is selected for switching at the time of switching, thereby improving the quality of the playback.
以上对本发明所提供的一种动态码率分配方法、分组域流媒体服务器进行 以上实施例的说明只是用于帮助理解本发明的方法及其核心思想; 同时,对于 本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均 会有改变之处, 综上所述, 本说明书内容不应理解为对本发明的限制。
The foregoing description of the foregoing embodiments of the dynamic rate allocation method and the packet domain streaming server provided by the present invention is only for helping to understand the method and core idea of the present invention. Meanwhile, for those skilled in the art, The present invention is not limited by the scope of the present invention.
Claims
1、 一种动态码率分配方法, 其特征在于, 包括: A dynamic rate allocation method, comprising:
根据用户设备的带宽发生变化, 判断需要调整码率时, 进行码率切换; 发送切换码率后的媒体数据。 According to the change of the bandwidth of the user equipment, when it is determined that the code rate needs to be adjusted, the code rate is switched; and the media data after the switching code rate is sent.
2、 如权利要求 1所述的动态码率分配方法, 其特征在于, 所述根据用户 设备的带宽发生变化, 判断需要调整码率时, 进行码率切换包括: 获取发送 者报告包的往返时间; The dynamic rate allocation method according to claim 1, wherein, when the bandwidth of the user equipment changes, and it is determined that the code rate needs to be adjusted, performing rate switching includes: obtaining a round trip time of the sender report packet ;
判断所述往返时间是否满足预定条件; Determining whether the round trip time meets a predetermined condition;
在所述往返时间满足预定条件时, 进行码率切换。 When the round-trip time satisfies a predetermined condition, rate switching is performed.
3、 如权利要求 2所述的动态码率分配方法, 其特征在于, 所述获取发送 者 4艮告包的往返时间包括: The dynamic bit rate allocation method according to claim 2, wherein the round-trip time for obtaining the sender packet comprises:
根据接收者报告包中携带的所述发送者报告包的发送时间 ,及最后接收发 送者报告包到发送时间的延迟, 获取所述发送者报告包的往返时间。 The round trip time of the sender report packet is obtained according to the transmission time of the sender report packet carried in the receiver report packet and the delay of receiving the sender report packet to the transmission time.
4、 如权利要求 2所述的动态码率分配方法, 其特征在于, 还包括: 判断所述往返时间满足预定条件后,判断当前传输帧为完整帧时,进行码 率切换。 The dynamic rate allocation method according to claim 2, further comprising: determining that the current transmission frame is a complete frame after determining that the round-trip time satisfies a predetermined condition, and performing rate switching.
5、 如权利要求 2、 3或 4所述的动态码率分配方法, 其特征在于, 所述判 断所述往返时间满足预定条件时 , 进行码率切换包括: The dynamic rate allocation method according to claim 2, 3 or 4, wherein, when the determining that the round-trip time satisfies a predetermined condition, performing rate switching includes:
判断所述往返时间连续小于等于预设的往返时间最小值的次数达到预定 次数时, 向高码率媒体流调整。 When it is determined that the round trip time is continuously less than or equal to the preset round trip time minimum number of times reaches a predetermined number of times, the media stream is adjusted to a high code rate.
6、 如权利要求 2、 3或 4所述的动态码率分配方法, 其特征在于, 所述判 断所述往返时间满足预定条件时 , 进行码率切换包括: The dynamic rate allocation method according to claim 2, 3 or 4, wherein, when the determining that the round trip time satisfies a predetermined condition, performing rate switching includes:
判断所述往返时间连续大于等于预设的往返时间最大值的次数达到预定 次数,且本时间段的往返时间大于前一个时间段的往返时间时, 向低码率媒体 流调整。 And determining that the round trip time is continuously greater than or equal to the preset round trip time maximum number of times reaches a predetermined number of times, and when the round trip time of the current time period is greater than the round trip time of the previous time period, adjusting to the low code rate media stream.
7、 如权利要求 4所述的动态码率分配方法, 其特征在于, 所述方法还包 括:
在所述无线网络控制器与用户设备之间带宽下降后,所述无线网络控制器 使用为每一个用户设备预设的緩冲区緩存数据。 The dynamic rate allocation method according to claim 4, wherein the method further comprises: After the bandwidth between the radio network controller and the user equipment drops, the radio network controller uses the buffer buffer data preset for each user equipment.
8、 如权利要求 1所述的动态码率分配方法, 其特征在于, 进行码率切换 包括: 8. The dynamic bit rate allocation method according to claim 1, wherein performing rate switching comprises:
在当前传输帧为完整帧时, 进行码率切换。 When the current transmission frame is a complete frame, rate switching is performed.
9、 如权利要求 8所述的动态码率分配方法, 其特征在于, 所述根据用户 设备的带宽发生变化, 判断需要调整码率包括: The dynamic rate allocation method according to claim 8, wherein the determining the need to adjust the code rate according to the change of the bandwidth of the user equipment comprises:
获取发送者报告包的往返时间; 在所述往返时间满足预定条件时, 判断需 要调整码率; Obtaining a round trip time of the sender report packet; determining that the code rate needs to be adjusted when the round trip time satisfies the predetermined condition;
或, 获取丢包率; 在所述丢包率满足预定条件时, 判断需要调整码率。 Or, the packet loss rate is obtained; when the packet loss rate satisfies the predetermined condition, it is determined that the code rate needs to be adjusted.
10、 一种分组域流媒体服务器, 其特征在于, 包括: A packet domain streaming media server, comprising:
往返时间获取单元, 用于获取发送者报告包的往返时间; a round-trip time obtaining unit, configured to obtain a round-trip time of the sender report packet;
第一往返时间判断单元, 用于判断所述往返时间是否满足预定条件; 第一切换单元, 用于在所述往返时间满足预定条件时, 进行码率切换; 发送单元, 用于发送切换码率后的媒体数据。 a first round-trip time determining unit, configured to determine whether the round-trip time meets a predetermined condition; a first switching unit, configured to perform a code rate switching when the round-trip time satisfies a predetermined condition; and a sending unit, configured to send a switching code rate After the media data.
11、 如权利要求 10所述的分组域流媒体服务器, 其特征在于, 所述往返 时间获取单元包括: The packet domain streaming server according to claim 10, wherein the round trip time acquiring unit comprises:
发送时间获取单元,用于获取接收者报告包中携带的所述发送者报告包的 发送时间; a sending time obtaining unit, configured to acquire a sending time of the sender report packet carried in the receiver report packet;
延迟获取单元 ,用于获取接收者报告包中携带的最后接收发送者报告包到 发送时间的延迟; a delay acquiring unit, configured to obtain a delay of a last receiving sender report packet carried in the receiver report packet to a sending time;
处理单元, 用于根据接收者报告包中携带的所述发送者报告包的发送时 间,及最后接收发送者报告包到发送时间的延迟,获取所述发送者报告包的往 返时间。 And a processing unit, configured to acquire a return time of the sender report packet according to a sending time of the sender report packet carried in the receiver report packet, and a delay of receiving the sender report packet to the sending time.
12、 如权利要求 10所述的分组域流媒体服务器, 其特征在于, 还包括: 第一完整帧判断单元, 用于判断当前传输帧是否为完整帧,在当前传输帧 为完整帧时, 再控制所述第一切换单元进行码率切换。
The packet domain streaming server according to claim 10, further comprising: a first complete frame determining unit, configured to determine whether the current transmission frame is a complete frame, and when the current transmission frame is a complete frame, Controlling the first switching unit to perform rate switching.
13、 如权利要求 10、 11或 12所述的分组域流媒体服务器, 其特征在于, 所述第一往返时间判断单元包括: The packet domain streaming server according to claim 10, 11 or 12, wherein the first round trip time determining unit comprises:
上切判断单元,用于判断所述往返时间连续小于等于预设的往返时间最小 值的次数是否达到预定次数; a top-cut determining unit, configured to determine whether the number of times that the round-trip time is continuously less than or equal to a preset minimum round-trip time reaches a predetermined number of times;
所述第一切换单元包括: The first switching unit includes:
上切单元,用于在所述往返时间连续小于等于预设的往返时间最小值的次 数达到预定次数时, 向高码率媒体流调整。 And an upper cutting unit, configured to adjust to the high code rate media stream when the round trip time is continuously less than or equal to a preset minimum number of round trip times.
14、 如权利要求 10、 11或 12所述的分组域流媒体服务器, 其特征在于, 所述第一往返时间判断单元包括: The packet domain streaming media server according to claim 10, 11 or 12, wherein the first round trip time determining unit comprises:
下切判断单元,用于判断所述往返时间连续大于等于预设的往返时间最大 值的次数是否达到预定次数,本时间段的往返时间是否大于前一个时间段的往 返时间; The undercut determining unit is configured to determine whether the round trip time is continuously greater than or equal to a preset number of times of the maximum round trip time, and whether the round trip time of the current time period is greater than the return time of the previous time period;
所述第一切换单元包括: The first switching unit includes:
下切单元,用于所述往返时间连续大于等于预设的往返时间最大值的次数 达到预定次数,且本时间段的往返时间大于前一个时间段的往返时间时, 向低 码率媒体流调整。 And an undercut unit, configured to adjust the round trip time to be greater than or equal to a preset round trip time maximum number of times, and adjust the round trip time to a low bit rate media stream when the round trip time of the current time period is greater than the round trip time of the previous time period.
15、 一种分组域流媒体服务器, 其特征在于, 包括: 15. A packet domain streaming media server, comprising:
带宽判断单元, 用于根据用户设备的带宽发生变化, 判断是否需要调整码 率; a bandwidth determining unit, configured to determine, according to a change in bandwidth of the user equipment, whether the code rate needs to be adjusted;
第二完整帧判断单元, 用于判断当前传输帧是否为完整帧; a second complete frame determining unit, configured to determine whether the current transmission frame is a complete frame;
第二切换单元, 用于在需要调整码率时, 且当前传输帧为完整帧时, 进行 码率切换, 发送切换码率后的媒体数据。 The second switching unit is configured to: when the code rate needs to be adjusted, and the current transmission frame is a complete frame, perform rate switching, and send the media data after the switching rate.
16、 如权利要求 15所述的分组域流媒体服务器, 其特征在于, 所述带宽 判断单元包括: The packet domain streaming server according to claim 15, wherein the bandwidth determining unit comprises:
第二往返时间判断单元, 用于获取发送者报告包的往返时间; 在所述往返 时间满足预定条件时, 判断需要调整码率; a second round-trip time determining unit, configured to obtain a round-trip time of the sender report packet; when the round-trip time meets the predetermined condition, determine that the code rate needs to be adjusted;
或, 丢包率判断单元, 用于获取丢包率; 在所述丢包率满足预定条件时,
判断需要调整码率。 Or, a packet loss rate determining unit is configured to obtain a packet loss rate; when the packet loss rate meets a predetermined condition, Determine the need to adjust the bit rate.
17、 一种分组域流媒体服务器, 其特征在于, 包括: 17. A packet domain streaming media server, comprising:
用于根据用户设备的带宽发生变化,判断需要调整码率时,进行码率切换 的单元; A unit for performing rate switching when determining that a code rate needs to be adjusted according to a change in bandwidth of the user equipment;
用于发送切换码率后的媒体数据的单元。 A unit for transmitting media data after switching the code rate.
18、 如权利要求 17所述的分组域流媒体服务器, 其特征在于, 所述用于 根据用户设备的带宽发生变化, 判断需要调整码率时,进行码率切换的单元还 用于: The packet domain streaming server according to claim 17, wherein the means for performing rate switching when the bandwidth of the user equipment changes and determining that the code rate needs to be adjusted is further used for:
获取发送者报告包的往返时间; Get the round trip time of the sender report package;
判断所述往返时间是否满足预定条件; Determining whether the round trip time meets a predetermined condition;
在所述往返时间满足预定条件时, 进行码率切换。 When the round-trip time satisfies a predetermined condition, rate switching is performed.
19、 如权利要求 17所述的分组域流媒体服务器, 其特征在于, 所述用于 根据用户设备的带宽发生变化, 判断需要调整码率时,进行码率切换的单元还 用于: The packet-domain streaming server according to claim 17, wherein the means for performing rate switching when the bandwidth of the user equipment changes and determining that the code rate needs to be adjusted is further used to:
在当前传输帧为完整帧时, 进行码率切换。
When the current transmission frame is a complete frame, rate switching is performed.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200810005294.1 | 2008-02-27 | ||
CN200810005294.1A CN101242359B (en) | 2008-02-27 | 2008-02-27 | Dynamic code rate allocation method and packet domain stream media server |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2009106015A1 true WO2009106015A1 (en) | 2009-09-03 |
Family
ID=39933575
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2009/070584 WO2009106015A1 (en) | 2008-02-27 | 2009-02-27 | Dynamic bit rate allocation method, packet-domain streaming media server |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN101242359B (en) |
WO (1) | WO2009106015A1 (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111768790A (en) * | 2019-03-14 | 2020-10-13 | 百度在线网络技术(北京)有限公司 | Method and apparatus for transmitting voice data |
CN113810728A (en) * | 2021-08-31 | 2021-12-17 | 深圳力维智联技术有限公司 | Live broadcast data transmission control method and device and live broadcast equipment |
US20220095020A1 (en) * | 2020-01-17 | 2022-03-24 | Beijing Dajia Internet Information Technology Co., Ltd. | Method for switching a bit rate, and electronic device |
CN114513474A (en) * | 2022-02-08 | 2022-05-17 | 聚好看科技股份有限公司 | Video transmission method, video transmission terminal, media server, and storage medium |
CN115174965A (en) * | 2022-06-30 | 2022-10-11 | 杭州海康威视数字技术股份有限公司 | Video preview method and device, electronic equipment and computer readable storage medium |
US11936704B2 (en) | 2018-10-05 | 2024-03-19 | Interdigital Madison Patent Holdings, Sas | Method to be implemented at a device able to run one adaptive streaming session, and corresponding device |
Families Citing this family (23)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101242359B (en) * | 2008-02-27 | 2010-08-18 | 华为技术有限公司 | Dynamic code rate allocation method and packet domain stream media server |
CN102065468A (en) * | 2009-11-13 | 2011-05-18 | 华为技术有限公司 | Code rate adjustment method and server |
CN102118357B (en) | 2009-12-31 | 2014-12-17 | 华为技术有限公司 | Method, device and system for processing streaming media |
CN101867802A (en) * | 2010-05-17 | 2010-10-20 | 上海海维工业控制有限公司 | Two-stage code rate control method based on encoder and buffer memory |
CN102957672A (en) * | 2011-08-25 | 2013-03-06 | 中国电信股份有限公司 | Method, client side and system for self-adaptive playing of FLV (flash video) media streams |
US9037742B2 (en) * | 2011-11-15 | 2015-05-19 | International Business Machines Corporation | Optimizing streaming of a group of videos |
CN102521895A (en) * | 2011-11-25 | 2012-06-27 | 航天科工深圳(集团)有限公司 | Informationized polling tracking method and system of power equipment |
CN103414956A (en) * | 2013-08-13 | 2013-11-27 | 中安消技术有限公司 | Real-time data transmission method and system based on transmission control protocol |
CN103561283A (en) * | 2013-10-30 | 2014-02-05 | 乐视致新电子科技(天津)有限公司 | Method and device for code rate switch of smart television |
CN104780124B (en) * | 2014-01-09 | 2018-08-07 | 中国科学院声学研究所 | A kind of dynamic according to the time period adjusts the method for managing resource of reserved bandwidth |
CN105791987B (en) * | 2014-12-23 | 2018-11-02 | 深圳Tcl数字技术有限公司 | media data playing method and terminal |
CN106162188B (en) * | 2015-04-28 | 2019-08-06 | 北京大学 | Video code rate self-adapting regulation method and device |
CN104869461A (en) * | 2015-05-22 | 2015-08-26 | 南京创维信息技术研究院有限公司 | Video data processing system and method |
CN105162555B (en) * | 2015-09-24 | 2019-06-25 | 广州市百果园网络科技有限公司 | A kind of code rate adjustment method and its terminal |
CN105407361A (en) * | 2015-11-09 | 2016-03-16 | 广州华多网络科技有限公司 | Audio and video live broadcast data processing method and device |
KR102547320B1 (en) * | 2016-02-01 | 2023-06-23 | 삼성전자주식회사 | Electronic device and method for control thereof |
CN107659601B (en) * | 2016-07-26 | 2019-12-17 | 中国科学院声学研究所 | code rate self-adaption method based on HTTP self-adaption flow |
CN108079578B (en) * | 2017-10-26 | 2020-12-01 | 咪咕互动娱乐有限公司 | Code rate adjusting method and device based on cloud game and storage medium |
CN107743253B (en) * | 2017-11-03 | 2019-07-19 | 中广热点云科技有限公司 | For the video transmission rate adaptation method in wireless network |
CN109413205A (en) * | 2018-12-04 | 2019-03-01 | 北京诺士诚国际工程项目管理有限公司 | A kind of management data uploading method and device |
CN109495326B (en) * | 2018-12-28 | 2021-12-14 | 北京东土科技股份有限公司 | Network bandwidth allocation method and system |
CN110636346B (en) * | 2019-09-19 | 2021-08-03 | 北京达佳互联信息技术有限公司 | Code rate self-adaptive switching method and device, electronic equipment and storage medium |
CN111970683B (en) * | 2020-09-04 | 2023-09-12 | Oppo(重庆)智能科技有限公司 | Method, device, terminal equipment and storage medium for switching SIM card |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040240390A1 (en) * | 2003-05-30 | 2004-12-02 | Vidiator Enterprises Inc. | Method and apparatus for dynamic bandwidth adaptation |
CN1848810A (en) * | 2006-05-15 | 2006-10-18 | 武汉虹旭信息技术有限责任公司 | Stream media transmitting rate controlling method |
CN1980238A (en) * | 2006-10-30 | 2007-06-13 | 上海广电(集团)有限公司中央研究院 | II.264 flow-media transmission control method based on real-time transmission/control protocl |
CN101030924A (en) * | 2006-03-03 | 2007-09-05 | 中兴通讯股份有限公司 | Method for adapting dynamic bandwidth |
CN101115196A (en) * | 2006-07-27 | 2008-01-30 | 腾讯科技(深圳)有限公司 | Method, system and terminal for adjusting video quality |
CN101242359A (en) * | 2008-02-27 | 2008-08-13 | 华为技术有限公司 | Dynamic code rate allocation method and packet domain stream media server |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100407662C (en) * | 2003-01-16 | 2008-07-30 | 华为技术有限公司 | Network bandwidth detecting method for implementing stream medium service |
CN100444637C (en) * | 2005-04-14 | 2008-12-17 | 中兴通讯股份有限公司 | Method for transmitting video-frequency flow in network |
-
2008
- 2008-02-27 CN CN200810005294.1A patent/CN101242359B/en not_active Expired - Fee Related
-
2009
- 2009-02-27 WO PCT/CN2009/070584 patent/WO2009106015A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040240390A1 (en) * | 2003-05-30 | 2004-12-02 | Vidiator Enterprises Inc. | Method and apparatus for dynamic bandwidth adaptation |
CN101030924A (en) * | 2006-03-03 | 2007-09-05 | 中兴通讯股份有限公司 | Method for adapting dynamic bandwidth |
CN1848810A (en) * | 2006-05-15 | 2006-10-18 | 武汉虹旭信息技术有限责任公司 | Stream media transmitting rate controlling method |
CN101115196A (en) * | 2006-07-27 | 2008-01-30 | 腾讯科技(深圳)有限公司 | Method, system and terminal for adjusting video quality |
CN1980238A (en) * | 2006-10-30 | 2007-06-13 | 上海广电(集团)有限公司中央研究院 | II.264 flow-media transmission control method based on real-time transmission/control protocl |
CN101242359A (en) * | 2008-02-27 | 2008-08-13 | 华为技术有限公司 | Dynamic code rate allocation method and packet domain stream media server |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11936704B2 (en) | 2018-10-05 | 2024-03-19 | Interdigital Madison Patent Holdings, Sas | Method to be implemented at a device able to run one adaptive streaming session, and corresponding device |
CN111768790A (en) * | 2019-03-14 | 2020-10-13 | 百度在线网络技术(北京)有限公司 | Method and apparatus for transmitting voice data |
CN111768790B (en) * | 2019-03-14 | 2023-11-21 | 百度在线网络技术(北京)有限公司 | Method and device for transmitting voice data |
US20220095020A1 (en) * | 2020-01-17 | 2022-03-24 | Beijing Dajia Internet Information Technology Co., Ltd. | Method for switching a bit rate, and electronic device |
CN113810728A (en) * | 2021-08-31 | 2021-12-17 | 深圳力维智联技术有限公司 | Live broadcast data transmission control method and device and live broadcast equipment |
CN113810728B (en) * | 2021-08-31 | 2023-09-26 | 深圳力维智联技术有限公司 | Live broadcast data transmission control method and device and live broadcast equipment |
CN114513474A (en) * | 2022-02-08 | 2022-05-17 | 聚好看科技股份有限公司 | Video transmission method, video transmission terminal, media server, and storage medium |
CN114513474B (en) * | 2022-02-08 | 2024-03-05 | 聚好看科技股份有限公司 | Video transmission method, video transmission terminal, media server and storage medium |
CN115174965A (en) * | 2022-06-30 | 2022-10-11 | 杭州海康威视数字技术股份有限公司 | Video preview method and device, electronic equipment and computer readable storage medium |
CN115174965B (en) * | 2022-06-30 | 2024-01-02 | 杭州海康威视数字技术股份有限公司 | Video preview method, device, electronic equipment and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN101242359A (en) | 2008-08-13 |
CN101242359B (en) | 2010-08-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2009106015A1 (en) | Dynamic bit rate allocation method, packet-domain streaming media server | |
US7047308B2 (en) | System and method for simultaneous media playout | |
US20030198184A1 (en) | Method of dynamically determining real-time multimedia streaming rate over a communications networks | |
US8621061B2 (en) | Adaptive bitrate management for streaming media over packet networks | |
KR100537499B1 (en) | Method of generating transmission control parameter and selective retranmission method according to the packet characteristics. | |
US7984179B1 (en) | Adaptive media transport management for continuous media stream over LAN/WAN environment | |
US7652994B2 (en) | Accelerated media coding for robust low-delay video streaming over time-varying and bandwidth limited channels | |
EP2255535B1 (en) | Device and method for adaptation of target rate of video signals | |
EP2364017B1 (en) | Method, system and user device for obtaining key frame in streaming media service | |
US20100121974A1 (en) | Stepwise probing for adaptive streaming in a packet communication network | |
JP2003169090A (en) | Transmission system | |
JP2003515289A (en) | System and method for controlling a delay budget of a decoder buffer in a streaming data receiver | |
WO2006086691A2 (en) | A network for providing a streaming service | |
EP1395020A2 (en) | Method and apparatus for dynamically controlling a real-time multimedia data generation rate | |
Xie et al. | Rate-distortion optimized dynamic bitstream switching for scalable video streaming | |
Kuang et al. | Hierarchical analysis of RealMedia streaming traffic on an IEEE 802.11 b wireless LAN | |
Akester | A resilient multicast protocol for digital TV over 802.11 wireless networks | |
Nunome et al. | An Adaptive Modulation Method with IEEE 802.11 aa GCR Block Ack for QoE Enhancement of Audio-Video Reliable Groupcast | |
Lundan et al. | Optimal 3GPP packet-switched streaming service (PSS) over GPRS networks | |
Ma et al. | Access point centric scheduling for dash streaming in multirate 802.11 wireless network | |
Chen et al. | QoS of mobile real-time streaming adapted to bandwidth | |
KR100401227B1 (en) | Multimedia Streaming Method | |
EP4445592A1 (en) | Content delivery | |
Kim et al. | Network-Adaptive Rate and Error Controls for WiFi Video Streaming | |
Liu et al. | Multi-buffer based congestion control for multicast streaming of scalable video |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 09713970 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 09713970 Country of ref document: EP Kind code of ref document: A1 |