Movatterモバイル変換


[0]ホーム

URL:


CN105430475A - Video data buffering method and device - Google Patents

Video data buffering method and device
Download PDF

Info

Publication number
CN105430475A
CN105430475ACN201510744649.9ACN201510744649ACN105430475ACN 105430475 ACN105430475 ACN 105430475ACN 201510744649 ACN201510744649 ACN 201510744649ACN 105430475 ACN105430475 ACN 105430475A
Authority
CN
China
Prior art keywords
preset
video data
buffer
buffer length
remaining
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.)
Pending
Application number
CN201510744649.9A
Other languages
Chinese (zh)
Inventor
孙卓
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co LtdfiledCriticalBeijing Qihoo Technology Co Ltd
Priority to CN201510744649.9ApriorityCriticalpatent/CN105430475A/en
Publication of CN105430475ApublicationCriticalpatent/CN105430475A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

The invention discloses a buffering method and device of video data, and relates to the technical field of information. First in the process of playing video data, video data to be played are cached in a video buffering area with a preset buffering length; then whether playing status information of the current video data satisfies a preset condition is detected according to a preset time interval; and the preset buffering length corresponding to the video buffering area is adjusted according to a detection result. By utilization of the abovementioned scheme, when network conditions are not ideal, the occurrence of a phenomenon of unsmooth playing of a live video is reduced, and when the network conditions are relatively good, the real-time performance of playing of the live video can be improved.

Description

Translated fromChinese
视频数据的缓冲方法及装置Video data buffering method and device

技术领域technical field

本发明涉及一种信息技术领域,特别是涉及一种视频数据的缓冲方法及装置。The invention relates to the field of information technology, in particular to a video data buffering method and device.

背景技术Background technique

近些年来,随着信息技术的飞速发展,网络视频直播越来越受到人们的青睐,网络视频直播是指人们可以通过网络收看到远端正在进行的现场音视频实况,例如,赛事、会议、教学、手术等。这样极大地丰富了人们的工作和学习生活。用户在观看网络直播视频时,首先需要在视频缓冲区中将视频数据进行缓冲,然后播放缓冲的视频数据。In recent years, with the rapid development of information technology, online video live broadcasting has become more and more popular among people. Online video live broadcasting means that people can watch live audio and video live broadcasts at the remote end through the network, such as events, conferences, teaching, surgery, etc. This greatly enriches people's work and study life. When watching live webcast video, the user first needs to buffer the video data in the video buffer, and then play the buffered video data.

目前,在对视频数据进行缓冲时,视频缓冲区中数据的缓冲长度通常为固定长度,即用户在观看网络直播视频时,首先需要在视频缓冲区中缓冲固定长度的数据,然后再播放这些缓冲的视频数据,然而当网络条件不理想时,视频播放会受到网络状况影响,如果网络发生拥塞,网速较慢,数据的缓冲长度配置得较短时会出现直播视频播放卡顿的现象,影响了直播视频的观看效果;而当网络条件较好时,数据的缓冲长度配置得较长时,视频数据的延迟较大,会影响到直播视频播放的实时性。At present, when buffering video data, the buffer length of the data in the video buffer is usually a fixed length, that is, when a user watches a webcast video, he first needs to buffer fixed-length data in the video buffer, and then play the buffered data. However, when the network conditions are not ideal, the video playback will be affected by the network conditions. If the network is congested, the network speed is slow, and the data buffer length is configured to be short, the live video playback will be stuck, which will affect the However, when the network conditions are good and the data buffer length is configured to be longer, the delay of video data is relatively large, which will affect the real-time performance of live video playback.

发明内容Contents of the invention

有鉴于此,本发明提供一种视频数据的缓冲方法及装置,主要目的在于可以在网络条件不太理想时,减少发生直播视频播放卡顿的现象,同时在网络条件较好时,可以提高直播视频播放的实时性。In view of this, the present invention provides a video data buffering method and device, the main purpose of which is to reduce the occurrence of live video playback freezes when the network conditions are not ideal, and at the same time to improve the quality of the live broadcast when the network conditions are good. The real-time nature of video playback.

依据本发明一个方面,提供了一种视频数据的缓冲方法,所述方法包括:According to one aspect of the present invention, a method for buffering video data is provided, the method comprising:

在播放视频数据的过程中,将待播放视频数据缓存在预置缓冲长度的视频缓冲区中;In the process of playing video data, cache the video data to be played in a video buffer with a preset buffer length;

按照预置时间间隔检测当前视频数据的播放状态信息是否符合预设条件;Detecting whether the playback state information of the current video data meets the preset condition according to the preset time interval;

根据检测结果,对所述视频缓冲区对应的所述预置缓冲长度进行调整。According to the detection result, the preset buffer length corresponding to the video buffer is adjusted.

依据本发明另一个方面,提供了一种视频数据的缓冲装置,所述装置包括:According to another aspect of the present invention, a buffering device for video data is provided, the device comprising:

缓存单元,用于在播放视频数据的过程中,将待播放视频数据缓存在预置缓冲长度的视频缓冲区中;The cache unit is used to cache the video data to be played in a video buffer with a preset buffer length during the process of playing video data;

检测单元,用于按照预置时间间隔检测当前视频数据的播放状态信息是否符合预设条件;The detection unit is used to detect whether the playback state information of the current video data meets the preset condition according to the preset time interval;

调整单元,用于根据所述检测单元的检测结果,对所述视频缓冲区对应的所述预置缓冲长度进行调整。An adjustment unit, configured to adjust the preset buffer length corresponding to the video buffer according to the detection result of the detection unit.

借由上述技术方案,本发明实施例提供的技术方案至少具有下列优点:With the above technical solutions, the technical solutions provided by the embodiments of the present invention have at least the following advantages:

本发明提供的一种视频数据的缓冲方法及装置,首先在播放视频数据的过程中,将待播放视频数据缓存在预置缓冲长度的视频缓冲区中;然后按照预置时间间隔检测当前视频数据的播放状态信息是否符合预设条件;最后根据检测结果,对所述视频缓冲区对应的所述预置缓冲长度进行调整。与目前通过缓冲固定长度的视频数据的方式相比,本发明在播放视频数据的过程中,通过检测当前视频数据的播放状态信息是否符合预设条件,可以对视频缓冲区对应的预置缓冲长度进行实时调整,进而可以实现在直播视频流畅播放与滞后播放之间的动态调整,在网络较好的情况下,使用较短的缓冲区进行实时播放;在网络较差的情况下,使用较长的缓冲区保证流畅播放,减少了发生直播视频播放卡顿的现象,提升了用户的体验。A video data buffering method and device provided by the present invention, firstly, in the process of playing video data, buffer the video data to be played in a video buffer with a preset buffer length; then detect the current video data according to a preset time interval Whether the playback state information of the video buffer meets the preset condition; finally, according to the detection result, the preset buffer length corresponding to the video buffer is adjusted. Compared with the current method of buffering fixed-length video data, the present invention can check the preset buffer length corresponding to the video buffer by detecting whether the playback status information of the current video data meets the preset conditions during the process of playing video data. Real-time adjustments can be made to achieve dynamic adjustments between smooth playback and delayed playback of live video. When the network is good, a shorter buffer is used for real-time playback; when the network is poor, a longer buffer is used. The buffer zone ensures smooth playback, reduces the phenomenon of live video playback stuttering, and improves the user experience.

上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention, it can be implemented according to the contents of the description, and in order to make the above and other purposes, features and advantages of the present invention more obvious and understandable , the specific embodiments of the present invention are enumerated below.

附图说明Description of drawings

通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiment. The drawings are only for the purpose of illustrating a preferred embodiment and are not to be considered as limiting the invention. Also throughout the drawings, the same reference numerals are used to designate the same components. In the attached picture:

图1示出了本发明实施例提供的一种视频数据的缓冲方法流程示意图;Fig. 1 shows a schematic flow chart of a video data buffering method provided by an embodiment of the present invention;

图2示出了本发明实施例提供的另一种视频数据的缓冲方法流程示意图;FIG. 2 shows a schematic flowchart of another video data buffering method provided by an embodiment of the present invention;

图3示出了本发明实施例提供的一种视频数据的缓冲装置结构示意图;Fig. 3 shows a schematic structural diagram of a buffering device for video data provided by an embodiment of the present invention;

图4示出了本发明实施例提供的另一种视频数据的缓冲装置结构示意图。FIG. 4 shows a schematic structural diagram of another video data buffering device provided by an embodiment of the present invention.

具体实施方式detailed description

下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

本发明实施例提供了一种视频数据的缓冲方法,如图1所示,所示方法包括:The embodiment of the present invention provides a buffering method of video data, as shown in Figure 1, the shown method includes:

101、在播放视频数据的过程中,将待播放视频数据缓存在预置缓冲长度的视频缓冲区中。101. During the process of playing video data, cache the video data to be played in a video buffer with a preset buffer length.

其中,所述视频缓冲区为视频数据的缓冲区,在视频缓冲区中进行视频数据的缓冲。所述预置缓冲长度可以根据用户的实际需求进行配置,也可以由系统默认配置,本发明实施例不做限定。Wherein, the video buffer is a buffer of video data, and video data is buffered in the video buffer. The preset buffer length can be configured according to the actual needs of the user, or can be configured by default by the system, which is not limited in this embodiment of the present invention.

对于本发明实施例,当需要播放视频数据时,首先将待播放视频数据缓存在预置缓冲长度的视频缓冲区中,再从预置缓冲长度的视频缓冲区中读取视频数据进行播放。For the embodiment of the present invention, when video data needs to be played, the video data to be played is first buffered in a video buffer with a preset buffer length, and then the video data is read from the video buffer with a preset buffer length for playback.

进一步地,在所述将待播放视频数据缓存在预置缓冲长度的视频缓冲区中之前,可以获取当前的网络状态信息,根据当前的网络状态信息获取得到当前网络的下载速度,根据当前网络的下载速度,将所述预置缓冲长度配置为与所述下载速度对应的缓冲长度,不同的下载速度对应不同的预置缓冲长度。Further, before the video data to be played is cached in the video buffer with a preset buffer length, the current network state information can be obtained, and the download speed of the current network can be obtained according to the current network state information, and the download speed of the current network can be obtained according to the current network state information. For the download speed, the preset buffer length is configured as a buffer length corresponding to the download speed, and different download speeds correspond to different preset buffer lengths.

