CN101459852B - Method and device for predicting video service occurrence delay - Google Patents

Method and device for predicting video service occurrence delay Download PDF

Info

Publication number
CN101459852B
CN101459852B CN 200810241546 CN200810241546A CN101459852B CN 101459852 B CN101459852 B CN 101459852B CN 200810241546 CN200810241546 CN 200810241546 CN 200810241546 A CN200810241546 A CN 200810241546A CN 101459852 B CN101459852 B CN 101459852B
Authority
CN
China
Prior art keywords
sequence number
video frame
sdu
receiving end
waiting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN 200810241546
Other languages
Chinese (zh)
Other versions
CN101459852A (en
Inventor
周素萍
李斌
谷安文
陈玉芳
叶建涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN 200810241546 priority Critical patent/CN101459852B/en
Publication of CN101459852A publication Critical patent/CN101459852A/en
Priority to PCT/CN2009/074452 priority patent/WO2010072099A1/en
Application granted granted Critical
Publication of CN101459852B publication Critical patent/CN101459852B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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

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

本发明公开了一种预测视频业务发生时延的方法和装置,所述方法包括:预测接收端正在播放的视频帧的序列号;获取发送端等待发送的视频帧的序列号;如果所述接收端正在播放的视频帧的序列号大于或等于所述发送端等待发送的视频帧的序列号,判断所述发送端等待发送的视频帧会发生时延。所述装置包括:第一预测单元,用于预测接收端正在播放的视频帧的序列号;第一获取单元,用于获取发送端等待发送的视频帧的序列号;第一时延判断单元,如果所述第一预测单元预测的视频帧的序列号大于或者等于所述第一获取单元获取的视频帧的序列号,所述第一获取单元获取的视频帧会发生时延。所述方法和装置可以在网络侧预测等待发送的视频帧是否会发生时延。

Figure 200810241546

The present invention discloses a method and device for predicting the time delay of video services. The method includes: predicting the sequence number of the video frame being played by the receiving end; acquiring the sequence number of the video frame waiting to be sent by the sending end; if the receiving end The sequence number of the video frame being played by the end is greater than or equal to the sequence number of the video frame waiting to be sent by the sending end, and it is judged that the video frame waiting to be sent by the sending end will be delayed. The device includes: a first prediction unit, used to predict the sequence number of the video frame being played by the receiving end; a first obtaining unit, used to obtain the sequence number of the video frame waiting to be sent by the sending end; a first delay judging unit, 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 obtained by the first obtaining unit, the video frame obtained by the first obtaining unit will be delayed. The method and device can predict whether the video frames waiting to be sent will be delayed at the network side.

Figure 200810241546

Description

预测视频业务发生时延的方法和装置 Method and device for predicting video service delay

技术领域technical field

本发明涉及通信领域,特别涉及一种预测视频业务发生时延的方法和装置。The invention relates to the communication field, in particular to a method and device for predicting time delay of video services.

背景技术Background technique

视频业务是把数据实时从服务端下载到移动终端进行播放,其最大的特点是用户不必等到整个文件全部下载完毕,而只需经过几秒或十数秒的启动时延即可使用。The video service is to download data from the server to the mobile terminal for playback in real time. Its biggest feature is that the user does not have to wait for the entire file to be downloaded, but can use it only after a few seconds or tens of seconds of start-up delay.

视频业务使用的传输协议有RTP(Real-time Transport Protocol,实时传输协议)、RTCP(RTP Control Protocol,RTP控制协议)和RTSP(Real-Time StreamingProtocol,实时流媒体协议)。RTSP在体系结构上位于RTP和RTCP之上。它使用TCP或RTP完成数据传输。The transmission protocols used by video services include RTP (Real-time Transport Protocol, Real-time Transport Protocol), RTCP (RTP Control Protocol, RTP Control Protocol) and RTSP (Real-Time Streaming Protocol, real-time streaming media protocol). RTSP is architecturally on top of RTP and RTCP. It uses TCP or RTP for data transfer.

现有技术中,发送端将一个视频帧分割成若干个RTP包,然后将这些RTP包以SDU(Service Data Unit,服务数据单元)为载体发送到无线网络中进行传输。如图1所示,其为视频帧的分包与承载示意图。接收端接收到SDU,从而获得RTP包,然后将属于同一个视频帧的RTP包组合成为一个视频帧,最后将组合后的视频帧按照顺序一帧一帧地进行播放。In the prior art, the sending end divides a video frame into several RTP packets, and then sends these RTP packets to the wireless network with SDU (Service Data Unit, Service Data Unit) as the carrier for transmission. As shown in FIG. 1 , it is a schematic diagram of subpacketizing and bearing video frames. The receiving end receives the SDU to obtain the RTP packet, then combines the RTP packets belonging to the same video frame into a video frame, and finally plays the combined video frames frame by frame in sequence.

视频播放过程中往往会出现跳频、马赛克现象,主要是丢包引起,其中包括时延丢包。时延丢包含义为终端按顺序播放视频帧,每一帧都有固定的播放时刻,如果视频数据晚于其播放时刻到达终端就称之为时延,该数据没有任何用处,会被终端丢弃,即产生时延丢包。Frequency hopping and mosaic phenomenon often occur during video playback, mainly caused by packet loss, including delay and packet loss. Delay loss means that the terminal plays video frames in order, and each frame has a fixed playback time. If the video data arrives at the terminal later than its playback time, it is called delay. The data is useless and will be discarded by the terminal. , that is, delay packet loss occurs.

现有技术尚不能在网络侧预测等待发送的视频帧是否会发生时延。In the prior art, it is not possible to predict whether the video frames waiting to be sent will be delayed on the network side.

发明内容Contents of the invention

本发明实施例公开了一种能够在网络侧预测视频业务是否发生时延的方法和装置,以提高视频业务传输的效率,所述方案如下:The embodiment of the present invention discloses a method and device capable of predicting whether a video service is delayed on the network side, so as to improve the efficiency of video service transmission. The scheme is as follows:

本发明实施例公开了一种预测视频业务发生时延的方法,包括:The embodiment of the present invention discloses a method for predicting video service delay, including:

预测接收端正在播放的视频帧的序列号;Predict the sequence number of the video frame being played by the receiving end;

获取发送端等待发送的视频帧的序列号;Obtain the sequence number of the video frame that the sender 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 sending end, it is determined that the video frame waiting to be sent by the sending end will be delayed.

本发明实施例还公开了一种预测视频业务发生时延的方法,包括:The embodiment of the present invention also discloses a method for predicting the time delay of video services, including:

预测接收端正在播放的视频帧的SDU的序列号;Predict the sequence number of the SDU of the video frame being played by the receiving end;

获取发送端等待发送的SDU的序列号;Obtain the sequence number of the SDU that the sender is waiting 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 waiting to be sent by the sending end, it is determined that the SDU waiting to be sent by the sending end will be delayed.

本发明实施例还公开了一种预测视频业务发生时延的装置,包括:The embodiment of the present invention also discloses a device for predicting the time delay of video services, including:

第一预测单元,用于预测接收端正在播放的视频帧的序列号;The first prediction unit is used to predict the sequence number of the video frame being played by the receiving end;

第一获取单元,用于获取发送端等待发送的视频帧的序列号;The first obtaining unit is used to obtain the sequence number of the video frame waiting to be sent by the sending end;

第一时延判断单元,用于如果所述第一预测单元预测的视频帧的序列号大于或者等于所述第一获取单元获取的视频帧的序列号,判断所述第一获取单元获取的视频帧会发生时延。The first delay judging unit is configured to judge the video acquired by the first acquiring unit if the serial number of the video frame predicted by the first predicting unit is greater than or equal to the serial number of the video frame acquired by the first acquiring unit Frames are delayed.

本发明实施例还公开了一种预测视频业务发生时延的装置,包括:The embodiment of the present invention also discloses a device for predicting the time delay of video services, including:

第二预测单元,用于预测接收端正在播放的视频帧的SDU的序列号;The second prediction unit is used to predict the sequence number of the SDU of the video frame being played by the receiving end;

第二获取单元,用于获取发送端等待发送的SDU的序列号;The second obtaining unit is used to obtain the sequence number of the SDU waiting to be sent by the sending end;

第三时延判断单元,用于如果所述第二预测单元预测的SDU的序列号大于或者等于所述第二获取单元获取的SDU的序列号,判断所述第二获取单元获取的SDU会发生时延。The third delay judging unit is configured to judge that the SDU acquired by the second acquiring unit will occur if the sequence number of the SDU predicted by the second predicting unit is greater than or equal to the sequence number of the SDU acquired by the second acquiring unit delay.

本发明实施例提供的方法和装置,能够在网络侧预测视频帧是否会发生时延,以便网络侧采取相应的措施,提高网络传输的效率。The method and device provided by the embodiments of the present invention can predict whether a video frame will be delayed on the network side, so that the network side can take corresponding measures to improve the efficiency of network transmission.

附图说明Description of drawings

图1为现有技术中视频帧、RTP和SDU的对应关系;Fig. 1 is the corresponding relation of video frame, RTP and SDU in the prior art;

图2为本发明实施例一提供的一种预测视频业务发生时延的方法的流程图;FIG. 2 is a flowchart of a method for predicting video service delay provided by Embodiment 1 of the present invention;

图3为本发明实施例二提供的一种预测视频业务发生时延的方法的流程图;FIG. 3 is a flowchart of a method for predicting video service delay provided by Embodiment 2 of the present invention;

图4为本发明实施例三提供的一种预测视频业务发生时延的装置的结构图;FIG. 4 is a structural diagram of a device for predicting video service delay provided by Embodiment 3 of the present invention;

图5为本发明实施例四提供的一种预测视频业务发生时延的装置的结构图;FIG. 5 is a structural diagram of an apparatus for predicting video service delay provided by Embodiment 4 of the present invention;

图6为本发明实施例中所使用到的第一记录表和第二记录表的数据结构图。Fig. 6 is a data structure diagram of the first recording table and the second recording table used in the embodiment of the present invention.

具体实施方式Detailed ways

为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明的几个实施例作进一步地详细的描述。In order to make the object, technical solution and advantages of the present invention clearer, several embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.

实施例一Embodiment one

参见图2,为本发明实施例一提供的一种预测视频业务发生时延的方法的示意图,包括如下步骤:Referring to FIG. 2 , it is a schematic diagram of a method for predicting video service delay provided by Embodiment 1 of the present invention, including the following steps:

步骤201,预测接收端正在播放的视频帧的序列号。Step 201, predict the sequence number of the video frame being played by the receiving end.

即估算接收端当前时刻正在播放的视频帧的序列号,一般情况下采用视频帧的时间戳作为视频帧的序列号。That is to estimate the serial number of the video frame being played at the receiving end at the current moment. Generally, the timestamp of the video frame is used as the serial number of the video frame.

预测接收端正在播放的视频帧的序列号,其具体实现方式,例如,获取接收端的播放时长和接收端的播放速度,然后估算出当前时刻接收端正在播放的视频帧的序列号。Predict the sequence number of the video frame being played by the receiving end. The specific implementation method, for example, obtain the playback duration and playback speed of the receiving end, and then estimate the sequence number of the video frame being played by the receiving end at the current moment.

或者,获取接收端反馈的网络反馈信息RTCP包,该RTCP包中包含一个或多个字段携带接收端将被解码的SDU的序列号,通过该RTCP包来估算接收端正在播放的视频帧的序列号。Or, obtain the network feedback information RTCP packet fed back by the receiving end, the RTCP packet contains one or more fields carrying the sequence number of the SDU to be decoded by the receiving end, and use the RTCP packet to estimate the sequence of the video frame being played by the receiving end Number.

当接收端的应用程序开始一个RTP会话时会使用两个端口:一个给RTP用来传输业务数据,一个给RTCP用来进行传输控制。在视频业务传输的过程中,RTCP会周期性上报网络反馈信息给发送端,以便于发送端采取相应的措施,如进行传输的可靠性控制、流量控制或拥塞控制等。When the application at the receiving end starts an RTP session, two ports are used: one for RTP to transmit business data, and one for RTCP for transmission control. During video service transmission, RTCP will periodically report network feedback information to the sender, so that the sender can take corresponding measures, such as transmission reliability control, flow control, or congestion control.

具体的实现方法,例如,当发送端的网络侧接收到来自于接收端的网络反馈信息RTCP包后,从该网络反馈信息中解析出下一个需要被解码的RTP包的序列号(即SDU的序列号),通过此序列号,就可以得到该SDU包所对应的视频帧的序列号,该视频帧为接收端下一个将被播放的视频帧。The specific implementation method, for example, when the network side of the sending end receives the network feedback information RTCP packet from the receiving end, it parses out the sequence number of the next RTP packet to be decoded from the network feedback information (that is, the sequence number of the SDU ), through this serial number, the serial number of the video frame corresponding to the SDU packet can be obtained, and the video frame is the next video frame to be played at the receiving end.

可以通过如下方式得到下一个将被播放的视频帧的序列号。例如,设计一个第一记录表(参见图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 sequence number of the next SDU to be decoded, the sequence number 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 number of the next video frame to be played.

然后通过该下一个将被播放的视频帧的序列号估算接收端当前正在播放的视频帧的序列号。Then use the sequence number of the next video frame to be played to estimate the sequence number of the currently playing video frame at the receiving end.

一般情况下,相邻视频帧的序列号相差一个时间戳。例如,如果帧率为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 timestamp. For example, if the frame rate is 10 frames/s, it means that there are 10 frames per unit time. If the timestamp of the frame starts from 0, then it can be calculated that the timestamp corresponding to the video frame is 0, 0.1, 0.2... ...0.9 1.0. If the serial number of the video frame is 11.0, the serial number of the previous adjacent video frame is 10.9, and the difference between the serial numbers is 1 timestamp, which is 0.1. The timestamp is generally equal to the inverse of the frame rate, but there may be some deviation.

因此,可以将估算值设置为一个时间戳,用下一个将要播放的视频帧的序列号减去该估算值即可得到接收端正在播放的视频帧。如果网络延迟的比较厉害,接收端也有可能跳过下一个播放的视频帧,在这种情况下,可以将估算值设置为零或者负数,估算值的绝对值等于时间戳的整数倍,再用下一个播放的视频帧的序列号减去该估算值,得到接收端正在播放的视频帧的序列号。Therefore, the estimated value can be set as a time stamp, and the estimated value can be subtracted from the sequence number of the next video frame to be played to obtain the video frame being played by the receiving end. If the network delay is severe, the receiving end may skip the next video frame to be played. In this case, the estimated value can be set to zero or a negative number. The absolute value of the estimated value is equal to the integer multiple of the timestamp, and then used The estimated value is subtracted from the sequence number of the next video frame to be played to obtain the sequence number of the video frame being played at the receiving end.

估算值也可以设置为一个与网络延迟状况相关的系数,网络延迟越厉害,则估算值应当越小,然后用接收端下一个将要播放的视频帧减去该估算值得到接收端正在播放的视频帧的序列号。The estimated value can also be set as a coefficient related to the network delay condition. The worse the network delay, the smaller the estimated value should be. Then subtract the estimated value from the next video frame to be played at the receiving end to get the video being played at the receiving end The sequence number of the frame.

网络侧也可以通过其它方式预测接收端当前播放的视频帧,例如,依据视频帧的序列号的大小,将网络侧已经成功发送的视频帧的序列号全部记录到记录表中,当得到下一个将要播放的视频帧的序列号之后,从该记录表中检索出与该下一个将要播放的视频帧的序列号最接近的那个视频帧。The network side can also use other methods to predict the video frame currently played by the receiving end. For example, according to the size of the sequence number of the video frame, all the sequence numbers of the video frames that have been successfully sent by the network side are recorded in the record table. When the next After the sequence 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 recording table.

需要注意的是,此处所称的接收端正在播放的视频帧,仅仅是一种预测,并不代表接收端当前实际播放的视频帧,也不限于接收端实际播放的视频帧。完全可以使用其它视频帧作为当前播放的视频帧。例如可以直接将需要解码的下一个RTP所对应的视频帧作为当前播放的视频帧,或者将该视频帧的序列号直接减去一定的数值作为接收端正在播放的视频帧。It should be noted that the video frame being played by the receiving end mentioned here is only a 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. It is absolutely possible to use other video frames as the currently playing video frame. For example, the video frame corresponding to the next RTP to be decoded can be directly used as the currently played video frame, or the serial number of the video frame can be directly subtracted by a certain value as the video frame being played by the receiving end.

步骤202,获取发送端等待发送的视频帧的序列号。Step 202, acquire the sequence number of the video frame waiting to be sent by the sending end.

视频帧都是以SDU的形式进行传输的,作为发送端的网络侧,也需要从其它网元获取SDU,同时发送端可能存在多个SDU等待发送。发送端可以从等待发送的SDU队列中选择一个SDU,获取该SDU所属的视频帧,该视频帧即为发送端等待发送的视频帧。Video frames are transmitted in the form of SDUs. As the sending end, the network side also needs to obtain SDUs from other network elements, and there may be multiple SDUs waiting to be sent at the sending end. The sending end may select an SDU from the SDU queue waiting to be sent, and obtain the video frame to which the SDU belongs, and the video frame is the video frame waiting to be sent by the sending end.

其具体实现方式,例如,设计一个第二记录表(参见图6),只记录当前需要传输的SDU,以及SDU和所属视频帧之间的对应关系。从第二记录表中选择序列号最小的SDU,并从第二记录表中获取该SDU所属的视频帧的序列号。当该SDU成功发送之后,将其从第二记录表中删除。The specific implementation method is, for example, designing a second recording table (see FIG. 6 ), which only records the SDUs currently to be transmitted, and the corresponding relationship between the SDUs and their associated video frames. Select the SDU with the smallest sequence number from the second record table, and obtain the sequence number of the video frame to which the SDU belongs from the second record table. After the SDU is successfully sent, it is deleted from the second record table.

进一步的,步骤202可以只获取需要重传的SDU所对应的视频帧的序列号。SDU在传输过程中可能会发生错误,需要重传,重传超过一定次数便容易发生时延。可以采用一个第二记录表实现这一功能,例如第二记录表中只记录需要重传的SDU,从而进一步提高效率。Further, step 202 may only acquire the sequence number of the video frame corresponding to the SDU that needs to be retransmitted. Errors may occur during the transmission of the SDU, which needs to be retransmitted. If the retransmission exceeds a certain number of times, it is prone to delay. This function can be realized by using a second record table, for example, only SDUs that need to be retransmitted are recorded in the second record table, so as to further improve efficiency.

步骤201和202的执行顺序可以互相调换。The execution order of steps 201 and 202 can be interchanged.

步骤203,判断发送端等待发送的视频帧是否会发生时延。Step 203, judging whether the video frame waiting to be sent by the sending end will be delayed.

如果接收端正在播放的视频帧的序列号大于或等于发送端等待发送的视频帧的序列号,即步骤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 sending end is waiting to send, that is, the sequence number of the video frame predicted in step 201 is greater than or equal to the sequence number of the video frame obtained in step 202, the judgment step 202 The acquired video frames will be delayed.

发明人发现,通常情况下,作为用户的接收端,在时间上将会先播放序列号小的视频帧,后播放序列号大的视频帧,序列号本身隐含了播放时间的信息。The inventors found that, usually, as the receiving end of the user, the video frame with a small serial number will be played first in time, and the video frame with a large serial number will be played later, 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 waiting to be sent by the sending end, the playback time of the video frame waiting to be sent by the sending end has passed, even if the video frame waiting to be sent arrives At the receiving end, the result is a delay; conversely, if the video frame waiting to be sent by the sending end does not experience delay, the video frame with a sequence number larger than the video frame waiting to be sent by the sending end may not be delayed.

所以,实施例一可以进一步包括步骤,在步骤203判断发送端等待发送的视频帧会发生时延后,获取所述发送端等待发送的其它视频帧的序列号,如果所述发送端等待发送的视频帧不会发生时延,判断所述其它视频帧中序列号比所述发送端等待发送的视频帧大的视频帧也不会发生时延。Therefore, Embodiment 1 may further include the step of determining in step 203 that the video frame waiting to be sent by the sending end will be delayed, and obtaining the sequence numbers of other video frames waiting to be sent by the sending end, if the video frame waiting to be sent by the sending end There will be no time delay in the video frame, and no time delay will occur in judging the video frames whose sequence number is larger than the video frame waiting to be sent by the sending end among the other video frames.

其实现方式,例如,可以利用步骤202的第二记录表,将第二记录表按照视频帧的序列号从小到大的方式进行排序,如果发送端等待发送的视频帧不会发生时延,则第二记录表中排在发送端等待发送的视频帧下面的视频帧也不会发生时延,如此可极大的提高效率。Its implementation, for example, can use the second recording table in step 202 to sort the second recording table according to the sequence number of the video frame from small to large, if the video frame waiting to be sent by the sending end will not be delayed, then In the second recording table, the video frames below the video frames waiting to be sent by the sending end will not be delayed, so that the efficiency can be greatly improved.

现有技术尚不能在网络侧预测未发送的视频帧是否会发生时延,本实施例提供了一种预测的方法,可以方便网络侧预测等待发送的视频帧是否会发生时延,从而采取相应的措施,提高网络的效率。In the prior art, it is not possible to predict whether the unsent video frames will be delayed on the network side. This embodiment provides a prediction method, which can facilitate the network side to predict whether the video frames waiting to be sent will be delayed, so as to take corresponding measures. measures to improve network efficiency.

实施例二Embodiment two

如图3所示,为本发明实施例二提供的一种预测视频业务发生时延的方法的示意图,包括如下步骤:    As shown in Figure 3, it is a schematic diagram of a method for predicting video service delay provided by Embodiment 2 of the present invention, including the following steps:

步骤301,预测接收端正在播放的视频帧的SDU的序列号。Step 301, predict the sequence number of the SDU of the video frame being played by the receiving end.

即估算接收端当前时刻正在播放的视频帧的SDU的序列号。其具体实现方式,一种是通过接收端的播放时长和接收端的播放速度,估算出当前时刻,接收端正在播放的视频帧的序列号,然后获取该视频帧的一个SDU的序列号。That is, the sequence number of the SDU of the video frame being played at the receiving end is estimated at the current moment. Its specific implementation method, one is to estimate the serial number of the video frame being played by the receiving end at the current moment through the playback duration and playback speed of the receiving end, and then obtain the serial number of an SDU of the video frame.

另一种方法是通过网络反馈信息来计算接收端正在播放的视频帧的SDU的序列号。例如,可以通过在网络反馈信息中增加一个字段,用来携带接收端下一个将要被解码的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 sequence number of the next SDU to be decoded at the receiving end. With this serial number, you can get the serial number of the video frame corresponding to the SDU, use the serial number of the video frame to guess 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. Specifically, the sequence number of the SDU of the video frame being played by the receiving end can be predicted through the following steps.

第一步,获取当前来自于所述接收端的网络反馈信息。The first step is to obtain current network feedback information from the receiving end.

即获取当前来自于接收端的网络反馈信息RTCP包,RTCP包中的一个或多个字段携带了接收端将要被解码的SDU的序列号。That is to obtain the current network feedback information RTCP packet from the receiving end, and one or more fields in the RTCP packet carry the sequence number of the SDU to be decoded by the receiving end.

第二步,解析所述网络反馈信息。The second step is to analyze the network feedback information.

即从网络反馈信息RTCP包中,解析接收端下一个将被解码的SDU的序列号。That is, from the network feedback information RTCP packet, parse the sequence number of the next SDU to be decoded at the receiving end.

第三步,获取接收端下一个将被解码的视频帧的序列号。The third step is to obtain the sequence number of the next video frame to be decoded at the receiving end.

例如,可以设计一个第一记录表,记录RTP包的序列号(即SDU的序列号)和SDU所属的视频帧的序列号之间的对应关系。当获得了下一个将被解码的SDU的序列号之后,就可以从第一记录表检索出SDU所属的视频帧序列号,这个视频帧序列号就是下一个将被播放的视频帧的序列号。For example, a first recording table may be designed to record the correspondence between the sequence number of the RTP packet (that is, 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 sequence number 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 number of the next video frame to be played.

第四步,估算接收端当前播放的视频帧的序列号。The fourth step is to estimate the sequence number of the video frame currently played by the receiving end.

即利用第三步所获得的下一个将被播放的视频帧的序列号,减去一个估算值,就可以估算出接收端当前正在播放的视频帧的序列号。可以将估算值设置为一个时间戳;如果网络延迟的比较厉害,接收端也有可能跳过下一个播放的视频帧,在这种情况下,可以将估算值设置为零或者负数,估算值的绝对值等于时间戳的整数倍。That is, the sequence number of the video frame currently being played at the receiving end can be estimated by subtracting an estimated value from the sequence number of the next video frame to be played obtained in the third step. The estimated value can be set as a timestamp; if the network delay is relatively severe, the receiving end may skip the next video frame to be played. In this case, the estimated value can be set to zero or a negative number, and the absolute value of the estimated value The value is equal to an integer multiple of the timestamp.

第五步,获取属于当前播放的视频帧的一个SDU。The fifth step is to obtain an SDU belonging to the currently played video frame.

一个视频帧对应多个SDU,可以从属于接收端正在播放的视频帧的SDU中选择一个SDU,例如选择正在播放的视频帧中序列号最大的一个SDU的序列号,作为正在播放的视频帧的SDU的序列号。One video frame corresponds to multiple SDUs, and one SDU can be selected from the SDUs belonging to the video frame being played by the receiving end, for example, the serial number of the SDU with the largest serial number in the video frame being played is selected as the video frame being played The serial number of the SDU.

步骤302,获取发送端等待发送的SDU的序列号;Step 302, obtaining the sequence number of the SDU waiting to be sent by the sending end;

网络侧可能存在多个等待发送的SDU,发送端可以从等待发送的SDU队列中选择一个SDU。There may be multiple SDUs waiting to be sent on the network side, and the sender can select an SDU from the queue of SDUs waiting to be sent.

例如,使用一个第二记录表,记录所有发送端等待传送的SDU的序列号,并选择序列号最小的SDU作为发送端等待发送SDU。当该SDU发送成功之后,即将其从第二记录表中删除。For example, a second record table is used to record the sequence numbers of all SDUs waiting to be transmitted by the sending end, and the SDU with the smallest sequence number is selected as the SDU waiting to be sent by the sending end. After the SDU is sent successfully, it is about to be deleted from the second record table.

进一步的,步骤302可以只获取需要重传的SDU的序列号,因为重传的SDU发生时延的可能性较大。可以采用第二记录表实现这一功能,例如第二记录表中可以只记录需要重传的SDU的序列号,从而提高效率。Further, step 302 may only acquire the sequence numbers of the SDUs that need to be retransmitted, because the retransmitted SDUs are more likely to be delayed. This function can be implemented by using the second record table, for example, only the sequence numbers of the SDUs that need to be retransmitted can be recorded in the second record table, thereby improving efficiency.

步骤301和302的执行顺序可以互相调换。The execution order of steps 301 and 302 can be interchanged.

步骤303,判断所述发送端等待发送的SDU是否会发生时延。Step 303, judging whether the SDU waiting to be sent by the sending end will be delayed.

如果所述接收端正在播放的视频帧的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 waiting to be sent by the transmitting end, that is, the sequence number of the SDU predicted in step 301 is greater than or equal to the sequence number of the SDU obtained in step 302, It is judged that the SDU waiting to be sent by the sending end will be delayed.

发明人发现,一般情况下,SDU的序列号是按照从小到大的方式排序的,如果序列号大的SDU所对应的视频帧已经被播放了,说明序列号小的SDU所对应的视频帧的播放时刻已经过去了,即如果该SDU到达接收端将会发生时延。The inventors found that, in general, the serial numbers of SDUs are sorted from small to large. If the video frame corresponding to the SDU with a large serial number has been played, it means that the video frame corresponding to the SDU with a small serial number is The playback moment has passed, that is, there will be a delay if the SDU reaches the receiving end.

进一步的,本实施例还可以包括如下步骤,在步骤303判断步骤302获取的SDU会发生时延后,获取发送端等待发送的其它SDU的序列号,判断所述其它SDU中序列号比步骤302获取的SDU大的SDU也不会发生时延。Further, the present embodiment may also include the following steps. After judging in step 303 that the SDU acquired in step 302 will be delayed, the sequence numbers of other SDUs waiting to be sent by the sending end are obtained, and the sequence numbers in the other SDUs are judged to be higher than those in step 302. The acquired SDU with a large SDU will not be delayed.

现有技术中,并不能在网络侧预测尚未发送的视频帧的SDU是否会发生时延,本实施例提供了一种方法可以预测发送端等待发送的视频帧的SDU是否会发生时延,从而便于网络侧提前作出处理。In the prior art, it is impossible to predict whether the SDU of the unsent video frame will be delayed on the network side. This embodiment provides a method to predict whether the SDU of the video frame waiting to be sent by the sending end will be delayed, so that It is convenient for the network side to make processing in advance.

实施例三Embodiment three

如图4所示,为本发明实施例三提供的一种预测视频业务发生时延的装置的示意图,包括:As shown in FIG. 4, it is a schematic diagram of a device for predicting video service delay provided by Embodiment 3 of the present invention, including:

第一预测单元401,用于预测接收端正在播放的视频帧的序列号。The first prediction unit 401 is configured to predict the sequence number of the video frame being played by the receiving end.

接收端会反馈网络信息RTCP包,为了获取接收端正在播放的视频帧的序列号,需要在RTCP包中携带接收端下一个将要解码的SDU的序列号,通过这个序列号,就可以计算出接收端当前正在播放的视频帧的序列号。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, it is necessary to carry the serial number of the next SDU to be decoded by the receiving end in the RTCP packet. Through this serial number, the receiving end can be calculated. The sequence number of the video frame currently being played by the client.

具体实现方式,例如,第一预测单元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 acquisition unit is configured to acquire network feedback information currently from the receiving end, and the network feedback information includes one or more fields, which are used to carry the sequence number of the SDU to be decoded by the receiving end.

计算单元,用于当反馈信息获取单元接收到来自于接收端的网络反馈信息RTCP后,从该网络反馈信息中解析出下一个需要被解码的RTP包的序列号(即SDU的序列号),通过此序列号,就可以得到该SDU包所属的视频帧的序列号,该视频帧为接收端下一个将被播放的视频帧,然后利用下一个将被播放的视频帧的序列号,估算接收端当前正在播放的视频帧的序列号。具体而言,可通过如下子单元进行估算:The calculation unit is used to analyze the serial number of the next RTP packet (ie, the serial number of the SDU) that needs to be decoded from the network feedback information after the feedback information acquisition unit receives the network feedback information RTCP from the receiving end, through With this serial number, you can get the serial number of the video frame to which the SDU packet belongs. This video frame is the next video frame to be played at the receiving end, and then use the serial number of the next video frame to be played to estimate the receiving end. The sequence number of the currently playing video frame. Specifically, it can be estimated through the following subunits:

第一记录表单元,用于记录RTP包的序列号(即SDU的序列号)和SDU所属的视频帧的序列号之间的对应关系。The first recording table unit is used to record the correspondence between the serial number of the RTP packet (that is, the serial number of the SDU) and the serial number of the video frame to which the SDU belongs.

解析子单元,用于解析反馈信息获取单元获取的网络反馈信息,以获取所述接收端下一个将被解码的SDU的序列号。The parsing subunit is configured to parse the network feedback information obtained by the feedback information obtaining unit to obtain the sequence number of the next SDU to be decoded at the receiving end.

当获得了下一个将被解码的SDU的序列号之后,估算子单元就可以从第一记录表单元检索出解析子单元解析出的SDU所属的视频帧,这个视频帧的序列号就是下一个将被播放的视频帧的序列号。有了下一个被播放的视频帧的序列号,估算子单元将该视频帧的序列号减去一个估算值,就可以估算出接收端当前正在播放的视频帧的序列号。至于估算值,可以将估算值设置为一个时间戳;如果网络延迟的比较厉害,接收端也有可能跳过下一个播放的视频帧,在这种情况下,可以将估算值设置为零或者负数,估算值的绝对值等于一个或多个时间戳。After obtaining the sequence number of the next SDU to be decoded, the estimation subunit can retrieve from the first record table unit the video frame to which the SDU parsed by the analysis subunit belongs, and the sequence number of this video frame is the next The sequence number of the video frame being played. With the sequence number of the next video frame to be played, the estimation subunit subtracts an estimated value from the sequence number of the video frame to estimate the sequence number of the video frame currently being played at the receiving end. As for the estimated value, you can set the estimated value as a timestamp; if the network delay is severe, the receiving end may skip the next video frame to be played. In this case, you can set the estimated value to zero or a negative number. The absolute value of the estimate is equal to one or more timestamps.

当前播放的视频帧仅作为一种判断基准,用来预测待发送的视频帧发生时延的可能性。可以有各种确定方式,并不局限于实际播放的视频帧。The currently played video frame is only used as a criterion for predicting the possibility of delay in the video frame to be sent. Various determination methods are possible, and are not limited to actual played video frames.

第一获取单元402,用于获取发送端等待发送的视频帧的序列号。The first obtaining unit 402 is configured to obtain the sequence number of the video frame waiting to be sent by the sending end.

视频帧都是以SDU的形式进行传输的,作为发送端的网络侧,可能存在多个SDU等待发送。发送端可以从等待发送的SDU队列中选择一个SDU,获取该SDU所属的视频帧,该视频帧即为发送端等待发送的视频帧。Video frames are transmitted in the form of SDUs. As the network side of the sending end, there may be multiple SDUs waiting to be sent. The sending end may select an SDU from the SDU queue waiting to be sent, and obtain the video frame to which the SDU belongs, and the video frame is the video frame waiting to be sent by the sending end.

例如,第一获取单元402可以包括一个第二记录表单元,用于记录在发送端所有需要发送给接收的SDU,以及SDU和所属视频帧之间的对应关系;第一获取单元402还包括一个检索子单元,用于从第二记录表单元中选择序列号最小的SDU,并从第二记录表中获取该SDU所属的视频帧的序列号,当该SDU成功发送之后,将其从第二记录表中删除。For example, the first acquisition unit 402 may include a second recording table unit, which is used to record all SDUs that need to be sent to the receiver at the sending end, and the correspondence between the SDU and the associated video frame; the first acquisition unit 402 also includes a The retrieval subunit is used to select the SDU with the smallest sequence number from the second record table unit, and obtain the sequence number of the video frame to which the SDU belongs from the second record table, and after the SDU is successfully sent, send it from the second Deleted from the record table.

时延判断单元403,用于判断发送端等待发送的视频帧是否发生时延。The delay judging unit 403 is configured to judge whether the video frame waiting to be sent by the sending end is delayed.

如果第一预测单元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 sending end is waiting to send acquired by the first acquiring unit 402, then it is judged that the sending end acquired by the first acquiring unit 402 is waiting The video frames sent will be delayed.

发明人发现,通常情况下,作为用户的接收端,在时间上将会先播放序列号小的视频帧,后播放序列号大的视频帧,序列号本身隐含了播放时间的信息。因此,如果接收端正在播放的视频帧的序列号大于发送端等待发送的视频帧的序列号,则该发送端等待发送的视频帧的播放时间已经过去了,即便该等待发送的视频帧到达接收端,其结果也是发生时延。The inventors found that, usually, as the receiving end of the user, the video frame with a small serial number will be played first in time, and the video frame with a large serial number will be played later, 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 waiting to be sent by the sending end, the playback time of the video frame waiting to be sent by the sending end has passed, even if the video frame waiting to be sent arrives at the receiving end end, the result is delay.

本实施例还可以进一步包括第二时延判断单元,用于获取发送端等待发送的其它视频帧(不包括第一获取单元402获取的视频帧),如果第一时延判断单元403判断第一获取单元402获取的视频帧不会发生时延,判断所述其它视频帧中序列号比第一获取单元402获取的序列号大的视频帧也不会发生时延。This embodiment may further include a second delay judging unit for acquiring other video frames (not including the video frames acquired by the first acquiring unit 402) waiting to be sent by the sending end, if the first delay judging unit 403 judges the first The video frames acquired by the acquiring unit 402 will not be delayed, and it is judged that the video frames with sequence numbers larger than those acquired by the first acquiring unit 402 among the other video frames will not be delayed.

现有技术中,网络侧并不能预测尚未发送的视频帧是否会发生时延,本实施例提供了一种装置可以预测发送端等待发送的视频帧是否会发生时延,从而便于网络侧提前作出处理。In the prior art, the network side cannot predict whether there will be a delay in the video frames that have not yet been sent. This embodiment provides a device that can predict whether the video frames waiting to be sent by the sending end will be delayed, so that it is convenient for the network side to make advance decisions. deal with.

实施例四Embodiment four

如图5所示,为本发明实施例四所提供的一种预测视频业务发生时延的装置的示意图,包括:As shown in FIG. 5, it is a schematic diagram of a device for predicting video service delay provided by Embodiment 4 of the present invention, including:

第二预测单元501,用于预测接收端正在播放的视频帧的SDU的序列号。The second prediction unit 501 is configured to predict the sequence number of the SDU of the video frame being played by the receiving end.

预测接收端正在播放的视频帧,获取正在播放的视频帧的一个SDU的序列号。Predict the video frame being played at the receiving end, and obtain the sequence number of an SDU of the video frame being played.

可以通过网络反馈信息携带接收端下一个将要被解码的SDU序列号。有了这个序列号,就可以得到SDU所对应的视频帧的序列号,该视频帧的序列号即可推测接收端正在播放的视频帧的序列号,然后选择一个正在播放的视频帧的一个SDU的序列号。The next SDU sequence number to be decoded at 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 be used to guess the serial number of the video frame being played by the receiving end, and then select an SDU of a video frame being played. serial number.

具体实现方式,例如,第二预测单元可包括如下子单元:第一记录表单元、网络反馈信息获取单元、解析子单元、估算子单元和查询字单元。For a specific implementation, for example, the second prediction unit may include the following subunits: a first record table unit, a network feedback information acquisition unit, an analysis subunit, an estimation subunit, and a query word unit.

第一记录表单元,用于记录RTP包的序列号(即SDU的序列号)和SDU所属的视频帧的序列号之间的对应关系。The first recording table unit is used to record the correspondence between the serial number of the RTP packet (that is, the serial number of the SDU) and the serial number of the video frame to which the SDU belongs.

网络反馈信息获取单元,用于获取当前来自于所述接收端的网络反馈信息,所述网络反馈信息包括所述接收端下一个将被解码的SDU的序列号。A network feedback information obtaining unit, configured to obtain current network feedback information from the receiving end, where the network feedback information includes the sequence number of the next SDU to be decoded by the receiving end.

解析子单元,用于解析所述网络反馈信息获取单元获取的网络反馈信息,以得到所述接收端下一个将被解码的SDU的序列号。The parsing subunit is configured to parse the network feedback information obtained by the network feedback information obtaining unit to obtain the sequence number of the next SDU to be decoded at the receiving end.

估算子单元,用于从解析子单元获取下一个将被解码的SDU的序列号之后,从第一记录表单元检索出该SDU所属的视频帧序列号,这个视频帧序列号就是下一个将被播放的视频帧的序列号,将该视频帧的序列号减去一个估算值即可估算出接收端正在播放的视频帧的序列号。至于估算值的大小,可设置为一个时间戳,如果网络延迟的比较厉害,接收端也有可能跳过下一个播放的视频帧,在这种情况下,可以将估算值设置为零或者负数,估算值的绝对值等于一个或者多个时间戳。The estimation subunit is used to obtain the sequence number of the next SDU to be decoded from the parsing subunit, and then retrieve the sequence number of the video frame to which the SDU belongs from the first recording table unit. This video frame sequence number is the sequence number of the next SDU to be decoded. The sequence number of the video frame being played. Subtract an estimated value from the sequence number of the video frame to estimate the sequence number of the video frame being played at the receiving end. As for the size of the estimated value, it can be set as a timestamp. If the network delay is severe, the receiving end may skip the next video frame to be played. In this case, the estimated value can be set to zero or a negative number. The absolute value of the value is equal to one or more timestamps.

查询子单元,用于从所述第一记录表单元检索属正在播放的视频帧的SDU,由于一个视频帧对应多个SDU,可以选择正在播放的视频帧中序列号最大的一个SDU的序列号。The query subunit is used to retrieve the SDU belonging to the video frame being played from the first record table unit. Since one video frame corresponds to multiple SDUs, the sequence number of the SDU with the largest sequence number in the video frame being played can be selected .

第二获取单元502,用于获取发送端等待发送的SDU的序列号。The second obtaining unit 502 is configured to obtain the sequence number of the SDU waiting to be sent by the sending end.

网络侧可能存在多个等待发送的SDU,第二获取单元502可以从等待发送的SDU队列中选择一个SDU。There may be multiple SDUs waiting to be sent on the network side, and the second obtaining unit 502 may select an SDU from the queue of SDUs waiting to be sent.

例如,使用一个第二记录表,记录所有发送端等待传送的SDU的序列号,并选择序列号最小的SDU作为发送端等待发送SDU。当该SDU发送成功之后,即将其从第二记录表中删除。For example, a second record table is used to record the sequence numbers of all SDUs waiting to be transmitted by the sending end, and the SDU with the smallest sequence number is selected as the SDU waiting to be sent by the sending end. After the SDU is sent successfully, it is about to be deleted from the second record table.

第三时延判断单元503,用于判断所述发送端等待发送的SDU是否会发生时延。The third delay judging unit 503 is configured to judge whether the SDU waiting to be sent by the sending end will be delayed.

如果第二预测单元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 obtained by the second obtaining unit 502 will be delayed.

发明人发现,一般情况下,SDU的序列号是按照从小到大的方式排序的,如果序列号大的SDU所对应的视频帧已经被播放了,说明序列号小的SDU所对应的视频帧的播放时刻已经过去了,即如果该SDU到达接收端将会发生时延。The inventors found that, in general, the serial numbers of SDUs are sorted from small to large. If the video frame corresponding to the SDU with a large serial number has been played, it means that the video frame corresponding to the SDU with a small serial number is The playback moment has passed, that is, there will be a delay if the SDU reaches the receiving end.

进一步的,本实施例还可以包括第四时延判断单元,用于获取发送端等待发送的其它SDU,如果第二获取单元502获取的SDU不会发生时延,判断其它SDU中序列号比第二获取单元502获取的SDU大的SDU也不会发生时延。Further, this embodiment may also include a fourth time delay judging unit, which is used to obtain other SDUs waiting to be sent by the sending end. If the SDU obtained by the second obtaining unit 502 does not have a time delay, it is judged that the sequence numbers in other SDUs are higher than the first SDU. The SDU with a larger SDU acquired by the second acquisition unit 502 will not be delayed.

现有技术中,网络侧并不能预测尚未发送的SDU是否会发生时延,本实施例提供了一种装置可以预测发送端等待发送的SDU是否会发生时延,从而便于网络侧提前作出处理。In the prior art, the network side cannot predict whether the SDUs that have not been sent will be delayed. This embodiment provides a device that can predict whether the SDUs waiting to be sent by the sending end will be delayed, so that the network side can make processing in advance.

以上所述发明实施例可以通过软件实现,相应的软件可以存储在可读取的存储介质中,例如计算机的硬盘、光盘或软盘中。The above-mentioned embodiments of the invention can be realized by software, and the corresponding software can be stored in a readable storage medium, such as a hard disk, an optical disk or a floppy disk of a computer.

以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection of the present invention. within range.

Claims (12)

1.一种预测视频业务发生时延的方法,其特征在于,所述方法包括:1. A method for predicting video service time delay, characterized in that the method comprises: 预测接收端正在播放的视频帧的序列号;Predict the sequence number of the video frame being played by the receiving end; 获取发送端等待发送的视频帧的序列号;Obtain the sequence number of the video frame that the sender 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 sending end, it is determined that the video frame waiting to be sent by the sending end will be delayed; 其中,所述预测接收端正在播放的视频帧的序列号包括,获取当前来自于接收端的网络反馈信息,所述网络反馈信息包括所述接收端下一个将被解码的SDU的序列号,利用所述网络反馈信息估算所述接收端正在播放的视频帧的序列号。Wherein, said predicting the sequence number of the video frame being played by the receiving end includes obtaining current network feedback information from the receiving end, and the network feedback information includes the sequence number of the next SDU to be decoded by the receiving end, using the Estimate the sequence number of the video frame being played by the receiving end based on the network feedback information. 2.如权利要求1所述的方法,其特征在于,所述利用所述网络反馈信息预测所述接收端正在播放的视频帧的序列号的步骤,包括:2. The method according to claim 1, wherein the step of using the network feedback information to predict the sequence number of the video frame being played by the receiving end includes: 从所述网络反馈信息中解析出所述接收端下一个将被解码的SDU的序列号;Analyzing the sequence number of the next SDU to be decoded at the receiving end from the network feedback information; 从第一记录表中获取所述接收端下一个将被解码的SDU所属的视频帧的序列号,所述第一记录表记录了SDU和SDU所属的视频帧之间的对应关系;Obtain the sequence number of the video frame to which the next SDU to be decoded at the receiving end belongs from the first recording table, and the first recording table records the correspondence between the SDU and the video frame to which the SDU belongs; 将所述接收端下一个将被解码的SDU所属的视频帧的序列号,减去一个估算值所得到的结果作为所述接收端正在播放的视频帧的序列号。The result obtained by subtracting an estimated value from the sequence number of the video frame to which the next SDU to be decoded at the receiving end belongs is used as the sequence number of the video frame being played by the receiving end. 3.如权利要求1所述的方法,其特征在于,所述获取发送端等待发送的视频帧的序列号的步骤,包括:3. The method according to claim 1, wherein the step of obtaining the sequence number of the video frame that the sending end waits to send comprises: 从第二记录表中获取序列号最小的SDU,所述第二记录表记录了所述发送端当前等待发送的SDU队列及所述等待发送的SDU所属视频帧的序列号;Obtain the SDU with the smallest sequence number from the second recording table, the second recording table records the sequence number of the SDU queue that the sending end is currently waiting to send and the video frame to which the SDU waiting to send belongs; 从所述第二记录表获取所述序列号最小的SDU所属的视频帧的序列号,作为所述发送端等待发送的视频帧的序列号。Acquire the sequence number of the video frame to which the SDU with the smallest sequence number belongs from the second record table, and use it as the sequence number of the video frame waiting to be sent by the sending end. 4.如权利要求1所述的方法,其特征在于,所述方法还包括:4. The method of claim 1, further comprising: 获取所述发送端等待发送的其它视频帧的序列号,如果所述发送端等待发送的视频帧不会发生时延,判断所述其它视频帧中序列号比所述发送端等待发送的视频帧大的视频帧也不会发生时延。Acquiring the sequence numbers of other video frames waiting to be sent by the sending end, if the video frames waiting to be sent by the sending end will not be delayed, judging that the sequence numbers of the other video frames are higher than those of the video frames waiting to be sent by the sending end Large video frames also do not suffer from lag. 5.一种预测视频业务发生时延的方法,其特征在于,所述方法包括:5. A method for predicting video service time delay, characterized in that the method comprises: 预测接收端正在播放的视频帧的SDU的序列号;Predict the sequence number of the SDU of the video frame being played by the receiving end; 获取发送端等待发送的SDU的序列号;Obtain the sequence number of the SDU waiting to be sent by the sender; 如果所述接收端正在播放的视频帧的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 waiting to be sent by the sending end, it is judged that the SDU waiting to be sent by the sending end will be delayed; 其中,所述预测接收端正在播放的视频帧的SDU的序列号包括:Wherein, the sequence number of the SDU of the video frame being played by the prediction receiving end includes: 获取当前来自于所述接收端的网络反馈信息,所述网络反馈信息包括所述接收端下一个将被解码的SDU的序列号;Acquire current network feedback information from the receiving end, where the network feedback information includes the sequence number of the next SDU to be decoded at the receiving end; 解析所述网络反馈信息,获取所述接收端下一个将被解码的SDU的序列号;Analyzing the network feedback information to obtain the sequence number of the next SDU to be decoded at the receiving end; 从第一记录表获取所述接收端下一个将被解码的SDU所属的视频帧的序列号,所述第一记录表记录了SDU和SDU所属的视频帧之间的对应关系;Obtain the sequence number of the video frame to which the next SDU to be decoded at the receiving end belongs from the first recording table, and the first recording table records the correspondence between the SDU and the video frame to which the SDU belongs; 将所述接收端下一个将被解码的SDU所属的视频帧的序列号减去一个估算值所得到的结果作为当前播放的视频帧的序列号;The result obtained by subtracting an estimated value from the sequence number of the video frame to which the next SDU to be decoded at the receiving end is used as the sequence number of the currently played video frame; 从所述第一记录表中检索属于所述当前播放的视频帧的SDU,取序列号最大的SDU的序列号。Retrieving the SDUs belonging to the currently played video frame from the first record table, and taking the sequence number of the SDU with the largest sequence number. 6.如权利要求5所述的方法,其特征在于,所述方法还包括:6. The method of claim 5, further comprising: 获取发送端等待发送的其它SDU的序列号,如果所述发送端等待发送的SDU不会发生时延,判断所述其它SDU中序列号比所述发送端等待发送的SDU大的SDU也不会发生时延。Obtain the sequence numbers of other SDUs that the sender is waiting to send. If the SDUs that the sender is waiting to send will not be delayed, it is judged that the SDUs in the other SDUs that have a sequence number larger than the SDU that the sender is waiting to send will not Latency occurs. 7.一种预测视频业务发生时延的装置,其特征在于,所述装置包括:7. A device for predicting the time delay of video services, characterized in that the device comprises: 第一预测单元,用于预测接收端正在播放的视频帧的序列号;The first prediction unit is used to predict the sequence number of the video frame being played by the receiving end; 第一获取单元,用于获取发送端等待发送的视频帧的序列号;The first obtaining unit is used to obtain the sequence number of the video frame waiting to be sent by the sending end; 第一时延判断单元,用于如果所述第一预测单元预测的视频帧的序列号大于或者等于所述第一获取单元获取的视频帧的序列号,判断所述第一获取单元获取的视频帧会发生时延;The first delay judging unit is configured to judge the video acquired by the first acquiring unit if the serial number of the video frame predicted by the first predicting unit is greater than or equal to the serial number of the video frame acquired by the first acquiring unit Frames will be delayed; 其中,所述第一预测单元包括:Wherein, the first prediction unit includes: 反馈信息获取单元,用于获取当前来自于接收端的网络反馈信息,所述网络反馈信息包括在所述接收端下一个将被解码的SDU的序列号;a feedback information acquiring unit, configured to acquire network feedback information currently from the receiving end, the network feedback information including the sequence number of the next SDU to be decoded at the receiving end; 计算单元,用于依据所述反馈信息获取单元获取的网络反馈信息估算所述接收端正在播放的视频帧的序列号。A calculating unit, configured to estimate the sequence number of the video frame being played by the receiving end according to the network feedback information acquired by the feedback information acquiring unit. 8.如权利要求7所述的装置,其特征在于,所述计算单元包括:8. The device according to claim 7, wherein the computing unit comprises: 第一记录表单元,用于记录SDU和视频帧之间的对应关系;The first recording table unit is used to record the corresponding relationship between the SDU and the video frame; 解析子单元,用于解析所述反馈信息获取单元获取的网络反馈信息,以获取所述接收端下一个将被解码的SDU的序列号;The parsing subunit is configured to parse the network feedback information obtained by the feedback information obtaining unit to obtain the sequence number of the next SDU to be decoded at the receiving end; 估算子单元,用于从所述第一记录表单元获取所述解析子单元所解析的SDU所属的视频帧的序列号,减去一个估算值所得到的结果作为所述接收端正在播放的视频帧的序列号。The estimation subunit is used to obtain the sequence number of the video frame to which the SDU analyzed by the analysis subunit belongs from the first recording table unit, and subtract an estimated value as the video being played by the receiving end The sequence number of the frame. 9.如权利要求7所述的装置,其特征在于,所述第一获取单元包括:9. The device according to claim 7, wherein the first obtaining unit comprises: 第二记录表单元,用于记录所述发送端正在等待发送的SDU队列及所述等待发送的SDU所属视频帧的序列号;The second recording table unit is used to record the SDU queue that the sending end is waiting to send and the sequence number of the video frame to which the SDU waiting to send belongs; 检索子单元,用于从所述第二记录表单元获取序列号最小的SDU所属的视频帧的序列号,作为所述发送端等待发送的视频帧的序列号。The retrieval subunit is configured to obtain, from the second recording table unit, 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 waiting to be sent by the sending end. 10.如权利要求9所述的装置,其特征在于,所述装置还包括:10. The device of claim 9, further comprising: 第二时延判断单元,用于获取发送端等待发送的其它视频帧,如果所述第一时延判断单元判断所述第一获取单元获取的视频帧不会发生时延,判断所述其它视频帧中序列号比所述第一获取单元获取的序列号大的视频帧也不会发生时延。The second delay judging unit is used to acquire other video frames waiting to be sent by the sending end, if the first delay judging unit judges that the video frames acquired by the first acquiring unit will not be delayed, judge the other video frames A video frame whose sequence number is larger than the sequence number obtained by the first obtaining unit will not be delayed. 11.一种预测视频业务发生时延的装置,其特征在于,所述装置包括:11. A device for predicting video service delay, characterized in that the device comprises: 第二预测单元,用于预测接收端正在播放的视频帧的SDU的序列号;The second prediction unit is used to predict the sequence number of the SDU of the video frame being played by the receiving end; 第二获取单元,用于获取发送端等待发送的SDU的序列号;The second obtaining unit is used to obtain the sequence number of the SDU waiting to be sent by the sending end; 第三时延判断单元,用于如果所述第二预测单元预测的SDU的序列号大于或者等于所述第二获取单元获取的SDU的序列号,判断所述第二获取单元预测的SDU会发生时延;The third delay judging unit is configured to judge that the SDU predicted by the second acquiring unit will occur if the sequence number of the SDU predicted by the second predicting unit is greater than or equal to the sequence number of the SDU acquired by the second acquiring unit delay; 其中,所述第二预测单元包括:Wherein, the second prediction unit includes: 第一记录表单元,用于记录SDU和视频帧之间的对应关系;The first recording table unit is used to record the corresponding relationship between the SDU and the video frame; 网络反馈信息获取单元,用于获取当前来自于所述接收端的网络反馈信息,所述网络反馈信息包括所述接收端下一个将被解码的SDU的序列号;A network feedback information acquisition unit, configured to acquire current network feedback information from the receiving end, the network feedback information including the sequence number of the next SDU to be decoded at the receiving end; 解析子单元,用于解析所述网络反馈信息获取单元获取的网络反馈信息,以得到所述接收端下一个将被解码的SDU的序列号;The parsing subunit is configured to parse the network feedback information obtained by the network feedback information obtaining unit to obtain the sequence number of the next SDU to be decoded at the receiving end; 估算子单元,用于从所述第一记录表单元获取所述解析子单元所解析的SDU所属的视频帧的序列号,减去一个估算值得到所述接收端正在播放的视频帧的序列号;The estimation subunit is used to acquire the sequence number of the video frame to which the SDU analyzed by the parsing subunit belongs from the first recording table unit, and subtract an estimated value to obtain the sequence number of the video frame being played by the receiving end ; 查询子单元,用于从所述第一记录表单元检索属于所述估算子单元计算出的视频帧的SDU,取序列号最大的SDU的序列号。The query subunit is configured to retrieve the SDUs belonging to the video frame calculated by the estimation subunit from the first recording table unit, and obtain the sequence number of the SDU with the largest sequence number. 12.如权利要求11所述的装置,其特征在于,所述装置还包括:12. The device of claim 11, further comprising: 第四时延判断单元,用于获取发送端等待发送的其它SDU,如果所述第三时延判断单元判断所述第二获取单元获取的SDU不会发生时延,判断所述其它SDU中序列号比所述第二获取单元获取的SDU大的SDU也不会发生时延。The fourth delay judging unit is used to obtain other SDUs waiting to be sent by the sending end. If the third delay judging unit judges that the SDU obtained by the second obtaining unit will not be delayed, judge the sequence in the other SDUs The SDU with a number larger than the SDU obtained by the second obtaining unit will not be delayed.
CN 200810241546 2008-12-22 2008-12-22 Method and device for predicting video service occurrence delay Active CN101459852B (en)

Priority Applications (2)

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

Applications Claiming Priority (1)

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

Publications (2)

Publication Number Publication Date
CN101459852A CN101459852A (en) 2009-06-17
CN101459852B true CN101459852B (en) 2011-04-13

Family

ID=40770431

Family Applications (1)

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

Country Status (2)

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

Families Citing this family (6)

* 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
CN111654690A (en) * 2020-05-06 2020-09-11 北京百度网讯科技有限公司 Live video delay time determination method and device and electronic equipment
CN113766567B (en) * 2020-06-05 2025-04-11 华为技术有限公司 A communication method and device
CN112507163B (en) * 2020-12-02 2023-07-21 北京奇艺世纪科技有限公司 Duration prediction model training method, recommendation method, device, equipment and medium

Citations (4)

* 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
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 上海华为技术有限公司 A method and device for calculating terminal cache size

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100592547B1 (en) * 2003-06-03 2006-06-23 서울시립대학교 산학협력단 Packet Scheduling Method for Streaming
CN101459852B (en) * 2008-12-22 2011-04-13 华为技术有限公司 Method and device for predicting video service occurrence delay

Patent Citations (4)

* 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
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 上海华为技术有限公司 A method and device for calculating terminal cache size

Also Published As

Publication number Publication date
CN101459852A (en) 2009-06-17
WO2010072099A1 (en) 2010-07-01

Similar Documents

Publication Publication Date Title
US10063606B2 (en) Systems and methods for using client-side video buffer occupancy for enhanced quality of experience in a communication network
US10419502B2 (en) Systems and methods for using client-side video buffer occupancy for enhanced quality of experience in a communication network
JP3912091B2 (en) Data communication system, data transmission apparatus, data reception apparatus and method, and computer program
US7725576B2 (en) Method and apparatus for measuring stream availability, quality and performance
CN101459852B (en) Method and device for predicting video service occurrence delay
EP2530870B1 (en) Systems and methods for measuring quality of experience for media streaming
KR101566250B1 (en) Apparatus and method for streaming multimedia files on a portable terminal
US7886071B2 (en) Communication processing device, communication control method, and computer program
MXPA06002026A (en) Quality of experience (qoe) metrics for wireless communication networks.
CN108235149B (en) Method and device for optimizing video playing fluency
US10097319B2 (en) Method and apparatus for re-transmitting MMT packet and method and apparatus for requesting MMT packet re-transmission
US20140369222A1 (en) Method for estimating network jitter in apparatus for transmitting coded media data
WO2018024497A1 (en) Estimation of losses in a video stream
JP2005051299A (en) Packet transmission apparatus, packet reception apparatus, packet transmission method and packet reception method
CA2742038C (en) Systems and methods for measuring quality of experience for media streaming
Szilágyi et al. Network side lightweight and scalable YouTube QoE estimation
CN101179353A (en) Method and system of monitoring multimedia service performance
CN103457793A (en) Method, device and system for measuring multicast time delay
US7830920B2 (en) System and method for enhancing audio quality for IP based systems using an AMR payload format
KR100737678B1 (en) Latency Analysis Method for Multimedia Streaming Service
CN104427331B (en) A kind of video traffic processing method, device and the network equipment
WO2014073202A1 (en) Information-processing device, information-processing method, content distribution system, and computer program recording medium
US7643503B2 (en) System and method for dynamically determining retransmit buffer time
CN101369975A (en) A detection method and system for delayed packet loss
KR100886104B1 (en) Multimedia traffic charging method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant