CN103945213B - A kind of video flow quality monitoring method and device - Google Patents
A kind of video flow quality monitoring method and device Download PDFInfo
- Publication number
- CN103945213B CN103945213B CN201310022730.7A CN201310022730A CN103945213B CN 103945213 B CN103945213 B CN 103945213B CN 201310022730 A CN201310022730 A CN 201310022730A CN 103945213 B CN103945213 B CN 103945213B
- Authority
- CN
- China
- Prior art keywords
- frame
- current video
- quality
- video
- video frame
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000012544 monitoring process Methods 0.000 title claims abstract description 110
- 238000000034 method Methods 0.000 title claims abstract description 69
- 230000006378 damage Effects 0.000 claims abstract description 106
- 230000008859 change Effects 0.000 claims abstract description 7
- 238000011156 evaluation Methods 0.000 claims description 57
- 238000004364 calculation method Methods 0.000 claims description 40
- 238000013139 quantization Methods 0.000 claims description 30
- 238000012806 monitoring device Methods 0.000 claims description 6
- 230000000903 blocking effect Effects 0.000 claims description 5
- 208000027418 Wounds and injury Diseases 0.000 claims 7
- 208000014674 injury Diseases 0.000 claims 7
- 238000013507 mapping Methods 0.000 claims 2
- 238000012935 Averaging Methods 0.000 claims 1
- 108010001267 Protein Subunits Proteins 0.000 claims 1
- 238000012360 testing method Methods 0.000 claims 1
- 230000006735 deficit Effects 0.000 abstract description 6
- 230000008569 process Effects 0.000 description 23
- 230000000694 effects Effects 0.000 description 15
- 238000013441 quality evaluation Methods 0.000 description 9
- 238000005516 engineering process Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 238000005538 encapsulation Methods 0.000 description 3
- 238000007430 reference method Methods 0.000 description 3
- 239000000284 extract Substances 0.000 description 2
- 238000007792 addition Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000003139 buffering effect Effects 0.000 description 1
- 230000015556 catabolic process Effects 0.000 description 1
- 238000000354 decomposition reaction Methods 0.000 description 1
- 238000006731 degradation reaction Methods 0.000 description 1
- 230000001934 delay Effects 0.000 description 1
- 238000013467 fragmentation Methods 0.000 description 1
- 238000006062 fragmentation reaction Methods 0.000 description 1
- 238000009499 grossing Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000013442 quality metrics Methods 0.000 description 1
- 238000007619 statistical method Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N17/00—Diagnosis, testing or measuring for television systems or their details
- H04N17/004—Diagnosis, testing or measuring for television systems or their details for digital television systems
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/20—Arrangements for detecting or preventing errors in the information received using signal quality detector
- H04L1/201—Frame classification, e.g. bad, good or erased
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/20—Arrangements for detecting or preventing errors in the information received using signal quality detector
- H04L1/205—Arrangements for detecting or preventing errors in the information received using signal quality detector jitter monitoring
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/85—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client
- H04N21/63—Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
- H04N21/647—Control signaling between network components and server or clients; Network processes for video distribution between server and clients, e.g. controlling the quality of the video stream, by dropping packets, protecting content from unauthorised alteration within the network, monitoring of network load, bridging between two different networks, e.g. between IP and wireless
- H04N21/64723—Monitoring of network processes or resources, e.g. monitoring of network load
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Multimedia (AREA)
- Quality & Reliability (AREA)
- Computer Security & Cryptography (AREA)
- Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- General Health & Medical Sciences (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
本发明公开了一种视频流质量监测方法及装置。其中,该方法包括:获取网络侧的视频流信息;根据视频流信息,计算基准帧的质量评分,以及当前视频帧的编码质量评分;根据基准帧的质量评分、当前视频帧的编码质量评分、以及当前视频帧的编码类型,计算源编码质量评分;根据视频流信息,计算网络损伤评分;其中,网络损伤是由丢包以及时延抖动引起的视频流质量损伤;根据源编码质量评分和网络损伤评分,确定视频流的质量监测评分。通过本发明,解决了相关技术中网络侧视频流质量监测方法监测精度不高、实现较复杂的问题,准确反映出视频质量的动态变化,提高了视频流质量监测的准确度,复杂度不高,能很方便地应用于网络侧视频质量实时监测环境中。
The invention discloses a video stream quality monitoring method and device. Wherein, the method includes: obtaining video stream information on the network side; calculating the quality score of the reference frame and the coding quality score of the current video frame according to the video stream information; according to the quality score of the reference frame, the coding quality score of the current video frame, And the coding type of the current video frame, calculate the source coding quality score; calculate the network damage score according to the video stream information; where, the network damage is the video stream quality damage caused by packet loss and delay jitter; according to the source coding quality score and network Impairment score, which determines the quality monitoring score of the video stream. Through the present invention, the problem of low monitoring accuracy and complex implementation of the network side video stream quality monitoring method in the related art is solved, and the dynamic change of video quality is accurately reflected, and the accuracy of video stream quality monitoring is improved, and the complexity is not high , and can be easily applied to the real-time monitoring environment of video quality on the network side.
Description
技术领域technical field
本发明涉及移动通讯领域,特别是涉及一种视频流质量监测方法及装置。The invention relates to the field of mobile communication, in particular to a video stream quality monitoring method and device.
背景技术Background technique
近年来随着网络带宽的增加,实时视频业务如流媒体业务、视频电话业务、视频会议业务等发展速度非常迅速。对这些视频业务的质量进行准确评估,既可以让用户了解到视频业务的服务水平,又可以为服务提供商提供服务水平提升的标尺,对业务的良好运营有着重要作用。尤其在业务实际运行中,实现业务的在线监测,可以动态掌握业务运行的质量状态,及时发现业务运行过程中的质量问题,具有很强的实用价值。In recent years, with the increase of network bandwidth, real-time video services such as streaming media services, video telephony services, and video conference services have developed very rapidly. Accurate evaluation of the quality of these video services can not only let users understand the service level of video services, but also provide service providers with a yardstick for service level improvement, which plays an important role in the good operation of services. Especially in the actual operation of the business, the online monitoring of the business can dynamically grasp the quality status of the business operation, and timely discover the quality problems in the process of business operation, which has strong practical value.
视频流业务质量的在线监测可在服务侧、网络侧和终端侧实现。服务侧业务质量监测主要监测服务侧提供的质量,无法体现终端侧的用户体验质量。终端侧业务质量监测需要部署在用户终端上,一般需征得用户同意才能部署,部署存在一定难度,并且只能反映单个用户对业务的体验,很难反映网络群体用户的体验。有些终端侧业务质量监测方法还会影响用户对业务的使用,从而影响用户的业务体验。而网络侧业务质量监测可部署在各网络节点,无需用户配合,也不会影响用户,可对网络节点上通过的多个业务会话同时进行监测,从而反映该网络节点负责的网络的质量状况。如果部署在离用户终端很近的网络节点上,虽无法像终端侧方法那样直接反映用户体验,但也能很好反映业务运行状况。The online monitoring of video streaming service quality can be realized on the service side, network side and terminal side. The service quality monitoring on the service side mainly monitors the quality provided by the service side, and cannot reflect the user experience quality on the terminal side. Terminal-side service quality monitoring needs to be deployed on user terminals, which generally requires the consent of users to deploy. Deployment is difficult, and it can only reflect the service experience of a single user, and it is difficult to reflect the experience of network group users. Some terminal-side service quality monitoring methods may also affect the user's use of the service, thereby affecting the user's service experience. The service quality monitoring on the network side can be deployed on each network node without the cooperation of the user and will not affect the user. It can monitor multiple service sessions passing through the network node at the same time, thus reflecting the quality status of the network that the network node is responsible for. If it is deployed on a network node very close to the user terminal, although it cannot directly reflect the user experience like the terminal-side method, it can also reflect the business operation status well.
但是,在网络侧进行视频流业务质量在线监测存在一些挑战。首先,网络侧业务数据通过量较大,视频业务尤其如此,因此对数据处理速度的要求很高,相应的质量监测方法就不能太复杂;其次,在网络侧不存在视频业务的原始数据,只能通过解析视频业务流来进行质量评测,这在媒体质量评测中称为无参考方法,无参考方法在质量评测领域一直是难点所在,要么精度不高、要么过于复杂;再次,网络侧业务质量监测的监测依据需是当前时刻已到达的数据包,且需要根据当前收到的数据包进行质量状态的动态更新,这就要求监测方法能够实时处理实时业务流数据。However, there are some challenges in online monitoring of video streaming service quality on the network side. First of all, the service data throughput on the network side is relatively large, especially for video services, so the requirements for data processing speed are very high, and the corresponding quality monitoring methods cannot be too complicated; secondly, there is no original data of video services on the network side, only Quality evaluation can be performed by analyzing video service streams, which is called no-reference method in media quality evaluation. No-reference method has always been a difficulty in the field of quality evaluation, either with low accuracy or too complicated; thirdly, network-side service quality The monitoring basis for monitoring needs to be the data packets that have arrived at the current moment, and the quality status needs to be dynamically updated according to the currently received data packets, which requires the monitoring method to be able to process real-time business flow data in real time.
现有的可应用于网络侧的无参考方法,一般会考虑源视频编码和网络性能两方面对视频质量的影响,但在具体涵盖因素方面各有不同。如ITU-T G.1070针对视频电话业务的质量评测提出了一套较完善的无参考框架,但在针对视频质量进行评测时,源视频编码只考虑了编码器类型、比特率和帧率三个因素,网络性能只考虑了丢包因素;移动图像质量度量(Moving Picture Quality Metric,简称为MPQM)模型的源视频编码只是根据编码器类型的不同给出了固定分数,网络性能也只考虑了丢包,导致视频流质量的监测精度较低。另外一些模型,考虑的因素很多,但其具体实现却很模糊。如T-V-model,考虑了视频编码、分辨率变化、传输过程、及显示过程带来的损伤,但是这些损伤与最终评分之间的关系过于简单,且并未阐明损伤的具体表示方法和影响因素。其他一些模型,也存在类似的问题。Existing no-reference methods that can be applied to the network side generally consider the impact of source video coding and network performance on video quality, but differ in terms of specific factors covered. For example, ITU-T G.1070 proposes a relatively complete set of no-reference framework for quality evaluation of video telephony services. However, when evaluating video quality, source video coding only considers the encoder type, bit rate, and frame rate. The network performance only considers the packet loss factor; the source video coding of the Moving Picture Quality Metric (MPQM) model only gives a fixed score according to the different encoder types, and the network performance only considers Packet loss leads to low monitoring accuracy of video stream quality. In other models, many factors are considered, but their specific implementation is very vague. For example, the T-V-model considers the damage caused by video coding, resolution change, transmission process, and display process, but the relationship between these damages and the final score is too simple, and the specific representation method and influencing factors of the damage are not clarified . Some other models have similar problems.
针对相关技术中的网络侧的视频流质量监测方法监测精度不高、实现较复杂的问题,目前尚未提出有效的解决方案。Aiming at the problem of low monitoring accuracy and complex implementation of the video stream quality monitoring method on the network side in the related art, no effective solution has been proposed yet.
发明内容Contents of the invention
针对相关技术中网络侧的视频流质量监测方法监测精度不高、实现较复杂的问题,本发明提供了一种视频流质量监测方法及装置,用以解决上述技术问题。Aiming at the problem of low monitoring accuracy and complex implementation of the video stream quality monitoring method on the network side in the related art, the present invention provides a video stream quality monitoring method and device to solve the above technical problems.
根据本发明的一个方面,本发明提供了一种视频流质量监测方法,其中,该方法包括:获取网络侧的视频流信息;根据上述视频流信息,计算基准帧的质量评分,以及当前视频帧的编码质量评分;根据上述基准帧的质量评分、上述当前视频帧的编码质量评分、以及上述当前视频帧的编码类型,计算源编码质量评分;根据上述视频流信息,计算网络损伤评分;其中,上述网络损伤是由丢包以及时延抖动引起的视频流质量损伤;根据上述源编码质量评分和上述网络损伤评分,确定视频流的质量监测评分。According to one aspect of the present invention, the present invention provides a video stream quality monitoring method, wherein the method includes: obtaining video stream information on the network side; calculating the quality score of the reference frame and the current video frame according to the above video stream information The coding quality score of the above-mentioned reference frame, the coding quality score of the above-mentioned current video frame, and the coding type of the above-mentioned current video frame, calculate the source coding quality score; according to the above-mentioned video stream information, calculate the network damage score; wherein, The above network damage is the video stream quality damage caused by packet loss and delay jitter; according to the above source coding quality score and the above network damage score, determine the quality monitoring score of the video stream.
进一步地,获取网络侧的视频流信息包括:对网络侧的视频业务网络数据进行解封装和解复用,得到视频流;解析上述视频流,定位当前视频帧和上一视频帧在上述视频流中的起始点和结束点;将当前视频帧的起始点和结束点,以及上述上一视频帧的起始点和结束点,分别反向映射到上述视频业务网络数据包,分别得到上述当前视频帧和上一视频帧的所有网络包的到达时刻;根据该到达时刻分别确定当前视频帧到达时刻和上一视频帧到达时刻;根据上述上一视频帧的结束点以及上述当前视频帧的结束点,确定上述当前视频帧的比特数;确定上述当前视频帧的实时丢包率、实时比特率以及实时帧率;解析上述当前视频帧的编码比特流,确定上述当前视频帧的编码类型、尺寸信息以及量化参数。Further, obtaining the video stream information on the network side includes: decapsulating and demultiplexing the video service network data on the network side to obtain the video stream; parsing the above video stream, and locating the current video frame and the previous video frame in the above video stream The starting point and the ending point of the current video frame; the starting point and the ending point of the current video frame, and the starting point and the ending point of the above-mentioned previous video frame are respectively reversely mapped to the above-mentioned video service network data packet, and the above-mentioned current video frame and the above-mentioned current video frame are respectively obtained. The arrival time of all network packets of the last video frame; respectively determine the arrival time of the current video frame and the arrival time of the last video frame according to the arrival time; determine according to the end point of the last video frame and the end point of the above-mentioned current video frame The number of bits of the above-mentioned current video frame; determine the real-time packet loss rate, real-time bit rate and real-time frame rate of the above-mentioned current video frame; analyze the encoded bit stream of the above-mentioned current video frame, and determine the encoding type, size information and quantization of the above-mentioned current video frame parameter.
进一步地,根据上述视频流信息,计算基准帧的质量评分包括:根据上述当前视频帧的编码比特流判断上述当前视频帧是否为基准帧;如果是基准帧,则对上述基准帧执行块效应评价操作以及模糊评价操作;对上述块效应评价操作的结果以及上述模糊评价操作的结果进行加权平均,得到上述基准帧的质量评分。Further, according to the above video stream information, calculating the quality score of the reference frame includes: judging whether the above current video frame is a reference frame according to the coded bit stream of the above current video frame; if it is a reference frame, performing blockiness evaluation on the above reference frame operation and blur evaluation operation; performing a weighted average on the result of the block effect evaluation operation and the result of the blur evaluation operation to obtain the quality score of the reference frame.
进一步地,根据上述视频流信息,计算当前视频帧的编码质量评分包括:根据上述当前视频帧的比特数和尺寸信息,得到上述当前视频帧的每像素比特数;根据上述每像素比特数以及上述量化参数,采取与上述当前视频帧的编码类型相应的计算操作,得到时间和空间复杂度;根据上述时间和空间复杂度以及上述量化参数,得到上述当前视频帧的编码质量评分。Further, calculating the encoding quality score of the current video frame according to the above video stream information includes: obtaining the number of bits per pixel of the above current video frame according to the number of bits and size information of the above current video frame; according to the above number of bits per pixel and the above For the quantization parameter, the calculation operation corresponding to the coding type of the above-mentioned current video frame is adopted to obtain the time and space complexity; according to the above-mentioned time and space complexity and the above-mentioned quantization parameter, the coding quality score of the above-mentioned current video frame is obtained.
进一步地,根据上述基准帧的质量评分、上述当前视频帧的编码质量评分、以及上述当前视频帧的编码类型,计算源编码质量评分包括:如果上述当前视频帧的编码类型为帧内预测I帧,且上述当前视频帧是基准帧,则上述源编码质量评分等于上述基准帧的质量评分;如果上述当前视频帧的编码类型为帧内预测I帧,上述当前视频帧不是基准帧,且存在上述基准帧的质量评分,则根据上述基准帧的质量评分、上述当前视频帧的编码质量评分,以及上述当前视频帧与基准帧之间的编码质量差异,计算上述源编码质量评分;如果上述当前视频帧的编码类型为帧内预测I帧,上述当前视频帧不是基准帧,且不存在上述基准帧的质量评分,则上述源编码质量评分等于上述当前视频帧的编码质量评分;如果上述当前视频帧的编码类型为前向预测P帧,则获取上一视频帧的质量监测评分;根据上述上一视频帧的质量监测评分、上述当前视频帧的编码质量评分、以及上述当前视频帧与上述上一视频帧之间的编码质量差异,计算上述源编码质量评分。Further, according to the quality score of the above-mentioned reference frame, the coding quality score of the above-mentioned current video frame, and the coding type of the above-mentioned current video frame, calculating the source coding quality score includes: if the coding type of the above-mentioned current video frame is intra-frame prediction I frame , and the above-mentioned current video frame is a reference frame, then the above-mentioned source encoding quality score is equal to the quality score of the above-mentioned reference frame; The quality score of the reference frame, then according to the quality score of the above-mentioned reference frame, the coding quality score of the above-mentioned current video frame, and the coding quality difference between the above-mentioned current video frame and the reference frame, calculate the above-mentioned source coding quality score; if the above-mentioned current video The encoding type of the frame is an intra-frame prediction I frame, and the above-mentioned current video frame is not a reference frame, and there is no quality score of the above-mentioned reference frame, then the above-mentioned source coding quality score is equal to the coding quality score of the above-mentioned current video frame; if the above-mentioned current video frame If the encoding type is forward predictive P frame, the quality monitoring score of the previous video frame is obtained; according to the quality monitoring score of the previous video frame, the encoding quality score of the current video frame, and the relationship between the current video frame and the previous The difference in encoding quality between video frames, computing the source encoding quality score above.
进一步地,根据上述视频流信息,计算网络损伤评分包括:设定第一时间窗口长度;其中,上述第一时间窗口的结束点为上述当前视频帧,上述第一时间窗口的开始点为与上述当前视频帧的时间间隔不大于上述第一时间窗口长度的视频帧;根据上述第一时间窗口内的各个视频帧的实时丢包率,计算得到实时平均丢包率;根据上述第一时间窗口内的各个视频帧的实时比特率,计算得到实时平均比特率;根据上述第一时间窗口内的各个视频帧的实时帧率,计算得到实时平均帧率;根据上述实时平均比特率和上述实时平均帧率,计算得到丢包鲁棒性因子;根据上述丢包鲁棒性因子以及上述实时平均丢包率,计算得到丢包损伤评分;根据上述当前视频帧到达时刻的上述实时平均帧率,以及上述上一视频帧到达时刻的实时平均帧率,计算得到时延抖动评分;其中,上述网络损伤评分包括上述丢包损伤评分和上述时延抖动评分。Further, according to the above video stream information, calculating the network damage score includes: setting the length of the first time window; wherein, the end point of the first time window is the above current video frame, and the start point of the first time window is the same as the above The time interval of the current video frame is not greater than the video frame of the above-mentioned first time window length; according to the real-time packet loss rate of each video frame in the above-mentioned first time window, the real-time average packet loss rate is calculated; according to the real-time average packet loss rate in the above-mentioned first time window The real-time average bit rate of each video frame is calculated to obtain the real-time average bit rate; according to the real-time frame rate of each video frame in the first time window, the real-time average frame rate is calculated; according to the above-mentioned real-time average bit rate and the above-mentioned real-time average frame rate, calculate the packet loss robustness factor; according to the above packet loss robustness factor and the above real-time average packet loss rate, calculate the packet loss damage score; according to the above real-time average frame rate at the arrival time of the current video frame, and the above The real-time average frame rate at the arrival time of the last video frame is calculated to obtain the delay jitter score; wherein, the above-mentioned network damage score includes the above-mentioned packet loss damage score and the above-mentioned delay jitter score.
进一步地,根据上述源编码质量评分和上述网络损伤评分,确定上述视频流的质量监测评分包括:根据上述源编码质量评分、上述丢包损伤评分、上述时延抖动评分,计算得到当前视频帧的动态评分;设定第二时间窗口长度;其中,上述第二时间窗口的结束点为上述当前视频帧,上述第二时间窗口的开始点为与上述当前视频帧的时间间隔不大于上述第二时间窗口长度的视频帧;对上述第二时间窗口内的各个视频帧的动态评分取平均值,得到上述视频流的质量监测评分。Further, according to the above-mentioned source coding quality score and the above-mentioned network damage score, determining the quality monitoring score of the above-mentioned video stream includes: according to the above-mentioned source coding quality score, the above-mentioned packet loss damage score, and the above-mentioned delay jitter score, calculating the Dynamic scoring; setting the length of the second time window; wherein, the end point of the second time window is the above-mentioned current video frame, and the start point of the second time window is that the time interval with the above-mentioned current video frame is not greater than the above-mentioned second time The video frames of the window length; the dynamic score of each video frame in the above-mentioned second time window is averaged to obtain the quality monitoring score of the above-mentioned video stream.
根据本发明的另一方面,本发明还提供了一种视频流质量监测装置,其中,该装置包括:信息获取模块,用于获取网络侧的视频流信息;源编码质量评分模块,用于根据视频流信息,计算基准帧的质量评分,以及当前视频帧的编码质量评分;根据基准帧的质量评分、当前视频帧的编码质量评分、以及当前视频帧的编码类型,计算源编码质量评分;网络损伤评分模块,用于根据视频流信息,计算网络损伤评分;其中,网络损伤是由丢包以及时延抖动引起的视频流质量损伤;质量监测评分模块,用于根据源编码质量评分和网络损伤评分,确定视频流的质量监测评分。According to another aspect of the present invention, the present invention also provides a video stream quality monitoring device, wherein the device includes: an information acquisition module, used to obtain video stream information on the network side; a source coding quality scoring module, used to Video stream information, calculate the quality score of the reference frame, and the encoding quality score of the current video frame; calculate the source encoding quality score according to the quality score of the reference frame, the encoding quality score of the current video frame, and the encoding type of the current video frame; network The damage scoring module is used to calculate the network damage score according to the video stream information; wherein, the network damage is the video stream quality damage caused by packet loss and delay jitter; the quality monitoring and scoring module is used to score and network damage according to the source coding quality Score, which determines the quality monitoring score for the video stream.
进一步地,上述信息获取模块包括:视频流获取子单元,用于对网络侧的视频业务网络数据进行解封装和解复用,得到视频流;时刻确定子单元,用于解析上述视频流,定位当前视频帧和上一视频帧在上述视频流中的起始点和结束点;将当前视频帧的起始点和结束点,以及上述上一视频帧的起始点和结束点,分别反向映射到上述视频业务网络数据包,分别得到上述当前视频帧和上一视频帧的所有网络包的到达时刻;根据该到达时刻分别确定当前视频帧到达时刻和上一视频帧到达时刻;比特数确定子单元,用于根据上述上一视频帧的结束点以及上述当前视频帧的结束点,确定上述当前视频帧的比特数;编码信息确定子单元,用于确定上述当前视频帧的实时丢包率、实时比特率以及实时帧率;解析上述当前视频帧的编码比特流,确定上述当前视频帧的编码类型、尺寸信息以及量化参数。Further, the information acquisition module includes: a video stream acquisition subunit, used to decapsulate and demultiplex the video service network data on the network side, to obtain a video stream; a time determination subunit, used to analyze the above video stream, and locate the current The start point and end point of the video frame and the previous video frame in the above video stream; the start point and end point of the current video frame, and the start point and end point of the above last video frame are reversely mapped to the above video The service network data packet obtains the arrival time of all network packets of the above-mentioned current video frame and the last video frame respectively; respectively determine the arrival time of the current video frame and the arrival time of the last video frame according to the arrival time; the number of bits determines the subunit, with Determine the number of bits of the above-mentioned current video frame according to the end point of the above-mentioned last video frame and the end point of the above-mentioned current video frame; the encoding information determination subunit is used to determine the real-time packet loss rate and real-time bit rate of the above-mentioned current video frame and a real-time frame rate; analyzing the coded bit stream of the current video frame to determine the coding type, size information and quantization parameters of the current video frame.
进一步地,上述源编码质量评分模块包括基准帧的质量评分单元,用于根据上述视频流信息,计算基准帧的质量评分;其中,上述基准帧的质量评分单元包括:基准帧判断子单元,用于根据上述当前视频帧的编码比特流判断上述当前视频帧是否为基准帧;评价子单元,用于如果是基准帧,则对上述基准帧执行块效应评价操作以及模糊评价操作;基准帧的质量评分子单元,用于对上述块效应评价操作的结果以及上述模糊评价操作的结果进行加权平均,得到上述基准帧的质量评分。Further, the above-mentioned source coding quality scoring module includes a quality scoring unit of the reference frame, which is used to calculate the quality score of the reference frame according to the above-mentioned video stream information; wherein, the quality scoring unit of the above-mentioned reference frame includes: a reference frame judging subunit, used Judging whether the above-mentioned current video frame is a reference frame according to the coded bit stream of the above-mentioned current video frame; the evaluation subunit is used to perform a block effect evaluation operation and a blur evaluation operation on the above-mentioned reference frame if it is a reference frame; the quality of the reference frame The scoring subunit is configured to perform a weighted average on the result of the block effect evaluation operation and the result of the blur evaluation operation to obtain the quality score of the reference frame.
进一步地,上述源编码质量评分模块包括编码质量评分单元,用于根据上述视频流信息,计算当前视频帧的编码质量评分;其中,上述编码质量评分单元包括:每像素比特数确定子单元,用于根据上述当前视频帧的比特数和尺寸信息,得到上述当前视频帧的每像素比特数;时间和空间复杂度确定子单元,用于根据上述每像素比特数以及上述量化参数,采取与上述当前视频帧的编码类型相应的计算操作,得到时间和空间复杂度;编码质量评分子单元,用于根据上述时间和空间复杂度以及上述量化参数,得到上述当前视频帧的编码质量评分。Further, the above-mentioned source coding quality scoring module includes a coding quality scoring unit, which is used to calculate the coding quality scoring of the current video frame according to the above-mentioned video stream information; wherein, the above-mentioned coding quality scoring unit includes: a subunit for determining the number of bits per pixel, using According to the number of bits and the size information of the current video frame above, the number of bits per pixel of the above-mentioned current video frame is obtained; the time and space complexity determination subunit is used to adopt the above-mentioned number of bits per pixel and the above-mentioned quantization parameters. Computing operations corresponding to the encoding type of the video frame to obtain the time and space complexity; the encoding quality scoring subunit is used to obtain the encoding quality score of the current video frame according to the above-mentioned time and space complexity and the above-mentioned quantization parameters.
进一步地,上述源编码质量评分模块包括源编码质量评分单元,用于根据上述基准帧的质量评分、上述当前视频帧的编码质量评分、以及上述当前视频帧的编码类型,计算源编码质量评分;其中,上述源编码质量评分单元包括:第一评分子单元,用于在上述当前视频帧的编码类型为帧内预测I帧,且上述当前视频帧是基准帧的情况下,上述源编码质量评分等于上述基准帧的质量评分;第二评分子单元,用于在上述当前视频帧的编码类型为帧内预测I帧,上述当前视频帧不是基准帧,且存在上述基准帧的质量评分的情况下,根据上述基准帧的质量评分、上述当前视频帧的编码质量评分,以及上述当前视频帧与基准帧之间的编码质量差异,计算上述源编码质量评分;第三评分子单元,用于在上述当前视频帧的编码类型为帧内预测I帧,上述当前视频帧不是基准帧,且不存在上述基准帧的质量评分的情况下,上述源编码质量评分等于上述当前视频帧的编码质量评分;第四评分子单元,用于在上述当前视频帧的编码类型为前向预测P帧的情况下,获取上一视频帧的质量监测评分;根据上述上一视频帧的质量监测评分、上述当前视频帧的编码质量评分、以及上述当前视频帧与上述上一视频帧之间的编码质量差异,计算上述源编码质量评分。Further, the above-mentioned source coding quality scoring module includes a source coding quality scoring unit, which is used to calculate the source coding quality score according to the quality score of the above-mentioned reference frame, the coding quality score of the above-mentioned current video frame, and the coding type of the above-mentioned current video frame; Wherein, the above-mentioned source coding quality scoring unit includes: a first scoring subunit, used to score the above-mentioned source coding quality when the coding type of the above-mentioned current video frame is intra-frame prediction I frame, and the above-mentioned current video frame is a reference frame Equal to the quality score of the above-mentioned reference frame; the second scoring subunit is used to predict the I frame in the encoding type of the above-mentioned current video frame, the above-mentioned current video frame is not a reference frame, and there is a quality score of the above-mentioned reference frame , according to the quality score of the above-mentioned reference frame, the coding quality score of the above-mentioned current video frame, and the coding quality difference between the above-mentioned current video frame and the reference frame, calculate the above-mentioned source coding quality score; the third scoring subunit is used in the above-mentioned The coding type of the current video frame is an intra-frame prediction I frame, and the above-mentioned current video frame is not a reference frame, and there is no quality score of the above-mentioned reference frame, the above-mentioned source coding quality score is equal to the coding quality score of the above-mentioned current video frame; Four scoring subunits, used to obtain the quality monitoring score of the previous video frame when the coding type of the above-mentioned current video frame is a forward prediction P frame; according to the quality monitoring score of the above-mentioned last video frame, the above-mentioned current video frame and the coding quality difference between the current video frame and the previous video frame to calculate the source coding quality score.
进一步地,上述网络损伤评分模块包括:第一设定单元,用于设定第一时间窗口长度;其中,上述第一时间窗口的结束点为上述当前视频帧,上述第一时间窗口的开始点为与上述当前视频帧的时间间隔不大于上述第一时间窗口长度的视频帧;平均单元,用于根据上述第一时间窗口内的各个视频帧的实时丢包率,计算得到实时平均丢包率;根据上述第一时间窗口内的各个视频帧的实时比特率,计算得到实时平均比特率;根据上述第一时间窗口内的各个视频帧的实时帧率,计算得到实时平均帧率;丢包损伤评分单元,用于根据上述实时平均比特率和上述实时平均帧率,计算得到丢包鲁棒性因子;根据上述丢包鲁棒性因子以及上述实时平均丢包率,计算得到丢包损伤评分;时延抖动评分单元,用于根据上述当前视频帧到达时刻的上述实时平均帧率,以及上述上一视频帧到达时刻的实时平均帧率,计算得到时延抖动评分;其中,上述网络损伤评分包括上述丢包损伤评分和上述时延抖动评分。Further, the above-mentioned network damage scoring module includes: a first setting unit, configured to set the length of the first time window; wherein, the end point of the first time window is the above-mentioned current video frame, and the start point of the first time window is It is a video frame whose time interval with the above-mentioned current video frame is not greater than the length of the above-mentioned first time window; the average unit is used to calculate the real-time average packet loss rate according to the real-time packet loss rate of each video frame in the above-mentioned first time window ; According to the real-time bit rate of each video frame in the above-mentioned first time window, calculate the real-time average bit rate; According to the real-time frame rate of each video frame in the above-mentioned first time window, calculate the real-time average frame rate; packet loss damage The scoring unit is used to calculate the packet loss robustness factor according to the above-mentioned real-time average bit rate and the above-mentioned real-time average frame rate; according to the above-mentioned packet loss robustness factor and the above-mentioned real-time average packet loss rate, calculate and obtain the packet loss damage score; The delay jitter scoring unit is used to calculate the delay jitter score according to the real-time average frame rate at the arrival time of the current video frame and the real-time average frame rate at the arrival time of the previous video frame; wherein the network damage score includes The aforementioned packet loss impairment score and the aforementioned latency jitter score.
进一步地,上述质量监测评分模块包括:动态评分单元,用于根据上述源编码质量评分、上述丢包损伤评分、上述时延抖动评分,计算得到当前视频帧的动态评分;第二设定单元,用于设定第二时间窗口长度;其中,上述第二时间窗口的结束点为上述当前视频帧,上述第二时间窗口的开始点为与上述当前视频帧的时间间隔不大于上述第二时间窗口长度的视频帧;质量监测评分单元,用于对上述第二时间窗口内的各个视频帧的动态评分取平均值,得到上述视频流的质量监测评分。Further, the above-mentioned quality monitoring and scoring module includes: a dynamic scoring unit, which is used to calculate and obtain the dynamic scoring of the current video frame according to the above-mentioned source coding quality score, the above-mentioned packet loss damage score, and the above-mentioned delay and jitter score; the second setting unit, It is used to set the length of the second time window; wherein, the end point of the second time window is the above-mentioned current video frame, and the start point of the second time window is that the time interval with the above-mentioned current video frame is not greater than the above-mentioned second time window length of the video frame; a quality monitoring and scoring unit, configured to average the dynamic scores of each video frame in the second time window to obtain the quality monitoring score of the video stream.
通过本发明,在获取到网络侧的视频流信息后,根据该视频流信息获取源编码质量评分和网络损伤评分,其中,在源编码质量评分的计算过程中使用基准帧,在网络损伤评分的计算过程中考虑了丢包以及时延抖动引起的视频流质量损伤,最后根据上述源编码质量评分和上述网络损伤评分,确定视频流的质量监测评分,解决了相关技术中网络侧的视频流质量监测方法监测精度不高、实现较复杂的问题,较为准确地反映出视频质量的动态变化,提高了视频流质量监测的准确度,且复杂度不高,能够很方便地应用于网络侧视频质量实时监测环境中。Through the present invention, after the video stream information on the network side is obtained, the source coding quality score and the network damage score are obtained according to the video stream information, wherein the reference frame is used in the calculation process of the source coding quality score, and the network damage score In the calculation process, the video stream quality damage caused by packet loss and delay jitter is considered. Finally, according to the above-mentioned source coding quality score and the above-mentioned network damage score, the quality monitoring score of the video stream is determined, which solves the problem of video stream quality on the network side in related technologies. The monitoring method has low monitoring accuracy and complicated implementation. It can more accurately reflect the dynamic changes in video quality and improve the accuracy of video stream quality monitoring. The complexity is not high, and it can be easily applied to network-side video quality. Real-time monitoring environment.
附图说明Description of drawings
图1是根据本发明实施例的视频流质量监测方法的流程图;Fig. 1 is the flow chart of the video flow quality monitoring method according to the embodiment of the present invention;
图2是根据本发明实施例的网络侧的视频流信息的获取流程图;FIG. 2 is a flow chart of obtaining video stream information on the network side according to an embodiment of the present invention;
图3是根据本发明实施例的基准帧的质量评分流程图;Fig. 3 is a flow chart of quality scoring of a reference frame according to an embodiment of the present invention;
图4是根据本发明实施例的编码质量评分流程图;Fig. 4 is a flow chart of encoding quality scoring according to an embodiment of the present invention;
图5是根据本发明实施例的源编码质量评分流程图;Fig. 5 is a flow chart of scoring source coding quality according to an embodiment of the present invention;
图6是根据本发明实施例的网络损伤评分流程图;FIG. 6 is a flow chart of network damage scoring according to an embodiment of the present invention;
图7是根据本发明实施例的视频流质量监测装置的结构框图;Fig. 7 is a structural block diagram of a video stream quality monitoring device according to an embodiment of the present invention;
图8是根据本发明实施例的视频流质量监测装置的结构示意图。Fig. 8 is a schematic structural diagram of an apparatus for monitoring video stream quality according to an embodiment of the present invention.
具体实施方式detailed description
为了解决相关技术中网络侧的视频流质量监测方法监测精度不高、实现较复杂的问题,本发明提供了一种视频流质量监测方法及装置,以下结合附图以及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不限定本发明。In order to solve the problem of low monitoring accuracy and complex implementation of the video stream quality monitoring method on the network side in the related art, the present invention provides a video stream quality monitoring method and device. The present invention is further described below in conjunction with the accompanying drawings and embodiments Detailed description. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.
本实施例提供了一种视频流质量监测方法,该方法可以在网络侧实现,图1是根据本发明实施例的视频流质量监测方法的流程图,如图1所示,该方法包括以下步骤(步骤S102-步骤S108):This embodiment provides a method for monitoring video stream quality, which can be implemented on the network side. FIG. 1 is a flow chart of a method for monitoring video stream quality according to an embodiment of the present invention. As shown in FIG. 1 , the method includes the following steps (step S102-step S108):
步骤S102,获取网络侧的视频流信息;该视频流信息是为后续计算源编码质量评分和网络损伤评分提供计算基础。具体地:Step S102, acquiring video stream information on the network side; the video stream information provides a calculation basis for subsequent calculation of source coding quality score and network damage score. specifically:
上述视频流信息包括:当前视频帧的编码比特流,当前视频帧的比特数、尺寸信息、编码类型、量化参数、实时丢包率、实时比特率、实时帧率以及当前视频帧到达时刻、上一视频帧到达时刻;The above video stream information includes: the coded bit stream of the current video frame, the number of bits of the current video frame, size information, encoding type, quantization parameters, real-time packet loss rate, real-time bit rate, real-time frame rate and the arrival time of the current video frame, the last The arrival time of a video frame;
步骤S104,根据上述视频流信息,计算基准帧的质量评分,以及当前视频帧的编码质量评分;根据上述基准帧的质量评分、上述当前视频帧的编码质量评分、以及上述当前视频帧的编码类型,计算源编码质量评分;Step S104: Calculate the quality score of the reference frame and the coding quality score of the current video frame according to the video stream information; according to the quality score of the reference frame, the coding quality score of the current video frame, and the coding type of the current video frame , calculate the source coding quality score;
步骤S106,根据上述视频流信息,计算网络损伤评分;其中,上述网络损伤是由丢包以及时延抖动引起的视频流质量损伤;Step S106, calculating the network damage score according to the above video stream information; wherein, the above network damage is the video stream quality damage caused by packet loss and delay jitter;
步骤S108,根据上述源编码质量评分和上述网络损伤评分,确定视频流的质量监测评分。Step S108, according to the above-mentioned source coding quality score and the above-mentioned network damage score, determine the quality monitoring score of the video stream.
通过上述方法,在获取到网络侧的视频流信息后,根据该视频流信息获取源编码质量评分和网络损伤评分,其中,在源编码质量评分的计算过程中使用基准帧,在网络损伤评分的计算过程中考虑了丢包以及时延抖动引起的视频流质量损伤,最后根据上述源编码质量评分和上述网络损伤评分,确定视频流的质量监测评分,解决了相关技术中网络侧的视频流质量监测方法监测精度不高、实现较复杂的问题,较为准确地反映出视频质量的动态变化,提高了视频流质量监测的准确度,且复杂度不高,能够很方便地应用于网络侧视频质量实时监测环境中。Through the above method, after the video stream information on the network side is obtained, the source coding quality score and the network damage score are obtained according to the video stream information, wherein, the reference frame is used in the calculation process of the source coding quality score, and the In the calculation process, the video stream quality damage caused by packet loss and delay jitter is considered. Finally, according to the above-mentioned source coding quality score and the above-mentioned network damage score, the quality monitoring score of the video stream is determined, which solves the problem of video stream quality on the network side in related technologies. The monitoring method has low monitoring accuracy and complicated implementation. It can more accurately reflect the dynamic changes in video quality and improve the accuracy of video stream quality monitoring. The complexity is not high, and it can be easily applied to network-side video quality. Real-time monitoring environment.
对于上述步骤S102中的视频流信息的获取操作,本实施例提供了一种优选实施方式,即获取网络侧的视频流信息包括:对网络侧的视频业务网络数据进行解封装和解复用,得到视频流;解析上述视频流,定位当前视频帧和上一视频帧在上述视频流中的起始点和结束点;将当前视频帧的起始点和结束点,以及上述上一视频帧的起始点和结束点,分别反向映射到上述视频业务网络数据包,分别得到上述当前视频帧和上一视频帧的所有网络包的到达时刻;根据该到达时刻分别确定当前视频帧到达时刻和上一视频帧到达时刻;根据上一视频帧的结束点以及当前视频帧的结束点,确定当前视频帧的比特数;确定上述当前视频帧的实时丢包率、实时比特率以及实时帧率;解析上述当前视频帧的编码比特流,确定上述当前视频帧的编码类型、尺寸信息以及量化参数。通过该优选实施方式,为后续计算源编码质量评分和网络损伤评分提供了计算基础,提到了视频流质量的监测精度和准确度。For the acquisition operation of the video stream information in the above step S102, this embodiment provides a preferred implementation mode, that is, acquiring the video stream information on the network side includes: decapsulating and demultiplexing the video service network data on the network side to obtain Video stream; analyze the above video stream, locate the start point and end point of the current video frame and the previous video frame in the above video stream; set the start point and end point of the current video frame, and the start point and end point of the above previous video frame The end points are respectively reversely mapped to the above-mentioned video service network data packets, and the arrival times of all network packets of the above-mentioned current video frame and the previous video frame are obtained respectively; according to the arrival times, the arrival times of the current video frame and the previous video frame are respectively determined Arrival time; according to the end point of the previous video frame and the end point of the current video frame, determine the number of bits of the current video frame; determine the real-time packet loss rate, real-time bit rate and real-time frame rate of the above-mentioned current video frame; analyze the above-mentioned current video The coded bit stream of the frame determines the coding type, size information and quantization parameters of the above-mentioned current video frame. Through this preferred embodiment, a calculation basis is provided for the subsequent calculation of the source coding quality score and the network damage score, and the monitoring precision and accuracy of the video stream quality are mentioned.
图2是根据本发明实施例的网络侧的视频流信息的获取流程图,如图2所示,该流程包括以下步骤(步骤S202-步骤S210):Fig. 2 is a flow chart of obtaining video stream information on the network side according to an embodiment of the present invention. As shown in Fig. 2, the process includes the following steps (step S202-step S210):
步骤S202,对视频业务网络数据进行解封装和解复用,得到视频流。例如在RTP(实时传送协议)/UDP(User Datagram Protocol,用户数据包协议)/IP(Internet Protocol,网络之间互连的协议)协议框架下,可通过以太网帧解封装、IP包解封装、UDP包解封装、RTP包解封装得到视频业务流,继而通过解复用(如H.223解复用)得到视频流。Step S202, decapsulating and demultiplexing the video service network data to obtain a video stream. For example, under the protocol framework of RTP (Real-time Transport Protocol)/UDP (User Datagram Protocol)/IP (Internet Protocol, a protocol for interconnection between networks), it can decapsulate Ethernet frames and IP packets , UDP packet decapsulation, RTP packet decapsulation to obtain the video service stream, and then obtain the video stream through demultiplexing (such as H.223 demultiplexing).
步骤S204,解析视频流,查找起始码,从而定位当前视频帧的编码比特流在视频流中的起始点和结束点。Step S204, analyzing the video stream to find the start code, so as to locate the start point and end point of the coded bit stream of the current video frame in the video stream.
步骤S206,将当前视频帧的起始点和结束点反向映射到视频业务网络数据包,可得到用于封装当前视频帧的所有网络数据包的序号以及到达时刻。Step S206, reversely map the start point and end point of the current video frame to the video service network data packet, and obtain the sequence numbers and arrival times of all network data packets used to encapsulate the current video frame.
步骤S208,由视频帧的所有网络包的到达时间,可得到视频帧的到达时刻、最早到达时刻和最晚到达时刻。视频帧的最早到达时刻为视频帧的第一个网络数据包的到达时刻,到达时刻和最晚到达时刻都为视频帧的最后一个网络数据包的到达时刻。Step S208, from the arrival time of all network packets of the video frame, the arrival time, earliest arrival time and latest arrival time of the video frame can be obtained. The earliest arrival time of the video frame is the arrival time of the first network data packet of the video frame, and both the arrival time and the latest arrival time are the arrival time of the last network data packet of the video frame.
步骤S210,两帧之间结束点的间隔即为当前视频帧所包含的比特数,继续解析当前视频帧的编码比特流,提取其他编码信息:帧的编码类型(I帧或P帧);帧的尺寸(宽度和高度);帧的量化参数。为得到上述信息只需解析少量信息即可,运算量很小。举例来说,在H.261、H.263视频流中可解析每帧的帧头,在H.264视频流中可解析SPS(Sequence Parameter Set,序列参数集)和PPS(Picture Parameter Set,图像参数集)。Step S210, the interval between the end points between two frames is the number of bits contained in the current video frame, continue to analyze the encoded bit stream of the current video frame, and extract other encoding information: the encoding type of the frame (I frame or P frame); Dimensions (width and height); quantization parameters of the frame. In order to obtain the above information, only a small amount of information needs to be parsed, and the amount of calculation is very small. For example, the frame header of each frame can be parsed in H.261 and H.263 video streams, and SPS (Sequence Parameter Set, sequence parameter set) and PPS (Picture Parameter Set, image parameter set) can be parsed in H.264 video stream parameter set).
其中,如果当前视频帧的帧编码类型为I帧,且与上一基准帧出现间隔大于G个GoP,则继续判断其是否为无丢包I帧,如是则将其作为新的基准帧,并保存该帧的编码比特流,如否,则该帧不能作为新的基准帧。判断一帧是否存在丢包的方法是:该帧对应的最后一个网络包的序号减去第一个网络包的序号如等于该帧对应的网络包的个数,则认为该帧是无丢包的。在实际应用中,可根据业务性质、评测精度要求、及评测实时性要求等确定G的取值。Wherein, if the frame encoding type of the current video frame is an I frame, and the interval with the previous reference frame is greater than G GoPs, then continue to judge whether it is an I frame without packet loss, and if so, use it as a new reference frame, and Save the coded bit stream of the frame, if not, the frame cannot be used as a new reference frame. The method for judging whether there is packet loss in a frame is: if the sequence number of the last network packet corresponding to the frame minus the sequence number of the first network packet is equal to the number of network packets corresponding to the frame, then the frame is considered to have no packet loss of. In practical applications, the value of G can be determined according to the nature of the business, the requirements for evaluation accuracy, and the requirements for real-time evaluation.
当然,本实施例中的视频流信息的获取方法的实现不局限于上述流程,只要能够准确获取到视频流信息即可。例如可以通过与系统中的封装协议的相配合,来定位当前视频帧。例如,如使用RTP协议直接封装视频帧,且RTP封装时采用了分片单元(Fragmentation Unit,简称为FU)方法,则可通过FU中的标志位来定位当前帧。Of course, the implementation of the method for acquiring video stream information in this embodiment is not limited to the above process, as long as the video stream information can be accurately acquired. For example, the current video frame can be located by cooperating with the encapsulation protocol in the system. For example, if the RTP protocol is used to directly encapsulate the video frame, and the Fragmentation Unit (FU) method is adopted during the RTP encapsulation, the current frame can be located through the flag bit in the FU.
对于上述步骤S104中的根据视频流信息计算基准帧的质量评分,本实施例提供了一种优选实施方式,即根据上述当前视频帧的编码比特流判断上述当前视频帧是否为基准帧;如果是基准帧,则对该基准帧执行块效应评价操作以及模糊评价操作;对上述块效应评价操作的结果以及上述模糊评价操作的结果进行加权平均,得到基准帧的质量评分。该优选实施方式中,引入基准帧进行质量评分,提高了视频流质量的监测精度。For the calculation of the quality score of the reference frame based on the video stream information in the above step S104, this embodiment provides a preferred implementation mode, that is, to judge whether the above-mentioned current video frame is a reference frame according to the coded bit stream of the above-mentioned current video frame; if so For the reference frame, the block effect evaluation operation and the blur evaluation operation are performed on the reference frame; the results of the above block effect evaluation operation and the results of the above blur evaluation operation are weighted and averaged to obtain the quality score of the reference frame. In this preferred implementation manner, a reference frame is introduced for quality scoring, which improves the monitoring accuracy of video stream quality.
实时视频业务主要的空间域损伤为块效应和模糊,图3是根据本发明实施例的基准帧的质量评分流程图,如图3所示,该流程包括以下步骤(步骤S302-步骤S310):The main spatial domain impairments of real-time video services are blocking effects and blurring. FIG. 3 is a flow chart of the quality scoring of reference frames according to an embodiment of the present invention. As shown in FIG. 3 , the process includes the following steps (step S302-step S310):
步骤S302,根据视频流信息中的编码比特流确定当前视频帧是否为基准帧;具体为,判断当前视频帧的编码比特流是否存在,如果存在,则当前视频帧为基准帧;如果不存在,则当前视频帧为非基准帧。Step S302, determine whether the current video frame is a reference frame according to the coded bit stream in the video stream information; specifically, determine whether the coded bit stream of the current video frame exists, if it exists, then the current video frame is the reference frame; if not, Then the current video frame is a non-reference frame.
步骤S304,对当前视频帧进行视频解码。Step S304, performing video decoding on the current video frame.
步骤S306,对当前视频帧的重建图像进行块效应评价。Step S306, evaluating blockiness on the reconstructed image of the current video frame.
具体可以采用以下方法实现:使用一种简单的块效应级别统计法进行计算。将重建图像的亮度分量分割成互不重叠的8×8块。在一个8×8亮度块(即有8行8列)中,若有大于或等于7行的值是相同的,就认为该块是“块效应比较严重”;除边缘外,每个8×8亮度块都有与之邻接的4个8×8亮度块,若4条邻接边中有3条或四条发生邻接的8个灰度值中多于5个之间的差值大于阈值,就认为该块的“块效应严重”;若4条邻接边中有2条或1条发生邻接的8个灰度值有多于5个之间的差值大于阈值,就认为该块的“块效应一般”。根据上述方法对所有8×8块进行分类,分别统计出当前视频帧中各种块效应程度块的所占比例,最后求出块效应对该图像的影响。Specifically, the following methods can be used to implement: use a simple block effect level statistical method for calculation. Divide the luminance component of the reconstructed image into non-overlapping 8×8 blocks. In an 8×8 luminance block (that is, there are 8 rows and 8 columns), if there are values greater than or equal to 7 rows that are the same, it is considered that the block is “seriously blocked”; except for the edge, each 8× Each of the 8 luminance blocks has 4 adjacent 8×8 luminance blocks. If there are 3 or 4 of the 4 adjacent edges, the difference between more than 5 of the 8 gray values that are adjacent is greater than the threshold value, then It is considered that the block has "serious block effect"; if there are 2 or 1 of the 4 adjacent edges, the difference between the 8 gray values that are adjacent to more than 5 is greater than the threshold, and the block is considered to be a "block". general effect". All 8×8 blocks are classified according to the above method, and the proportions of blocks with various degrees of blockiness in the current video frame are counted respectively, and finally the influence of blockiness on the image is calculated.
步骤S308,对当前帧的重建图像进行模糊评价。Step S308, perform blur evaluation on the reconstructed image of the current frame.
具体可以采用一种简单的平均边缘宽度法进行计算:使用Sobel竖直方向算子得到边缘图,对于边缘图中的某个边缘点,找到图像的对应点附近(例如同一行)的极值点,极值点间的距离就是该边缘的宽度,对边缘图中所有边缘点求边缘宽度,所有边缘宽度的和与边缘点数量的比值,即为图像的模糊评价。Specifically, a simple average edge width method can be used for calculation: use the Sobel vertical direction operator to obtain the edge map, and for an edge point in the edge map, find the extreme point near the corresponding point of the image (such as the same row) , the distance between the extreme points is the width of the edge, the edge width is calculated for all the edge points in the edge map, and the ratio of the sum of all edge widths to the number of edge points is the blur evaluation of the image.
步骤S310,对块效应评价和模糊评价的结果加权平均,即为基准帧的质量评分Q0。In step S310, the weighted average of the results of blockiness evaluation and blur evaluation is obtained as the quality score Q 0 of the reference frame.
当然,上述块效应评价和模糊评价的方式并不仅限于上述实施例中列举的方式,只要能够准确获取基准帧的质量评分即可。例如可根据业务性质、评测精度要求、及评测实时性要求等选择基准帧的质量评分的具体实施方法。例如块效应可使用基于奇异值分解的块边界差异评测、或基于局部块差异与HVS的块效应评价等方法进行评测,模糊可使用边缘轮廓梯度统计、局部峰态统计等方法进行评测。Of course, the methods of blockiness evaluation and blur evaluation are not limited to the methods listed in the above embodiments, as long as the quality score of the reference frame can be accurately obtained. For example, the specific implementation method of the quality scoring of the reference frame can be selected according to the nature of the business, the requirements for evaluation accuracy, and the requirements for real-time evaluation. For example, block effects can be evaluated using methods such as block boundary difference evaluation based on singular value decomposition, or block effect evaluation based on local block differences and HVS, and blur can be evaluated using methods such as edge contour gradient statistics and local kurtosis statistics.
在本实施例中,为了提高视频流的监测精度,可以将一个或多个图像组(Group of Picture,简称为GoP)中的第一个无损I帧作为基准帧,从视频流中提取基准帧的编码比特流,将基准帧完全解码后进行空间域无参考监测。用这一监测结果作为这一个或多个GoP中的其他后续帧的评分基准。在实际应用中,可根据业务性质、监测精度要求、以及监测实时性要求等选择基准帧出现的间隔。In this embodiment, in order to improve the monitoring accuracy of the video stream, the first lossless I frame in one or more Group of Pictures (GoP) can be used as the reference frame, and the reference frame can be extracted from the video stream The coded bit stream of the reference frame is fully decoded for reference-free monitoring in the spatial domain. Use this monitoring result as a scoring basis for other subsequent frames in the one or more GoPs. In practical applications, the interval at which the reference frames appear can be selected according to the nature of the business, the requirements for monitoring accuracy, and the requirements for real-time monitoring.
对于上述步骤S104中的根据视频流信息,计算当前视频帧的编码质量评分,本实施例提供了一种优选实施方式,即根据当前视频帧的比特数和尺寸信息,得到当前视频帧的每像素比特数;根据上述每像素比特数以及上述量化参数,采取与当前视频帧的编码类型相应的计算操作,得到时间和空间复杂度;根据时间和空间复杂度以及上述量化参数,得到当前视频帧的编码质量评分。通过该优选实施方式,提高了视频流质量的监测精度。For the calculation of the encoding quality score of the current video frame according to the video stream information in the above step S104, this embodiment provides a preferred implementation mode, that is, according to the bit number and size information of the current video frame, the per pixel of the current video frame is obtained The number of bits; according to the above-mentioned number of bits per pixel and the above-mentioned quantization parameters, the calculation operation corresponding to the encoding type of the current video frame is adopted to obtain the time and space complexity; according to the time and space complexity and the above-mentioned quantization parameters, the time and space complexity of the current video frame is obtained. Encoding quality rating. Through this preferred implementation manner, the monitoring accuracy of video stream quality is improved.
在实际应用中,量化参数越大,量化步长就越大,视频质量越低,这说明视频质量和量化参数之间存在反比的关系,这种关系在这里用线性模型来表示。同时编码质量还跟时间和空间复杂度有关,不同的时间和空间复杂度会影响该线性模型的斜率。时间和空间复杂度可由残差帧的性质来表征,这里采用该帧的量化参数以及编码后的每像素比特数来体现。因此,当前视频帧的编码质量可根据帧编码类型、量化参数、每像素比特数以及时间和空间复杂度来计算。In practical applications, the larger the quantization parameter, the larger the quantization step size and the lower the video quality, which shows that there is an inverse relationship between the video quality and the quantization parameter, which is represented by a linear model here. At the same time, the encoding quality is also related to time and space complexity, and different time and space complexities will affect the slope of the linear model. The time and space complexity can be characterized by the properties of the residual frame, which is represented by the quantization parameter of the frame and the number of bits per pixel after encoding. Therefore, the encoding quality of the current video frame can be calculated according to the frame encoding type, quantization parameter, bits per pixel, and time and space complexity.
基于此,在上述实施方式中,当前视频帧的编码质量除了使用传统的量化参数(Quantization Parameter,简称为QP)来衡量外,还进一步地考虑了视频帧的时间和空间复杂度。视频帧的时间和空间复杂度具有以下特点:视频帧的时间和空间复杂度使用视频帧的量化参数QP以及帧每像素编码比特数简单有效地表征,并根据该帧所采用的不同编码类型而采取不同的计算方法。由于实时视频业务对时延要求很高,所以一般仅采用帧内预测I帧和前向预测P帧,而不采用引入时延的双向预测B帧,因此此处仅考虑两种编码类型,I帧或P帧。Based on this, in the above embodiments, besides using traditional quantization parameters (Quantization Parameter, QP for short) to measure the encoding quality of the current video frame, time and space complexity of the video frame are further taken into consideration. The time and space complexity of a video frame has the following characteristics: the time and space complexity of a video frame is simply and effectively characterized by the quantization parameter QP of the video frame and the number of coded bits per pixel of the frame, and varies according to the different coding types adopted by the frame Use a different calculation method. Because real-time video services have high requirements on time delay, generally only intra-frame prediction I frames and forward prediction P frames are used instead of bi-directional prediction B frames that introduce time delays. Therefore, only two encoding types are considered here, I frame or P frame.
图4是根据本发明实施例的编码质量评分流程图,如图4所示,该流程包括以下步骤(步骤S402-步骤S406):Fig. 4 is a flowchart of encoding quality scoring according to an embodiment of the present invention. As shown in Fig. 4, the process includes the following steps (step S402-step S406):
步骤S402,根据视频流信息中的当前视频帧的比特数B和尺寸(宽度W和高度H),计算当前视频帧的每像素比特数R。Step S402, according to the bit number B and size (width W and height H) of the current video frame in the video stream information, calculate the number of bits per pixel R of the current video frame.
每像素比特数R的计算过程具体可以采用以下公式实现: The calculation process of the number of bits per pixel R can be specifically implemented using the following formula:
步骤S404,根据视频流信息中的当前视频帧的编码类型和量化参数QP,计算当前帧的时间和空间复杂度δ。Step S404, according to the encoding type and quantization parameter Q P of the current video frame in the video stream information, calculate the time and space complexity δ of the current frame.
若当前帧为I帧,则时间和空间复杂度计算如下:δ=(a1×R+b1)×Qp。If the current frame is an I frame, the time and space complexity is calculated as follows: δ=(a 1 ×R+b 1 )×Qp.
若当前帧为P帧,则时间和空间复杂度计算如下:δ=(a2×R+b2)×Qp。If the current frame is a P frame, the time and space complexities are calculated as follows: δ=(a 2 ×R+b 2 )×Qp.
其中,上述公式中的a1、b1、a2和b2为常数值的模型参数。Wherein, a 1 , b 1 , a 2 and b 2 in the above formula are model parameters with constant values.
步骤S406,根据量化参数QP,以及时间和空间复杂度,计算得到当前视频帧的编码质量QC。具体可以利用以下公式实现:其中,上述公式中的a3、b3、a4和b4为常数值的模型参数。Step S406, according to the quantization parameter Q P , and the time and space complexity, the coding quality Q C of the current video frame is calculated. Specifically, the following formula can be used to achieve: Wherein, a 3 , b 3 , a 4 and b 4 in the above formula are model parameters with constant values.
在计算出基准帧的质量评分,以及当前视频帧的编码质量评分之后,便可计算源编码质量评分。错误传播损伤评价用于衡量错误传播对当前视频帧的损伤影响,并计算源编码质量评分QE。如果当前帧为I帧,该帧的质量完全由自身决定,不受错误传播的影响。如果当前帧为P帧,该帧的质量并不完全由自身决定,还受其参考帧质量的影响,如果其参考帧的质量产生了衰退,这种衰退会传播到该帧。实时视频业务对时延要求严格,所以一般不使用多参考帧技术,因此此处仅考虑上一帧对当前帧的错误传播影响。After calculating the quality score of the reference frame and the encoding quality score of the current video frame, the source encoding quality score can be calculated. The error propagation impairment evaluation is used to measure the impairment impact of error propagation on the current video frame, and calculate the source coding quality score Q E . If the current frame is an I frame, the quality of the frame is completely determined by itself and is not affected by error propagation. If the current frame is a P frame, the quality of this frame is not completely determined by itself, but also affected by the quality of its reference frame. If the quality of its reference frame deteriorates, the degradation will propagate to this frame. Real-time video services have strict requirements on delay, so the multi-reference frame technology is generally not used. Therefore, only the error propagation effect of the previous frame on the current frame is considered here.
对于上述步骤S104中的源编码质量评分的计算操作,本实施例提供了一种优选实施方式,即根据基准帧的质量评分、当前视频帧的编码质量评分、以及当前视频帧的编码类型,计算源编码质量评分包括:For the calculation operation of the source coding quality score in the above step S104, this embodiment provides a preferred implementation mode, that is, according to the quality score of the reference frame, the coding quality score of the current video frame, and the coding type of the current video frame, calculate Source encoding quality scores include:
如果当前视频帧的编码类型为帧内预测I帧,且当前视频帧是基准帧,则源编码质量评分等于基准帧的质量评分;If the encoding type of the current video frame is an intraframe prediction I frame, and the current video frame is a reference frame, then the source coding quality score is equal to the quality score of the reference frame;
如果当前视频帧的编码类型为帧内预测I帧,当前视频帧不是基准帧,且存在基准帧的质量评分,则根据基准帧的质量评分、当前视频帧的编码质量评分,以及当前视频帧与基准帧之间的编码质量差异,计算源编码质量评分;If the encoding type of the current video frame is an intra-frame prediction I frame, the current video frame is not a reference frame, and there is a quality score of the reference frame, then according to the quality score of the reference frame, the encoding quality score of the current video frame, and the current video frame and The encoding quality difference between reference frames, and calculate the source encoding quality score;
如果当前视频帧的编码类型为帧内预测I帧,当前视频帧不是基准帧,且不存在基准帧的质量评分,则源编码质量评分等于当前视频帧的编码质量评分;If the encoding type of current video frame is intraframe prediction I frame, current video frame is not reference frame, and there is no quality score of reference frame, then source encoding quality score is equal to the encoding quality score of current video frame;
如果当前视频帧的编码类型为前向预测P帧,则获取上一视频帧的质量监测评分;根据上一视频帧的质量监测评分、当前视频帧的编码质量评分、以及当前视频帧与上一视频帧之间的编码质量差异,计算源编码质量评分。If the encoding type of the current video frame is a forward prediction P frame, then obtain the quality monitoring score of the previous video frame; according to the quality monitoring score of the previous video frame, the encoding quality score of the current video frame, and The encoding quality difference between video frames, computing the source encoding quality score.
图5是根据本发明实施例的源编码质量评分流程图,如图5所示,该流程包括以下步骤(步骤S502-步骤S506):Fig. 5 is a flow chart of scoring source coding quality according to an embodiment of the present invention. As shown in Fig. 5, the process includes the following steps (step S502-step S506):
步骤S502,若当前视频帧为I帧,且为基准帧(判断当前视频帧的编码比特流是否存在,如存在则当前视频帧为基准帧),则源编码质量评分QE就是基准帧的质量评分Q0,即QE|=Q0|。Step S502, if the current video frame is an I frame and is a reference frame (judging whether the encoded bit stream of the current video frame exists, if it exists, the current video frame is a reference frame), then the source coding quality score Q E is the quality of the reference frame Score Q 0 , ie Q E |=Q 0 |.
步骤S504,若当前视频帧为I帧,且不为基准帧,且基准帧的质量评分Q0已存在,则源编码质量评分QE以基准帧的质量评分Q0为基础,并考虑当前视频帧与基准帧之间的编码质量差异,如下式:其中,QC,0的计算同上述实施例中步骤S406中Qc的计算方式。Step S504, if the current video frame is an I frame and not a reference frame, and the quality score Q0 of the reference frame already exists, then the source coding quality score QE is based on the quality score Q0 of the reference frame, and the current video frame is considered The coding quality difference between the frame and the reference frame is as follows: Wherein, the calculation of Q C,0 is the same as the calculation method of Qc in step S406 in the above embodiment.
若当前视频帧为I帧,且不为基准帧,但基准帧的质量评分Q0(在评测最开始,还未出现一个无损I帧),则源编码质量评分QE为当前视频帧的编码质量评分QC,即QE|=QC|。If the current video frame is an I frame and not a reference frame, but the quality score of the reference frame is Q 0 (at the beginning of the evaluation, a lossless I frame has not yet appeared), then the source coding quality score Q E is the code of the current video frame Quality score Q C , ie Q E |=Q C |.
步骤S506,若当前视频帧为P帧,考虑上一视频帧对当前视频帧的错误传播,即源编码质量评分QE以上一视频帧的最终质量动态评分Qpre为参考,并考虑当前视频帧与上一视频帧之间的编码质量差异,如下式:其中,QC,pre的计算同上述实施例中步骤S406中Qc的计算方式。Step S506, if the current video frame is a P frame, consider the error propagation of the previous video frame to the current video frame, that is, the source coding quality score Q E takes the final quality dynamic score Q pre of the previous video frame as a reference, and consider the current video frame The difference in encoding quality from the previous video frame is as follows: Wherein, the calculation of Q C,pre is the same as the calculation method of Qc in step S406 in the above embodiment.
对于上述实施例的步骤S106中根据视频流信息计算网络损伤评分,网络损伤除了考虑丢包因素外,还考虑了时延抖动因素对视频质量的影响。此处,没有考虑时延对视频质量的影响,因为时延太大会导致丢包,仅考虑丢包即可。视频业务流的整体时延表现为初始缓冲,可通过一些附加手段如广告等加以缓解。For the calculation of the network damage score based on the video stream information in step S106 of the above embodiment, the network damage also takes into account the impact of delay and jitter factors on video quality in addition to packet loss factors. Here, the impact of delay on video quality is not considered, because too much delay will cause packet loss, only packet loss can be considered. The overall delay of the video service flow is shown as initial buffering, which can be alleviated by some additional means such as advertisements.
在考虑丢包对视频质量的影响时,可以使用实时平均丢包率替代常用的实时丢包率,使动态评分结果更为稳定。实时丢包率为当前视频帧到达时刻之前的一段时间内的丢包率。实时平均丢包率为当前视频帧到达时刻之前的一段时间内的丢包率平均值。When considering the impact of packet loss on video quality, the real-time average packet loss rate can be used instead of the commonly used real-time packet loss rate to make the dynamic scoring results more stable. The real-time packet loss rate is the packet loss rate for a period of time before the arrival of the current video frame. The real-time average packet loss rate is the average packet loss rate in a period of time before the current video frame arrives.
另外,还可以计算丢包的鲁棒性因子以提高视频流质量监测的精度。丢包的鲁棒性因子使用实时平均比特率以及实时平均帧率进行表征,也即视频流实时平均比特率和实时平均帧率不同时对丢包的容忍程度不同。实时平均比特率或实时帧率越大,对丢包的容忍程度越低。实时比特率为当前视频帧到达时刻之前的一段时间内通过网络节点的视频流速率。实时平均比特率为当前视频帧到达时刻之前的一段时间内通过网络节点的视频流速率。由于本实施例应用于网络侧,帧率指一定时间内通过网络节点的视频帧数量。实时帧率为当前视频帧到达时刻之前的一段时间内通过网络节点的视频帧数量。实时平均帧率为当前视频帧到达时刻之前的一段时间内通过网络节点的视频帧平均数量。In addition, the robustness factor of packet loss can also be calculated to improve the accuracy of video stream quality monitoring. The robustness factor of packet loss is characterized by the real-time average bit rate and real-time average frame rate, that is, the tolerance for packet loss is different when the real-time average bit rate and real-time average frame rate of video streams are different. The larger the real-time average bit rate or real-time frame rate, the lower the tolerance to packet loss. The real-time bit rate is the video streaming rate through the network nodes during a period of time before the arrival of the current video frame. The real-time average bit rate is the video stream rate passing through network nodes during a period of time before the arrival of the current video frame. Since this embodiment is applied to the network side, the frame rate refers to the number of video frames passing through the network nodes within a certain period of time. The real-time frame rate is the number of video frames passing through the network node within a period of time before the arrival of the current video frame. The real-time average frame rate is the average number of video frames passing through the network node within a period of time before the arrival of the current video frame.
在考虑时延抖动对视频质量的影响时,可以利用实时平均帧率的变化表征时延抖动。实时平均帧率的变化以前后视频帧到达时刻的实时平均帧率的差值来表征。由于某一视频帧相对于上一视频帧的时延抖动往往可在终端侧通过终端缓冲器加以缓解,但对于终端来说,实时平均帧率的变化会造成视频播放忽快忽慢的效果,影响终端用户的主观体验。When considering the impact of delay jitter on video quality, the change of real-time average frame rate can be used to characterize the delay jitter. The change of the real-time average frame rate is characterized by the difference of the real-time average frame rate at the arrival moment of the video frame before and after. Since the delay jitter of a certain video frame relative to the previous video frame can often be alleviated by the terminal buffer on the terminal side, but for the terminal, the change of the real-time average frame rate will cause the video playback to be fast or slow. Affects the subjective experience of end users.
基于上述多重考虑,本实施例提供了一种优选实施方式,即根据视频流信息,计算网络损伤评分包括:设定第一时间窗口长度;其中,第一时间窗口的结束点为当前视频帧,第一时间窗口的开始点为与当前视频帧的时间间隔不大于第一时间窗口长度的视频帧;根据第一时间窗口内的各个视频帧的实时丢包率,计算得到实时平均丢包率;根据第一时间窗口内的各个视频帧的实时比特率,计算得到实时平均比特率;根据第一时间窗口内的各个视频帧的实时帧率,计算得到实时平均帧率;根据实时平均比特率和实时平均帧率,计算得到丢包鲁棒性因子;根据丢包鲁棒性因子以及实时平均丢包率,计算得到丢包损伤评分;根据当前视频帧到达时刻的实时平均帧率,以及上一视频帧到达时刻的实时平均帧率,计算得到时延抖动评分;其中,网络损伤评分包括丢包损伤评分和时延抖动评分。通过该优选实施方式,提高了视频流质量监测的精度。Based on the above multiple considerations, this embodiment provides a preferred implementation manner, that is, calculating the network damage score according to the video stream information includes: setting the length of the first time window; where the end point of the first time window is the current video frame, The starting point of the first time window is the video frame with the time interval of the current video frame being no greater than the first time window length; according to the real-time packet loss rate of each video frame in the first time window, the real-time average packet loss rate is calculated; Calculate the real-time average bit rate according to the real-time bit rate of each video frame in the first time window; calculate the real-time average frame rate according to the real-time frame rate of each video frame in the first time window; calculate the real-time average frame rate according to the real-time average bit rate and Calculate the packet loss robustness factor based on the real-time average frame rate; calculate the packet loss damage score based on the packet loss robustness factor and the real-time average packet loss rate; The real-time average frame rate at the arrival moment of the video frame is calculated to obtain the delay jitter score; the network damage score includes the packet loss damage score and the delay jitter score. Through this preferred implementation manner, the accuracy of video stream quality monitoring is improved.
图6是根据本发明实施例的网络损伤评分流程图,如图6所示,该流程包括以下步骤(步骤S602-步骤S620):FIG. 6 is a flow chart of network damage scoring according to an embodiment of the present invention. As shown in FIG. 6, the process includes the following steps (step S602-step S620):
步骤S602,设定实时丢包率、实时平均丢包率、实时比特率、实时平均比特率、实时帧率和实时平均帧率计算时使用的时间窗口。设定时间窗口长度T,时间窗口的结束点为当前视频帧,时间窗口的开始点为第一个与当前视频帧的到达时刻间隔不大于T的视频帧。Step S602, setting the real-time packet loss rate, the real-time average packet loss rate, the real-time bit rate, the real-time average bit rate, the real-time frame rate and the time window used for calculating the real-time average frame rate. Set the time window length T, the end point of the time window is the current video frame, and the start point of the time window is the first video frame whose arrival time interval with the current video frame is not greater than T.
步骤S604,计算当前视频帧到达时刻的实时丢包率PLRr。计算方法为:当前视频帧对应的最后一个网络数据包的序号减去时间窗口内第一个视频帧对应的第一个网络数据包的序号的差值,再减去时间窗口内所有视频帧对应的所有网络数据包个数,得到的差值除以当前视频帧对应的最后一个网络数据包的序号与时间窗口内第一个视频帧对应的第一个网络数据包的序号的差值。Step S604, calculating the real-time packet loss rate PLR r at the arrival moment of the current video frame. The calculation method is: the sequence number of the last network data packet corresponding to the current video frame minus the difference of the sequence number of the first network data packet corresponding to the first video frame in the time window, and then subtracting the difference of the sequence number corresponding to all video frames in the time window The number of all network data packets, the obtained difference is divided by the difference between the sequence number of the last network data packet corresponding to the current video frame and the sequence number of the first network data packet corresponding to the first video frame in the time window.
步骤S606,计算当前视频帧到达时刻的实时平均丢包率PLRa。计算方法为:计算时间窗口内所有视频帧到达时刻的实时丢包率的平均。使用实时平均丢包率替代实时丢包率,可使评测结果更为平滑。Step S606, calculating the real-time average packet loss rate PLR a at the arrival moment of the current video frame. The calculation method is: calculate the average of the real-time packet loss rate at the arrival moment of all video frames in the time window. Using the real-time average packet loss rate instead of the real-time packet loss rate can make the evaluation results smoother.
步骤S608,计算当前视频帧到达时刻的实时比特率BRr。计算方法为:时间窗口内所有视频帧的比特数和,除以当前视频帧的最晚到达时刻与时间窗口内第一个视频帧的最早到达时刻的差值。Step S608, calculating the real-time bit rate BR r at the arrival moment of the current video frame. The calculation method is: the sum of bits of all video frames in the time window, divided by the difference between the latest arrival time of the current video frame and the earliest arrival time of the first video frame in the time window.
步骤S610,计算当前视频帧到达时刻的实时平均比特率BRa。计算方法为:计算时间窗口内所有视频帧到达时刻的实时比特率的平均。使用实时平均比特率替代实时比特率,可使评测结果更为平滑。Step S610, calculating the real-time average bit rate BR a at the arrival moment of the current video frame. The calculation method is: calculating the average of the real-time bit rates at the arrival moments of all video frames within the time window. Using real-time average bitrate instead of real-time bitrate can smooth out the evaluation results.
步骤S612,计算当前视频帧到达时刻的实时帧率FRr。计算方法为:时间窗口内的所有视频帧的个数,除以当前视频帧的最晚到达时刻与时间窗口内第一个视频帧的最早到达时刻的差值。Step S612, calculating the real-time frame rate FR r at the arrival moment of the current video frame. The calculation method is: the number of all video frames in the time window, divided by the difference between the latest arrival time of the current video frame and the earliest arrival time of the first video frame in the time window.
步骤S614,计算当前视频帧到达时刻的实时平均帧率FRa。计算方法为:计算时间窗口内所有视频帧到达时间的实时帧率的平均。使用实时平均帧率替代实时帧率,可使评测结果更为平滑。Step S614, calculating the real-time average frame rate FR a at the arrival moment of the current video frame. The calculation method is: calculate the average of the real-time frame rates of the arrival times of all video frames in the time window. Using the real-time average frame rate instead of the real-time frame rate can make the evaluation results smoother.
步骤S616,计算当前视频帧到达时刻的丢包鲁棒性因子Dplv。根据实时平均比特率BRa和实时平均帧率FRa,利用下式计算:其中,该公式中的a5和b5为常数值的模型参数。Step S616, calculating the packet loss robustness factor D plv at the moment of arrival of the current video frame. According to the real-time average bit rate BRa and the real-time average frame rate FRa, use the following formula to calculate: Wherein, a 5 and b 5 in the formula are model parameters with constant values.
步骤S618,计算当前视频帧到达时刻的丢包损伤评分PL,利用下式实现:
步骤S620,计算当前视频帧到达时刻的时延抖动评分DF。计算方法为:平均帧率抖动为当前视频帧到达时刻的实时平均帧率减去上一帧到达时刻的实时平均帧率。时延抖动评分DF是平均帧率抖动的线性模型,如下式:DF=k×|FRa-FRa,pre|。Step S620, calculating the delay jitter score DF at the arrival moment of the current video frame. The calculation method is: the average frame rate jitter is the real-time average frame rate at the arrival time of the current video frame minus the real-time average frame rate at the arrival time of the previous frame. The delay jitter score DF is a linear model of the average frame rate jitter, as follows: DF=k×|FR a -FR a,pre |.
在计算出源编码质量评分和网络损伤评分之后,综合源编码质量评分、网络损伤评分中丢包损伤评分和时延抖动评分的结果,利用下式计算得到当当前视频帧的动态评分:Q=QE×PL-DF。After calculating the source coding quality score and the network damage score, the results of the source coding quality score, the network damage score and the delay jitter score are integrated, and the dynamic score of the current video frame is calculated by using the following formula: Q= Q E × PL-DF.
为使评测结果更为稳定,可采用时间窗口平滑技术。设定时间窗口长度Tq,时间窗口的结束点为当前视频帧,时间窗口的开始点为第一个与当前视频帧的时间间隔不大于Tq的视频帧。通过下式计算时间窗口内的所有视频帧动态评分的平均值作为最终的视频流的质量监测评分: In order to make the evaluation results more stable, time window smoothing technology can be used. Set the time window length T q , the end point of the time window is the current video frame, and the start point of the time window is the first video frame whose time interval with the current video frame is not greater than T q . The average value of the dynamic scores of all video frames in the time window is calculated as the final quality monitoring score of the video stream by the following formula:
基于上述视频流的质量监测评分的实施过程,本实施例提供了一种优选实施方式,即根据源编码质量评分和网络损伤评分,确定视频流的质量监测评分包括:根据源编码质量评分、丢包损伤评分、时延抖动评分,计算得到当前视频帧的动态评分;设定第二时间窗口长度;其中,第二时间窗口的结束点为当前视频帧,第二时间窗口的开始点为与当前视频帧的时间间隔不大于第二时间窗口长度的视频帧;对第二时间窗口内的各个视频帧的动态评分取平均值,得到视频流的质量监测评分。通过该优选实施方式,提高了视频流质量监测结果的精度和稳定性。Based on the implementation process of the quality monitoring score of the video stream described above, this embodiment provides a preferred implementation mode, that is, according to the source coding quality score and the network damage score, determining the quality monitoring score of the video stream includes: according to the source coding quality score, loss Packet damage score, delay jitter score, calculate the dynamic score of the current video frame; set the length of the second time window; wherein, the end point of the second time window is the current video frame, and the start point of the second time window is the same as the current The time interval of the video frame is not greater than the video frame of the second time window length; the dynamic score of each video frame in the second time window is averaged to obtain the quality monitoring score of the video stream. Through this preferred implementation manner, the accuracy and stability of video stream quality monitoring results are improved.
对应于上述实施例介绍的视频流质量监测方法,本实施例提供了一种视频流质量监测装置,该装置可以设置在网络侧,用以实现上述实施例。图7是根据本发明实施例的视频流质量监测装置的结构框图,如图7所示,该装置包括:信息获取模块10、源编码质量评分模块20、网络损伤评分模块30和质量监测评分模块40。下面对该结构进行详细介绍。Corresponding to the video stream quality monitoring method introduced in the above embodiments, this embodiment provides a video stream quality monitoring device, which can be set on the network side to implement the above embodiments. Fig. 7 is a structural block diagram of a video stream quality monitoring device according to an embodiment of the present invention. As shown in Fig. 7, the device includes: an information acquisition module 10, a source coding quality scoring module 20, a network damage scoring module 30 and a quality monitoring and scoring module 40. The structure is described in detail below.
信息获取模块10,用于获取网络侧的视频流信息;An information acquisition module 10, configured to acquire video stream information on the network side;
源编码质量评分模块20,用于根据视频流信息,计算基准帧的质量评分,以及当前视频帧的编码质量评分;根据基准帧的质量评分、当前视频帧的编码质量评分、以及当前视频帧的编码类型,计算源编码质量评分;The source encoding quality scoring module 20 is used to calculate the quality score of the reference frame and the encoding quality score of the current video frame according to the video stream information; according to the quality score of the reference frame, the encoding quality score of the current video frame, and the Encoding type, calculate the source encoding quality score;
网络损伤评分模块30,用于根据视频流信息,计算网络损伤评分;其中,网络损伤是由丢包以及时延抖动引起的视频流质量损伤;The network damage scoring module 30 is used to calculate the network damage score according to the video stream information; wherein, the network damage is the video stream quality damage caused by packet loss and delay jitter;
质量监测评分模块40,用于根据源编码质量评分和网络损伤评分,确定视频流的质量监测评分。The quality monitoring and scoring module 40 is configured to determine the quality monitoring score of the video stream according to the source coding quality score and the network damage score.
通过上述方法,在信息获取模块10获取到网络侧的视频流信息后,源编码质量评分模块20和网络损伤评分模块30根据该视频流信息计算源编码质量评分和网络损伤评分,其中,在源编码质量评分的计算过程中使用基准帧,在网络损伤评分的计算过程中考虑了丢包以及时延抖动引起的视频流质量损伤,最后质量监测评分模块40根据上述源编码质量评分和上述网络损伤评分,确定视频流的质量监测评分,解决了相关技术中网络侧的视频流质量监测方法监测精度不高、实现较复杂的问题,较为准确地反映出视频质量的动态变化,提高了视频流质量监测的准确度,且复杂度不高,能够很方便地应用于网络侧视频质量实时监测环境中。Through the above method, after the information acquisition module 10 acquires the video stream information on the network side, the source coding quality scoring module 20 and the network damage scoring module 30 calculate the source coding quality score and the network damage scoring module according to the video stream information, wherein, at the source The reference frame is used in the calculation process of the coding quality score, and the video stream quality damage caused by packet loss and delay jitter is considered in the calculation process of the network damage score. Finally, the quality monitoring and scoring module 40 is based on the above-mentioned source coding quality score and the above-mentioned network damage. Score, determine the quality monitoring score of the video stream, solve the problem of low monitoring accuracy and complicated implementation of the video stream quality monitoring method on the network side in related technologies, reflect the dynamic changes of video quality more accurately, and improve the quality of video stream The accuracy of monitoring is not high, and the complexity is not high, and it can be easily applied to the real-time monitoring environment of video quality on the network side.
优选地,上述装置还可以包括用于从网络上截取视频流的网络数据获取模块。对于上述信息获取模块10的视频流信息的获取操作,本实施例提供了一种优选实施方式,即信息获取模块10包括:视频流获取子单元,用于对网络侧的视频业务网络数据进行解封装和解复用,得到视频流;时刻确定子单元,用于解析视频流,定位当前视频帧和上一视频帧在视频流中的起始点和结束点;将当前视频帧的起始点和结束点,以及上一视频帧的起始点和结束点,分别反向映射到视频业务网络数据包,分别得到当前视频帧和上一视频帧的所有网络包的到达时刻;根据该到达时刻分别确定当前视频帧到达时刻和上一视频帧到达时刻;比特数确定子单元,用于根据上一视频帧的起始点以及当前视频帧的起始点,确定当前视频帧的比特数;编码信息确定子单元,用于确定当前视频帧的实时丢包率、实时比特率以及实时帧率;解析当前视频帧的编码比特流,确定当前视频帧的编码类型、尺寸信息以及量化参数。通过该优选实施方式,为后续计算源编码质量评分和网络损伤评分提供了计算基础,提到了视频流质量的监测精度和准确度。前面对视频流信息的获取过程进行了详细介绍,在此不再赘述。Preferably, the above device may also include a network data acquisition module for intercepting video streams from the network. For the acquisition operation of the video stream information of the above-mentioned information acquisition module 10, this embodiment provides a preferred implementation mode, that is, the information acquisition module 10 includes: a video stream acquisition subunit, which is used to decode the video service network data on the network side Encapsulation and demultiplexing to obtain the video stream; the time determination subunit is used to analyze the video stream, locate the start point and end point of the current video frame and the previous video frame in the video stream; set the start point and end point of the current video frame , and the start point and end point of the previous video frame are respectively reversely mapped to the video service network data packet, and the arrival time of all network packets of the current video frame and the previous video frame are respectively obtained; the current video frame is determined according to the arrival time The frame arrival time and the last video frame arrival time; the number of bits determines the subunit, which is used to determine the number of bits of the current video frame according to the starting point of the previous video frame and the starting point of the current video frame; the encoding information determines the subunit, using To determine the real-time packet loss rate, real-time bit rate and real-time frame rate of the current video frame; analyze the encoded bit stream of the current video frame, and determine the encoding type, size information and quantization parameters of the current video frame. Through this preferred embodiment, a calculation basis is provided for the subsequent calculation of the source coding quality score and the network damage score, and the monitoring precision and accuracy of the video stream quality are mentioned. The acquisition process of the video stream information has been introduced in detail above, and will not be repeated here.
优选地,上述信息获取模块10还可具有以下特点:所提取的视频编码信息包括,基准帧的编码比特流;帧的编码类型(I帧或P帧);帧的尺寸(宽度和高度);帧的量化参数QP;每帧所含的比特数;帧的到达时刻。所提取的网络包信息包括,用于封装一个视频帧的所有网络包的序号、到达时间。Preferably, the above-mentioned information acquisition module 10 can also have the following characteristics: the extracted video coding information includes the coded bit stream of the reference frame; the coding type of the frame (I frame or P frame); the size of the frame (width and height); The quantization parameter Q P of the frame; the number of bits contained in each frame; the moment of arrival of the frame. The extracted network packet information includes sequence numbers and arrival times of all network packets used to encapsulate a video frame.
对于上述源编码质量评分模块20根据视频流信息计算基准帧的质量评分,本实施例提供了一种优选实施方式,即源编码质量评分模块20包括基准帧的质量评分单元,用于根据视频流信息,计算基准帧的质量评分;其中,基准帧的质量评分单元包括:基准帧判断子单元,用于根据当前视频帧的编码比特流判断当前视频帧是否为基准帧;评价子单元,用于如果是基准帧,则对基准帧执行块效应评价操作以及模糊评价操作;基准帧的质量评分子单元,用于对块效应评价操作的结果以及模糊评价操作的结果进行加权平均,得到基准帧的质量评分。该优选实施方式中,引入基准帧进行质量评分,提高了视频流质量的监测精度。前面对基准帧的质量评分过程进行了详细介绍,在此不再赘述。For the above-mentioned source coding quality scoring module 20 to calculate the quality score of the reference frame according to the video stream information, this embodiment provides a preferred implementation mode, that is, the source coding quality scoring module 20 includes a quality scoring unit of the reference frame for information, to calculate the quality score of the reference frame; wherein, the quality score unit of the reference frame includes: a reference frame judging subunit, which is used to judge whether the current video frame is a reference frame according to the encoded bit stream of the current video frame; an evaluation subunit for If it is a reference frame, the block effect evaluation operation and the blur evaluation operation are performed on the reference frame; the quality scoring subunit of the reference frame is used to carry out weighted average to the results of the block effect evaluation operation and the blur evaluation operation to obtain the reference frame Quality rating. In this preferred implementation manner, a reference frame is introduced for quality scoring, which improves the monitoring accuracy of video stream quality. The quality scoring process of the reference frame has been introduced in detail above, and will not be repeated here.
优选地,上述基准帧的质量评分单元还可具有以下特点:针对实时视频业务中最明显的两种空间损伤:块效应和模糊,分别采用复杂度较低的空间域质量评测方法进行评测,综合后得到基准帧质量评价结果。在保证效果的同时,计算量增加不多。Preferably, the quality scoring unit of the above-mentioned reference frame can also have the following characteristics: for the two most obvious spatial impairments in real-time video services: block effect and blur, respectively adopt a relatively low-complexity spatial domain quality evaluation method for evaluation, comprehensive Finally, the benchmark frame quality evaluation results are obtained. While ensuring the effect, the amount of calculation does not increase much.
对于上述源编码质量评分模块20根据视频流信息,计算当前视频帧的编码质量评分,本实施例提供了一种优选实施方式,即源编码质量评分模块20包括编码质量评分单元,用于根据视频流信息,计算当前视频帧的编码质量评分;其中,编码质量评分单元包括:每像素比特数确定子单元,用于根据当前视频帧的比特数和尺寸信息,得到当前视频帧的每像素比特数;时间和空间复杂度确定子单元,用于根据每像素比特数以及量化参数,采取与当前视频帧的编码类型相应的计算操作,得到时间和空间复杂度;编码质量评分子单元,用于根据时间和空间复杂度以及量化参数,得到当前视频帧的编码质量评分。通过该优选实施方式,提高了视频流质量的监测精度。前面对编码质量评分过程进行了详细介绍,在此不再赘述。For the above-mentioned source coding quality scoring module 20 to calculate the coding quality scoring of the current video frame according to the video stream information, this embodiment provides a preferred implementation mode, that is, the source coding quality scoring module 20 includes a coding quality scoring unit for The flow information calculates the encoding quality score of the current video frame; wherein, the encoding quality scoring unit includes: the number of bits per pixel determines a subunit, which is used to obtain the number of bits per pixel of the current video frame according to the number of bits and size information of the current video frame ; The time and space complexity determination subunit is used to take calculation operations corresponding to the coding type of the current video frame according to the number of bits per pixel and the quantization parameter to obtain the time and space complexity; the coding quality scoring subunit is used to calculate according to The time and space complexity and quantization parameters are used to obtain the encoding quality score of the current video frame. Through this preferred implementation manner, the monitoring accuracy of video stream quality is improved. The encoding quality scoring process has been described in detail above, and will not be repeated here.
对于上述源编码质量评分模块20的源编码质量评分的计算操作,本实施例提供了一种优选实施方式,即源编码质量评分模块20包括源编码质量评分单元,用于根据基准帧的质量评分、当前视频帧的编码质量评分、以及当前视频帧的编码类型,计算源编码质量评分;其中,源编码质量评分单元包括:For the calculation operation of the source coding quality score of the above-mentioned source coding quality scoring module 20, this embodiment provides a preferred implementation mode, that is, the source coding quality scoring module 20 includes a source coding quality scoring unit for , the encoding quality score of the current video frame, and the encoding type of the current video frame, calculate the source encoding quality score; wherein, the source encoding quality scoring unit includes:
第一评分子单元,用于在当前视频帧的编码类型为帧内预测I帧,且当前视频帧是基准帧的情况下,源编码质量评分等于基准帧的质量评分;The first scoring subunit is used to predict the I frame within the frame when the coding type of the current video frame is a frame, and the current video frame is a reference frame, and the source coding quality score is equal to the quality score of the reference frame;
第二评分子单元,用于在当前视频帧的编码类型为帧内预测I帧,当前视频帧不是基准帧,且存在基准帧的质量评分的情况下,根据基准帧的质量评分、当前视频帧的编码质量评分,以及当前视频帧与基准帧之间的编码质量差异,计算源编码质量评分;The second scoring subunit is used to predict the I frame in the coding type of the current video frame, the current video frame is not a reference frame, and there is a quality score of the reference frame, according to the quality score of the reference frame, the current video frame The encoding quality score of , and the encoding quality difference between the current video frame and the reference frame, calculate the source encoding quality score;
第三评分子单元,用于在当前视频帧的编码类型为帧内预测I帧,当前视频帧不是基准帧,且不存在基准帧的质量评分的情况下,源编码质量评分等于当前视频帧的编码质量评分;The 3rd scoring subunit, for the encoding type of current video frame is intra-frame prediction I frame, current video frame is not reference frame, and under the situation that does not have the quality score of reference frame, source coding quality score is equal to current video frame Coding quality rating;
第四评分子单元,用于在当前视频帧的编码类型为前向预测P帧的情况下,获取上一视频帧的质量监测评分;根据上一视频帧的质量监测评分、当前视频帧的编码质量评分、以及当前视频帧与上一视频帧之间的编码质量差异,计算源编码质量评分。前面对源编码质量评分过程进行了详细介绍,在此不再赘述。The fourth scoring subunit is used to obtain the quality monitoring score of the previous video frame when the encoding type of the current video frame is a forward prediction P frame; according to the quality monitoring score of the previous video frame, the encoding of the current video frame The quality score, and the encoding quality difference between the current video frame and the previous video frame, calculate the source encoding quality score. The source coding quality scoring process has been introduced in detail above, and will not be repeated here.
优选地,上述源编码质量评分单元还可具有以下特点:根据帧编码类型判断是否引入错误传播机制,只有P帧才会受到错误传播的影响。而某帧的质量受到损伤后,该帧以后的、在同一个GoP的其他帧都会受到影响。I帧虽不考虑错误传播,但为了提高评测精度,以基准帧为基础进行源编码质量评价。Preferably, the above-mentioned source coding quality scoring unit may also have the following characteristics: judging whether to introduce an error propagation mechanism according to the frame coding type, and only P frames will be affected by error propagation. When the quality of a certain frame is damaged, other frames after this frame and in the same GoP will be affected. Although the I frame does not consider the error propagation, in order to improve the evaluation accuracy, the source coding quality evaluation is based on the reference frame.
对于上述实施例的网络损伤评分模块30根据视频流信息获取网络损伤评分,网络损伤除了考虑丢包因素外,还考虑了时延抖动因素对视频质量的影响。本实施例提供了一种优选实施方式,即网络损伤评分模块30包括:第一设定单元,用于设定第一时间窗口长度;其中,第一时间窗口的结束点为当前视频帧,第一时间窗口的开始点为与当前视频帧的时间间隔不大于第一时间窗口长度的视频帧;平均单元,用于根据第一时间窗口内的各个视频帧的实时丢包率,计算得到实时平均丢包率;根据第一时间窗口内的各个视频帧的实时比特率,计算得到实时平均比特率;根据第一时间窗口内的各个视频帧的实时帧率,计算得到实时平均帧率;丢包损伤评分单元,用于根据实时平均比特率和实时平均帧率,计算得到丢包鲁棒性因子;根据丢包鲁棒性因子以及实时平均丢包率,计算得到丢包损伤评分;时延抖动评分单元,用于根据当前视频帧到达时刻的实时平均帧率,以及上一视频帧到达时刻的实时平均帧率,计算得到时延抖动评分;其中,网络损伤评分包括丢包损伤评分和时延抖动评分。通过该优选实施方式,提高了视频流质量监测的精度。前面对网络损伤评分过程进行了详细介绍,在此不再赘述。For the network damage scoring module 30 in the above embodiment to obtain the network damage score according to the video stream information, the network damage also takes into account the impact of the delay and jitter factors on the video quality in addition to the packet loss factor. This embodiment provides a preferred implementation manner, that is, the network damage scoring module 30 includes: a first setting unit, configured to set the length of the first time window; wherein, the end point of the first time window is the current video frame, and the second The starting point of a time window is a video frame whose time interval with the current video frame is not greater than the length of the first time window; the average unit is used to calculate the real-time average according to the real-time packet loss rate of each video frame in the first time window Packet loss rate; calculate the real-time average bit rate according to the real-time bit rate of each video frame in the first time window; calculate the real-time average frame rate according to the real-time frame rate of each video frame in the first time window; packet loss The damage scoring unit is used to calculate the packet loss robustness factor according to the real-time average bit rate and the real-time average frame rate; calculate the packet loss damage score according to the packet loss robustness factor and the real-time average packet loss rate; delay jitter The scoring unit is used to calculate the delay jitter score according to the real-time average frame rate at the arrival time of the current video frame and the real-time average frame rate at the arrival time of the previous video frame; wherein, the network damage score includes packet loss damage score and delay Jitter score. Through this preferred implementation manner, the accuracy of video stream quality monitoring is improved. The network damage scoring process has been introduced in detail above, and will not be repeated here.
优选地,网络损伤评分模块30还可具有以下特点:计算时使用的实时平均丢包率、实时平均比特率和实时平均帧率是当前视频帧到达时刻之前一段时间之内的实时丢包率、实时比特率和实时帧率的平均值。这样可使评测结果更为稳定。实时丢包率、实时比特率和实时帧率也是在当前视频帧到达时刻之前一段时间之内计算的。Preferably, the network damage scoring module 30 can also have the following characteristics: the real-time average packet loss rate, real-time average bit rate and real-time average frame rate used in the calculation are the real-time packet loss rate within a period of time before the arrival of the current video frame, The average of real-time bitrate and real-time frame rate. This can make the evaluation results more stable. The real-time packet loss rate, real-time bit rate and real-time frame rate are also calculated within a period of time before the current video frame arrives.
优选地,网络损伤评分模块30还可具有以下特点:为计算当前视频帧到达时刻之前一段时间之内的实时丢包率、实时比特率和实时帧率,可使用时间窗口概念,以及一个存放时间窗口内所有视频帧信息的“先进先出”的队列。时间窗口长度为计算实时丢包率、实时比特率和实时帧率的时间长度。当前视频帧到达后,将当前视频帧信息加入队列,将队列头上所有与当前视频帧到达时刻相差超过时间窗口长度的视频帧的信息全部删除。也可以为实时丢包率和实时帧率建立队列,用于计算实时平均丢包率和实时平均帧率。Preferably, the network damage scoring module 30 can also have the following characteristics: in order to calculate the real-time packet loss rate, real-time bit rate and real-time frame rate within a period of time before the arrival of the current video frame, the concept of time window can be used, and a storage time A "first in first out" queue of all video frame information in the window. The time window length is the time length for calculating the real-time packet loss rate, real-time bit rate and real-time frame rate. After the current video frame arrives, the information of the current video frame is added to the queue, and all the information of the video frame at the head of the queue that differs from the arrival time of the current video frame by more than the length of the time window is all deleted. Queues can also be established for the real-time packet loss rate and real-time frame rate, which are used to calculate the real-time average packet loss rate and real-time average frame rate.
基于质量监测评分模块40的视频流质量监测评分的实施过程,本实施例提供了一种优选实施方式,即质量监测评分模块40包括:动态评分单元,用于根据源编码质量评分、丢包损伤评分、时延抖动评分,计算得到当前视频帧的动态评分;Based on the implementation process of the video stream quality monitoring and scoring of the quality monitoring and scoring module 40, this embodiment provides a preferred implementation mode, that is, the quality monitoring and scoring module 40 includes: a dynamic scoring unit for scoring according to the source coding quality, packet loss damage Score, delay jitter score, calculate the dynamic score of the current video frame;
第二设定单元,用于设定第二时间窗口长度;其中,第二时间窗口的结束点为当前视频帧,第二时间窗口的开始点为与当前视频帧的时间间隔不大于第二时间窗口长度的视频帧;质量监测评分单元,用于对第二时间窗口内的各个视频帧的动态评分取平均值,得到视频流的质量监测评分。通过该优选实施方式,提高了视频流质量监测结果的精度和稳定性。The second setting unit is used to set the length of the second time window; wherein, the end point of the second time window is the current video frame, and the start point of the second time window is that the time interval with the current video frame is not greater than the second time The video frame of the window length; the quality monitoring and scoring unit, which is used to average the dynamic scores of each video frame in the second time window to obtain the quality monitoring score of the video stream. Through this preferred implementation manner, the accuracy and stability of video stream quality monitoring results are improved.
优选地,质量监测评分模块40用于综合源编码质量评价和网络损伤评价的结果,计算当前视频帧的动态评分结果,可使用时间窗口对当前视频帧的动态评分进行平滑,输出更为稳定的动态评分结果。Preferably, the quality monitoring and scoring module 40 is used to synthesize the results of source coding quality evaluation and network damage evaluation, calculate the dynamic scoring result of the current video frame, and use the time window to smooth the dynamic scoring of the current video frame, and output a more stable Dynamic scoring results.
图8是根据本发明实施例的视频流质量监测装置的结构示意图,如图8所示,网络数据获取模块负责在网络侧获取网络数据,并根据协议和端口号分离出待评测的视频业务网络数据。继而由信息获取模块从视频业务网络数据中提取评测相关信息,包括视频编码信息及网络包信息;源编码质量评分模块和网络损伤评分模块分别根据上述信息进行分项评测。源编码质量评分模块继续细分为三个单元,基准帧的质量评分单元、编码质量评分单元和源编码质量评分单元;网络损伤评分模块进行丢包损伤评价和时延抖动损伤评价;质量监测评分模块综合源编码质量评价和网络损伤评价的结果,给出最终的动态评分。Figure 8 is a schematic structural diagram of a video stream quality monitoring device according to an embodiment of the present invention, as shown in Figure 8, the network data acquisition module is responsible for acquiring network data on the network side, and separates the video service network to be evaluated according to the protocol and port number data. Then, the information acquisition module extracts evaluation-related information from the video service network data, including video coding information and network packet information; the source coding quality scoring module and the network damage scoring module perform sub-item evaluation based on the above information. The source coding quality scoring module is further subdivided into three units, the quality scoring unit of the reference frame, the coding quality scoring unit, and the source coding quality scoring unit; the network damage scoring module performs packet loss damage evaluation and delay jitter damage evaluation; quality monitoring and scoring The module synthesizes the results of source coding quality evaluation and network damage evaluation to give a final dynamic score.
从以上的描述中,可以看出,本发明实施例在网络侧获取指定业务和会话的实时视频流,对该实时视频流进行解析,对其源编码的质量进行评分。并评价由于错误传播因素造成的视频质量损伤,以及评价由于网络性能造成的视频质量损伤,最后根据评价结果得出该实时视频流质量的动态评分。本发明实施例对网络侧获取的视频流,每解析得到一个视频帧的编码比特流,就可以给出该帧到达时刻的业务质量动态评分。某视频帧到达时刻的业务质量动态评分不仅考虑了当前帧的情况,还考虑了当前帧之前一段时间内其他帧的情况,使评分既具有动态性,也具备一定的稳定性。From the above description, it can be seen that the embodiments of the present invention obtain real-time video streams of specified services and sessions on the network side, analyze the real-time video streams, and score the quality of source codes. And evaluate the video quality damage caused by error propagation factors, and evaluate the video quality damage caused by network performance, and finally get the dynamic score of the real-time video stream quality according to the evaluation results. In the embodiment of the present invention, for the video stream acquired by the network side, each time the coded bit stream of a video frame is obtained by parsing, the service quality dynamic score at the arrival time of the frame can be given. The service quality dynamic score at the arrival time of a certain video frame not only considers the situation of the current frame, but also considers the situation of other frames in a period of time before the current frame, so that the score is both dynamic and stable.
本发明实施例同时考虑源视频编码和网络性能两方面对视频质量的影响,在源视频编码评价上创新地使用了基准帧,且衡量编码质量时考虑了量化参数、时间和空间复杂度、帧编码类型、错误传播等多个因素,网络性能方面除了考虑丢包外,还考虑时延抖动带来的质量损伤,提高了评测精度。另外,本发明实施例的计算很简单,也能监测实时业务的动态质量,可很好地应用于网络侧实时视频业务质量在线监测。The embodiment of the present invention considers the influence of source video encoding and network performance on video quality at the same time, innovatively uses reference frames in source video encoding evaluation, and considers quantization parameters, time and space complexity, and frame rate when measuring encoding quality. Encoding type, error propagation and other factors. In addition to packet loss, network performance also considers the quality damage caused by delay and jitter, which improves the evaluation accuracy. In addition, the calculation of the embodiment of the present invention is very simple, and the dynamic quality of the real-time service can also be monitored, which can be well applied to the online monitoring of the real-time video service quality on the network side.
尽管为示例目的,已经公开了本发明的优选实施例,本领域的技术人员将意识到各种改进、增加和取代也是可能的,因此,本发明的范围应当不限于上述实施例。Although preferred embodiments of the present invention have been disclosed for illustrative purposes, those skilled in the art will appreciate that various modifications, additions and substitutions are possible, and therefore, the scope of the present invention should not be limited to the above-described embodiments.
Claims (12)
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201310022730.7A CN103945213B (en) | 2013-01-22 | 2013-01-22 | A kind of video flow quality monitoring method and device |
| PCT/CN2013/084795 WO2014114109A1 (en) | 2013-01-22 | 2013-09-30 | Method and device for monitoring quality of video stream |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201310022730.7A CN103945213B (en) | 2013-01-22 | 2013-01-22 | A kind of video flow quality monitoring method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN103945213A CN103945213A (en) | 2014-07-23 |
| CN103945213B true CN103945213B (en) | 2016-12-28 |
Family
ID=51192660
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201310022730.7A Active CN103945213B (en) | 2013-01-22 | 2013-01-22 | A kind of video flow quality monitoring method and device |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN103945213B (en) |
| WO (1) | WO2014114109A1 (en) |
Families Citing this family (20)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104486092B (en) * | 2014-12-15 | 2018-04-06 | 北京国双科技有限公司 | Data monitoring method and device |
| CN105721862B (en) * | 2016-02-01 | 2017-11-21 | 杭州电子科技大学 | A kind of unmanned plane video quality determines method |
| CN106210926B (en) * | 2016-07-11 | 2018-12-04 | 天津大学 | Video quality self-adaptation control method based on fuzzy control |
| CN111432275B (en) * | 2016-10-08 | 2023-11-17 | 华为技术有限公司 | Methods and devices for assessing video quality |
| CN106851261A (en) * | 2017-02-23 | 2017-06-13 | 中国矿业大学 | A kind of method for evaluating video quality based on GOP |
| CN108696751B (en) * | 2017-04-11 | 2020-07-28 | 中国移动通信有限公司研究院 | A video processing method and device |
| CN112702630B (en) * | 2017-05-27 | 2025-03-25 | 华为技术有限公司 | Fault detection method, monitoring device and network device |
| CN107105226B (en) * | 2017-06-22 | 2019-01-01 | 迪爱斯信息技术股份有限公司 | A kind of video quality evaluation device |
| CN107613315B (en) * | 2017-10-30 | 2020-05-12 | Oppo广东移动通信有限公司 | Video image quality adjustment method, device, terminal device and storage medium |
| EP3573338A1 (en) | 2018-05-25 | 2019-11-27 | Carrier Corporation | Video device and network quality evaluation/diagnostic tool |
| CN109413413B (en) * | 2018-09-26 | 2020-06-05 | 央视国际网络无锡有限公司 | Video quality evaluation method and device |
| CN111314691B (en) * | 2018-12-11 | 2022-09-16 | 中国移动通信集团广东有限公司 | A method and device for evaluating video call quality |
| CN114449253B (en) * | 2020-10-30 | 2025-03-18 | 中国移动通信有限公司研究院 | Video quality assessment method, device and network equipment |
| CN115412776B (en) * | 2021-05-28 | 2024-10-18 | 华为技术有限公司 | A network quality assessment method and device in video transmission in near-field scenarios |
| US11902547B2 (en) | 2021-07-15 | 2024-02-13 | Google Llc | Low-delay two-pass frame-level rate control using an adjusted complexity |
| CN113905197A (en) * | 2021-09-29 | 2022-01-07 | 深圳市天视通视觉有限公司 | Network video recorder copying device and system |
| CN114915846B (en) * | 2022-05-10 | 2024-06-21 | 中移(杭州)信息技术有限公司 | Data processing method, device, equipment and computer readable storage medium |
| CN114979625B (en) * | 2022-05-20 | 2025-07-08 | 腾讯科技(深圳)有限公司 | Video quality evaluation method, apparatus, device, storage medium, and program product |
| CN115150641A (en) * | 2022-06-28 | 2022-10-04 | 炫彩互动网络科技有限公司 | Cloud game video coding parameter dynamic adjustment method and device |
| CN115713710B (en) * | 2022-11-04 | 2025-10-03 | 华中科技大学 | Content-based real-time video analysis configuration update method, device and system |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101626506A (en) * | 2008-07-10 | 2010-01-13 | 华为技术有限公司 | Method, device and system for evaluating quality of video code stream |
| CN101635846A (en) * | 2008-07-21 | 2010-01-27 | 华为技术有限公司 | A video quality assessment method, system and device |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101227604B (en) * | 2007-01-18 | 2010-05-19 | 上海未来宽带技术及应用工程研究中心有限公司 | Method for detecting network video quality by network injury tolerance |
| KR20090063406A (en) * | 2007-12-14 | 2009-06-18 | 삼성전자주식회사 | Real-time Video Quality Evaluation System and Method Considering Transmission Characteristics |
| CN101448175B (en) * | 2008-12-25 | 2010-12-01 | 华东师范大学 | A No-Reference Method for Streaming Video Quality Assessment |
| CN102158729B (en) * | 2011-05-05 | 2012-11-28 | 西北工业大学 | Method for objectively evaluating encoding quality of video sequence without reference |
-
2013
- 2013-01-22 CN CN201310022730.7A patent/CN103945213B/en active Active
- 2013-09-30 WO PCT/CN2013/084795 patent/WO2014114109A1/en active Application Filing
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101626506A (en) * | 2008-07-10 | 2010-01-13 | 华为技术有限公司 | Method, device and system for evaluating quality of video code stream |
| CN101635846A (en) * | 2008-07-21 | 2010-01-27 | 华为技术有限公司 | A video quality assessment method, system and device |
Also Published As
| Publication number | Publication date |
|---|---|
| WO2014114109A1 (en) | 2014-07-31 |
| CN103945213A (en) | 2014-07-23 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN103945213B (en) | A kind of video flow quality monitoring method and device | |
| CN102959976B (en) | Method and device for evaluating video stream quality | |
| EP2119204B1 (en) | Method and arrangement for video telephony quality assessment | |
| KR101465927B1 (en) | Video data quality assessment method and device | |
| JP5302342B2 (en) | Method, apparatus and system for evaluating the quality of a video code stream | |
| EP1995978B1 (en) | Video quality assessment | |
| US8923411B2 (en) | Method and system for determining a quality value of a video stream | |
| US20120212624A1 (en) | Method, apparatus, and system for evaluating video quality | |
| JP4787210B2 (en) | Video quality estimation method, apparatus, and program | |
| JP4914400B2 (en) | Quality estimation method, quality estimation system, user terminal, quality management terminal and program | |
| CN104837008B (en) | A kind of layer bitstreams video-aware quality evaluating method based on Network Packet Loss damage | |
| US9723266B1 (en) | Lightweight content aware bit stream video quality monitoring service | |
| Ascenso et al. | Packet-header based no-reference quality metrics for H. 264/AVC video transmission | |
| Lu et al. | Quality assessing of video over a packet network | |
| Nuhbegović et al. | Validating IPTV service quality under realistic triple play network conditions | |
| JP2011004354A (en) | Video quality estimating device, video quality estimation method, and control program for the video quality estimating device | |
| JP5707461B2 (en) | Video quality estimation apparatus, video quality estimation method and program | |
| Zečić et al. | An approach to estimate correlation between QoS and perceptual video quality in packet-switched networks | |
| Wang et al. | Video quality assessment for IPTV services: A survey | |
| Yang et al. | Quality of Experience Evaluation for Networked Video Services | |
| Menéndez et al. | Improved the Quality of Experience Assessment with Quality Index Based Frames over IPTV Network |
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 | ||
| TR01 | Transfer of patent right |
Effective date of registration: 20170606 Address after: 518057 Nanshan District high tech Industrial Park, Guangdong, ZTE building, A3-01, A3-02, Patentee after: Shenzhen Zhongxing Communication Technology Service Co., Ltd. Address before: 518057 Nanshan District Guangdong high tech Industrial Park, South Road, science and technology, ZTE building, Ministry of Justice Patentee before: ZTE Corporation |
|
| TR01 | Transfer of patent right |