例如,存在3个预置缓冲长度,分别为长度A、长度B、长度C,将属于100KB/s至200KB/s之间的下载速度对应长度A,将属于300KB/s至400KB/s之间的下载速度对应长度B,将属于500KB/s至600KB/s之间的下载速度对应长度C。当网络当前的下载速度为150KB/s时,将预置缓冲长度配置为长度A;当网络当前的下载速度为512KB/s时,将预置缓冲长度配置为长度C。For example, there are 3 preset buffer lengths, namely length A, length B, and length C, which will belong to the corresponding length A of the download speed between 100KB/s and 200KB/s, and will fall between 300KB/s and 400KB/s The download speed corresponding to length B will belong to the download speed between 500KB/s and 600KB/s corresponding to length C. When the current download speed of the network is 150KB/s, configure the preset buffer length as length A; when the current download speed of the network is 512KB/s, configure the preset buffer length as length C.

对于本发明实施例,根据网络的实际情况配置预置缓冲长度,当网速较好时,可以将预置缓冲长度配置得较短一些,以提高直播视频播放的实时性;当网速较差时,可以将预置缓冲长度配置得较长一些,以保证直播视频播放的流畅性。For the embodiment of the present invention, the preset buffer length is configured according to the actual situation of the network. When the network speed is good, the preset buffer length can be configured to be shorter to improve the real-time performance of live video playback; when the network speed is poor , you can configure the preset buffer length to be longer to ensure the smoothness of live video playback.

再进一步地,在所述将待播放视频数据缓存在预置缓冲长度的视频缓冲区中之前,还可以输出提示信息,所述提示信息用于确认是否按照预置缓冲长度进行数据缓冲,当用户根据提示信息确认按照预置缓冲长度进行数据缓冲时,将待播放视频数据缓存在预置缓冲长度的视频缓冲区中;当用户根据提示信息取消按照预置缓冲长度进行数据缓冲时,可以输出预置缓冲长度的修改信息,用于用户修改预置缓冲长度,在预置缓冲长度修改完成之后,再将待播放视频数据缓存在修改后的预置缓冲长度的视频缓冲区中。Still further, before the video data to be played is cached in the video buffer with a preset buffer length, prompt information can also be output, and the prompt information is used to confirm whether to perform data buffering according to the preset buffer length. When the user According to the prompt information, when the data buffering according to the preset buffer length is confirmed, the video data to be played is buffered in the video buffer with the preset buffer length; when the user cancels the data buffering according to the preset buffer length according to the prompt information, the preset buffer length can be output. The modification information of the preset buffer length is used for the user to modify the preset buffer length. After the modification of the preset buffer length is completed, the video data to be played is cached in the modified video buffer of the preset buffer length.

102、按照预置时间间隔检测当前视频数据的播放状态信息是否符合预设条件。102. Detect whether the playing state information of the current video data meets a preset condition according to a preset time interval.

其中,所述播放状态信息可以为视频缓冲区中视频数据量的状态信息,也可以为播放视频数据时的网络状态信息。所述预设条件可以按用户需求进行配置,也可以由系统默认配置,本发明实施例不做限定。所述预置时间间隔可以根据实际需求进行配置,例如,预置时间间隔可以配置为1秒、2秒等。Wherein, the playing state information may be the state information of the amount of video data in the video buffer, or may be the network state information when playing the video data. The preset conditions may be configured according to user requirements, or may be configured by default by the system, which is not limited in this embodiment of the present invention. The preset time interval may be configured according to actual requirements, for example, the preset time interval may be configured as 1 second, 2 seconds, and so on.

例如,当需要检测的播放状态信息为视频缓冲区中视频数据量的状态信息时,预设条件可以配置为视频缓冲区中剩余的视频数据量大于数据量A,当视频数据当前的视频缓冲区中剩余的视频数据量小于或等于数据量A时,即视频缓冲区中的视频数据将要播空,判定当前视频数据的播放状态信息不符合预置条件;当视频数据当前的视频缓冲区中剩余的视频数据量大于数据量A时,判定当前视频数据的播放状态信息符合预置条件。For example, when the playback status information to be detected is the status information of the amount of video data in the video buffer, the preset condition can be configured as the amount of video data remaining in the video buffer is greater than the amount of data A, when the current video buffer of the video data When the amount of remaining video data in the video buffer is less than or equal to the amount of data A, that is, the video data in the video buffer will be aired, and it is determined that the playback status information of the current video data does not meet the preset conditions; when the remaining video data in the current video buffer is When the amount of video data in is greater than the amount of data A, it is determined that the playback state information of the current video data meets the preset condition.

再例如,当前视频数据的播放状态信息可以为播放视频数据时的网络状态信息,预设条件可以配置为视频数据的下载速度小于或等于速度b,即以该区间定义网络处于拥塞状态,当检测出当前视频数据的下载速度大于速度b时,可以确定当前网络处于正常状态,网速较好,判定当前视频数据的播放状态信息不符合预置条件;当检测出当前视频数据的下载速度小于b时,可以确定当前网络处于拥塞状态,网速较差,判定当前视频数据的播放状态信息符合预置条件。For another example, the playback status information of the current video data can be the network status information when the video data is played, and the preset condition can be configured such that the download speed of the video data is less than or equal to the speed b, that is, the interval defines that the network is in a congested state. When the download speed of the current video data is greater than speed b, it can be determined that the current network is in a normal state and the network speed is better, and it is determined that the playback status information of the current video data does not meet the preset conditions; when it is detected that the download speed of the current video data is less than b , it can be determined that the current network is in a congested state and the network speed is poor, and it is determined that the playback status information of the current video data meets the preset conditions.

103、根据检测结果,对视频缓冲区对应的预置缓冲长度进行调整。103. According to the detection result, adjust the preset buffer length corresponding to the video buffer.

例如,预设数据量A用于确定视频数据播放时是否出现卡顿现象,具体地,当检测出视频缓冲区中剩余的视频数据量大于预设数据量A时,确定视频数据播放过程中没有出现卡顿现象,当检测出视频缓冲区中剩余的视频数据量小于或等于预设数据量A时,确定视频数据播放过程中出现了卡顿现象,可以对视频缓冲区对应的预置缓冲长度进行增大,具体可以将新的预置缓冲长度配置为原有预置缓冲长度的两倍,以减少发生直播视频播放卡顿的现象。For example, the preset data amount A is used to determine whether there is a jam phenomenon during video data playback. Specifically, when it is detected that the remaining video data amount in the video buffer is greater than the preset data amount A, it is determined that there is no video data during playback. Caton phenomenon occurs, when it is detected that the amount of video data remaining in the video buffer is less than or equal to the preset data amount A, it is determined that there has been a jam phenomenon during the playback of video data, and the corresponding preset buffer length of the video buffer can be adjusted. To increase, specifically, the new preset buffer length can be configured to be twice the original preset buffer length, so as to reduce the phenomenon of live video playback stuttering.

再例如,预设下载速度B用于确定网络是否处于正常状态,具体地,当检测出当前视频数据的下载速度小于或等于预设下载速度B时,可以确定当前网络处于拥塞状态,网速较差,当检测出当前视频数据的下载速度大于预设下载速度B时,可以确定当前网络处于正常状态,网速较好,可以对视频缓冲区对应的预置缓冲长度进行减小,具体可以将新的预置缓冲长度配置为原有预置缓冲长度的一半,并相应删除部分缓冲数据,以提高直播视频播放的实时性。For another example, the preset download speed B is used to determine whether the network is in a normal state. Specifically, when it is detected that the download speed of the current video data is less than or equal to the preset download speed B, it can be determined that the current network is in a congested state, and the network speed is relatively low. Poor, when it is detected that the download speed of the current video data is greater than the preset download speed B, it can be determined that the current network is in a normal state and the network speed is good, and the preset buffer length corresponding to the video buffer can be reduced. The new preset buffer length is configured as half of the original preset buffer length, and part of the buffer data is deleted accordingly to improve the real-time performance of live video playback.

对于本发明实施例,可以根据播放视频数据时的网络状态信息或者视频缓冲区中视频数据量的状态信息,例如,视频缓冲区中剩余的视频数据量、当前视频数据的下载速度、视频缓冲区中剩余的视频数据量的减少量以及增加量等,调整视频缓冲区对应的预置缓冲长度。可以实现在直播视频流畅播放与滞后播放之间的动态调整,并且可以配置相应的阈值,来保证在调整的过程中,预置缓冲长度不会超过特定范围,进而可以保证调整的准确性。For the embodiment of the present invention, according to the network state information or the state information of the amount of video data in the video buffer when playing video data, for example, the remaining video data amount in the video buffer, the download speed of the current video data, the video buffer Adjust the preset buffer length corresponding to the video buffer. Dynamic adjustment between smooth playback and delayed playback of live video can be realized, and the corresponding threshold can be configured to ensure that the preset buffer length will not exceed a specific range during the adjustment process, thereby ensuring the accuracy of the adjustment.

本发明实施例提供的一种视频数据的缓冲方法,首先在播放视频数据的过程中,将待播放视频数据缓存在预置缓冲长度的视频缓冲区中;然后按照预置时间间隔检测当前视频数据的播放状态信息是否符合预设条件;最后根据检测结果,对所述视频缓冲区对应的所述预置缓冲长度进行调整。与目前通过缓冲固定长度的视频数据的方式相比,本发明在播放视频数据的过程中,通过检测当前视频数据的播放状态信息是否符合预设条件,可以对视频缓冲区对应的预置缓冲长度进行实时调整,进而可以实现在直播视频流畅播放与滞后播放之间的动态调整,在网络较好的情况下,使用较短的缓冲区进行实时播放;在网络较差的情况下,使用较长的缓冲区保证流畅播放,减少了发生直播视频播放卡顿的现象,提升了用户的体验。A video data buffering method provided by an embodiment of the present invention firstly buffers the video data to be played in a video buffer with a preset buffer length in the process of playing video data; then detects the current video data according to a preset time interval Whether the playback state information of the video buffer meets the preset condition; finally, according to the detection result, the preset buffer length corresponding to the video buffer is adjusted. Compared with the current method of buffering fixed-length video data, the present invention can check the preset buffer length corresponding to the video buffer by detecting whether the playback status information of the current video data meets the preset conditions during the process of playing video data. Real-time adjustments can be made to achieve dynamic adjustments between smooth playback and delayed playback of live video. When the network is good, a shorter buffer is used for real-time playback; when the network is poor, a longer buffer is used. The buffer zone ensures smooth playback, reduces the phenomenon of live video playback stuttering, and improves the user experience.

本发明实施例提供了另一种视频数据的缓冲方法,如图2所示,所示方法包括:The embodiment of the present invention provides another video data buffering method, as shown in Figure 2, the shown method includes:

201、在播放视频数据的过程中,将待播放视频数据缓存在预置缓冲长度的视频缓冲区中。201. During the process of playing video data, cache the video data to be played in a video buffer with a preset buffer length.

其中,所述视频缓冲区为视频数据的缓冲区,在视频缓冲区中进行视频数据的缓冲。所述预置缓冲长度可以根据用户的实际需求进行配置,也可以由系统默认配置,本发明实施例不做限定。Wherein, the video buffer is a buffer of video data, and video data is buffered in the video buffer. The preset buffer length can be configured according to the actual needs of the user, or can be configured by default by the system, which is not limited in this embodiment of the present invention.

