WO2010072099A1 - Method and apparatus for prediction of time delay of video service - Google Patents

Method and apparatus for prediction of time delay of video service Download PDF

Info

Publication number
WO2010072099A1
WO2010072099A1 PCT/CN2009/074452 CN2009074452W WO2010072099A1 WO 2010072099 A1 WO2010072099 A1 WO 2010072099A1 CN 2009074452 W CN2009074452 W CN 2009074452W WO 2010072099 A1 WO2010072099 A1 WO 2010072099A1
Authority
WO
WIPO (PCT)
Prior art keywords
sequence number
video frame
sdu
receiving end
played
Prior art date
Application number
PCT/CN2009/074452
Other languages
French (fr)
Chinese (zh)
Inventor
周素萍
李斌
谷安文
陈玉芳
叶建涛
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2010072099A1 publication Critical patent/WO2010072099A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/24Systems for the transmission of television signals using pulse code modulation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering

Definitions

  • the present invention relates to the field of communications, and in particular, to a method and apparatus for predicting a delay of a video service. Background technique
  • the video service downloads data from the server to the mobile terminal in real time for playback.
  • the biggest feature is that the user does not have to wait until the entire file has been downloaded, and only needs a few seconds or ten seconds of startup delay to use.
  • the transmission protocols used by the video service include RTP (Real-time Transport Protocol), RTCP (RTP Control Protocol), and Real-Time Streaming Protocol (RTSP).
  • RTP Real-time Transport Protocol
  • RTCP Real-time Transport Protocol
  • RTSP Real-Time Streaming Protocol
  • RTSP is architecturally located on top of RTP and RTCP. It uses TCP or RTP for data transfer.
  • the transmitting end divides a video frame into several RTP packets, and then these
  • the RTP packet is transmitted to the wireless network by using an SDU (Service Data Unit) as a carrier for transmission.
  • SDU Service Data Unit
  • FIG. 1 it is a schematic diagram of packetization and bearer of a video frame.
  • the receiving end receives the SDU, thereby obtaining the RTP packet, and then combining the RTP packets belonging to the same video frame into one video frame, and finally playing the combined video frames one frame at a time in sequence.
  • Frequency hopping and mosaic phenomena often occur during video playback, mainly due to packet loss, including delay packet loss.
  • the delay is lost.
  • the terminal plays the video frame in sequence, and each frame has a fixed playing time. If the video data arrives at the terminal later than the playing time, it is called a delay. The data has no use and will be discarded by the terminal, that is, the delay packet is lost.
  • the embodiment of the invention discloses a method and a device for predicting whether a video service has a delay on the network side, so that the network side can take corresponding measures in time to improve the efficiency of video service transmission.
  • the solution is as follows:
  • the embodiment of the invention discloses a method for predicting the delay of a video service, which comprises: predicting a sequence number of a video frame being played by the receiving end;
  • sequence number of the video frame being played by the receiving end is greater than or equal to the sequence number of the video frame waiting to be sent by the transmitting end, it is determined that the video frame waiting for the sending end of the transmitting end is delayed.
  • the embodiment of the invention further discloses a method for predicting a delay of a video service, comprising: predicting a sequence number of an SDU of a video frame being played by the receiving end;
  • sequence number of the SDU of the video frame being played by the receiving end is greater than or equal to the sequence number of the SDU that the transmitting end is waiting to send, it is determined that the SDU waiting to be sent by the transmitting end has a delay.
  • the embodiment of the present invention further discloses an apparatus for predicting a delay of a video service, comprising: a first prediction unit, configured to predict a sequence number of a video frame being played by the receiving end; and a first acquiring unit, configured to acquire a sending end a sequence number of the transmitted video frame, where the first time delay determining unit is configured to determine, if the sequence number of the video frame predicted by the first prediction unit is greater than or equal to the sequence number of the video frame acquired by the first acquiring unit, The video frame acquired by the first acquiring unit will have a delay.
  • the embodiment of the invention further discloses an apparatus for predicting a delay of a video service, which comprises: a second prediction unit, configured to: predict a sequence number of the SDU of the video frame being played by the receiving end; a second acquiring unit, configured to acquire a sequence number of the SDU that the transmitting end is waiting to send; and a third time delay determining unit, configured to The sequence number of the SDU predicted by the second prediction unit is greater than or equal to the sequence number of the SDU acquired by the second acquiring unit, and the SDU obtained by the second acquiring unit is determined to have a delay.
  • the method and the device provided by the embodiments of the present invention can predict whether a video frame will have a delay on the network side, so that the network side takes corresponding measures to improve the efficiency of network transmission.
  • FIG. 1 is a correspondence between a video frame, an RTP, and an SDU in the prior art
  • FIG. 2 is a flow chart of a method for predicting a delay of a video service according to Embodiment 1 of the present invention
  • FIG. 3 is a flow chart of a method for predicting a delay of a video service according to Embodiment 2 of the present invention.
  • FIG. 4 is a structural diagram of an apparatus for predicting a delay of a video service according to Embodiment 3 of the present invention.
  • FIG. 5 is a structural diagram of an apparatus for predicting a delay of a video service according to Embodiment 4 of the present invention.
  • Figure 6 is a diagram showing the data structure of the first record table and the second record table used in the embodiment of the present invention. detailed description
  • Embodiment 1 of the present invention a method for predicting a delay of a video service according to Embodiment 1 of the present invention is provided.
  • the flow chart of the method includes the following steps:
  • Step 201 Prediction of a sequence number of a video frame being played by the receiving end.
  • the sequence number of the video frame currently being played by the receiving end is estimated.
  • the time stamp of the video frame is used as the serial number of the video frame.
  • Predicting the sequence number of the video frame being played by the receiving end for example, obtaining the playing duration of the receiving end and the playing speed of the receiving end, and then estimating the sequence number of the video frame being played by the receiving end at the current moment.
  • RTCP packet includes one or more fields carrying a sequence number of the SDU to be decoded by the receiving end, and estimating the sequence of the video frame being played by the receiving end by using the RTCP packet number.
  • RTCP When the receiving application starts an RTP session, it uses two ports: one for RTP to transmit service data and one for RTCP for transmission control.
  • RTCP In the process of video service transmission, RTCP periodically reports network feedback information to the sender, so that the sender can take corresponding measures, such as reliability control, flow control or congestion control.
  • the RTCP packet is used to estimate the sequence number of the video frame being played by the receiving end. For example, when the network side of the transmitting end receives the network feedback information RTCP packet from the receiving end, it parses out the network feedback information.
  • the sequence number of the next RTP packet to be decoded ie, the sequence number of the SDU
  • the sequence number of the video frame currently being played by the receiving end is then estimated by the sequence number of the next video frame to be played.
  • the sequence number of the next video frame to be played can be obtained as follows.
  • a first record table (see FIG. 6) is designed to record the correspondence between the sequence number of the RTP packet (ie, the sequence number of the SDU) and the sequence number of the video frame to which the SDU belongs.
  • the sequence of the video frame to which the SDU belongs can be retrieved from the first record table, and the sequence number of the video frame is the sequence of the next video frame to be played. Column number.
  • the sequence number of the video frame currently being played by the receiving end is then estimated by the sequence number of the next video frame to be played.
  • the sequence numbers of adjacent video frames differ by one time stamp. For example, if the frame rate is 10 frames/s, which means that there are 10 frames per unit time, if the timestamp of the frame starts from 0, then the timestamp corresponding to the video frame can be inferred to be 0, 0.1, 0.2... ..0.9 1.0. If the sequence number of the video frame is 11.0, the sequence number of the adjacent previous video frame is 10.9, and the sequence number differs by 1 time stamp, that is, 0.1.
  • the timestamp is generally equal to the reciprocal of the frame rate, but there may be some deviation.
  • the estimated value can be set to a time stamp, and the video frame being played by the receiving end can be obtained by subtracting the estimated value from the sequence number of the next video frame to be played. If the network delay is too strong, it is also possible for the receiving end to skip the next played video frame. In this case, the estimated value can be set to zero or negative, and the absolute value of the estimated value is equal to an integer multiple of the timestamp. The serial number of the next played video frame is subtracted from the estimated value to obtain the sequence number of the video frame being played by the receiving end.
  • the estimated value can also be set to a coefficient related to the network delay condition. The more the network delay is, the smaller the estimated value should be. Then, the video value of the next video frame to be played by the receiving end is subtracted from the estimated value to obtain the video being played by the receiving end.
  • the serial number of the frame is also be set to a coefficient related to the network delay condition. The more the network delay is, the smaller the estimated value should be. Then, the video value of the next video frame to be played by the receiving end is subtracted from the estimated value to obtain the video being played by the receiving end. The serial number of the frame.
  • the network side can also predict the video frame currently being played by the receiving end by using other methods. For example, according to the sequence number of the video frame, all the serial numbers of the video frames that have been successfully sent by the network side are recorded in the record table, and the next one is obtained. After the serial number of the video frame to be played, the video frame closest to the sequence number of the next video frame to be played is retrieved from the record table.
  • the video frame being played by the receiving end is only a kind of prediction, and does not represent the video frame actually played by the receiving end, nor is it limited to the video frame actually played by the receiving end.
  • Other video frames can also be used as the currently playing video frame: for example, it can be directly
  • the video frame corresponding to the next RTP that needs to be decoded is used as the currently played video frame, or the sequence number of the video frame is directly subtracted by a certain value as the video frame being played by the receiving end.
  • Step 202 Acquire a sequence number of a video frame that the sending end is waiting to send.
  • the video frames are transmitted in the form of SDUs.
  • the SDUs need to be obtained from other network elements.
  • the sender can select an SDU from the SDU queue that is waiting to be sent, and obtain the video frame to which the SDU belongs.
  • the video frame is the video frame that the sender waits to send.
  • the specific implementation manner for example, designing a second record table (see FIG. 6), only records the SDU currently needed to be transmitted, and the correspondence between the SDU and the belonging video frame.
  • the SDU with the smallest sequence number is selected from the second record table, and the sequence number of the video frame to which the SDU belongs is obtained from the second record table.
  • the SDU is successfully sent, it is deleted from the second record table.
  • step 202 may only obtain the sequence number of the video frame corresponding to the SDU that needs to be retransmitted. SDUs may have errors during transmission and need to be retransmitted. If the retransmission exceeds a certain number of times, delays are likely to occur.
  • This function can be implemented using a second record table, for example, only the SDUs that need to be retransmitted are recorded in the second record table, thereby further improving efficiency.
  • steps 201 and 202 can be interchanged.
  • Step 203 Determine whether a delay occurs in the video frame that the sending end waits for sending.
  • the sequence number of the video frame being played by the receiving end is greater than or equal to the sequence number of the video frame that the transmitting end is waiting to send, that is, the sequence number of the video frame predicted by step 201 is greater than or equal to the sequence number of the video frame obtained in step 202, and the determining step
  • the video frame acquired by 202 will have a delay.
  • the inventor has found that, in general, as the receiving end of the user, the video frame with a small serial number will be played in time, and then the video frame with a large serial number will be played, and the serial number itself implies the information of the playing time.
  • the sequence number of the video frame being played by the receiving end is greater than or equal to the sequence number of the video frame that the transmitting end is waiting to transmit, the playing time of the video frame waiting for the sending end of the transmitting end has passed, even if the video frame waiting to be sent arrives.
  • the result is also a delay; on the contrary, If the video frame waiting to be sent by the transmitting end does not have a delay, the video frame whose sequence number is larger than the video frame that the transmitting end is waiting to transmit may not have a delay.
  • the first embodiment may further include the step of: after determining, in step 203, that the video frame waiting to be sent by the transmitting end is delayed, acquiring a sequence number of other video frames that the transmitting end is waiting to send, if the sending end is waiting to be sent.
  • the video frame does not have a delay, and it is judged that the video frame in the other video frames is larger than the video frame that the transmitting end is waiting to transmit.
  • the second record table of step 202 may be used to sort the second record table according to the sequence number of the video frame from small to large. If the video frame waiting for the sending end does not delay, the time is not delayed. The video frame below the video frame waiting to be transmitted by the transmitting end in the second recording table does not have a delay, which can greatly improve the efficiency.
  • This embodiment provides a method for predicting whether the network side predicts whether a video frame waiting to be sent will be delayed, and accordingly Measures to improve the efficiency of the network.
  • a flowchart of a method for predicting a delay of a video service according to Embodiment 2 of the present invention includes the following steps:
  • Step 301 Predict a sequence number of an SDU of a video frame being played by the receiving end.
  • the sequence number of the SDU of the video frame currently being played by the receiving end is estimated.
  • the specific implementation manner is that, by using the playing duration of the receiving end and the playing speed of the receiving end, the serial number of the video frame being played by the receiving end is estimated at the current moment, and then the serial number of an SDU of the video frame is obtained.
  • Another method is to calculate the sequence number of the SDU of the video frame being played by the receiving end through the network feedback information. For example, a field may be added to the network feedback information to carry the next SDU sequence number to be decoded at the receiving end. With this serial number, the serial number of the video frame corresponding to the SDU can be obtained, and the serial number of the video frame being played by the receiving end can be estimated by using the serial number of the video frame, and then an SDU of the video frame being played is selected. Serial number. Specifically, the following steps can be used to predict the video frame being played by the receiving end.
  • the serial number of the SDU is the serial number of the SDU.
  • the first step is to obtain network feedback information currently from the receiving end.
  • the network feedback information RTCP packet currently received from the receiving end is obtained, and one or more fields in the RTCP packet carry the sequence number of the SDU to be decoded by the receiving end.
  • the network feedback information is parsed.
  • the sequence number of the next SDU to be decoded at the receiving end is parsed.
  • the sequence number of the next video frame to be decoded at the receiving end is obtained.
  • a first record table may be designed to record the correspondence between the sequence number of the RTP packet (i.e., the sequence number of the SDU) and the sequence number of the video frame to which the SDU belongs. After obtaining the sequence number of the next SDU to be decoded, the video frame sequence number to which the SDU belongs can be retrieved from the first record table, and the video frame sequence number is the sequence number of the next video frame to be played.
  • the serial number of the video frame currently being played by the receiving end is estimated.
  • the sequence number of the video frame currently being played by the receiving end can be estimated.
  • the estimate can be set to a timestamp; if the network delay is too high, it is possible for the receiver to skip the next played video frame. In this case, the estimate can be set to zero or negative, the absolute value of the estimate. The value is equal to an integer multiple of the timestamp.
  • an SDU belonging to the currently played video frame is obtained.
  • a video frame corresponds to multiple SDUs
  • an SDU may be selected from the SDUs of the video frames that are being played by the receiving end, for example, selecting the serial number of the SDU with the largest serial number in the video frame being played, as the video frame being played. The serial number of the SDU.
  • Step 302 Obtain a sequence number of the SDU that the sending end is waiting to send.
  • SDUs There may be multiple SDUs waiting to be sent on the network side, and the sender can wait for SDUs to be sent. Select an SDU in the queue.
  • a second record table is used to record the sequence numbers of all SDUs that the sender is waiting to transmit, and the SDU with the smallest sequence number is selected as the sender to wait for the SDU to be sent.
  • the SDU is successfully sent, it is deleted from the second record table.
  • step 302 may only obtain the sequence number of the SDU that needs to be retransmitted, because the retransmission of the SDU is more likely to occur.
  • This function can be implemented by using the second record table.
  • the second record table can record only the sequence number of the SDU that needs to be retransmitted, thereby improving efficiency.
  • steps 301 and 302 can be interchanged.
  • Step 303 Determine whether a delay occurs in the SDU that the sending end waits for sending.
  • sequence number of the SDU of the video frame being played by the receiving end is greater than or equal to the sequence number of the SDU that the transmitting end is waiting to send, that is, the sequence number of the SDU predicted by the step 301 is greater than or equal to the sequence number of the SDU obtained in step 302. It is determined that the SDU waiting to be sent by the transmitting end will have a delay.
  • the inventor has found that, in general, the sequence numbers of the SDUs are sorted in a small to large manner. If a video frame corresponding to an SDU having a large serial number has been played, the video frame corresponding to the SDU having a small serial number is described. The playback time has elapsed, that is, if the SDU arrives at the receiving end, a delay will occur.
  • the embodiment may further include the following steps: after determining that the SDU obtained in step 302 is delayed, the sequence number of other SDUs that the sending end waits to send is obtained, and the sequence number ratio of the other SDUs is determined.
  • the SDU with a large SDU obtained will not have a delay.
  • This embodiment provides a method for predicting whether the SDU of the video frame that the transmitting end is waiting to send will have a delay. It is convenient for the network side to handle in advance.
  • the delay of predicting video service is provided in Embodiment 3 of the present invention.
  • the structural diagram of the device including:
  • the first prediction unit 401 is configured to predict a sequence number of a video frame that is being played by the receiving end.
  • the receiving end will feed back the network information RTCP packet.
  • the RTCP packet needs to carry the sequence number of the next SDU to be decoded at the receiving end, and the serial number can be used to calculate the receiving.
  • the first prediction unit 401 includes a feedback information acquisition unit and a calculation unit.
  • the feedback information obtaining unit is configured to obtain network feedback information currently received from the receiving end, where the network feedback information includes one or more fields for carrying the sequence number of the SDU to be decoded by the receiving end.
  • a calculating unit configured to: after the feedback information acquiring unit receives the network feedback information RTCP from the receiving end, parse the sequence number of the next RTP packet that needs to be decoded (ie, the serial number of the SDU) from the network feedback information, and With this serial number, the sequence number of the video frame to which the SDU package belongs can be obtained.
  • the video frame is the next video frame to be played by the receiving end, and then the serial number of the next video frame to be played is used to estimate the receiving end.
  • the serial number of the video frame currently being played Specifically, it can be estimated by the following subunits:
  • the first record table unit is configured to record a correspondence between a sequence number of the RTP packet (ie, a sequence number of the SDU) and a sequence number of the video frame to which the SDU belongs.
  • the parsing subunit is configured to parse the network feedback information acquired by the feedback information acquiring unit to obtain the sequence number of the next SDU to be decoded by the receiving end.
  • the estimation subunit can retrieve the video frame to which the SDU parsed by the parsing subunit belongs from the first record table unit, and the sequence number of the video frame is the next one.
  • the estimation subunit subtracts the sequence number of the video frame by an estimated value, and can estimate the sequence number of the video frame currently being played by the receiving end.
  • the estimated value you can Set the estimate to a timestamp; if the network delay is too strong, it is possible for the receiver to skip the next played video frame. In this case, you can set the estimate to zero or negative, the absolute value of the estimate. Equal to one or more timestamps.
  • the currently played video frame is only used as a criterion for judging the possibility of delay in the video frame to be transmitted. There may be various ways of determining, and it is not limited to the actual played video frame.
  • the first obtaining unit 402 is configured to acquire a sequence number of a video frame that the transmitting end is waiting to send.
  • Video frames are transmitted in the form of SDUs.
  • the sender can select an SDU from the SDU queue that is waiting to be sent, and obtain the video frame to which the SDU belongs.
  • the video frame is the video frame that the sender waits to send.
  • the first obtaining unit 402 may include a second recording table unit, configured to record all SDUs that need to be sent to the receiving end at the transmitting end, and a correspondence between the SDU and the associated video frame.
  • the first obtaining unit 402 further includes a a search subunit, configured to select an SDU with the smallest sequence number from the second record table unit, and obtain a sequence number of the video frame to which the SDU belongs from the second record table, and after the SDU is successfully sent, remove the SDU from the second record table Deleted from the record table.
  • the first time delay determining unit 403 is configured to determine whether a video frame waiting to be sent by the transmitting end has a delay.
  • the terminal that is acquired by the first acquiring unit 402 is determined to wait.
  • the video frame sent will have a delay.
  • the inventor has found that, in general, as the receiving end of the user, the video frame with a small serial number will be played in time, and then the video frame with a large serial number will be played, and the serial number itself implies the information of the playing time. Therefore, if the sequence number of the video frame being played by the receiving end is greater than the sequence number of the video frame that the transmitting end is waiting to transmit, the playing time of the video frame waiting for the sending end of the transmitting end has passed, even if the video frame waiting to be sent arrives at the receiving At the end, the result is also a delay.
  • the embodiment may further include a second time delay determining unit, configured to acquire the sending end and wait for The other video frames are sent (excluding the video frames acquired by the first obtaining unit 402). If the first time delay determining unit 403 determines that the video frames acquired by the first obtaining unit 402 do not have a delay, the other video frames are determined. The video frame whose sequence number is larger than the sequence number acquired by the first acquisition unit 402 does not have a delay.
  • the network side cannot predict whether a video frame that has not been sent will be delayed.
  • This embodiment provides a device that can predict whether a video frame waiting to be sent by the transmitting end will have a delay, thereby facilitating the network side to make an advance. deal with.
  • FIG. 5 it is a structural diagram of an apparatus for predicting a delay of a video service according to Embodiment 4 of the present invention, including:
  • the second prediction unit 501 is configured to predict a sequence number of the SDU of the video frame being played by the receiving end.
  • the SDU serial number to be decoded by the receiving end can be carried through the network feedback information. With this serial number, the serial number of the video frame corresponding to the SDU can be obtained. The serial number of the video frame can estimate the serial number of the video frame being played by the receiving end, and then select an SDU of the video frame being played. Serial number.
  • the second prediction unit 501 may include the following subunits: a first record table unit, a network feedback information acquisition unit, a parsing subunit, an estimation subunit, and a query word unit.
  • the first record table unit is configured to record a correspondence between a sequence number of the RTP packet (ie, a sequence number of the SDU) and a sequence number of the video frame to which the SDU belongs.
  • the network feedback information acquiring unit is configured to obtain network feedback information currently from the receiving end, where the network feedback information includes a sequence number of the next SDU to be decoded by the receiving end.
  • a parsing subunit configured to parse the network feedback information acquired by the network feedback information acquiring unit, to obtain a sequence number of the SDU to be decoded by the receiving end.
  • An estimation subunit configured to retrieve, from the parsing subunit, a sequence number of a video frame to which the SDU belongs, after the sequence number of the next SDU to be decoded, the video frame sequence number is the next one to be
  • the serial number of the played video frame the serial number of the video frame is subtracted from an estimated value to estimate the serial number of the video frame being played by the receiving end.
  • the size of the estimate it can be set to a timestamp. If the network delay is too strong, the receiver may skip the next played video frame. In this case, the estimated value can be set to zero or negative.
  • the absolute value of the value is equal to one or more timestamps.
  • Querying a subunit configured to retrieve, from the first record table unit, a video frame that is being played
  • the serial number of one SDU with the largest serial number in the video frame being played can be selected.
  • the second obtaining unit 502 is configured to obtain a sequence number of the SDU that the transmitting end is waiting to send. There may be multiple SDUs waiting to be sent on the network side, and the second obtaining unit 502 may select one SDU from the SDU queues waiting to be sent.
  • a second record table is used to record the sequence numbers of all SDUs that the sender is waiting to transmit, and the SDU with the smallest sequence number is selected as the sender to wait for the SDU to be sent.
  • the SDU is successfully sent, it is deleted from the second record table.
  • the third delay determining unit 503 is configured to determine whether a delay occurs in the SDU that the transmitting end is waiting to send.
  • the SDU acquired by the second obtaining unit 502 may be delayed.
  • the embodiment may further include a fourth time delay determining unit, configured to acquire other SDUs that the sending end is waiting to send, and if the SDU acquired by the second obtaining unit 502 does not have a delay, determine the serial number ratio of the other SDUs.
  • the SDU with the SDU that is acquired by the second obtaining unit 502 does not have a delay.
  • the network side cannot predict whether the SDU that has not been sent will be delayed.
  • This embodiment provides a device that can predict whether the SDU waiting to be sent by the sending end will delay, so that the network side can facilitate the processing in advance.
  • the above described embodiments of the invention may be implemented by software, and the corresponding software may be stored in a readable storage medium, such as a hard disk, an optical disk or a floppy disk of a computer.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present invention discloses a method and an apparatus for prediction of time delay of video service, and said method includes: predicting the sequence number of the video frame being displayed in the receiver; obtaining the sequence number of the video frame waiting for being sent in the transmitter; judging the time delay would happen to the video frame waiting for being sent in the transmitter, if the sequence number of the video frame being displayed in said receiver is greater than or equal to the sequence number of the video frame waiting for being sent in said transmitter. Said apparatus comprises: the 1st prediction unit for predicting the sequence number of the video frame being displayed in the receiver; the 1st obtaining unit for obtaining the sequence number of the video frame waiting for being sent in the transmitter; the 1st time delay judging unit for judging the time delay would happen to the video frame obtained by said 1st obtaining unit, if the sequence number of the video frame predicted by said 1st prediction unit is greater than or equal to the sequence number of the video frame obtained by said 1st obtaining unit. Said method and apparatus are able to predict whether the time delay would happen to the video frame waiting for being sent or not on the network side.

Description

预测视频业务发生时延的方法和装置 本申请要求于 2008 年 12 月 22 日提交中国专利局, 申请号为 200810241546.0, 发明名称为 "预测视频业务发生时延的方法和装置" 的 中国专利申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域  METHOD AND APPARATUS FOR PREDICTING TIME TENDENCY OF VIDEO SERVICE This application claims to be filed on Dec. 22, 2008, the Chinese Patent Application No. 200810241546.0, entitled "Method and Apparatus for Predicting Time Delay of Video Services" Priority is hereby incorporated by reference in its entirety. Technical field
本发明涉及通信领域, 特别涉及一种预测视频业务发生时延的方法和 装置。 背景技术  The present invention relates to the field of communications, and in particular, to a method and apparatus for predicting a delay of a video service. Background technique
视频业务是把数据实时从服务端下载到移动终端进行播放, 其最大的 特点是用户不必等到整个文件全部下载完毕, 而只需经过几秒或十数秒的 启动时延即可使用。  The video service downloads data from the server to the mobile terminal in real time for playback. The biggest feature is that the user does not have to wait until the entire file has been downloaded, and only needs a few seconds or ten seconds of startup delay to use.
视频业务使用的传输协议有 RTP ( Real-time Transport Protocol, 实时 传输协议) 、 RTCP ( RTP Control Protocol , RTP 控制协议) 和 RTSP ( Real-Time Streaming Protocol, 实时流媒体协议 ) 。 RTSP在体系结构上 位于 RTP和 RTCP之上。 它使用 TCP或 RTP完成数据传输。  The transmission protocols used by the video service include RTP (Real-time Transport Protocol), RTCP (RTP Control Protocol), and Real-Time Streaming Protocol (RTSP). RTSP is architecturally located on top of RTP and RTCP. It uses TCP or RTP for data transfer.
现有技术中,发送端将一个视频帧分割成若干个 RTP包, 然后将这些 In the prior art, the transmitting end divides a video frame into several RTP packets, and then these
RTP包以 SDU ( Service Data Unit, 服务数据单元 ) 为载体发送到无线网 络中进行传输。 如图 1所示, 其为视频帧的分包与承载示意图。 接收端接 收到 SDU, 从而获得 RTP包, 然后将属于同一个视频帧的 RTP包组合成 为一个视频帧, 最后将组合后的视频帧按照顺序一帧一帧地进行播放。 The RTP packet is transmitted to the wireless network by using an SDU (Service Data Unit) as a carrier for transmission. As shown in FIG. 1, it is a schematic diagram of packetization and bearer of a video frame. The receiving end receives the SDU, thereby obtaining the RTP packet, and then combining the RTP packets belonging to the same video frame into one video frame, and finally playing the combined video frames one frame at a time in sequence.
视频播放过程中往往会出现跳频、 马赛克现象, 主要是丟包引起, 其 中包括时延丟包。 时延丟包含义为终端按顺序播放视频帧, 每一帧都有固 定的播放时刻, 如果视频数据晚于其播放时刻到达终端就称之为时延, 该 数据没有任何用处, 会被终端丟弃, 即产生时延丟包。 Frequency hopping and mosaic phenomena often occur during video playback, mainly due to packet loss, including delay packet loss. The delay is lost. The terminal plays the video frame in sequence, and each frame has a fixed playing time. If the video data arrives at the terminal later than the playing time, it is called a delay. The data has no use and will be discarded by the terminal, that is, the delay packet is lost.
现有技术尚不能在网络侧预测等待发送的视频帧是否会发生时延。 发明内容  The prior art cannot predict whether a video frame waiting to be transmitted will have a delay on the network side. Summary of the invention
本发明实施例公开了一种能够在网络侧预测视频业务是否发生时延 的方法和装置, 以便网络侧及时采取相应的措施, 从而提高视频业务传输 的效率, 所述方案如下:  The embodiment of the invention discloses a method and a device for predicting whether a video service has a delay on the network side, so that the network side can take corresponding measures in time to improve the efficiency of video service transmission. The solution is as follows:
本发明实施例公开了一种预测视频业务发生时延的方法, 包括: 预测接收端正在播放的视频帧的序列号;  The embodiment of the invention discloses a method for predicting the delay of a video service, which comprises: predicting a sequence number of a video frame being played by the receiving end;
获取发送端等待发送的视频帧的序列号;  Obtaining a sequence number of a video frame that the transmitting end is waiting to send;
如果所述接收端正在播放的视频帧的序列号大于或等于所述发送端 等待发送的视频帧的序列号, 判断所述发送端等待发送的视频帧会发生时 延。  If the sequence number of the video frame being played by the receiving end is greater than or equal to the sequence number of the video frame waiting to be sent by the transmitting end, it is determined that the video frame waiting for the sending end of the transmitting end is delayed.
本发明实施例还公开了一种预测视频业务发生时延的方法, 包括: 预测接收端正在播放的视频帧的 SDU的序列号;  The embodiment of the invention further discloses a method for predicting a delay of a video service, comprising: predicting a sequence number of an SDU of a video frame being played by the receiving end;
获取发送端等待发送的 SDU的序列号;  Obtaining the serial number of the SDU that the sender waits to send;
如果所述接收端正在播放的视频帧的 SDU 的序列号大于或者等于所 述发送端等待发送的 SDU的序列号, 判断所述发送端等待发送的 SDU会 发生时延。  If the sequence number of the SDU of the video frame being played by the receiving end is greater than or equal to the sequence number of the SDU that the transmitting end is waiting to send, it is determined that the SDU waiting to be sent by the transmitting end has a delay.
本发明实施例还公开了一种预测视频业务发生时延的装置, 包括: 第一预测单元, 用于预测接收端正在播放的视频帧的序列号; 第一获取单元, 用于获取发送端等待发送的视频帧的序列号; 第一时延判断单元, 用于如果所述第一预测单元预测的视频帧的序列 号大于或者等于所述第一获取单元获取的视频帧的序列号, 判断所述第一 获取单元获取的视频帧会发生时延。  The embodiment of the present invention further discloses an apparatus for predicting a delay of a video service, comprising: a first prediction unit, configured to predict a sequence number of a video frame being played by the receiving end; and a first acquiring unit, configured to acquire a sending end a sequence number of the transmitted video frame, where the first time delay determining unit is configured to determine, if the sequence number of the video frame predicted by the first prediction unit is greater than or equal to the sequence number of the video frame acquired by the first acquiring unit, The video frame acquired by the first acquiring unit will have a delay.
本发明实施例还公开了一种预测视频业务发生时延的装置, 包括: 第二预测单元, 用于预测接收端正在播放的视频帧的 SDU的序列号; 第二获取单元, 用于获取发送端等待发送的 SDU的序列号; 第三时延判断单元, 用于如果所述第二预测单元预测的 SDU 的序列 号大于或者等于所述第二获取单元获取的 SDU 的序列号, 判断所述第二 获取单元获取的 SDU会发生时延。 The embodiment of the invention further discloses an apparatus for predicting a delay of a video service, which comprises: a second prediction unit, configured to: predict a sequence number of the SDU of the video frame being played by the receiving end; a second acquiring unit, configured to acquire a sequence number of the SDU that the transmitting end is waiting to send; and a third time delay determining unit, configured to The sequence number of the SDU predicted by the second prediction unit is greater than or equal to the sequence number of the SDU acquired by the second acquiring unit, and the SDU obtained by the second acquiring unit is determined to have a delay.
本发明实施例提供的方法和装置, 能够在网络侧预测视频帧是否会发 生时延, 以便网络侧采取相应的措施, 提高网络传输的效率。 附图说明  The method and the device provided by the embodiments of the present invention can predict whether a video frame will have a delay on the network side, so that the network side takes corresponding measures to improve the efficiency of network transmission. DRAWINGS
图 1 为现有技术中视频帧、 RTP和 SDU的对应关系;  FIG. 1 is a correspondence between a video frame, an RTP, and an SDU in the prior art;
图 2为本发明实施例一提供的一种预测视频业务发生时延的方法的流 程图;  2 is a flow chart of a method for predicting a delay of a video service according to Embodiment 1 of the present invention;
图 3为本发明实施例二提供的一种预测视频业务发生时延的方法的流 程图;  3 is a flow chart of a method for predicting a delay of a video service according to Embodiment 2 of the present invention;
图 4为本发明实施例三提供的一种预测视频业务发生时延的装置的结 构图;  4 is a structural diagram of an apparatus for predicting a delay of a video service according to Embodiment 3 of the present invention;
图 5为本发明实施例四提供的一种预测视频业务发生时延的装置的结 构图;  FIG. 5 is a structural diagram of an apparatus for predicting a delay of a video service according to Embodiment 4 of the present invention;
图 6为本发明实施例中所使用到的第一记录表和第二记录表的数据结 构图。 具体实施方式  Figure 6 is a diagram showing the data structure of the first record table and the second record table used in the embodiment of the present invention. detailed description
为使本发明的目的、 技术方案和优点更加清楚, 下面将结合附图对本 发明的几个实施例作进一步地详细的描述。  In order to make the objects, technical solutions and advantages of the present invention more comprehensible, several embodiments of the present invention will be described in detail below.
实施例一  Embodiment 1
参见图 2, 为本发明实施例一提供的一种预测视频业务发生时延的方 法的流程图, 包括如下步骤: Referring to FIG. 2, a method for predicting a delay of a video service according to Embodiment 1 of the present invention is provided. The flow chart of the method includes the following steps:
步骤 201 , 预测接收端正在播放的视频帧的序列号。  Step 201: Prediction of a sequence number of a video frame being played by the receiving end.
即估算接收端当前时刻正在播放的视频帧的序列号, 一般情况下采用 视频帧的时间戳作为视频帧的序列号。  That is, the sequence number of the video frame currently being played by the receiving end is estimated. Generally, the time stamp of the video frame is used as the serial number of the video frame.
预测接收端正在播放的视频帧的序列号, 其具体实现方式, 例如, 获 取接收端的播放时长和接收端的播放速度, 然后估算出当前时刻接收端正 在播放的视频帧的序列号。  Predicting the sequence number of the video frame being played by the receiving end, for example, obtaining the playing duration of the receiving end and the playing speed of the receiving end, and then estimating the sequence number of the video frame being played by the receiving end at the current moment.
或者, 获取接收端反馈的网络反馈信息 RTCP包, 该 RTCP包中包含 一个或多个字段携带接收端将被解码的 SDU的序列号, 通过该 RTCP 包 来估算接收端正在播放的视频帧的序列号。  Or obtaining a network feedback information RTCP packet fed back by the receiving end, where the RTCP packet includes one or more fields carrying a sequence number of the SDU to be decoded by the receiving end, and estimating the sequence of the video frame being played by the receiving end by using the RTCP packet number.
当接收端的应用程序开始一个 RTP 会话时会使用两个端口: 一个给 RTP用来传输业务数据, 一个给 RTCP用来进行传输控制。 在视频业务传 输的过程中, RTCP会周期性上报网络反馈信息给发送端, 以便于发送端 采取相应的措施, 如进行传输的可靠性控制、 流量控制或拥塞控制等。  When the receiving application starts an RTP session, it uses two ports: one for RTP to transmit service data and one for RTCP for transmission control. In the process of video service transmission, RTCP periodically reports network feedback information to the sender, so that the sender can take corresponding measures, such as reliability control, flow control or congestion control.
通过该 RTCP包来估算接收端正在播放的视频帧的序列号, 具体的实 现方法, 例如, 当发送端的网络侧接收到来自于接收端的网络反馈信息 RTCP包后,从该网络反馈信息中解析出下一个需要被解码的 RTP包的序 列号 (即 SDU的序列号) , 通过此序列号, 就可以得到该 SDU包所对应 的视频帧的序列号, 该视频帧为接收端下一个将被播放的视频帧。 然后通 过该下一个将被播放的视频帧的序列号估算接收端当前正在播放的视频 帧的序列号。  The RTCP packet is used to estimate the sequence number of the video frame being played by the receiving end. For example, when the network side of the transmitting end receives the network feedback information RTCP packet from the receiving end, it parses out the network feedback information. The sequence number of the next RTP packet to be decoded (ie, the sequence number of the SDU), through which the sequence number of the video frame corresponding to the SDU packet is obtained, and the video frame is the next receiver to be played. Video frame. The sequence number of the video frame currently being played by the receiving end is then estimated by the sequence number of the next video frame to be played.
其中, 可以通过如下方式得到下一个将被播放的视频帧的序列号。 例 如, 设计一个第一记录表(参见图 6 ) , 记录 RTP 包的序列号 (即 SDU 的序列号) 和 SDU所属的视频帧的序列号之间的对应关系。 当获得了下 一个将被解码的 SDU的序列号之后, 就可以从第一记录表检索出 SDU所 属的视频帧序列号, 这个视频帧序列号就是下一个将被播放的视频帧的序 列号。 The sequence number of the next video frame to be played can be obtained as follows. For example, a first record table (see FIG. 6) is designed to record the correspondence between the sequence number of the RTP packet (ie, the sequence number of the SDU) and the sequence number of the video frame to which the SDU belongs. After obtaining the serial number of the next SDU to be decoded, the sequence of the video frame to which the SDU belongs can be retrieved from the first record table, and the sequence number of the video frame is the sequence of the next video frame to be played. Column number.
然后通过该下一个将被播放的视频帧的序列号估算接收端当前正在 播放的视频帧的序列号。  The sequence number of the video frame currently being played by the receiving end is then estimated by the sequence number of the next video frame to be played.
一般情况下, 相邻视频帧的序列号相差一个时间戳。 例如, 如果帧率 为 10帧 /s, 表示单位时间内有 10个帧, 如果帧的时间戳从 0开始, 那么 可以推算出视频帧依次所对应的时间戳为 0、 0.1、 0.2.....0.9 1.0。 如果视 频帧的序列号为 11.0 , 则相邻的上一个视频帧的序列号就为 10.9 , 序列号 之间相差 1 个时间戳即 0.1。 时间戳一般等于帧率的倒数, 但可能会有些 偏差。  In general, the sequence numbers of adjacent video frames differ by one time stamp. For example, if the frame rate is 10 frames/s, which means that there are 10 frames per unit time, if the timestamp of the frame starts from 0, then the timestamp corresponding to the video frame can be inferred to be 0, 0.1, 0.2... ..0.9 1.0. If the sequence number of the video frame is 11.0, the sequence number of the adjacent previous video frame is 10.9, and the sequence number differs by 1 time stamp, that is, 0.1. The timestamp is generally equal to the reciprocal of the frame rate, but there may be some deviation.
因此, 可以将估算值设置为一个时间戳, 用下一个将要播放的视频帧 的序列号减去该估算值即可得到接收端正在播放的视频帧。 如果网络延迟 的比较厉害, 接收端也有可能跳过下一个播放的视频帧, 在这种情况下, 可以将估算值设置为零或者负数, 估算值的绝对值等于时间戳的整数倍, 再用下一个播放的视频帧的序列号减去该估算值, 得到接收端正在播放的 视频帧的序列号。  Therefore, the estimated value can be set to a time stamp, and the video frame being played by the receiving end can be obtained by subtracting the estimated value from the sequence number of the next video frame to be played. If the network delay is too strong, it is also possible for the receiving end to skip the next played video frame. In this case, the estimated value can be set to zero or negative, and the absolute value of the estimated value is equal to an integer multiple of the timestamp. The serial number of the next played video frame is subtracted from the estimated value to obtain the sequence number of the video frame being played by the receiving end.
估算值也可以设置为一个与网络延迟状况相关的系数, 网络延迟越厉 害, 则估算值应当越小, 然后用接收端下一个将要播放的视频帧减去该估 算值得到接收端正在播放的视频帧的序列号。  The estimated value can also be set to a coefficient related to the network delay condition. The more the network delay is, the smaller the estimated value should be. Then, the video value of the next video frame to be played by the receiving end is subtracted from the estimated value to obtain the video being played by the receiving end. The serial number of the frame.
网络侧也可以通过其它方式预测接收端当前播放的视频帧, 例如, 依 据视频帧的序列号的大小, 将网络侧已经成功发送的视频帧的序列号全部 记录到记录表中, 当得到下一个将要播放的视频帧的序列号之后, 从该记 录表中检索出与该下一个将要播放的视频帧的序列号最接近的那个视频 帧。  The network side can also predict the video frame currently being played by the receiving end by using other methods. For example, according to the sequence number of the video frame, all the serial numbers of the video frames that have been successfully sent by the network side are recorded in the record table, and the next one is obtained. After the serial number of the video frame to be played, the video frame closest to the sequence number of the next video frame to be played is retrieved from the record table.
需要注意的是, 此处所称的接收端正在播放的视频帧, 仅仅是一种预 测, 并不代表接收端当前实际播放的视频帧, 也不限于接收端实际播放的 视频帧。 也可以使用其它视频帧作为当前播放的视频帧: 例如可以直接将 需要解码的下一个 RTP所对应的视频帧作为当前播放的视频帧,或者将该 视频帧的序列号直接减去一定的数值作为接收端正在播放的视频帧。 It should be noted that the video frame being played by the receiving end is only a kind of prediction, and does not represent the video frame actually played by the receiving end, nor is it limited to the video frame actually played by the receiving end. Other video frames can also be used as the currently playing video frame: for example, it can be directly The video frame corresponding to the next RTP that needs to be decoded is used as the currently played video frame, or the sequence number of the video frame is directly subtracted by a certain value as the video frame being played by the receiving end.
步骤 202, 获取发送端等待发送的视频帧的序列号。  Step 202: Acquire a sequence number of a video frame that the sending end is waiting to send.
视频帧都是以 SDU 的形式进行传输的, 作为发送端的网络侧, 也需 要从其它网元获取 SDU, 同时发送端可能存在多个 SDU等待发送。 发送 端可以从等待发送的 SDU队列中选择一个 SDU,获取该 SDU所属的视频 帧, 该视频帧即为发送端等待发送的视频帧。  The video frames are transmitted in the form of SDUs. As the network side of the transmitting end, the SDUs need to be obtained from other network elements. At the same time, there may be multiple SDUs waiting to be sent at the transmitting end. The sender can select an SDU from the SDU queue that is waiting to be sent, and obtain the video frame to which the SDU belongs. The video frame is the video frame that the sender waits to send.
其具体实现方式, 例如, 设计一个第二记录表(参见图 6 ) , 只记录 当前需要传输的 SDU, 以及 SDU和所属视频帧之间的对应关系。 从第二 记录表中选择序列号最小的 SDU, 并从第二记录表中获取该 SDU所属的 视频帧的序列号。 当该 SDU成功发送之后, 将其从第二记录表中删除。  The specific implementation manner, for example, designing a second record table (see FIG. 6), only records the SDU currently needed to be transmitted, and the correspondence between the SDU and the belonging video frame. The SDU with the smallest sequence number is selected from the second record table, and the sequence number of the video frame to which the SDU belongs is obtained from the second record table. When the SDU is successfully sent, it is deleted from the second record table.
进一步的, 步骤 202可以只获取需要重传的 SDU所对应的视频帧的 序列号。 SDU在传输过程中可能会发生错误, 需要重传, 重传超过一定次 数便容易发生时延。 可以采用一个第二记录表实现这一功能, 例如第二记 录表中只记录需要重传的 SDU, 从而进一步提高效率。  Further, step 202 may only obtain the sequence number of the video frame corresponding to the SDU that needs to be retransmitted. SDUs may have errors during transmission and need to be retransmitted. If the retransmission exceeds a certain number of times, delays are likely to occur. This function can be implemented using a second record table, for example, only the SDUs that need to be retransmitted are recorded in the second record table, thereby further improving efficiency.
步骤 201和 202的执行顺序可以互相调换。  The order of execution of steps 201 and 202 can be interchanged.
步骤 203 , 判断发送端等待发送的视频帧是否会发生时延。  Step 203: Determine whether a delay occurs in the video frame that the sending end waits for sending.
如果接收端正在播放的视频帧的序列号大于或等于发送端等待发送 的视频帧的序列号, 即步骤 201 预测的视频帧的序列号大于或等于步骤 202获取的视频帧的序列号, 判断步骤 202获取的视频帧会发生时延。  If the sequence number of the video frame being played by the receiving end is greater than or equal to the sequence number of the video frame that the transmitting end is waiting to send, that is, the sequence number of the video frame predicted by step 201 is greater than or equal to the sequence number of the video frame obtained in step 202, and the determining step The video frame acquired by 202 will have a delay.
发明人发现, 通常情况下, 作为用户的接收端, 在时间上将会先播放 序列号小的视频帧, 后播放序列号大的视频帧, 序列号本身隐含了播放时 间的信息。  The inventor has found that, in general, as the receiving end of the user, the video frame with a small serial number will be played in time, and then the video frame with a large serial number will be played, and the serial number itself implies the information of the playing time.
因此, 如果接收端正在播放的视频帧的序列号大于等于发送端等待发 送的视频帧的序列号, 则该发送端等待发送的视频帧的播放时间已经过去 了, 即便该等待发送的视频帧到达接收端, 其结果也是发生时延; 反之, 如果发送端等待发送的视频帧不会发生时延, 则序列号比发送端等待发送 的视频帧大的视频帧也可能不会发生时延。 Therefore, if the sequence number of the video frame being played by the receiving end is greater than or equal to the sequence number of the video frame that the transmitting end is waiting to transmit, the playing time of the video frame waiting for the sending end of the transmitting end has passed, even if the video frame waiting to be sent arrives. At the receiving end, the result is also a delay; on the contrary, If the video frame waiting to be sent by the transmitting end does not have a delay, the video frame whose sequence number is larger than the video frame that the transmitting end is waiting to transmit may not have a delay.
所以, 实施例一可以进一步包括步骤, 在步骤 203判断发送端等待发 送的视频帧会发生时延后, 获取所述发送端等待发送的其它视频帧的序列 号, 如果所述发送端等待发送的视频帧不会发生时延, 判断所述其它视频 帧中序列号比所述发送端等待发送的视频帧大的视频帧也不会发生时延。  Therefore, the first embodiment may further include the step of: after determining, in step 203, that the video frame waiting to be sent by the transmitting end is delayed, acquiring a sequence number of other video frames that the transmitting end is waiting to send, if the sending end is waiting to be sent. The video frame does not have a delay, and it is judged that the video frame in the other video frames is larger than the video frame that the transmitting end is waiting to transmit.
其实现方式, 例如, 可以利用步骤 202的第二记录表, 将第二记录表 按照视频帧的序列号从小到大的方式进行排序, 如果发送端等待发送的视 频帧不会发生时延, 则第二记录表中排在发送端等待发送的视频帧下面的 视频帧也不会发生时延, 如此可极大的提高效率。  For example, the second record table of step 202 may be used to sort the second record table according to the sequence number of the video frame from small to large. If the video frame waiting for the sending end does not delay, the time is not delayed. The video frame below the video frame waiting to be transmitted by the transmitting end in the second recording table does not have a delay, which can greatly improve the efficiency.
现有技术尚不能在网络侧预测未发送的视频帧是否会发生时延, 本实 施例提供了一种预测的方法, 可以方便网络侧预测等待发送的视频帧是否 会发生时延, 从而采取相应的措施, 提高网络的效率。  In the prior art, it is not possible to predict whether a non-transmitted video frame will have a delay in the network. This embodiment provides a method for predicting whether the network side predicts whether a video frame waiting to be sent will be delayed, and accordingly Measures to improve the efficiency of the network.
实施例二  Embodiment 2
如图 3所示, 为本发明实施例二提供的一种预测视频业务发生时延的 方法的流程图, 包括如下步骤:  As shown in FIG. 3, a flowchart of a method for predicting a delay of a video service according to Embodiment 2 of the present invention includes the following steps:
步骤 301 , 预测接收端正在播放的视频帧的 SDU的序列号。  Step 301: Predict a sequence number of an SDU of a video frame being played by the receiving end.
即估算接收端当前时刻正在播放的视频帧的 SDU 的序列号。 其具体 实现方式, 一种是通过接收端的播放时长和接收端的播放速度, 估算出当 前时刻, 接收端正在播放的视频帧的序列号, 然后获取该视频帧的一个 SDU的序列号。  That is, the sequence number of the SDU of the video frame currently being played by the receiving end is estimated. The specific implementation manner is that, by using the playing duration of the receiving end and the playing speed of the receiving end, the serial number of the video frame being played by the receiving end is estimated at the current moment, and then the serial number of an SDU of the video frame is obtained.
另一种方法是通过网络反馈信息来计算接收端正在播放的视频帧的 SDU的序列号。 例如, 可以通过在网络反馈信息中增加一个字段, 用来携 带接收端下一个将要被解码的 SDU序列号。 有了这个序列号, 就可以得 到 SDU所对应的视频帧的序列号, 利用该视频帧的序列号即可推测接收 端正在播放的视频帧的序列号, 然后选择正在播放的视频帧的一个 SDU 的序列号。 具体而言, 可通过如下步骤来预测接收端正在播放的视频帧的Another method is to calculate the sequence number of the SDU of the video frame being played by the receiving end through the network feedback information. For example, a field may be added to the network feedback information to carry the next SDU sequence number to be decoded at the receiving end. With this serial number, the serial number of the video frame corresponding to the SDU can be obtained, and the serial number of the video frame being played by the receiving end can be estimated by using the serial number of the video frame, and then an SDU of the video frame being played is selected. Serial number. Specifically, the following steps can be used to predict the video frame being played by the receiving end.
SDU的序列号。 The serial number of the SDU.
第一步, 获取当前来自于所述接收端的网络反馈信息。  The first step is to obtain network feedback information currently from the receiving end.
即获取当前来自于接收端的网络反馈信息 RTCP包, RTCP包中的一 个或多个字段携带了接收端将要被解码的 SDU的序列号。  That is, the network feedback information RTCP packet currently received from the receiving end is obtained, and one or more fields in the RTCP packet carry the sequence number of the SDU to be decoded by the receiving end.
第二步, 解析所述网络反馈信息。  In the second step, the network feedback information is parsed.
即从网络反馈信息 RTCP 包中, 解析接收端下一个将被解码的 SDU 的序列号。  That is, from the network feedback information RTCP packet, the sequence number of the next SDU to be decoded at the receiving end is parsed.
第三步, 获取接收端下一个将被解码的视频帧的序列号。  In the third step, the sequence number of the next video frame to be decoded at the receiving end is obtained.
例如, 可以设计一个第一记录表, 记录 RTP包的序列号 (即 SDU的 序列号) 和 SDU所属的视频帧的序列号之间的对应关系。 当获得了下一 个将被解码的 SDU的序列号之后, 就可以从第一记录表检索出 SDU所属 的视频帧序列号, 这个视频帧序列号就是下一个将被播放的视频帧的序列 号。  For example, a first record table may be designed to record the correspondence between the sequence number of the RTP packet (i.e., the sequence number of the SDU) and the sequence number of the video frame to which the SDU belongs. After obtaining the sequence number of the next SDU to be decoded, the video frame sequence number to which the SDU belongs can be retrieved from the first record table, and the video frame sequence number is the sequence number of the next video frame to be played.
第四步, 估算接收端当前播放的视频帧的序列号。  In the fourth step, the serial number of the video frame currently being played by the receiving end is estimated.
即利用第三步所获得的下一个将被播放的视频帧的序列号, 减去一个 估算值, 就可以估算出接收端当前正在播放的视频帧的序列号。 可以将估 算值设置为一个时间戳; 如果网络延迟的比较厉害, 接收端也有可能跳过 下一个播放的视频帧, 在这种情况下, 可以将估算值设置为零或者负数, 估算值的绝对值等于时间戳的整数倍。  That is, by subtracting an estimated value from the sequence number of the next video frame to be played obtained obtained in the third step, the sequence number of the video frame currently being played by the receiving end can be estimated. The estimate can be set to a timestamp; if the network delay is too high, it is possible for the receiver to skip the next played video frame. In this case, the estimate can be set to zero or negative, the absolute value of the estimate. The value is equal to an integer multiple of the timestamp.
第五步, 获取属于当前播放的视频帧的一个 SDU。  In the fifth step, an SDU belonging to the currently played video frame is obtained.
一个视频帧对应多个 SDU, 可以从属于接收端正在播放的视频帧的 SDU 中选择一个 SDU, 例如选择正在播放的视频帧中序列号最大的一个 SDU的序列号, 作为正在播放的视频帧的 SDU的序列号。  A video frame corresponds to multiple SDUs, and an SDU may be selected from the SDUs of the video frames that are being played by the receiving end, for example, selecting the serial number of the SDU with the largest serial number in the video frame being played, as the video frame being played. The serial number of the SDU.
步骤 302, 获取发送端等待发送的 SDU的序列号。  Step 302: Obtain a sequence number of the SDU that the sending end is waiting to send.
网络侧可能存在多个等待发送的 SDU,发送端可以从等待发送的 SDU 队列中选择一个 SDU。 There may be multiple SDUs waiting to be sent on the network side, and the sender can wait for SDUs to be sent. Select an SDU in the queue.
例如, 使用一个第二记录表, 记录所有发送端等待传送的 SDU 的序 列号, 并选择序列号最小的 SDU作为发送端等待发送 SDU。 当该 SDU发 送成功之后, 即将其从第二记录表中删除。  For example, a second record table is used to record the sequence numbers of all SDUs that the sender is waiting to transmit, and the SDU with the smallest sequence number is selected as the sender to wait for the SDU to be sent. When the SDU is successfully sent, it is deleted from the second record table.
进一步的, 步骤 302可以只获取需要重传的 SDU的序列号, 因为重 传的 SDU发生时延的可能性较大。 可以采用第二记录表实现这一功能, 例如第二记录表中可以只记录需要重传的 SDU的序列号, 从而提高效率。  Further, step 302 may only obtain the sequence number of the SDU that needs to be retransmitted, because the retransmission of the SDU is more likely to occur. This function can be implemented by using the second record table. For example, the second record table can record only the sequence number of the SDU that needs to be retransmitted, thereby improving efficiency.
步骤 301和 302的执行顺序可以互相调换。  The order of execution of steps 301 and 302 can be interchanged.
步骤 303 , 判断所述发送端等待发送的 SDU是否会发生时延。  Step 303: Determine whether a delay occurs in the SDU that the sending end waits for sending.
如果所述接收端正在播放的视频帧的 SDU 的序列号大于或者等于所 述发送端等待发送的 SDU的序列号, 即步骤 301预测的 SDU的序列号大 于等于步骤 302获取的 SDU的序列号, 判断所述发送端等待发送的 SDU 会发生时延。  If the sequence number of the SDU of the video frame being played by the receiving end is greater than or equal to the sequence number of the SDU that the transmitting end is waiting to send, that is, the sequence number of the SDU predicted by the step 301 is greater than or equal to the sequence number of the SDU obtained in step 302. It is determined that the SDU waiting to be sent by the transmitting end will have a delay.
发明人发现, 一般情况下, SDU的序列号是按照从小到大的方式排序 的, 如果序列号大的 SDU所对应的视频帧已经被播放了, 说明序列号小 的 SDU所对应的视频帧的播放时刻已经过去了, 即如果该 SDU到达接收 端将会发生时延。  The inventor has found that, in general, the sequence numbers of the SDUs are sorted in a small to large manner. If a video frame corresponding to an SDU having a large serial number has been played, the video frame corresponding to the SDU having a small serial number is described. The playback time has elapsed, that is, if the SDU arrives at the receiving end, a delay will occur.
进一步的, 本实施例还可以包括如下步骤, 在步骤 303判断步骤 302 获取的 SDU会发生时延后, 获取发送端等待发送的其它 SDU的序列号, 判断所述其它 SDU中序列号比步骤 302获取的 SDU大的 SDU也不会发 生时延。  Further, the embodiment may further include the following steps: after determining that the SDU obtained in step 302 is delayed, the sequence number of other SDUs that the sending end waits to send is obtained, and the sequence number ratio of the other SDUs is determined. The SDU with a large SDU obtained will not have a delay.
现有技术中, 并不能在网络侧预测尚未发送的视频帧的 SDU是否会 发生时延, 本实施例提供了一种方法可以预测发送端等待发送的视频帧的 SDU是否会发生时延, 从而便于网络侧提前作出处理。  In the prior art, it is not possible to predict, on the network side, whether the SDU of the video frame that has not been sent will be delayed. This embodiment provides a method for predicting whether the SDU of the video frame that the transmitting end is waiting to send will have a delay. It is convenient for the network side to handle in advance.
实施例三  Embodiment 3
如图 4所示, 为本发明实施例三提供的一种预测视频业务发生时延的 装置的结构图, 包括: As shown in FIG. 4, the delay of predicting video service is provided in Embodiment 3 of the present invention. The structural diagram of the device, including:
第一预测单元 401 , 用于预测接收端正在播放的视频帧的序列号。 接收端会反馈网络信息 RTCP包, 为了获取接收端正在播放的视频帧 的序列号, 需要在 RTCP 包中携带接收端下一个将要解码的 SDU的序列 号, 通过这个序列号, 就可以计算出接收端当前正在播放的视频帧的序列 号。  The first prediction unit 401 is configured to predict a sequence number of a video frame that is being played by the receiving end. The receiving end will feed back the network information RTCP packet. In order to obtain the serial number of the video frame being played by the receiving end, the RTCP packet needs to carry the sequence number of the next SDU to be decoded at the receiving end, and the serial number can be used to calculate the receiving. The serial number of the video frame currently being played.
具体实现方式, 例如, 第一预测单元 401包括反馈信息获取单元、 计 算单元。  For a specific implementation, for example, the first prediction unit 401 includes a feedback information acquisition unit and a calculation unit.
反馈信息获取单元, 用于获取当前来自于接收端的网络反馈信息, 所 述网络反馈信息包括一个或多个字段,用来携带接收端将要被解码的 SDU 的序列号。  The feedback information obtaining unit is configured to obtain network feedback information currently received from the receiving end, where the network feedback information includes one or more fields for carrying the sequence number of the SDU to be decoded by the receiving end.
计算单元, 用于当反馈信息获取单元接收到来自于接收端的网络反馈 信息 RTCP后,从该网络反馈信息中解析出下一个需要被解码的 RTP包的 序列号 (即 SDU的序列号) , 通过此序列号, 就可以得到该 SDU包所属 的视频帧的序列号, 该视频帧为接收端下一个将被播放的视频帧, 然后利 用下一个将被播放的视频帧的序列号, 估算接收端当前正在播放的视频帧 的序列号。 具体而言, 可通过如下子单元进行估算:  a calculating unit, configured to: after the feedback information acquiring unit receives the network feedback information RTCP from the receiving end, parse the sequence number of the next RTP packet that needs to be decoded (ie, the serial number of the SDU) from the network feedback information, and With this serial number, the sequence number of the video frame to which the SDU package belongs can be obtained. The video frame is the next video frame to be played by the receiving end, and then the serial number of the next video frame to be played is used to estimate the receiving end. The serial number of the video frame currently being played. Specifically, it can be estimated by the following subunits:
第一记录表单元, 用于记录 RTP包的序列号 (即 SDU的序列号) 和 SDU所属的视频帧的序列号之间的对应关系。  The first record table unit is configured to record a correspondence between a sequence number of the RTP packet (ie, a sequence number of the SDU) and a sequence number of the video frame to which the SDU belongs.
解析子单元, 用于解析反馈信息获取单元获取的网络反馈信息, 以获 取所述接收端下一个将被解码的 SDU的序列号。  The parsing subunit is configured to parse the network feedback information acquired by the feedback information acquiring unit to obtain the sequence number of the next SDU to be decoded by the receiving end.
当获得了下一个将被解码的 SDU 的序列号之后, 估算子单元就可以 从第一记录表单元检索出解析子单元解析出的 SDU所属的视频帧, 这个 视频帧的序列号就是下一个将被播放的视频帧的序列号。 有了下一个被播 放的视频帧的序列号, 估算子单元将该视频帧的序列号减去一个估算值, 就可以估算出接收端当前正在播放的视频帧的序列号。 至于估算值, 可以 将估算值设置为一个时间戳; 如果网络延迟的比较厉害, 接收端也有可能 跳过下一个播放的视频帧, 在这种情况下, 可以将估算值设置为零或者负 数, 估算值的绝对值等于一个或多个时间戳。 After obtaining the sequence number of the next SDU to be decoded, the estimation subunit can retrieve the video frame to which the SDU parsed by the parsing subunit belongs from the first record table unit, and the sequence number of the video frame is the next one. The serial number of the video frame being played. With the sequence number of the next played video frame, the estimation subunit subtracts the sequence number of the video frame by an estimated value, and can estimate the sequence number of the video frame currently being played by the receiving end. As for the estimated value, you can Set the estimate to a timestamp; if the network delay is too strong, it is possible for the receiver to skip the next played video frame. In this case, you can set the estimate to zero or negative, the absolute value of the estimate. Equal to one or more timestamps.
当前播放的视频帧仅作为一种判断基准, 用来预测待发送的视频帧发 生时延的可能性。 可以有各种确定方式, 并不局限于实际播放的视频帧。  The currently played video frame is only used as a criterion for judging the possibility of delay in the video frame to be transmitted. There may be various ways of determining, and it is not limited to the actual played video frame.
第一获取单元 402 , 用于获取发送端等待发送的视频帧的序列号。 视频帧都是以 SDU 的形式进行传输的, 作为发送端的网络侧, 可能 存在多个 SDU等待发送。 发送端可以从等待发送的 SDU队列中选择一个 SDU, 获取该 SDU所属的视频帧, 该视频帧即为发送端等待发送的视频 帧。  The first obtaining unit 402 is configured to acquire a sequence number of a video frame that the transmitting end is waiting to send. Video frames are transmitted in the form of SDUs. As the network side of the sender, there may be multiple SDUs waiting to be sent. The sender can select an SDU from the SDU queue that is waiting to be sent, and obtain the video frame to which the SDU belongs. The video frame is the video frame that the sender waits to send.
例如, 第一获取单元 402可以包括一个第二记录表单元, 用于记录在 发送端所有需要发送给接收的 SDU, 以及 SDU和所属视频帧之间的对应 关系; 第一获取单元 402还包括一个检索子单元, 用于从第二记录表单元 中选择序列号最小的 SDU, 并从第二记录表中获取该 SDU所属的视频帧 的序列号, 当该 SDU成功发送之后, 将其从第二记录表中删除。  For example, the first obtaining unit 402 may include a second recording table unit, configured to record all SDUs that need to be sent to the receiving end at the transmitting end, and a correspondence between the SDU and the associated video frame. The first obtaining unit 402 further includes a a search subunit, configured to select an SDU with the smallest sequence number from the second record table unit, and obtain a sequence number of the video frame to which the SDU belongs from the second record table, and after the SDU is successfully sent, remove the SDU from the second record table Deleted from the record table.
第一时延判断单元 403 , 用于判断发送端等待发送的视频帧是否发生 时延。  The first time delay determining unit 403 is configured to determine whether a video frame waiting to be sent by the transmitting end has a delay.
如果第一预测单元 401预测的接收端正在播放的视频帧的序列号大于 等于第一获取单元 402获取的发送端等待发送的视频帧的序列号, 则判断 第一获取单元 402获取的发送端等待发送的视频帧会发生时延。  If the sequence number of the video frame being played by the receiving end predicted by the first prediction unit 401 is greater than or equal to the sequence number of the video frame that the first obtaining unit 402 is waiting to send, the terminal that is acquired by the first acquiring unit 402 is determined to wait. The video frame sent will have a delay.
发明人发现, 通常情况下, 作为用户的接收端, 在时间上将会先播放 序列号小的视频帧, 后播放序列号大的视频帧, 序列号本身隐含了播放时 间的信息。 因此, 如果接收端正在播放的视频帧的序列号大于发送端等待 发送的视频帧的序列号, 则该发送端等待发送的视频帧的播放时间已经过 去了, 即便该等待发送的视频帧到达接收端, 其结果也是发生时延。  The inventor has found that, in general, as the receiving end of the user, the video frame with a small serial number will be played in time, and then the video frame with a large serial number will be played, and the serial number itself implies the information of the playing time. Therefore, if the sequence number of the video frame being played by the receiving end is greater than the sequence number of the video frame that the transmitting end is waiting to transmit, the playing time of the video frame waiting for the sending end of the transmitting end has passed, even if the video frame waiting to be sent arrives at the receiving At the end, the result is also a delay.
本实施例还可以进一步包括第二时延判断单元, 用于获取发送端等待 发送的其它视频帧 (不包括第一获取单元 402获取的视频帧) , 如果第一 时延判断单元 403判断第一获取单元 402获取的视频帧不会发生时延, 判 断所述其它视频帧中序列号比第一获取单元 402获取的序列号大的视频帧 也不会发生时延。 The embodiment may further include a second time delay determining unit, configured to acquire the sending end and wait for The other video frames are sent (excluding the video frames acquired by the first obtaining unit 402). If the first time delay determining unit 403 determines that the video frames acquired by the first obtaining unit 402 do not have a delay, the other video frames are determined. The video frame whose sequence number is larger than the sequence number acquired by the first acquisition unit 402 does not have a delay.
现有技术中, 网络侧并不能预测尚未发送的视频帧是否会发生时延, 本实施例提供了一种装置可以预测发送端等待发送的视频帧是否会发生 时延, 从而便于网络侧提前作出处理。  In the prior art, the network side cannot predict whether a video frame that has not been sent will be delayed. This embodiment provides a device that can predict whether a video frame waiting to be sent by the transmitting end will have a delay, thereby facilitating the network side to make an advance. deal with.
实施例四  Embodiment 4
如图 5所示, 为本发明实施例四所提供的一种预测视频业务发生时延 的装置的结构图, 包括:  As shown in FIG. 5, it is a structural diagram of an apparatus for predicting a delay of a video service according to Embodiment 4 of the present invention, including:
第二预测单元 501 ,用于预测接收端正在播放的视频帧的 SDU的序列 号。  The second prediction unit 501 is configured to predict a sequence number of the SDU of the video frame being played by the receiving end.
预测接收端正在播放的视频帧, 获取正在播放的视频帧的一个 SDU 的序列号。  Predicting the video frame being played by the receiving end, and obtaining the serial number of an SDU of the video frame being played.
可以通过网络反馈信息携带接收端下一个将要被解码的 SDU序列号。 有了这个序列号, 就可以得到 SDU所对应的视频帧的序列号, 该视频帧 的序列号即可推测接收端正在播放的视频帧的序列号, 然后选择一个正在 播放的视频帧的一个 SDU的序列号。  The SDU serial number to be decoded by the receiving end can be carried through the network feedback information. With this serial number, the serial number of the video frame corresponding to the SDU can be obtained. The serial number of the video frame can estimate the serial number of the video frame being played by the receiving end, and then select an SDU of the video frame being played. Serial number.
具体实现方式, 例如, 第二预测单元 501可包括如下子单元: 第一记 录表单元、 网络反馈信息获取单元、 解析子单元、 估算子单元和查询字单 元。  For example, the second prediction unit 501 may include the following subunits: a first record table unit, a network feedback information acquisition unit, a parsing subunit, an estimation subunit, and a query word unit.
第一记录表单元, 用于记录 RTP包的序列号 (即 SDU的序列号) 和 SDU所属的视频帧的序列号之间的对应关系。  The first record table unit is configured to record a correspondence between a sequence number of the RTP packet (ie, a sequence number of the SDU) and a sequence number of the video frame to which the SDU belongs.
网络反馈信息获取单元, 用于获取当前来自于所述接收端的网络反馈 信息, 所述网络反馈信息包括所述接收端下一个将被解码的 SDU 的序列 号。 解析子单元, 用于解析所述网络反馈信息获取单元获取的网络反馈信 息, 以得到所述接收端下一个将被解码的 SDU的序列号。 The network feedback information acquiring unit is configured to obtain network feedback information currently from the receiving end, where the network feedback information includes a sequence number of the next SDU to be decoded by the receiving end. And a parsing subunit, configured to parse the network feedback information acquired by the network feedback information acquiring unit, to obtain a sequence number of the SDU to be decoded by the receiving end.
估算子单元, 用于从解析子单元获取下一个将被解码的 SDU 的序列 号之后, 从第一记录表单元检索出该 SDU所属的视频帧序列号, 这个视 频帧序列号就是下一个将被播放的视频帧的序列号, 将该视频帧的序列号 减去一个估算值即可估算出接收端正在播放的视频帧的序列号。 至于估算 值的大小, 可设置为一个时间戳, 如果网络延迟的比较厉害, 接收端也有 可能跳过下一个播放的视频帧, 在这种情况下, 可以将估算值设置为零或 者负数, 估算值的绝对值等于一个或者多个时间戳。  An estimation subunit, configured to retrieve, from the parsing subunit, a sequence number of a video frame to which the SDU belongs, after the sequence number of the next SDU to be decoded, the video frame sequence number is the next one to be The serial number of the played video frame, the serial number of the video frame is subtracted from an estimated value to estimate the serial number of the video frame being played by the receiving end. As for the size of the estimate, it can be set to a timestamp. If the network delay is too strong, the receiver may skip the next played video frame. In this case, the estimated value can be set to zero or negative. The absolute value of the value is equal to one or more timestamps.
查询子单元, 用于从所述第一记录表单元检索属正在播放的视频帧的 Querying a subunit, configured to retrieve, from the first record table unit, a video frame that is being played
SDU, 由于一个视频帧对应多个 SDU, 可以选择正在播放的视频帧中序列 号最大的一个 SDU的序列号。 SDU, since one video frame corresponds to multiple SDUs, the serial number of one SDU with the largest serial number in the video frame being played can be selected.
第二获取单元 502, 用于获取发送端等待发送的 SDU的序列号。 网络侧可能存在多个等待发送的 SDU,第二获取单元 502可以从等待 发送的 SDU队列中选择一个 SDU。  The second obtaining unit 502 is configured to obtain a sequence number of the SDU that the transmitting end is waiting to send. There may be multiple SDUs waiting to be sent on the network side, and the second obtaining unit 502 may select one SDU from the SDU queues waiting to be sent.
例如, 使用一个第二记录表, 记录所有发送端等待传送的 SDU 的序 列号, 并选择序列号最小的 SDU作为发送端等待发送 SDU。 当该 SDU发 送成功之后, 即将其从第二记录表中删除。  For example, a second record table is used to record the sequence numbers of all SDUs that the sender is waiting to transmit, and the SDU with the smallest sequence number is selected as the sender to wait for the SDU to be sent. When the SDU is successfully sent, it is deleted from the second record table.
第三时延判断单元 503 ,用于判断所述发送端等待发送的 SDU是否会 发生时延。  The third delay determining unit 503 is configured to determine whether a delay occurs in the SDU that the transmitting end is waiting to send.
如果第二预测单元 501 所预测的序列号大于或者等于第二获取单元 502所获得的序列号, 第二获取单元 502获取的 SDU会发生时延。  If the sequence number predicted by the second prediction unit 501 is greater than or equal to the sequence number obtained by the second obtaining unit 502, the SDU acquired by the second obtaining unit 502 may be delayed.
发明人发现, 一般情况下, SDU的序列号是按照从小到大的方式排序 的, 如果序列号大的 SDU所对应的视频帧已经被播放了, 说明序列号小 的 SDU所对应的视频帧的播放时刻已经过去了, 即如果该 SDU到达接收 端将会发生时延。 进一步的, 本实施例还可以包括第四时延判断单元, 用于获取发送端 等待发送的其它 SDU,如果第二获取单元 502获取的 SDU不会发生时延, 判断其它 SDU中序列号比第二获取单元 502获取的 SDU大的 SDU也不 会发生时延。 The inventor has found that, in general, the sequence numbers of the SDUs are sorted in a small to large manner. If a video frame corresponding to an SDU having a large serial number has been played, the video frame corresponding to the SDU having a small serial number is described. The playback time has elapsed, that is, if the SDU arrives at the receiving end, a delay will occur. Further, the embodiment may further include a fourth time delay determining unit, configured to acquire other SDUs that the sending end is waiting to send, and if the SDU acquired by the second obtaining unit 502 does not have a delay, determine the serial number ratio of the other SDUs. The SDU with the SDU that is acquired by the second obtaining unit 502 does not have a delay.
现有技术中, 网络侧并不能预测尚未发送的 SDU是否会发生时延, 本实施例提供了一种装置可以预测发送端等待发送的 SDU是否会发生时 延, 从而便于网络侧提前作出处理。  In the prior art, the network side cannot predict whether the SDU that has not been sent will be delayed. This embodiment provides a device that can predict whether the SDU waiting to be sent by the sending end will delay, so that the network side can facilitate the processing in advance.
以上所述发明实施例可以通过软件实现, 相应的软件可以存储在可读 取的存储介质中, 例如计算机的硬盘、 光盘或软盘中。  The above described embodiments of the invention may be implemented by software, and the corresponding software may be stored in a readable storage medium, such as a hard disk, an optical disk or a floppy disk of a computer.
以上所述仅为本发明的较佳实施例, 并不用以限制本发明, 凡在本发 明的精神和原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在 本发明的保护范围之内。  The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., which are within the spirit and scope of the present invention, should be included in the protection of the present invention. Within the scope.

Claims

权 利 要 求 书 Claim
1、 一种预测视频业务发生时延的方法, 其特征在于, 所述方法包括: 预测接收端正在播放的视频帧的序列号;  A method for predicting a delay of a video service, the method comprising: predicting a sequence number of a video frame being played by a receiving end;
获取发送端等待发送的视频帧的序列号;  Obtaining a sequence number of a video frame that the transmitting end is waiting to send;
如果所述接收端正在播放的视频帧的序列号大于或等于所述发送端等 待发送的视频帧的序列号, 判断所述发送端等待发送的视频帧会发生时延。  If the sequence number of the video frame being played by the receiving end is greater than or equal to the sequence number of the video frame to be sent by the sending end, it is determined that the video frame waiting to be sent by the transmitting end may be delayed.
2、 如权利要求 1所述的方法, 其特征在于, 所述预测接收端正在播放 的视频帧的序列号的步骤, 包括:  2. The method according to claim 1, wherein the step of predicting a sequence number of a video frame being played by the receiving end comprises:
获取当前来自于接收端的网络反馈信息, 所述网络反馈信息包括所述 接收端下一个将被解码的 SDU的序列号;  Obtaining network feedback information currently from the receiving end, where the network feedback information includes a sequence number of the next SDU to be decoded at the receiving end;
利用所述网络反馈信息估算所述接收端正在播放的视频帧的序列号。 The network feedback information is used to estimate a sequence number of a video frame being played by the receiving end.
3、 如权利要求 2所述的方法, 其特征在于, 所述利用所述网络反馈信 息估算所述接收端正在播放的视频帧的序列号的步骤, 包括: The method according to claim 2, wherein the step of estimating the sequence number of the video frame being played by the receiving end by using the network feedback information comprises:
从所述网络反馈信息中解析出所述接收端下一个将被解码的 SDU的序 列号;  Parsing, from the network feedback information, a sequence number of an SDU to be decoded by the receiving end;
根据所述接收端下一个将被解码的 SDU的序列号,从第一记录表中获 取所述接收端下一个将被解码的 SDU所属的视频帧的序列号, 所述第一记 录表记录了 SDU和 SDU所属的视频帧之间的对应关系;  Obtaining, from the first record table, a sequence number of a video frame to which the SDU to be decoded next to the receiving end belongs according to the sequence number of the SDU to be decoded next to the receiving end, where the first record table records The correspondence between the video frames to which the SDU and the SDU belong;
将所述接收端下一个将被解码的 SDU所属的视频帧的序列号, 减去一 个估算值所得到的结果作为所述接收端正在播放的视频帧的序列号。  And taking the result of subtracting an estimated value from the sequence number of the video frame to which the SDU to be decoded next to the receiving end is used as the sequence number of the video frame being played by the receiving end.
4、 如权利要求 1所述的方法, 其特征在于, 所述获取发送端等待发送 的视频帧的序列号的步骤, 包括:  The method of claim 1, wherein the step of acquiring a sequence number of a video frame that the transmitting end is waiting to send includes:
从第二记录表中获取序列号最小的 SDU, 所述第二记录表记录了所述发 送端当前等待发送的 SDU队列及所述等待发送的 SDU所属视频帧的序列号; 从所述第二记录表获取所述序列号最小的 SDU 所属的视频帧的序列 号, 作为所述发送端等待发送的视频帧的序列号。 Obtaining, from the second record table, the SDU with the smallest sequence number, the second record table records the sequence number of the SDU queue that the sender is currently waiting to send and the video frame to which the SDU is waiting to be sent; The record table obtains the sequence number of the video frame to which the SDU with the smallest sequence number belongs, as the sequence number of the video frame that the sender waits to send.
5、 如权利要求 1所述的方法, 其特征在于, 所述方法还包括: 获取所述发送端等待发送的其它视频帧的序列号, 如果所述发送端等 待发送的视频帧不会发生时延, 判断所述其它视频帧中序列号比所述发送 端等待发送的视频帧大的视频帧也不会发生时延。 The method according to claim 1, wherein the method further comprises: acquiring a sequence number of other video frames that the transmitting end is waiting to send, if the video frame waiting for the sending end does not occur when the sending end does not occur The delay does not occur when the video frame in the other video frames is larger than the video frame that the transmitting end is waiting to transmit.
6、 一种预测视频业务发生时延的方法, 其特征在于, 所述方法包括: 预测接收端正在播放的视频帧的 SDU的序列号;  A method for predicting a delay of a video service, the method comprising: predicting a sequence number of an SDU of a video frame being played by a receiving end;
获取发送端等待发送的 SDU的序列号;  Obtaining the serial number of the SDU that the sender waits to send;
如果所述接收端正在播放的视频帧的 SDU的序列号大于或者等于所述 发送端等待发送的 SDU的序列号, 判断所述发送端等待发送的 SDU会发 生时延。  If the sequence number of the SDU of the video frame being played by the receiving end is greater than or equal to the sequence number of the SDU that the transmitting end is waiting to send, it is determined that the SDU waiting for the transmitting end to generate a delay occurs.
7、 如权利要求 6所述的方法, 其特征在于, 所述预测接收端正在播放 的视频帧的 SDU的序列号的步骤包括:  7. The method according to claim 6, wherein the step of predicting the sequence number of the SDU of the video frame being played by the receiving end comprises:
获取当前来自于所述接收端的网络反馈信息, 所述网络反馈信息包括 所述接收端下一个将被解码的 SDU的序列号;  Obtaining network feedback information currently from the receiving end, where the network feedback information includes a sequence number of an SDU to be decoded by the receiving end;
解析所述网络反馈信息, 获取所述接收端下一个将被解码的 SDU的序 列号;  Parsing the network feedback information, and acquiring a sequence number of the SDU to be decoded by the receiving end;
根据所述接收端下一个将被解码的 SDU的序列号,从第一记录表获取 所述接收端下一个将被解码的 SDU所属的视频帧的序列号, 所述第一记录 表记录了 SDU和 SDU所属的视频帧之间的对应关系;  Obtaining, according to the sequence number of the SDU to be decoded, the sequence number of the video frame to which the SDU to be decoded next to the receiving end belongs, and the first record table records the SDU Correspondence relationship with the video frame to which the SDU belongs;
将所述接收端下一个将被解码的 SDU所属的视频帧的序列号减去一个 估算值所得到的结果作为当前播放的视频帧的序列号;  And a result obtained by subtracting an estimated value from a sequence number of a video frame to which the SDU to be decoded is to be decoded is used as a sequence number of the currently played video frame;
从所述第一记录表中检索属于所述当前播放的视频帧的 SDU, 取序列 号最大的 SDU的序列号作为接收端正在播放的视频帧的 SDU的序列号。  Retrieving the SDU belonging to the currently played video frame from the first record table, and taking the sequence number of the SDU having the largest sequence number as the sequence number of the SDU of the video frame being played by the receiving end.
8、 如权利要求 6所述的方法, 其特征在于, 所述方法还包括: 获取发送端等待发送的其它 SDU的序列号, 如果所述发送端等待发送 的 SDU不会发生时延, 判断所述其它 SDU中序列号比所述发送端等待发 送的 SDU大的 SDU也不会发生时延。 The method according to claim 6, wherein the method further comprises: obtaining a sequence number of other SDUs that the transmitting end is waiting to send, and if the sending end waits for the sent SDU to not delay, determining the location The serial number in the other SDU is waiting for the sender to send There is no delay in sending SDUs with large SDUs.
9、 一种预测视频业务发生时延的装置, 其特征在于, 所述装置包括: 第一预测单元, 用于预测接收端正在播放的视频帧的序列号; 第一获取单元, 用于获取发送端等待发送的视频帧的序列号; 第一时延判断单元, 用于如果所述第一预测单元预测的视频帧的序列 号大于或者等于所述第一获取单元获取的视频帧的序列号, 判断所述第一 获取单元获取的视频帧会发生时延。  A device for predicting a delay of a video service, wherein the device includes: a first prediction unit, configured to predict a sequence number of a video frame being played by the receiving end; and a first acquiring unit, configured to acquire and send a sequence number of the video frame to be sent by the terminal; the first time delay determining unit is configured to: if the sequence number of the video frame predicted by the first prediction unit is greater than or equal to the sequence number of the video frame acquired by the first acquiring unit, It is determined that the video frame acquired by the first acquiring unit has a delay.
10、 如权利要求 9所述的装置, 其特征在于, 所述第一预测单元包括: 反馈信息获取单元, 用于获取当前来自于接收端的网络反馈信息, 所 述网络反馈信息包括在所述接收端下一个将被解码的 SDU的序列号;  The device according to claim 9, wherein the first prediction unit comprises: a feedback information acquiring unit, configured to acquire network feedback information currently from the receiving end, where the network feedback information is included in the receiving The serial number of the next SDU to be decoded;
计算单元, 用于依据所述反馈信息获取单元获取的网络反馈信息估算 所述接收端正在播放的视频帧的序列号。  And a calculating unit, configured to estimate, according to the network feedback information acquired by the feedback information acquiring unit, a sequence number of the video frame that is being played by the receiving end.
11、 如权利要求 10所述的装置, 其特征在于, 所述计算单元包括: 第一记录表单元, 用于记录 SDU和视频帧之间的对应关系;  The device according to claim 10, wherein the calculating unit comprises: a first recording table unit, configured to record a correspondence between the SDU and the video frame;
解析子单元, 用于解析所述反馈信息获取单元获取的网络反馈信息, 以获取所述接收端下一个将被解码的 SDU的序列号;  a parsing subunit, configured to parse the network feedback information acquired by the feedback information acquiring unit, to obtain a sequence number of the next SDU to be decoded by the receiving end;
估算子单元, 用于从所述第一记录表单元获取所述解析子单元所解析 的 SDU所属的视频帧的序列号, 减去一个估算值所得到的结果作为所述接 收端正在播放的视频帧的序列号。  An estimation subunit, configured to acquire, from the first record table unit, a sequence number of a video frame to which the SDU parsed by the parsing subunit belongs, and subtract a result obtained by using an estimated value as a video being played by the receiving end The serial number of the frame.
12、 如权利要求 9所述的装置, 其特征在于, 所述第一获取单元包括: 第二记录表单元, 用于记录所述发送端正在等待发送的 SDU队列及所 述等待发送的 SDU所属视频帧的序列号;  The device according to claim 9, wherein the first acquiring unit comprises: a second recording table unit, configured to record an SDU queue that the sending end is waiting to send, and the SDU that is waiting to be sent The serial number of the video frame;
检索子单元, 用于从所述第二记录表单元获取序列号最小的 SDU所属 的视频帧的序列号, 作为所述发送端等待发送的视频帧的序列号。  And a search subunit, configured to obtain, from the second record table unit, a sequence number of a video frame to which the SDU having the smallest sequence number belongs, as a sequence number of the video frame that the sender waits to send.
13、 如权利要求 12所述的装置, 其特征在于, 所述装置还包括: 第二时延判断单元, 用于获取发送端等待发送的其它视频帧, 如果所 述第一时延判断单元判断所述第一获取单元获取的视频帧不会发生时延, 判断所述其它视频帧中序列号比所述第一获取单元获取的序列号大的视频 帧也不会发生时延。 The device according to claim 12, wherein the device further comprises: a second delay determining unit, configured to acquire other video frames that the transmitting end is waiting to send, if The first time delay determining unit determines that the video frame acquired by the first acquiring unit does not have a delay, and determines that the video frame in the other video frames that has a larger sequence number than the first obtaining unit does not. A delay will occur.
14、 一种预测视频业务发生时延的装置, 其特征在于, 所述装置包括: 第二预测单元, 用于预测接收端正在播放的视频帧的 SDU的序列号; 第二获取单元, 用于获取发送端等待发送的 SDU的序列号;  A device for predicting a delay of a video service, wherein the device includes: a second prediction unit, configured to predict a sequence number of an SDU of a video frame being played by the receiving end; and a second acquiring unit, configured to: Obtaining the sequence number of the SDU that the sender waits to send;
第三时延判断单元, 用于如果所述第二预测单元预测的 SDU的序列号 大于或者等于所述第二获取单元获取的 SDU的序列号, 判断所述第二获取 单元预测的 SDU会发生时延。  a third time delay determining unit, configured to determine that the SDU predicted by the second acquiring unit occurs if the sequence number of the SDU predicted by the second prediction unit is greater than or equal to the sequence number of the SDU acquired by the second acquiring unit Delay.
15、如权利要求 14所述的装置,其特征在于, 所述第二预测单元包括: 第一记录表单元, 用于记录 SDU和视频帧之间的对应关系;  The device according to claim 14, wherein the second prediction unit comprises: a first recording table unit, configured to record a correspondence between the SDU and the video frame;
网络反馈信息获取单元, 用于获取当前来自于所述接收端的网络反馈 信息,所述网络反馈信息包括所述接收端下一个将被解码的 SDU的序列号; 解析子单元, 用于解析所述网络反馈信息获取单元获取的网络反馈信 息, 以得到所述接收端下一个将被解码的 SDU的序列号;  a network feedback information acquiring unit, configured to acquire network feedback information currently from the receiving end, where the network feedback information includes a sequence number of an SDU to be decoded by the receiving end, and a parsing subunit, configured to parse the The network feedback information acquired by the network feedback information acquiring unit is used to obtain a sequence number of the next SDU to be decoded by the receiving end;
估算子单元, 用于从所述第一记录表单元获取所述解析子单元所解析 的 SDU所属的视频帧的序列号, 减去一个估算值得到所述接收端正在播放 的视频帧的序列号;  An estimation subunit, configured to acquire, from the first record table unit, a sequence number of a video frame to which the SDU parsed by the parsing subunit belongs, and subtract an estimated value to obtain a sequence number of a video frame that is being played by the receiving end ;
查询子单元, 用于从所述第一记录表单元检索属于所述估算子单元计 算出的视频帧的 SDU,取序列号最大的 SDU的序列号作为接收端正在播放 的视频帧的 SDU的序列号。  a query subunit, configured to retrieve, from the first record table unit, an SDU belonging to the video frame calculated by the estimation subunit, and take the sequence number of the SDU with the largest sequence number as the sequence of the SDU of the video frame being played by the receiving end number.
16、 如权利要求 14所述的装置, 其特征在于, 所述装置还包括: 第四时延判断单元, 用于获取发送端等待发送的其它 SDU, 如果所述 第三时延判断单元判断所述第二获取单元获取的 SDU不会发生时延, 判断 所述其它 SDU中序列号比所述第二获取单元获取的 SDU大的 SDU也不会 发生时延。  The device according to claim 14, wherein the device further comprises: a fourth time delay determining unit, configured to acquire another SDU that the transmitting end is waiting to send, if the third time delay determining unit determines The SDU obtained by the second acquiring unit does not have a delay, and it is determined that the SDU in the other SDUs having a larger sequence number than the SDU obtained by the second acquiring unit does not have a delay.
PCT/CN2009/074452 2008-12-22 2009-10-14 Method and apparatus for prediction of time delay of video service WO2010072099A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200810241546.0 2008-12-22
CN 200810241546 CN101459852B (en) 2008-12-22 2008-12-22 Method and device for predicting video service occurrence delay