对于本发明实施例,当需要播放视频数据时,首先将待播放视频数据缓存在预置缓冲长度的视频缓冲区中,再从预置缓冲长度的视频缓冲区中读取视频数据进行播放。For the embodiment of the present invention, when video data needs to be played, the video data to be played is first buffered in a video buffer with a preset buffer length, and then the video data is read from the video buffer with a preset buffer length for playback.

对于本发明实施例,可以根据当前网络的下载速度,配置所述预置缓冲长度。例如,当网络当前的下载速度较差时,为了保证直播视频数据播放的流畅性,可以将预置缓冲长度配置得较长一些;而当网络当前的下载速度较好时,为了保证直播视频数据播放的实时性,可以将预置缓冲长度配置得较短一些。For the embodiment of the present invention, the preset buffer length may be configured according to the download speed of the current network. For example, when the current download speed of the network is poor, in order to ensure the smoothness of live video data playback, the preset buffer length can be configured to be longer; For real-time playback, the preset buffer length can be configured to be shorter.

202a、按照预置时间间隔检测视频缓冲区中剩余的视频数据量是否大于预设数据量。202a. Detect whether the remaining video data volume in the video buffer is greater than the preset data volume at a preset time interval.

其中,所述预置时间间隔可以根据实际需求进行配置,也可以由系统默认进行配置,本发明实施例不做限定,例如,预置时间间隔可以配置为0.5秒、1秒等。Wherein, the preset time interval can be configured according to actual needs, or can be configured by default by the system, which is not limited in the embodiment of the present invention. For example, the preset time interval can be configured as 0.5 second, 1 second, etc.

203a1、若视频缓冲区中剩余的视频数据量大于预设数据量,则将预置缓冲长度减小为与预设数据量对应的缓冲长度。203a1. If the amount of video data remaining in the video buffer is greater than the preset data amount, reduce the preset buffer length to a buffer length corresponding to the preset data amount.

其中,不同预设数据量对应不同的缓冲长度。所述预设数据量可以根据实际需求进行设定。Wherein, different preset data amounts correspond to different buffer lengths. The preset data volume can be set according to actual needs.

203a2、若视频缓冲区中剩余的视频数据量小于预设数据量,则将预置缓冲长度增大为与预设数据量对应的缓冲长度。203a2. If the amount of video data remaining in the video buffer is less than the preset data amount, increase the preset buffer length to a buffer length corresponding to the preset data amount.

例如,存在4个不同的预设数据量,并且按照数据量从大到小的顺序,依次为数据量1、数据量2、数据量3、数据量4,数据量1的数据量最大;与数据量1对应的缓冲长度为长度a,与数据量2对应的缓冲长度为长度b,与数据量3对应的缓冲长度为长度c,与数据量4对应的缓冲长度为长度d,在上述条件下进行视频数据播放,当检测出视频缓冲区中剩余的视频数据量小于或等于数据量1且大于数据量2时,将预置缓冲长度增大为长度a;当检测出视频缓冲区中剩余的视频数据量小于或等于数据量3且大于数据量4时,将预置缓冲长度增大为长度c。For example, there are 4 different preset data volumes, and in descending order of data volumes, they are data volume 1, data volume 2, data volume 3, and data volume 4, and data volume 1 has the largest data volume; and The buffer length corresponding to data volume 1 is length a, the buffer length corresponding to data volume 2 is length b, the buffer length corresponding to data volume 3 is length c, and the buffer length corresponding to data volume 4 is length d. Under the above conditions Play video data under the following conditions, when it is detected that the amount of video data remaining in the video buffer is less than or equal to the amount of data 1 and greater than the amount of data 2, the preset buffer length is increased to length a; when it is detected that the remaining amount of video data in the video buffer When the amount of video data is less than or equal to data amount 3 and greater than data amount 4, the preset buffer length is increased to length c.

需要说明的是,通过检测视频缓冲区中剩余的视频数据量是否大于预设数据量,可以实现在视频流畅播放与滞后时间做出动态的调整,以减少播放视频卡顿现象的发生,以保证视频的实时性播放。It should be noted that by detecting whether the amount of video data remaining in the video buffer is greater than the preset amount of data, dynamic adjustments can be made to smooth video playback and lag time to reduce the occurrence of video freezes and ensure Real-time playback of video.

与步骤202a并列的步骤202b、按照预置时间间隔检测当前视频数据下载速度是否大于预设速度。Step 202b parallel to step 202a is to detect whether the current video data download speed is greater than the preset speed according to a preset time interval.

进一步地,所述步骤202b之前,还可以包括:获取与当前视频数据的播放模式信息对应的预设速度,不同播放模式对应不同的预设速度。所述步骤202b具体可以包括:按照预置时间间隔检测当前视频数据下载速度是否大于与所述播放模式信息对应的预设速度。其中,所述播放模式信息可以包含视频数据播放的分辨率、码率(Bitrate,比特率)等。例如,当视频数据播放的码率较高时,传送的数据较大,对应的预设速度较快,当视频数据播放的码率较低时,传送的数据较小,对应的预设速度较慢。Further, before the step 202b, it may also include: acquiring a preset speed corresponding to the play mode information of the current video data, and different play modes correspond to different preset speeds. The step 202b may specifically include: detecting whether the download speed of the current video data is greater than the preset speed corresponding to the playing mode information at a preset time interval. Wherein, the playing mode information may include resolution, bit rate (Bitrate, bit rate) and the like of video data playing. For example, when the bit rate of video data playback is high, the transmitted data is larger, and the corresponding preset speed is faster; when the bit rate of video data playback is lower, the transmitted data is smaller, and the corresponding preset speed is faster. slow.

进一步地,所述方法还包括:若当前视频数据下载速度小于或等于与所述播放模式信息对应的预设速度,则输出提示信息,所述提示信息用于确认是否切换当前视频数据的播放模式。其中,所述提示信息可以为文本提示信息、图片提示信息、音频提示信息、视频提示信息等。Further, the method further includes: if the download speed of the current video data is less than or equal to the preset speed corresponding to the playback mode information, then output prompt information, the prompt information is used to confirm whether to switch the playback mode of the current video data . Wherein, the prompt information may be text prompt information, picture prompt information, audio prompt information, video prompt information, and the like.

例如,如果判断出当前视频数据的下载速度小于或等于与播放模式信息对应的预设速度,可以通过终端设备的显示屏显示“是否将当前视频数据的分辨率切换为较低的分辨率”的文字提示信息,并且可以通过终端设备的音频输出端输出“是否将当前视频数据的分辨率切换为较低的分辨率”的语音提示信息。For example, if it is judged that the download speed of the current video data is less than or equal to the preset speed corresponding to the playback mode information, the screen of "whether to switch the resolution of the current video data to a lower resolution" can be displayed on the display screen of the terminal device. Text prompt information, and the voice prompt information of "whether to switch the resolution of the current video data to a lower resolution" can be output through the audio output terminal of the terminal device.

需要说明的是,通过按照预置时间间隔检测当前视频数据下载速度是否大于与所述播放模式信息对应的预设速度,若小于或等于所述预设速度,则输出用于是否切换当前视频数据的播放模式的提示信息,可以使得用户根据网络下载速度的实际情况,调整当前视频数据的播放模式,当网络水平较差时,通过降低视频数据的分辨率,可以提高直播视频数据播放的流畅性。It should be noted that, by detecting whether the download speed of the current video data is greater than the preset speed corresponding to the playback mode information according to the preset time interval, if it is less than or equal to the preset speed, the output is used to determine whether to switch the current video data. The prompt information of the playback mode can enable the user to adjust the playback mode of the current video data according to the actual situation of the network download speed. When the network level is poor, the fluency of the live video data playback can be improved by reducing the resolution of the video data. .

203b1、若当前视频数据下载速度大于预设速度,则将预置缓冲长度减小为与预设速度对应的缓冲长度。203b1. If the current video data download speed is greater than the preset speed, reduce the preset buffer length to a buffer length corresponding to the preset speed.

其中,不同预设速度对应不同的缓冲长度。所述预设速度可以根据实际需求进行设定。Wherein, different preset speeds correspond to different buffer lengths. The preset speed can be set according to actual needs.

203b2、若当前视频数据下载速度小于预设速度,则将预置缓冲长度增大为与预设速度对应的缓冲长度。203b2. If the current video data download speed is lower than the preset speed, increase the preset buffer length to a buffer length corresponding to the preset speed.

需要说明的是,通过检测当前视频数据下载速度是否大于预设速度,可以实现在视频流畅播放与滞后时间做出动态的调整,在网络较好的情况下使用较短的缓冲区进行实时播放,在网络不好的情况下使用较长的缓冲区保证流畅播放。It should be noted that by detecting whether the current video data download speed is greater than the preset speed, dynamic adjustments can be made to the smooth video playback and lag time. When the network is good, a shorter buffer is used for real-time playback. Use a longer buffer to ensure smooth playback when the network is not good.

与步骤202a、202b并列的步骤202c、按照预置时间间隔检测以当前时间为起点的预置时间段内,视频缓冲区中剩余的视频数据量的减少量是否大于预设减少阈值。Step 202c, parallel to steps 202a and 202b, detects at preset time intervals whether the amount of remaining video data in the video buffer has decreased greater than a preset reduction threshold within a preset time period starting from the current time.

203c1、若以当前时间为起点的预置时间段内,视频缓冲区中剩余的视频数据量的减少量大于预设减少阈值,则将预置缓冲长度增大为与预设减少阈值对应的缓冲长度。203c1. If within the preset time period starting from the current time, the amount of video data remaining in the video buffer decreases by more than the preset reduction threshold, increase the preset buffer length to the buffer corresponding to the preset reduction threshold length.

其中,不同预设减少阈值对应不同的缓冲长度。所述预置时间段以及所述预设减少阈值可以根据实际需求进行设定,也可以由系统默认配置,本发明实施例不做限定。Wherein, different preset reduction thresholds correspond to different buffer lengths. The preset time period and the preset reduction threshold may be set according to actual needs, or may be configured by default by the system, which are not limited in this embodiment of the present invention.

203c2、若以当前时间为起点的预置时间段内,视频缓冲区中剩余的视频数据量的减少量小于预设减少阈值,则将预置缓冲长度减小为与预设减少阈值对应的缓冲长度。203c2. If within the preset time period starting from the current time, the amount of remaining video data in the video buffer decreases less than the preset reduction threshold, reduce the preset buffer length to the buffer corresponding to the preset reduction threshold length.

需要说明的是,通过检测以当前时间为起点的预置时间段内,所述视频缓冲区中剩余的视频数据量的减少量是否大于预设减少阈值,可以实现在将要出现直播视频卡顿现象之前,将预置缓冲长度进行增大,避免发生直播视频播放卡顿的现象,提升了用户的体验。It should be noted that, by detecting whether the amount of remaining video data in the video buffer has been reduced by more than a preset reduction threshold within a preset period of time starting from the current time, it can be realized that when the live video freeze phenomenon is about to occur Previously, the preset buffer length was increased to avoid the phenomenon of live video playing stuck and improve the user experience.

与步骤202a、202b、202c并列的步骤202d、按照预置时间间隔检测以当前时间为起点的预置时间段内,视频缓冲区中剩余的视频数据量的增加量是否大于预设增加阈值。Step 202d parallel to steps 202a, 202b, and 202c detects at preset time intervals whether the amount of remaining video data in the video buffer has increased greater than a preset increase threshold within a preset time period starting from the current time.

203d1、若以当前时间为起点的预置时间段内,视频缓冲区中剩余的视频数据量的增加量大于预设增加阈值,则将预置缓冲长度减小为与预设增加阈值对应的缓冲长度。203d1. If within the preset time period starting from the current time, the increase of the amount of video data remaining in the video buffer is greater than the preset increase threshold, reduce the preset buffer length to the buffer corresponding to the preset increase threshold length.

其中,不同预设增加阈值对应不同的缓冲长度。所述预设增加阈值可以根据实际需求进行配置。Wherein, different preset increase thresholds correspond to different buffer lengths. The preset increase threshold can be configured according to actual requirements.

203d2、若以当前时间为起点的预置时间段内,视频缓冲区中剩余的视频数据量的增加量小于预设增加阈值,则将预置缓冲长度增大为与预设增加阈值对应的缓冲长度。203d2. If within the preset time period starting from the current time, the amount of remaining video data in the video buffer increases less than the preset increase threshold, increase the preset buffer length to a buffer corresponding to the preset increase threshold length.

需要说明的是,当网络水平较好时,会导致视频缓冲区中剩余的视频数据量增加,通过检测以当前时间为起点的预置时间段内,所述视频缓冲区中剩余的视频数据量的增加量是否大于预设增加阈值,可以在保证直播视频数据播放流畅的前提下,提高直播视频数据播放的实时性,进而可以提升用户体验。It should be noted that when the network level is good, the amount of video data remaining in the video buffer will increase. By detecting the amount of video data remaining in the video buffer within the preset time period starting from the current time Whether the increase amount is greater than the preset increase threshold can improve the real-time performance of live video data playback under the premise of ensuring smooth playback of live video data, thereby improving user experience.

进一步地,对于本发明实施例,上述四种对视频缓冲区对应的预置缓冲长度进行调整的方式,也可以以组合的形式对视频缓冲区对应的预置缓冲长度进行调整,具体可以根据实际需求进行选择设定,本发明实施例不做限定。Further, for the embodiment of the present invention, the above four ways of adjusting the preset buffer length corresponding to the video buffer can also be combined to adjust the preset buffer length corresponding to the video buffer. Select and set according to requirements, which is not limited in this embodiment of the present invention.

进一步地,所述方法还包括:检测当前待播放的视频数据是否为视频起始数据;若是,则将所述预置缓冲长度配置为小于预设阈值的长度。其中,所述预设阈值可以根据实际需求进行配置。Further, the method further includes: detecting whether the video data currently to be played is video start data; if so, configuring the preset buffer length to be less than a preset threshold. Wherein, the preset threshold can be configured according to actual requirements.

需要说明的是,通过检测当前待播放的视频数据是否为视频起始数据,当检测出当前待播放的视频数据为视频起始数据,通过将预置缓冲长度配置为小于预设阈值的长度,可以实现在视频将要开始播放时,配置相应较短的缓冲长度,达到快速播放直播视频的目的。It should be noted that by detecting whether the video data currently to be played is video start data, when it is detected that the video data to be played currently is video start data, by configuring the preset buffer length to be less than the preset threshold length, It can be realized that when the video is about to start playing, a correspondingly short buffer length can be configured to achieve the purpose of quickly playing the live video.

再进一步地,所述方法还包括:根据预置调整尺度阈值,对所述视频缓冲区对应的所述预置缓冲长度进行调整。其中所述预置调整尺度阈值,也可以由系统默认进行配置,具体地,可以配置调整尺度的最大值以及最小值,根据所述预置调整尺度阈值,对所述视频缓冲区对应的所述预置缓冲长度进行调整,可以提高调整的准确性。Still further, the method further includes: adjusting the preset buffer length corresponding to the video buffer according to a preset adjustment scale threshold. The preset adjustment scale threshold can also be configured by the system by default. Specifically, the maximum value and the minimum value of the adjustment scale can be configured. According to the preset adjustment scale threshold, the video buffer corresponding to the The preset buffer length can be adjusted to improve the accuracy of adjustment.

对于本发明实施例的具体应用场景可以如下所示,但不限于此,包括:The specific application scenarios of the embodiments of the present invention may be as follows, but not limited thereto, including:

当需要播放直播视频数据时,首先将待播放视频数据缓存在预置缓冲长度的视频缓冲区中,再从预置缓冲长度的视频缓冲区中读取视频数据进行播放。当开始播放直播视频数据时,在网速较好的情况下,可以预先配置较短的预置缓冲长度,为了实现快速播放视频数据,保证了直播视频的实时性,使用户无需等待较长时间,即可观看到直播视频数据。在视频播放的过程中,实时检测视频缓冲区中剩余的视频数据量是否大于预设数据量,以及检测当前视频数据的下载速度是否大于预设速度,如果视频缓冲区中剩余的视频数据量小于预设数据量,将预置缓冲长度增大为与预设数据量对应的缓冲长度,如果视频缓冲区中剩余的视频数据量大于预设数据量,将预置缓冲长度减小为与预设数据量对应的缓冲长度;或者当前视频数据的下载速度小于预设速度,将预置缓冲长度增大为与预设速度对应的缓冲长度;当前视频数据的下载速度大于预设速度,将预置缓冲长度减小为与预设速度对应的缓冲长度。可以实现在直播视频流畅播放与滞后播放之间的动态调整,在网络较好的情况下,使用较短的缓冲区进行实时播放;在网络较差的情况下,使用较长的缓冲区保证流畅播放,减少了发生直播视频播放卡顿的现象。When live video data needs to be played, the video data to be played is first buffered in a video buffer with a preset buffer length, and then the video data is read from the video buffer with a preset buffer length for playback. When starting to play live video data, in the case of good network speed, a short preset buffer length can be pre-configured. In order to realize fast playback of video data, the real-time performance of live video is guaranteed, so that users do not need to wait for a long time , you can watch the live video data. During video playback, detect in real time whether the amount of video data remaining in the video buffer is greater than the preset amount of data, and detect whether the download speed of the current video data is greater than the preset speed, if the amount of video data remaining in the video buffer is less than Preset data amount, increase the preset buffer length to the buffer length corresponding to the preset data amount, if the remaining video data amount in the video buffer is greater than the preset data amount, reduce the preset buffer length to the preset buffer length The buffer length corresponding to the amount of data; or the download speed of the current video data is lower than the preset speed, increase the preset buffer length to the buffer length corresponding to the preset speed; the download speed of the current video data is greater than the preset speed, the preset The buffer length is reduced to the buffer length corresponding to the preset speed. It can realize dynamic adjustment between smooth playback and delayed playback of live video. When the network is good, a shorter buffer is used for real-time playback; when the network is poor, a longer buffer is used to ensure smoothness. Playing, reducing the phenomenon of live video playback stuttering.

进一步地,在直播视频播放的过程中,当网络水平较好时,会导致视频缓冲区中剩余的视频数据量增加,可以通过检测以当前时间为起点的预置时间段内,视频缓冲区中剩余的视频数据量的增加量是否大于预设增加阈值,若是,则将所述预置缓冲长度减小为与所述预设增加阈值对应的缓冲长度,可以在保证直播视频数据播放流畅的前提下,提高直播视频数据播放的实时性。Furthermore, in the process of live video playback, when the network level is good, the amount of video data remaining in the video buffer will increase, which can be detected by detecting the current time in the preset time period starting from the video buffer. Whether the amount of increase of the remaining video data is greater than the preset increase threshold, if so, the preset buffer length is reduced to the buffer length corresponding to the preset increase threshold, which can ensure smooth playback of live video data In this case, the real-time performance of live video data playback is improved.

本发明实施例提供的另一种视频数据的缓冲方法,首先在播放视频数据的过程中,将待播放视频数据缓存在预置缓冲长度的视频缓冲区中;然后按照预置时间间隔检测当前视频数据的播放状态信息是否符合预设条件;最后根据检测结果,对所述视频缓冲区对应的所述预置缓冲长度进行调整。与目前通过缓冲固定长度的视频数据的方式相比,本发明在播放视频数据的过程中,通过检测当前视频数据的播放状态信息是否符合预设条件,可以对视频缓冲区对应的预置缓冲长度进行实时调整,进而可以实现在直播视频流畅播放与滞后播放之间的动态调整,在网络较好的情况下,使用较短的缓冲区进行实时播放;在网络较差的情况下,使用较长的缓冲区保证流畅播放,减少了发生直播视频播放卡顿的现象,提升了用户的体验。Another video data buffering method provided by the embodiment of the present invention firstly caches the video data to be played in a video buffer with a preset buffer length during the process of playing video data; then detects the current video data according to a preset time interval Whether the playing state information of the data meets the preset condition; finally, according to the detection result, the preset buffer length corresponding to the video buffer is adjusted. Compared with the current method of buffering fixed-length video data, the present invention can check the preset buffer length corresponding to the video buffer by detecting whether the playback status information of the current video data meets the preset conditions during the process of playing video data. Real-time adjustments can be made to achieve dynamic adjustments between smooth playback and delayed playback of live video. When the network is good, a shorter buffer is used for real-time playback; when the network is poor, a longer buffer is used. The buffer zone ensures smooth playback, reduces the phenomenon of live video playback stuttering, and improves the user experience.

进一步地,作为图1所述方法的具体实现,本发明实施例提供了一种视频数据的缓冲装置,如图3所示,所述装置包括:缓存单元31、检测单元32、调整单元33。Further, as a specific implementation of the method shown in FIG. 1 , an embodiment of the present invention provides a buffering device for video data. As shown in FIG. 3 , the device includes: a buffering unit 31 , a detection unit 32 , and an adjustment unit 33 .

所述缓存单元31,可以用于在播放视频数据的过程中,将待播放视频数据缓存在预置缓冲长度的视频缓冲区中。The cache unit 31 can be used to cache the video data to be played in a video buffer with a preset buffer length during the process of playing video data.