Publications (1)

Publication Number Publication Date
WO2010072099A1 true WO2010072099A1 (en) 2010-07-01

Family

ID=40770431

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2009/074452 WO2010072099A1 (en) 2008-12-22 2009-10-14 Method and apparatus for prediction of time delay of video service

Country Status (2)

Country Link
CN (1) CN101459852B (en)
WO (1) WO2010072099A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111654690A (en) * 2020-05-06 2020-09-11 北京百度网讯科技有限公司 Live video delay time determination method and device and electronic equipment
CN112507163A (en) * 2020-12-02 2021-03-16 北京奇艺世纪科技有限公司 Duration prediction model training method, recommendation method, device, equipment and medium

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101459852B (en) * 2008-12-22 2011-04-13 华为技术有限公司 Method and device for predicting video service occurrence delay
CN102063924B (en) * 2009-11-18 2015-07-15 新奥特(北京)视频技术有限公司 Method and device for playing animation
CN106982371B (en) * 2016-12-09 2020-08-11 上海谐桐信息技术有限公司 Code stream control method and system, code stream management method and system, and terminal equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101141639A (en) * 2007-09-28 2008-03-12 上海华为技术有限公司 Method and device for identifying stream media video frame boundary
US7440401B2 (en) * 2003-06-03 2008-10-21 University Of Seoul Industry Cooperation Foundation Packet scheduling method for streaming multimedia data
CN101296184A (en) * 2008-05-30 2008-10-29 华为技术有限公司 Method, system and device for data transmission
CN101321286A (en) * 2008-06-27 2008-12-10 上海华为技术有限公司 Method and device for computing caching of terminal
CN101459852A (en) * 2008-12-22 2009-06-17 华为技术有限公司 Method and device for predicting video service occurrence delay

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1941737A (en) * 2005-09-30 2007-04-04 富士通株式会社 Method and device for pre-determining time delay in node, and method and device for guarantee of time delay

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7440401B2 (en) * 2003-06-03 2008-10-21 University Of Seoul Industry Cooperation Foundation Packet scheduling method for streaming multimedia data
CN101141639A (en) * 2007-09-28 2008-03-12 上海华为技术有限公司 Method and device for identifying stream media video frame boundary
CN101296184A (en) * 2008-05-30 2008-10-29 华为技术有限公司 Method, system and device for data transmission
CN101321286A (en) * 2008-06-27 2008-12-10 上海华为技术有限公司 Method and device for computing caching of terminal
CN101459852A (en) * 2008-12-22 2009-06-17 华为技术有限公司 Method and device for predicting video service occurrence delay

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111654690A (en) * 2020-05-06 2020-09-11 北京百度网讯科技有限公司 Live video delay time determination method and device and electronic equipment
CN112507163A (en) * 2020-12-02 2021-03-16 北京奇艺世纪科技有限公司 Duration prediction model training method, recommendation method, device, equipment and medium