所述检测单元32,可以用于按照预置时间间隔检测当前视频数据的播放状态信息是否符合预设条件。The detecting unit 32 may be configured to detect whether the playing state information of the current video data meets a preset condition at a preset time interval.

所述调整单元33,可以用于根据所述检测单元32的检测结果,对所述视频缓冲区对应的所述预置缓冲长度进行调整。The adjustment unit 33 may be configured to adjust the preset buffer length corresponding to the video buffer according to the detection result of the detection unit 32 .

需要说明的是,本发明实施例提供的一种视频数据的缓冲装置所涉及各功能单元的其他相应描述,可以参考图1中的对应描述,在此不再赘述。It should be noted that, for other corresponding descriptions of the functional units involved in the video data buffering device provided by the embodiment of the present invention, reference may be made to the corresponding description in FIG. 1 , which will not be repeated here.

本发明实施例提供的一种视频数据的缓冲装置,首先在播放视频数据的过程中,将待播放视频数据缓存在预置缓冲长度的视频缓冲区中;然后按照预置时间间隔检测当前视频数据的播放状态信息是否符合预设条件;最后根据检测结果,对所述视频缓冲区对应的所述预置缓冲长度进行调整。与目前通过缓冲固定长度的视频数据的方式相比,本发明在播放视频数据的过程中,通过检测当前视频数据的播放状态信息是否符合预设条件,可以对视频缓冲区对应的预置缓冲长度进行实时调整,进而可以实现在直播视频流畅播放与滞后播放之间的动态调整,在网络较好的情况下,使用较短的缓冲区进行实时播放;在网络较差的情况下,使用较长的缓冲区保证流畅播放,减少了发生直播视频播放卡顿的现象,提升了用户的体验。A buffering device for video data provided by an embodiment of the present invention first buffers the video data to be played in a video buffer with a preset buffer length during the process of playing video data; then detects the current video data according to a preset time interval Whether the playback state information of the video buffer meets the preset condition; finally, according to the detection result, the preset buffer length corresponding to the video buffer is adjusted. Compared with the current method of buffering fixed-length video data, the present invention can check the preset buffer length corresponding to the video buffer by detecting whether the playback status information of the current video data meets the preset conditions during the process of playing video data. Real-time adjustments can be made to achieve dynamic adjustments between smooth playback and delayed playback of live video. When the network is good, a shorter buffer is used for real-time playback; when the network is poor, a longer buffer is used. The buffer zone ensures smooth playback, reduces the phenomenon of live video playback stuttering, and improves the user experience.

进一步地,作为图2所述方法的具体实现,本发明实施例提供了另一种视频数据的缓冲装置,如图4所示,所述装置包括:缓存单元41、检测单元42、调整单元43。Further, as a specific implementation of the method shown in FIG. 2 , the embodiment of the present invention provides another buffering device for video data. As shown in FIG. 4 , the device includes: a buffer unit 41 , a detection unit 42 , and an adjustment unit 43 .

所述缓存单元41,可以用于在播放视频数据的过程中,将待播放视频数据缓存在预置缓冲长度的视频缓冲区中。The cache unit 41 can be used to cache the video data to be played in a video buffer with a preset buffer length during the process of playing video data.

所述检测单元42,可以用于按照预置时间间隔检测当前视频数据的播放状态信息是否符合预设条件。The detecting unit 42 may be configured to detect whether the playing state information of the current video data meets a preset condition at a preset time interval.

所述调整单元43,可以用于根据所述检测单元42的检测结果,对所述视频缓冲区对应的所述预置缓冲长度进行调整。The adjustment unit 43 may be configured to adjust the preset buffer length corresponding to the video buffer according to the detection result of the detection unit 42 .

可选地,所述播放状态信息可以为所述视频缓冲区中剩余的视频数据量,所述预设条件可以为所述视频缓冲区中剩余的视频数据量大于预设数据量。Optionally, the playback status information may be the amount of video data remaining in the video buffer, and the preset condition may be that the amount of video data remaining in the video buffer is greater than the preset data amount.

所述调整单元43,具体可以用于若所述视频缓冲区中剩余的视频数据量大于预设数据量,则将所述预置缓冲长度减小为与所述预设数据量对应的缓冲长度。The adjusting unit 43 may specifically be configured to reduce the preset buffer length to a buffer length corresponding to the preset data amount if the amount of video data remaining in the video buffer is greater than a preset amount of data .

所述调整单元43,具体还可以用于若所述视频缓冲区中剩余的视频数据量小于所述预设数据量,则将所述预置缓冲长度增大为与所述预设数据量对应的缓冲长度,其中,不同预设数据量对应不同的缓冲长度。The adjusting unit 43 can also be specifically configured to increase the preset buffer length to correspond to the preset data amount if the remaining video data amount in the video buffer is smaller than the preset data amount The buffer length, wherein, different preset data amounts correspond to different buffer lengths.

可选地,所述播放状态信息可以为当前视频数据下载速度,所述预设条件可以为当前视频数据下载速度大于预设速度。Optionally, the playback status information may be the current video data download speed, and the preset condition may be that the current video data download speed is greater than the preset speed.

所述调整单元43,具体还可以用于若当前视频数据下载速度大于预设速度,则将所述预置缓冲长度减小为与所述预设速度对应的缓冲长度。The adjustment unit 43 can also be specifically configured to reduce the preset buffer length to a buffer length corresponding to the preset speed if the current video data download speed is greater than the preset speed.

所述调整单元43,具体还可以用于若当前视频数据下载速度小于或等于预设速度,则将所述预置缓冲长度增大为与所述预设速度对应的缓冲长度,其中,不同预设速度对应不同的缓冲长度。The adjusting unit 43 can also be specifically configured to increase the preset buffer length to a buffer length corresponding to the preset speed if the current video data download speed is less than or equal to the preset speed, wherein different preset Let the speed correspond to different buffer lengths.

可选地,所述播放状态信息可以为以当前时间为起点的预置时间段内,所述视频缓冲区中剩余的视频数据量的减少量,所述预设条件可以为以当前时间为起点的预置时间段内,所述视频缓冲区中剩余的视频数据量的减少量大于预设减少阈值。Optionally, the playback status information may be the reduction of the amount of video data remaining in the video buffer within a preset time period starting from the current time, and the preset condition may be starting from the current time During the preset period of time, the reduction of the amount of remaining video data in the video buffer is greater than a preset reduction threshold.

所述调整单元43,具体还可以用于若以当前时间为起点的预置时间段内,所述视频缓冲区中剩余的视频数据量的减少量大于预设减少阈值,则将所述预置缓冲长度增大为与所述预设减少阈值对应的缓冲长度。The adjustment unit 43 can also be specifically configured to: if within a preset period of time starting from the current time, the amount of reduction in the amount of video data remaining in the video buffer is greater than a preset reduction threshold, then the preset The buffer length is increased to a buffer length corresponding to the preset reduction threshold.

所述调整单元43,具体还可以用于若以当前时间为起点的预置时间段内,所述视频缓冲区中剩余的视频数据量的减少量小于预设减少阈值,则将所述预置缓冲长度减小为与所述预设减少阈值对应的缓冲长度,其中,不同预设减少阈值对应不同的缓冲长度。The adjustment unit 43 can also be specifically configured to: if within a preset period of time starting from the current time, the amount of reduction in the amount of video data remaining in the video buffer is less than a preset reduction threshold, then the preset The buffer length is reduced to a buffer length corresponding to the preset reduction threshold, where different preset reduction thresholds correspond to different buffer lengths.

可选地,所述播放状态信息可以为以当前时间为起点的预置时间段内,所述视频缓冲区中剩余的视频数据量的增加量,所述预设条件可以为以当前时间为起点的预置时间段内,所述视频缓冲区中剩余的视频数据量的增加量大于预设增加阈值。Optionally, the playback state information may be the amount of video data remaining in the video buffer within a preset period of time starting from the current time, and the preset condition may be that the current time is the starting point During the preset period of time, the amount of remaining video data in the video buffer increases by more than a preset increase threshold.

所述调整单元43,具体还用于若以当前时间为起点的预置时间段内,所述视频缓冲区中剩余的视频数据量的增加量大于预设增加阈值,则将所述预置缓冲长度减小为与所述预设增加阈值对应的缓冲长度。The adjustment unit 43 is specifically further configured to: if within a preset period of time starting from the current time, the increase in the amount of video data remaining in the video buffer is greater than a preset increase threshold, the preset buffer The length is reduced to a buffer length corresponding to the preset increase threshold.

所述调整单元43,具体还用于若以当前时间为起点的预置时间段内,所述视频缓冲区中剩余的视频数据量的增加量小于预设增加阈值,则将所述预置缓冲长度增大为与所述预设增加阈值对应的缓冲长度,其中,不同预设增加阈值对应不同的缓冲长度。The adjustment unit 43 is specifically further configured to: if within a preset period of time starting from the current time, the increase in the amount of video data remaining in the video buffer is less than a preset increase threshold, the preset buffer The length is increased to a buffer length corresponding to the preset increase threshold, wherein different preset increase thresholds correspond to different buffer lengths.

进一步地,所述装置还包括:获取单元44。Further, the device further includes: an acquiring unit 44 .

所述获取单元44,可以用于获取与当前视频数据的播放模式信息对应的预设速度,不同播放模式对应不同的预设速度。The obtaining unit 44 may be used to obtain a preset speed corresponding to the play mode information of the current video data, and different play modes correspond to different preset speeds.

所述检测单元42,具体可以用于按照预置时间间隔检测当前视频数据下载速度是否大于与所述播放模式信息对应的预设速度。The detection unit 42 may specifically be configured to detect whether the current video data download speed is greater than the preset speed corresponding to the playing mode information at a preset time interval.

进一步地,所述装置还包括:输出单元45。Further, the device further includes: an output unit 45 .

所述输出单元45,可以用于若所述检测单元42检测出当前视频数据下载速度小于或等于与所述播放模式信息对应的预设速度,则输出提示信息,所述提示信息用于确认是否切换当前视频数据的播放模式。The output unit 45 can be used to output prompt information if the detection unit 42 detects that the download speed of the current video data is less than or equal to the preset speed corresponding to the play mode information, and the prompt information is used to confirm whether Switch the playback mode of the current video data.

进一步地,所述装置还包括:配置单元46。Further, the device further includes: a configuration unit 46 .

所述检测单元42,还可以用于检测当前待播放的视频数据是否为视频起始数据。The detection unit 42 can also be used to detect whether the video data currently to be played is video start data.

所述配置单元46,可以用于若所述检测单元42检测出当前待播放的视频数据是视频起始数据,则将所述预置缓冲长度配置为小于预设阈值的长度。The configuration unit 46 may be configured to configure the preset buffer length to be less than a preset threshold if the detection unit 42 detects that the video data to be played currently is video start data.