Also Published As

Publication number Publication date
CN101459852A (en) 2009-06-17
CN101459852B (en) 2011-04-13

Similar Documents

Publication Publication Date Title
JP3912091B2 (en) Data communication system, data transmission apparatus, data reception apparatus and method, and computer program
US10063606B2 (en) Systems and methods for using client-side video buffer occupancy for enhanced quality of experience in a communication network
US8332486B2 (en) Apparatus and method for multimedia file streaming in portable terminal
US7886071B2 (en) Communication processing device, communication control method, and computer program
US11070327B2 (en) Method and apparatus for re-transmitting MMT packet and method and apparatus for requesting MMT packet re-transmission
US20020031125A1 (en) Packet transfer communication apparatus, packet transfer communication method, and storage medium
US20080151885A1 (en) On-Demand Multi-Channel Streaming Session Over Packet-Switched Networks
US20100290454A1 (en) Play-Out Delay Estimation
WO2010078763A1 (en) Stream media server, client terminal and method and system for downloading stream media
WO2020034082A1 (en) Slicing-based rtp stream transmission method, device, terminal and server
CN102948126A (en) Method and apparatus for generating and handling streaming media quality-of-experience metrics
JP2005110244A (en) System and method for multimedia streaming service
KR20150067348A (en) Method and apparatus for media data delivery control
US20060190593A1 (en) Signaling buffer parameters indicative of receiver buffer architecture
CN101854286B (en) UDP (User Datagram Protocol)-based data stream sending-receiving method and device
RU2010110600A (en) METHOD AND DEVICE FOR TRANSMISSION OF SPEECH INFORMATION WITH COMMUTATION OF CHANNELS ON NETWORKS WITH COMMUTATION OF PACKAGES
WO2010072099A1 (en) Method and apparatus for prediction of time delay of video service
WO2011137837A1 (en) Method, device and system for obtaining key information during fast channel switching
JP3933555B2 (en) DATA DISTRIBUTION SYSTEM, DATA DISTRIBUTION DEVICE, DATA DISTRIBUTION METHOD, DATA DISTRIBUTION PROGRAM, AND RECORDING MEDIUM CONTAINING THE PROGRAM
JP2005051299A (en) Packet transmission apparatus, packet reception apparatus, packet transmission method and packet reception method
US7839844B2 (en) System and method for dynamically determining retransmit buffer time
JP3906678B2 (en) Data communication system, data transmission apparatus, data reception apparatus and method, and computer program
US7643503B2 (en) System and method for dynamically determining retransmit buffer time
JP4120290B2 (en) Media gateway, stored data distribution system, stored data distribution method and program thereof
WO2012122903A1 (en) Data processing method and device

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: 09834052

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: 09834052

Country of ref document: EP

Kind code of ref document: A1