需要说明的是,本发明实施例提供的另一种视频数据的缓冲装置所涉及各功能单元的其他相应描述,可以参考图2中的对应描述,在此不再赘述。It should be noted that, for other corresponding descriptions of the functional units involved in another video data buffering device provided by the embodiment of the present invention, reference may be made to the corresponding description in FIG. 2 , which will not be repeated here.

本发明实施例提供的另一种视频数据的缓冲装置,首先在播放视频数据的过程中,将待播放视频数据缓存在预置缓冲长度的视频缓冲区中;然后按照预置时间间隔检测当前视频数据的播放状态信息是否符合预设条件;最后根据检测结果,对所述视频缓冲区对应的所述预置缓冲长度进行调整。与目前通过缓冲固定长度的视频数据的方式相比,本发明在播放视频数据的过程中,通过检测当前视频数据的播放状态信息是否符合预设条件,可以对视频缓冲区对应的预置缓冲长度进行实时调整,进而可以实现在直播视频流畅播放与滞后播放之间的动态调整,在网络较好的情况下,使用较短的缓冲区进行实时播放;在网络较差的情况下,使用较长的缓冲区保证流畅播放,减少了发生直播视频播放卡顿的现象,提升了用户的体验。Another video data buffering device provided in the embodiment of the present invention first buffers the video data to be played in a video buffer with a preset buffer length in the process of playing video data; then detects the current video according to a preset time interval Whether the playing state information of the data meets the preset condition; finally, according to the detection result, the preset buffer length corresponding to the video buffer is adjusted. Compared with the current method of buffering fixed-length video data, the present invention can check the preset buffer length corresponding to the video buffer by detecting whether the playback status information of the current video data meets the preset conditions during the process of playing video data. Real-time adjustments can be made to achieve dynamic adjustments between smooth playback and delayed playback of live video. When the network is good, a shorter buffer is used for real-time playback; when the network is poor, a longer buffer is used. The buffer zone ensures smooth playback, reduces the phenomenon of live video playback stuttering, and improves the user experience.

在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the foregoing embodiments, the descriptions of each embodiment have their own emphases, and for parts not described in detail in a certain embodiment, reference may be made to relevant descriptions of other embodiments.

可以理解的是,上述方法及装置中的相关特征可以相互参考。另外,上述实施例中的“第一”、“第二”等是用于区分各实施例,而并不代表各实施例的优劣。It can be understood that related features in the above methods and devices can refer to each other. In addition, "first", "second" and so on in the above embodiments are used to distinguish each embodiment, and do not represent the advantages and disadvantages of each embodiment.

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.

在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。The algorithms and displays presented herein are not inherently related to any particular computer, virtual system, or other device. Various generic systems can also be used with the teachings based on this. The structure required to construct such a system is apparent from the above description. Furthermore, the present invention is not specific to any particular programming language. It should be understood that various programming languages can be used to implement the content of the present invention described herein, and the above description of specific languages is for disclosing the best mode of the present invention.

在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure the understanding of this description.

类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, in order to streamline this disclosure and to facilitate an understanding of one or more of the various inventive aspects, various features of the invention are sometimes grouped together in a single embodiment, figure, or its description. This method of disclosure, however, is not to be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.

本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art can understand that the modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment. Modules or units or components in the embodiments may be combined into one module or unit or component, and furthermore may be divided into a plurality of sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings) and any method or method so disclosed may be used in any combination, except that at least some of such features and/or processes or units are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.

此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, those skilled in the art will understand that although some embodiments described herein include some features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the invention. and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.

本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的视频数据的缓冲方法及装置中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or a digital signal processor (DSP) can be used in practice to realize some or all functions of some or all parts in the video data buffering method and device according to the embodiment of the present invention . The present invention can also be implemented as an apparatus or an apparatus program (for example, a computer program and a computer program product) for performing a part or all of the methods described herein. Such a program for realizing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet site, or provided on a carrier signal, or provided in any other form.

应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means can be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. does not indicate any order. These words can be interpreted as names.

A1、一种视频数据的缓冲方法,包括:A1, a buffering method for video data, comprising:

在播放视频数据的过程中,将待播放视频数据缓存在预置缓冲长度的视频缓冲区中;In the process of playing video data, cache the video data to be played in a video buffer with a preset buffer length;

按照预置时间间隔检测当前视频数据的播放状态信息是否符合预设条件;Detecting whether the playback state information of the current video data meets the preset condition according to the preset time interval;

根据检测结果,对所述视频缓冲区对应的所述预置缓冲长度进行调整。According to the detection result, the preset buffer length corresponding to the video buffer is adjusted.

A2、如A1所述的视频数据的缓冲方法,所述播放状态信息为所述视频缓冲区中剩余的视频数据量,所述预设条件为所述视频缓冲区中剩余的视频数据量大于预设数据量,所述根据检测结果,对所述视频缓冲区对应的所述预置缓冲长度进行调整的步骤进一步包括:A2, the buffering method of video data as described in A1, described playback state information is the amount of video data remaining in the described video buffer, and described preset condition is that the amount of video remaining in the described video buffer is greater than preset Assuming the amount of data, the step of adjusting the preset buffer length corresponding to the video buffer according to the detection result further includes:

若所述视频缓冲区中剩余的视频数据量大于预设数据量,则将所述预置缓冲长度减小为与所述预设数据量对应的缓冲长度;If the amount of video data remaining in the video buffer is greater than a preset amount of data, reducing the preset buffer length to a buffer length corresponding to the preset data amount;

若所述视频缓冲区中剩余的视频数据量小于所述预设数据量,则将所述预置缓冲长度增大为与所述预设数据量对应的缓冲长度,其中,不同预设数据量对应不同的缓冲长度。If the amount of video data remaining in the video buffer is less than the preset amount of data, then increase the preset buffer length to a buffer length corresponding to the preset data amount, wherein different preset data amounts Corresponding to different buffer lengths.

A3、如A1所述的视频数据的缓冲方法,所述播放状态信息为当前视频数据下载速度,所述预设条件为当前视频数据下载速度大于预设速度,所述根据检测结果,对所述视频缓冲区对应的所述预置缓冲长度进行调整的步骤进一步包括:A3, the buffering method of video data as described in A1, described playback state information is current video data download speed, and described preset condition is that current video data download speed is greater than preset speed, described according to detection result, to described The step of adjusting the preset buffer length corresponding to the video buffer further includes:

若当前视频数据下载速度大于预设速度,则将所述预置缓冲长度减小为与所述预设速度对应的缓冲长度;If the current video data download speed is greater than the preset speed, then reduce the preset buffer length to a buffer length corresponding to the preset speed;

若当前视频数据下载速度小于预设速度,则将所述预置缓冲长度增大为与所述预设速度对应的缓冲长度,其中,不同预设速度对应不同的缓冲长度。If the current video data download speed is lower than the preset speed, the preset buffer length is increased to a buffer length corresponding to the preset speed, wherein different preset speeds correspond to different buffer lengths.

A4、如A1所述的视频数据的缓冲方法,所述播放状态信息为以当前时间为起点的预置时间段内,所述视频缓冲区中剩余的视频数据量的减少量,所述预设条件为以当前时间为起点的预置时间段内,所述视频缓冲区中剩余的视频数据量的减少量大于预设减少阈值,所述根据检测结果,对所述视频缓冲区对应的所述预置缓冲长度进行调整的步骤进一步包括:A4, the method for buffering video data as described in A1, the playback state information is the amount of reduction of the amount of video data remaining in the video buffer in the preset time period starting from the current time, and the preset The condition is that within a preset period of time starting from the current time, the reduction of the amount of video data remaining in the video buffer is greater than a preset reduction threshold, and according to the detection result, the The step of adjusting the preset buffer length further includes:

若以当前时间为起点的预置时间段内,所述视频缓冲区中剩余的视频数据量的减少量大于预设减少阈值,则将所述预置缓冲长度增大为与所述预设减少阈值对应的缓冲长度;If within the preset period of time starting from the current time, the amount of reduction in the remaining video data in the video buffer is greater than the preset reduction threshold, then increase the preset buffer length to be equal to the preset reduction The buffer length corresponding to the threshold;

若以当前时间为起点的预置时间段内,所述视频缓冲区中剩余的视频数据量的减少量小于预设减少阈值,则将所述预置缓冲长度减小为与所述预设减少阈值对应的缓冲长度,其中,不同预设减少阈值对应不同的缓冲长度。If within the preset period of time starting from the current time, the amount of video data remaining in the video buffer decreases by less than the preset reduction threshold, then the preset buffer length is reduced to the value equal to the preset reduction The buffer length corresponding to the threshold, where different preset reduction thresholds correspond to different buffer lengths.

A5、如A1所述的视频数据的缓冲方法,所述播放状态信息为以当前时间为起点的预置时间段内,所述视频缓冲区中剩余的视频数据量的增加量,所述预设条件为以当前时间为起点的预置时间段内,所述视频缓冲区中剩余的视频数据量的增加量大于预设增加阈值,所述根据检测结果,对所述视频缓冲区对应的所述预置缓冲长度进行调整的步骤进一步包括:A5, the method for buffering video data as described in A1, the playback status information is the amount of increase in the amount of video data remaining in the video buffer in the preset time period starting from the current time, and the preset The condition is that within a preset period of time starting from the current time, the increase in the amount of video data remaining in the video buffer is greater than a preset increase threshold, and according to the detection result, the video corresponding to the video buffer The step of adjusting the preset buffer length further includes:

若以当前时间为起点的预置时间段内,所述视频缓冲区中剩余的视频数据量的增加量大于预设增加阈值,则将所述预置缓冲长度减小为与所述预设增加阈值对应的缓冲长度;If within the preset time period with the current time as the starting point, the amount of video data remaining in the video buffer increases by more than the preset increase threshold, then the preset buffer length is reduced to be equal to the preset increase The buffer length corresponding to the threshold;

若以当前时间为起点的预置时间段内,所述视频缓冲区中剩余的视频数据量的增加量小于预设增加阈值,则将所述预置缓冲长度增大为与所述预设增加阈值对应的缓冲长度,其中,不同预设增加阈值对应不同的缓冲长度。If within the preset time period with the current time as the starting point, the amount of video data remaining in the video buffer increases by less than the preset increase threshold, then the preset buffer length is increased to be equal to the preset increase The buffer length corresponding to the threshold, where different preset increase thresholds correspond to different buffer lengths.

A6、如A3所述的视频数据的缓冲方法,所述方法还包括:A6, the buffering method of video data as described in A3, described method also comprises:

获取与当前视频数据的播放模式信息对应的预设速度,其中不同播放模式对应不同的预设速度;Obtain a preset speed corresponding to the playback mode information of the current video data, wherein different playback modes correspond to different preset speeds;

所述按照预置时间间隔检测当前视频数据的播放状态信息是否符合预设条件包括:Said detecting whether the playback state information of the current video data meets the preset conditions according to the preset time interval includes:

按照预置时间间隔检测当前视频数据下载速度是否大于与所述播放模式信息对应的预设速度。Detecting whether the download speed of the current video data is greater than the preset speed corresponding to the playing mode information according to a preset time interval.

A7、如A6所述的视频数据的缓冲方法,所述方法还包括:A7, the buffering method of video data as described in A6, described method also comprises:

若当前视频数据下载速度小于或等于与所述播放模式信息对应的预设速度,则输出提示信息,所述提示信息用于确认是否切换当前视频数据的播放模式。If the download speed of the current video data is less than or equal to the preset speed corresponding to the play mode information, then output prompt information, the prompt information is used to confirm whether to switch the play mode of the current video data.

A8、如A1所述的视频数据的缓冲方法,所述方法还包括:A8, the buffering method of video data as described in A1, described method also comprises:

检测当前待播放的视频数据是否为视频起始数据;Detect whether the video data currently to be played is the video start data;

若是,则将所述预置缓冲长度配置为小于预设阈值的长度。If yes, configure the preset buffer length to be less than the preset threshold.

B9、一种视频数据的缓冲装置,包括:B9, a buffer device for video data, comprising:

缓存单元,用于在播放视频数据的过程中,将待播放视频数据缓存在预置缓冲长度的视频缓冲区中;The cache unit is used to cache the video data to be played in a video buffer with a preset buffer length during the process of playing video data;

检测单元,用于按照预置时间间隔检测当前视频数据的播放状态信息是否符合预设条件;The detection unit is used to detect whether the playback state information of the current video data meets the preset condition according to the preset time interval;

调整单元,用于根据所述检测单元的检测结果,对所述视频缓冲区对应的所述预置缓冲长度进行调整。An adjustment unit, configured to adjust the preset buffer length corresponding to the video buffer according to the detection result of the detection unit.

B10、如B9所述的视频数据的缓冲装置,所述播放状态信息为所述视频缓冲区中剩余的视频数据量,所述预设条件为所述视频缓冲区中剩余的视频数据量大于预设数据量,B10, the buffering device of video data as described in B9, described playback state information is the amount of video data remaining in the described video buffer, and described preset condition is that the amount of video remaining in the described video buffer is greater than preset Set the amount of data,

所述调整单元,具体用于若所述视频缓冲区中剩余的视频数据量大于预设数据量,则将所述预置缓冲长度减小为与所述预设数据量对应的缓冲长度;The adjustment unit is specifically configured to reduce the preset buffer length to a buffer length corresponding to the preset data amount if the remaining video data amount in the video buffer is greater than a preset data amount;

所述调整单元,具体还用于若所述视频缓冲区中剩余的视频数据量小于所述预设数据量,则将所述预置缓冲长度增大为与所述预设数据量对应的缓冲长度,其中,不同预设数据量对应不同的缓冲长度。The adjusting unit is further configured to increase the preset buffer length to a buffer corresponding to the preset data amount if the remaining video data amount in the video buffer is smaller than the preset data amount. length, where different preset data amounts correspond to different buffer lengths.

B11、如B9所述的视频数据的缓冲装置,所述播放状态信息为当前视频数据下载速度,所述预设条件为当前视频数据下载速度大于预设速度,B11, the buffering device of video data as described in B9, described playback state information is current video data download speed, and described preset condition is that current video data download speed is greater than preset speed,

所述调整单元,具体还用于若当前视频数据下载速度大于预设速度,则将所述预置缓冲长度减小为与所述预设速度对应的缓冲长度;The adjustment unit is specifically further configured to reduce the preset buffer length to a buffer length corresponding to the preset speed if the current video data download speed is greater than a preset speed;

所述调整单元,具体还用于若当前视频数据下载速度小于预设速度,则将所述预置缓冲长度增大为与所述预设速度对应的缓冲长度,其中,不同预设速度对应不同的缓冲长度。The adjustment unit is specifically further configured to increase the preset buffer length to a buffer length corresponding to the preset speed if the current video data download speed is lower than the preset speed, wherein different preset speeds correspond to different buffer length.

B12、如B9所述的视频数据的缓冲装置,所述播放状态信息为以当前时间为起点的预置时间段内,所述视频缓冲区中剩余的视频数据量的减少量,所述预设条件为以当前时间为起点的预置时间段内,所述视频缓冲区中剩余的视频数据量的减少量大于预设减少阈值,B12, the buffering device of video data as described in B9, described playing state information is in the preset time period that is starting point with current time, the amount of reduction of remaining video data amount in described video buffer, described preset The condition is that within a preset time period starting from the current time, the amount of video data remaining in the video buffer decreases by more than a preset reduction threshold,

所述调整单元,具体还用于若以当前时间为起点的预置时间段内,所述视频缓冲区中剩余的视频数据量的减少量大于预设减少阈值,则将所述预置缓冲长度增大为与所述预设减少阈值对应的缓冲长度;The adjustment unit is specifically further configured to: if within a preset period of time starting from the current time, the reduction of the amount of video data remaining in the video buffer is greater than a preset reduction threshold, the preset buffer length increasing to a buffer length corresponding to the preset reduction threshold;

所述调整单元,具体还用于若以当前时间为起点的预置时间段内,所述视频缓冲区中剩余的视频数据量的减少量小于预设减少阈值,则将所述预置缓冲长度减小为与所述预设减少阈值对应的缓冲长度,其中,不同预设减少阈值对应不同的缓冲长度。The adjustment unit is specifically further configured to: if within a preset time period starting from the current time, the amount of video data remaining in the video buffer decreases by less than a preset reduction threshold, the preset buffer length It is reduced to a buffer length corresponding to the preset reduction threshold, where different preset reduction thresholds correspond to different buffer lengths.

B13、如B9所述的视频数据的缓冲装置,所述播放状态信息为以当前时间为起点的预置时间段内,所述视频缓冲区中剩余的视频数据量的增加量,所述预设条件为以当前时间为起点的预置时间段内,所述视频缓冲区中剩余的视频数据量的增加量大于预设增加阈值,B13, the buffering device of video data as described in B9, described playback state information is in the preset time period that is starting point with current time, the increment of the remaining video data amount in described video buffer, described preset The condition is that within a preset time period starting from the current time, the amount of video data remaining in the video buffer increases by more than a preset increase threshold,

所述调整单元,具体还用于若以当前时间为起点的预置时间段内,所述视频缓冲区中剩余的视频数据量的增加量大于预设增加阈值,则将所述预置缓冲长度减小为与所述预设增加阈值对应的缓冲长度;The adjustment unit is specifically further configured to: if within a preset period of time starting from the current time, the amount of video data remaining in the video buffer increases by more than a preset increase threshold, the preset buffer length reducing to a buffer length corresponding to the preset increase threshold;

所述调整单元,具体还用于若以当前时间为起点的预置时间段内,所述视频缓冲区中剩余的视频数据量的增加量小于预设增加阈值,则将所述预置缓冲长度增大为与所述预设增加阈值对应的缓冲长度,其中,不同预设增加阈值对应不同的缓冲长度。The adjusting unit is specifically further configured to: if within a preset period of time starting from the current time, the increase in the amount of video data remaining in the video buffer is less than a preset increase threshold, the preset buffer length increase to a buffer length corresponding to the preset increase threshold, where different preset increase thresholds correspond to different buffer lengths.

B14、如B11所述的视频数据的缓冲装置,所述装置还包括:获取单元;B14, the buffering device of video data as described in B11, described device also comprises: acquisition unit;

所述获取单元,用于获取与当前视频数据的播放模式信息对应的预设速度,不同播放模式对应不同的预设速度;The acquiring unit is configured to acquire a preset speed corresponding to the playback mode information of the current video data, and different playback modes correspond to different preset speeds;

所述检测单元,具体用于按照预置时间间隔检测当前视频数据下载速度是否大于与所述播放模式信息对应的预设速度。The detection unit is specifically configured to detect whether the current download speed of video data is greater than a preset speed corresponding to the playing mode information according to a preset time interval.

B15、如B14所述的视频数据的缓冲装置,所述装置还包括:B15, the buffering device of video data as described in B14, described device also comprises:

输出单元,用于若所述检测单元检测出当前视频数据下载速度小于或等于与所述播放模式信息对应的预设速度,则输出提示信息,所述提示信息用于确认是否切换当前视频数据的播放模式。An output unit, configured to output prompt information if the detection unit detects that the download speed of the current video data is less than or equal to the preset speed corresponding to the play mode information, and the prompt information is used to confirm whether to switch the current video data play mode.

B16、如B9所述的视频数据的缓冲装置,所述装置还包括:配置单元;B16, the buffering device of video data as described in B9, described device also comprises: configuration unit;

所述检测单元,还用于检测当前待播放的视频数据是否为视频起始数据;The detection unit is also used to detect whether the video data currently to be played is video start data;

所述配置单元,用于若所述检测单元检测出当前待播放的视频数据是视频起始数据,则将所述预置缓冲长度配置为小于预设阈值的长度。The configuration unit is configured to configure the preset buffer length to be a length smaller than a preset threshold if the detection unit detects that the video data to be played currently is video start data.

Claims (10)

CN201510744649.9A2015-11-042015-11-04 Video data buffering method and devicePendingCN105430475A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201510744649.9ACN105430475A (en)2015-11-042015-11-04 Video data buffering method and device

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201510744649.9ACN105430475A (en)2015-11-042015-11-04 Video data buffering method and device

Publications (1)

Publication NumberPublication Date
CN105430475Atrue CN105430475A (en)2016-03-23

Family

ID=55508358

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201510744649.9APendingCN105430475A (en)2015-11-042015-11-04 Video data buffering method and device

Country Status (1)

CountryLink
CN (1)CN105430475A (en)

Cited By (23)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN105898536A (en)*2016-04-292016-08-24乐视控股(北京)有限公司Video play method and device
CN106331789A (en)*2016-09-132017-01-11聚好看科技股份有限公司Carousel program playing control method and carousel program playing control device
CN106331766A (en)*2016-08-312017-01-11网宿科技股份有限公司 Video file playing method and device
CN106454433A (en)*2016-10-202017-02-22央视国际网络无锡有限公司Live broadcast signal delay processing method and apparatus
CN107222776A (en)*2017-05-192017-09-29腾讯科技(深圳)有限公司Video playing control method, browser, storage device and terminal
CN107396171A (en)*2017-07-242017-11-24广州酷狗计算机科技有限公司Live network broadcast method, device and storage medium
CN107529097A (en)*2016-06-202017-12-29北京信威通信技术股份有限公司A kind of method and device of adaptive regulating video buffer size
CN107959659A (en)*2016-10-172018-04-24杭州海康威视数字技术股份有限公司A kind of flow medium play control method, device and electronic equipment
CN108271031A (en)*2016-12-302018-07-10北京酷我科技有限公司The playback method and device of a kind of live video
CN108810656A (en)*2018-06-122018-11-13深圳国微视安科技有限公司A kind of the debounce processing method and processing system of real-time live broadcast TS streams
WO2018210130A1 (en)*2017-05-162018-11-22腾讯科技(深圳)有限公司Data buffering method, network device, and storage medium
CN109275129A (en)*2018-08-142019-01-25Oppo广东移动通信有限公司Communication processing method, communication processing device, electronic equipment and storage medium
CN109525887A (en)*2018-12-272019-03-26长沙理工大学A kind of self-regulation playback method, system and the device of Online Video
CN109600676A (en)*2018-12-172019-04-09北京金山云网络技术有限公司A kind of data buffering method and device
CN109963184A (en)*2017-12-142019-07-02阿里巴巴集团控股有限公司A kind of method, apparatus and electronic equipment of audio-video network broadcasting
CN110401869A (en)*2019-07-262019-11-01歌尔股份有限公司A kind of net cast method, system and electronic equipment and storage medium
CN111104350A (en)*2019-12-192020-05-05珠海亿智电子科技有限公司Online low-delay regulation and control method, terminal equipment and storage medium
CN112333476A (en)*2021-01-052021-02-05智者四海(北京)技术有限公司Video loading method and device
CN112469012A (en)*2019-09-062021-03-09华为技术有限公司Bluetooth communication method and related device
CN112751884A (en)*2019-10-292021-05-04华为终端有限公司Method and electronic equipment for processing media service
WO2021088514A1 (en)*2019-11-062021-05-14北京达佳互联信息技术有限公司Method for pre-loading content data, and electronic device and storage medium
CN113645477A (en)*2021-08-092021-11-12杭州米络星科技(集团)有限公司Live broadcast data processing method and device, live broadcast client equipment and storage medium
CN114979768A (en)*2022-05-232022-08-30北京字节跳动网络技术有限公司Video caching method, device, equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101583025A (en)*2009-06-112009-11-18中兴通讯股份有限公司Streaming media playing method and device
US20100040347A1 (en)*2003-02-102010-02-18Kent Larry G JrVideo Stream Adaptive Frame Rate Scheme
CN103051955A (en)*2012-12-212013-04-17华为技术有限公司Method and device for playing streaming media
CN103379379A (en)*2012-04-132013-10-30腾讯科技(深圳)有限公司Streaming media buffer play method and apparatus
CN103747286A (en)*2014-01-032014-04-23上海聚力传媒技术有限公司Method and equipment for providing videos
CN103841456A (en)*2013-12-102014-06-04珠海全志科技股份有限公司Webcast data buffering method
CN103916716A (en)*2013-01-082014-07-09北京信威通信技术股份有限公司Code rate smoothing method of video live transmission through wireless network
CN104125482A (en)*2013-04-232014-10-29深圳中兴网信科技有限公司Streaming media playing method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20100040347A1 (en)*2003-02-102010-02-18Kent Larry G JrVideo Stream Adaptive Frame Rate Scheme
CN101583025A (en)*2009-06-112009-11-18中兴通讯股份有限公司Streaming media playing method and device
CN103379379A (en)*2012-04-132013-10-30腾讯科技(深圳)有限公司Streaming media buffer play method and apparatus
CN103051955A (en)*2012-12-212013-04-17华为技术有限公司Method and device for playing streaming media
CN103916716A (en)*2013-01-082014-07-09北京信威通信技术股份有限公司Code rate smoothing method of video live transmission through wireless network
CN104125482A (en)*2013-04-232014-10-29深圳中兴网信科技有限公司Streaming media playing method and device
CN103841456A (en)*2013-12-102014-06-04珠海全志科技股份有限公司Webcast data buffering method
CN103747286A (en)*2014-01-032014-04-23上海聚力传媒技术有限公司Method and equipment for providing videos

Cited By (37)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN105898536A (en)*2016-04-292016-08-24乐视控股(北京)有限公司Video play method and device
CN107529097A (en)*2016-06-202017-12-29北京信威通信技术股份有限公司A kind of method and device of adaptive regulating video buffer size
CN106331766A (en)*2016-08-312017-01-11网宿科技股份有限公司 Video file playing method and device
CN106331766B (en)*2016-08-312019-08-13网宿科技股份有限公司The playing method and device of video file
CN106331789A (en)*2016-09-132017-01-11聚好看科技股份有限公司Carousel program playing control method and carousel program playing control device
CN106331789B (en)*2016-09-132019-07-02聚好看科技股份有限公司Carousel program control method for playing back and equipment
CN107959659B (en)*2016-10-172021-01-29杭州海康威视数字技术股份有限公司Streaming media playing control method and device and electronic equipment
CN107959659A (en)*2016-10-172018-04-24杭州海康威视数字技术股份有限公司A kind of flow medium play control method, device and electronic equipment
CN106454433A (en)*2016-10-202017-02-22央视国际网络无锡有限公司Live broadcast signal delay processing method and apparatus
CN108271031A (en)*2016-12-302018-07-10北京酷我科技有限公司The playback method and device of a kind of live video
US11146606B2 (en)2017-05-162021-10-12Tencent Technology (Shenzhen) Company LimitedData buffering method, network device, and storage medium
CN108881931A (en)*2017-05-162018-11-23腾讯科技(深圳)有限公司A kind of data buffering method and the network equipment
WO2018210130A1 (en)*2017-05-162018-11-22腾讯科技(深圳)有限公司Data buffering method, network device, and storage medium
CN107222776B (en)*2017-05-192019-03-01腾讯科技(深圳)有限公司Video playing control method, browser, storage equipment and terminal
CN107222776A (en)*2017-05-192017-09-29腾讯科技(深圳)有限公司Video playing control method, browser, storage device and terminal
CN107396171A (en)*2017-07-242017-11-24广州酷狗计算机科技有限公司Live network broadcast method, device and storage medium
CN109963184A (en)*2017-12-142019-07-02阿里巴巴集团控股有限公司A kind of method, apparatus and electronic equipment of audio-video network broadcasting
CN108810656A (en)*2018-06-122018-11-13深圳国微视安科技有限公司A kind of the debounce processing method and processing system of real-time live broadcast TS streams
CN108810656B (en)*2018-06-122021-10-26深圳国微视安科技有限公司Real-time live broadcast TS (transport stream) jitter removal processing method and processing system
CN109275129A (en)*2018-08-142019-01-25Oppo广东移动通信有限公司Communication processing method, communication processing device, electronic equipment and storage medium
CN109600676A (en)*2018-12-172019-04-09北京金山云网络技术有限公司A kind of data buffering method and device
CN109525887A (en)*2018-12-272019-03-26长沙理工大学A kind of self-regulation playback method, system and the device of Online Video
CN109525887B (en)*2018-12-272021-06-18长沙理工大学 A method, system and device for self-adjusting playback of online video
CN110401869A (en)*2019-07-262019-11-01歌尔股份有限公司A kind of net cast method, system and electronic equipment and storage medium
US12041110B2 (en)2019-09-062024-07-16Huawei Technologies Co., Ltd.Bluetooth communication method and related apparatus
CN112469012A (en)*2019-09-062021-03-09华为技术有限公司Bluetooth communication method and related device
CN112751884A (en)*2019-10-292021-05-04华为终端有限公司Method and electronic equipment for processing media service
WO2021082602A1 (en)*2019-10-292021-05-06华为技术有限公司Method for processing media service and electronic device
CN112751884B (en)*2019-10-292022-05-10华为终端有限公司 Method and electronic device for processing media services
US11876849B2 (en)2019-10-292024-01-16Huawei Technologies Co., Ltd.Media service processing method and electronic device
WO2021088514A1 (en)*2019-11-062021-05-14北京达佳互联信息技术有限公司Method for pre-loading content data, and electronic device and storage medium
CN111104350A (en)*2019-12-192020-05-05珠海亿智电子科技有限公司Online low-delay regulation and control method, terminal equipment and storage medium
CN112333476A (en)*2021-01-052021-02-05智者四海(北京)技术有限公司Video loading method and device
CN112333476B (en)*2021-01-052021-05-07智者四海(北京)技术有限公司Video loading method and device
CN113645477A (en)*2021-08-092021-11-12杭州米络星科技(集团)有限公司Live broadcast data processing method and device, live broadcast client equipment and storage medium
CN114979768A (en)*2022-05-232022-08-30北京字节跳动网络技术有限公司Video caching method, device, equipment and storage medium
CN114979768B (en)*2022-05-232024-08-27北京字节跳动网络技术有限公司Video caching method, device, equipment and storage medium

Similar Documents

PublicationPublication DateTitle
CN105430475A (en) Video data buffering method and device
CN103051955B (en)Flow media playing method and device
CN105100876B (en)A kind of playback method and device of Streaming Media
CN109257631B (en)Video carousel playing method and device, computer equipment and storage medium
US9503491B2 (en)Playback stall avoidance in adaptive media streaming
CN107211163B (en) Systems and methods for live streaming content
CN103152651A (en)Method and system of automatically adjusting play threshold of streaming media buffering area
CN112702649B (en) A method for optimizing the smoothness of live video playback on a mobile terminal, a storage medium, and an electronic device
US9621949B2 (en)Method and apparatus for reducing latency in multi-media system
US20140250236A1 (en)Method and system for selecting a delivery method for media on demand
CN105263037B (en)A kind of adaptive fluidizing method based on client-cache
CN109600676A (en)A kind of data buffering method and device
CN104125482A (en)Streaming media playing method and device
CN106331766B (en)The playing method and device of video file
CN106464960A (en)Method for reducing pre-fetching of multimedia streaming data with minimal impact on playback user experience
CN106921870A (en)A kind of video broadcasting method and device
US20240057234A1 (en)Adjusting light effects based on adjustments made by users of other systems
CN107333147B (en)Video buffer control method, terminal and storage device
WO2023035884A1 (en)Dynamic picture-quality video playing method and apparatus, and electronic device and storage medium
CN105898625B (en)Playing processing method and terminal equipment
US20180020031A1 (en)Method for adaptively streaming an audio/visual material
CN104581340B (en)Client, stream medium data method of reseptance and stream medium data transmission system
CN108882013A (en)Adjust method, apparatus, electronic equipment and the storage medium of audio and video playing rate
US20140255000A1 (en)Video playback system and method based on highlight information
CN106851337B (en)Video buffering control method and device

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication

Application publication date:20160323

RJ01Rejection of invention patent application after publication

[8]ページ先頭

©2009-2025 Movatter.jp