Movatterモバイル変換


[0]ホーム

URL:


CN110022482A - Video playing starting method, video service system and storage medium - Google Patents

Video playing starting method, video service system and storage medium
Download PDF

Info

Publication number
CN110022482A
CN110022482ACN201910163081.XACN201910163081ACN110022482ACN 110022482 ACN110022482 ACN 110022482ACN 201910163081 ACN201910163081 ACN 201910163081ACN 110022482 ACN110022482 ACN 110022482A
Authority
CN
China
Prior art keywords
video
cdn
playback
duration
file
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.)
Granted
Application number
CN201910163081.XA
Other languages
Chinese (zh)
Other versions
CN110022482B (en
Inventor
程辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
MIGU Video Technology Co Ltd
MIGU Culture Technology Co Ltd
Original Assignee
MIGU Video Technology Co Ltd
MIGU Culture Technology 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 MIGU Video Technology Co Ltd, MIGU Culture Technology Co LtdfiledCriticalMIGU Video Technology Co Ltd
Priority to CN201910163081.XApriorityCriticalpatent/CN110022482B/en
Publication of CN110022482ApublicationCriticalpatent/CN110022482A/en
Application grantedgrantedCritical
Publication of CN110022482BpublicationCriticalpatent/CN110022482B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The embodiment of the invention relates to the technical field of video service, and discloses a video playing starting method, a video service system and a storage medium. The method comprises the following steps: intercepting a first video from a video file; and the first video is sent to the CDN cluster so that the client caches a second video while loading and playing the first video from the CDN cluster, the playing start time length of the first video is shorter than that of the second video, and the second video is used for connecting the first video to realize the playing of the video file. The method and the device can shorten the playing time, enable the playing speed to be higher and improve the user experience.

Description

Translated fromChinese
视频起播方法、视频服务系统及存储介质Video broadcasting method, video service system and storage medium

技术领域technical field

本发明涉及视频服务技术领域,特别涉及一种视频起播方法、视频服务系统及存储介质。The present invention relates to the technical field of video services, and in particular, to a video broadcasting method, a video service system and a storage medium.

背景技术Background technique

视频的点播被应用于当前生活的方方面面。HLS(HTTP Live Streaming,)是目前广泛使用的一种点播流。HLS流的播放流程如下:1、客户端向后台门户服务器获取具体点播节目的HLS流的m3u8索引文件的全局调度(Global Server Load Balance,GSLB)地址,该地址一般经过防盗链加密处理。2、全局调度服务器将用户请求重定向至具体提供服务的CDN(Content Delivery Network,内容分发网络)节点。3、CDN节点校验m3u8请求的防盗链消息,如果该消息无效,则拒绝提供服务,如果该消息有效,则执行以下步骤:检查该点播节目的m3u8索引文件是否缓存在本CDN节点,若未缓存,则回源到源站获取原始m3u8索引文件,若有缓存,则根据当前客户端请求URL(Uniform Resource Locator,统一资源定位符)中解密出来的防盗链特征,实时计算生成针对当前客户端当前请求有效的m3u8索引文件,将索引文件返回给客户端。4、客户端播放器获取到请求的m3u8索引文件后,按照索引文件中的时间顺序,从CDN节点获取相应的ts视频切片,进行播放。Video on demand is used in all aspects of current life. HLS (HTTP Live Streaming,) is a widely used on-demand streaming. The playback process of the HLS stream is as follows: 1. The client obtains the Global Server Load Balance (GSLB) address of the m3u8 index file of the HLS stream of the specific on-demand program from the background portal server, and the address is generally processed by anti-leech encryption. 2. The global scheduling server redirects the user request to a specific CDN (Content Delivery Network, Content Delivery Network) node that provides services. 3. The CDN node verifies the anti-leech message requested by m3u8. If the message is invalid, it will refuse to provide the service. If the message is valid, perform the following steps: Check whether the m3u8 index file of the on-demand program is cached in the CDN node. If there is a cache, then go back to the source site to obtain the original m3u8 index file. If there is a cache, the anti-leech feature decrypted in the current client request URL (Uniform Resource Locator) will be calculated and generated in real time for the current client. The current request is for a valid m3u8 index file, and the index file is returned to the client. 4. After the client player obtains the requested m3u8 index file, it obtains the corresponding ts video slices from the CDN node according to the time sequence in the index file and plays them.

发明人发现相关技术至少存在以下问题:现有视频点播中,点播节目的起播时长较长,尤其是一些播放时长较长的视频文件,起播时长也会更长,影响用户体验。The inventor found that the related art has at least the following problems: in the existing VOD, the start-up duration of the VOD programs is long, especially for some video files with a longer playback duration, the start-up duration is also longer, which affects the user experience.

发明内容SUMMARY OF THE INVENTION

本发明实施方式的目的在于提供一种视频起播方法、视频服务系统及存储介质,旨在缩短起播时长,使得起播速度更快,提高用户体验。The purpose of the embodiments of the present invention is to provide a video start-up method, a video service system and a storage medium, which aim to shorten the start-up time, make the start-up speed faster, and improve user experience.

为解决上述技术问题,本发明的实施方式提供了一种视频起播方法,包括:In order to solve the above-mentioned technical problems, embodiments of the present invention provide a method for starting a video, including:

从视频文件中截取出第一视频;Cut out the first video from the video file;

将所述第一视频下发到CDN集群,以供客户端在从所述CDN集群加载播放所述第一视频的同时缓存第二视频,所述第一视频的起播时长小于所述第二视频的起播时长,所述第二视频用于衔接所述第一视频以实现所述视频文件的播放。Delivering the first video to the CDN cluster, so that the client can cache the second video while loading and playing the first video from the CDN cluster, and the start-up duration of the first video is shorter than that of the second video The start-up duration of the video, and the second video is used to connect the first video to realize the playback of the video file.

本发明的实施方式还提供了一种视频起播方法,包括:Embodiments of the present invention also provide a method for starting a video, including:

响应于客户端的播放请求下发第一视频,同时下发第二视频供所述客户端缓存;Delivering the first video in response to the client's play request, and simultaneously delivering the second video for the client to cache;

其中,所述第一视频的起播时长小于所述第二视频的起播时长,所述第二视频用于衔接所述第一视频以实现视频文件的播放。Wherein, the start-up duration of the first video is shorter than the start-up duration of the second video, and the second video is used to connect the first video to realize the playback of the video file.

本发明的实施方式还提供了一种视频起播方法,包括:Embodiments of the present invention also provide a method for starting a video, including:

响应于客户端的播放请求获取待播放的视频文件的播放地址;所述播放地址包括第一视频的播放地址以及第二视频的播放地址;所述第一视频从所述视频文件中截取,且所述第一视频的起播时长小于所述第二视频的起播时长,所述第二视频用于衔接所述第一视频以实现所述视频文件的播放;The playback address of the video file to be played is obtained in response to the playback request of the client; the playback address includes the playback address of the first video and the playback address of the second video; the first video is intercepted from the video file, and the The start-up duration of the first video is shorter than the start-up duration of the second video, and the second video is used to connect the first video to realize the playback of the video file;

根据所述第一视频的播放地址将所述播放请求重定向于用于提供所述第一视频的CDN节点,根据所述第二视频的播放地址将所述播放请求重定向于用于提供所述第二视频的CDN节点。The play request is redirected to the CDN node for providing the first video according to the play address of the first video, and the play request is redirected to the CDN node for providing the first video according to the play address of the second video The CDN node of the second video.

本发明的实施方式还提供了一种视频起播方法,包括:Embodiments of the present invention also provide a method for starting a video, including:

加载并播放从待播放的视频文件中截取的第一视频,同时缓存第二视频;其中,所述第一视频的起播时长小于所述第二视频的起播时长,所述第二视频用于衔接所述第一视频以实现所述视频文件的播放;Load and play the first video intercepted from the video file to be played, and cache the second video at the same time; wherein, the start-up duration of the first video is shorter than the start-up duration of the second video, and the second video uses in connecting the first video to realize the playback of the video file;

若所述第一视频播放完毕,则衔接于所述第一视频继续播放所述第二视频。If the playing of the first video is completed, the second video is continued to be played in connection with the first video.

本发明的实施方式还提供了一种视频服务系统,包括:视频内容管理服务器,CDN集群以及点播服务器;所述视频内容管理服务器、CDN集群以及所述点播服务器依次通信连接;Embodiments of the present invention also provide a video service system, including: a video content management server, a CDN cluster and an on-demand server; the video content management server, the CDN cluster, and the on-demand server are sequentially connected in communication;

其中,所述视频内容管理服务器用于实现如前所述的视频起播方法;Wherein, the video content management server is used to realize the above-mentioned video broadcasting method;

所述CDN集群用于实现如上所述的视频起播方法;The CDN cluster is used to implement the above-mentioned video broadcasting method;

所述点播服务器用于实现如上所述的视频起播方法。The video-on-demand server is used to implement the above-mentioned video playback method.

本发明的实施方式还提供了一种存储介质,用于存储计算机可读程序,所述计算机可读程序用于供计算机执行如前所述的视频起播方法。Embodiments of the present invention also provide a storage medium for storing a computer-readable program, where the computer-readable program is used for a computer to execute the aforementioned video playback method.

本发明实施方式相对于现有技术而言,通过视频内容管理服务器预先从视频文件中截取出第一视频,并将第一视频下发到CDN集群,客户端发起播放请求时,点播服务器获取待播放的视频文件的播放地址,播放地址包括第一视频的播放地址以及第二视频的播放地址,并根据播放地址将播放请求重定向于用于提供第一视频的第一CDN节点以及用于提供第二视频的第二CDN节点。客户端播放视频时先加载并播放第一视频,同时缓存第二视频,在第一视频播放完毕后衔接播放第二视频,因此第一视频的起播时长决定了视频文件的起播时长,由于第一视频的起播时长小于第二视频的起播时长,所以可以显著缩短视频起播时长、快速起播,提高用户体验。Compared with the prior art, the embodiment of the present invention intercepts the first video from the video file in advance through the video content management server, and delivers the first video to the CDN cluster. When the client initiates a playback request, the on-demand server obtains the pending The play address of the video file to be played, the play address includes the play address of the first video and the play address of the second video, and the play request is redirected to the first CDN node for providing the first video and the first CDN node for providing the first video according to the play address. The second CDN node of the second video. When the client plays a video, the first video is loaded and played first, and the second video is cached at the same time. After the first video is played, the second video is played continuously. Therefore, the start-up duration of the first video determines the start-up duration of the video file. The start-up duration of the first video is shorter than the start-up duration of the second video, so the start-up duration of the video can be significantly shortened, the start-up duration can be quickly started, and the user experience can be improved.

作为一个实施例,在所述从视频文件中截取出第一视频之后,所述将所述第一视频下发到CDN集群之前,还包括:将所述第一视频转码成至少两种格式的第三视频;所述将所述第一视频下发到CDN集群,具体包括:将所述至少两种格式的第三视频均下发到所述CDN集群。通过下发不同格式的第三视频至CDN集群,从而可向不同显示规格的客户端下发对应格式的第三视频,保证不同类型客户端上的视频播放清晰度。As an embodiment, after the cutting out the first video from the video file and before delivering the first video to the CDN cluster, the method further includes: transcoding the first video into at least two formats the third video; the delivering the first video to the CDN cluster specifically includes: delivering the third video in the at least two formats to the CDN cluster. By delivering the third video in different formats to the CDN cluster, the third video in the corresponding format can be delivered to clients with different display specifications, ensuring video playback clarity on different types of clients.

作为一个实施例,所述将所述第一视频下发到CDN集群,具体包括:As an embodiment, the delivering the first video to the CDN cluster specifically includes:

确定待下发至的所述CDN集群中的CDN节点是否为回源压力大于预设压力值的边缘CDN节点,若是,则将所述第一视频优先下发到所述边缘CDN节点。通过将第一视频优先下发到回源压力较大的边缘CDN节点,减少其回源的次数,从而可减轻由于CDN节点回源压力较大而造成的起播延时问题。Determine whether the CDN node in the CDN cluster to be delivered is an edge CDN node with a back-to-source pressure greater than a preset pressure value, and if so, deliver the first video to the edge CDN node preferentially. By preferentially delivering the first video to an edge CDN node with greater back-to-source pressure, the number of times of its back-to-source is reduced, thereby reducing the problem of start-up delay caused by the high back-to-source pressure of the CDN node.

作为一个实施例,所述确定待下发至的所述CDN集群中的CDN节点是否为回源压力大于预设压力值的边缘CDN节点,具体包括:若CDN节点预设时段的带宽占用率大于占用率阈值,则确定所述CDN节点为边缘CDN节点。从而可有有效地检测出回源压力较大的边缘CDN节点,进而有利于消除因回源压力较大而带来的起播延时问题。As an embodiment, the determining whether the CDN node in the CDN cluster to be delivered is an edge CDN node with a back-to-source pressure greater than a preset pressure value specifically includes: if the bandwidth occupancy rate of the CDN node in a preset period is greater than If the occupancy rate threshold is set, the CDN node is determined to be an edge CDN node. In this way, edge CDN nodes with large back-to-source pressure can be effectively detected, thereby helping to eliminate the problem of start-up delay caused by high back-to-source pressure.

作为一个实施例,所述第一视频在所述CDN集群中的缓存时限大于CDN集群中所述第二视频的缓存时限。从而可以大幅提高第一视频的命中率,由于第一视频的命中率越高相比未命中而言起播时长更小,因此使得所有视频的整体起播时长更小。As an embodiment, the cache time limit of the first video in the CDN cluster is greater than the cache time limit of the second video in the CDN cluster. As a result, the hit rate of the first video can be greatly improved, because the higher the hit rate of the first video, the shorter the start-up duration than the miss, so the overall start-up duration of all videos is shortened.

附图说明Description of drawings

图1是根据本发明第一实施方式视频起播方法的流程图;FIG. 1 is a flowchart of a method for starting a video according to a first embodiment of the present invention;

图2是根据本发明第二实施方式视频起播方法的流程图;2 is a flow chart of a method for starting a video according to a second embodiment of the present invention;

图3是根据本发明第三实施方式视频起播方法的流程图;3 is a flow chart of a method for starting a video according to a third embodiment of the present invention;

图4是根据本发明第四实施方式视频起播方法的流程图;4 is a flow chart of a method for starting a video according to a fourth embodiment of the present invention;

图5是根据本发明第五实施方式视频起播方法的流程图;5 is a flow chart of a method for starting a video according to a fifth embodiment of the present invention;

图6是根据本发明第六实施方式视频内容管理服务器的结构示意图;6 is a schematic structural diagram of a video content management server according to a sixth embodiment of the present invention;

图7是根据本发明第九实施方式视频服务系统的结构示意图。FIG. 7 is a schematic structural diagram of a video service system according to a ninth embodiment of the present invention.

具体实施方式Detailed ways

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合附图对本发明的各实施方式进行详细的阐述。然而,本领域的普通技术人员可以理解,在本发明各实施方式中,为了使读者更好地理解本发明而提出了许多技术细节。但是,即使没有这些技术细节和基于以下各实施方式的种种变化和修改,也可以实现本发明所要求保护的技术方案。In order to make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the various embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, those of ordinary skill in the art can appreciate that, in the various embodiments of the present invention, many technical details are set forth for the reader to better understand the present invention. However, even without these technical details and various changes and modifications based on the following embodiments, the technical solutions claimed in the present invention can be realized.

发明人发现现有相关视频起播方法存在起播时长较长的主要原因如下:The inventors found that the main reasons for the long start-up duration of the existing related video start-up methods are as follows:

1、如果点播的视频节目未被缓存在分派的CDN节点上,则该CDN节点需要从源站获取m3u8索引文件。并且点播的节目的播放时长越长,其m3u8索引文件越大,加载时长也越长。比如,一个播放时长超过90分钟的点播节目,其m3u8索引文件可以达到3MB(兆字节),m3u8索引文件的大小取决于ts切片文件名以及URL编码。因此,CDN节点从源站获取m3u8索引文件常常需要较大的时间开销。1. If the video program on demand is not cached on the assigned CDN node, the CDN node needs to obtain the m3u8 index file from the source site. And the longer the playing time of the on-demand program, the larger the m3u8 index file and the longer the loading time. For example, an on-demand program with a playing time of more than 90 minutes, its m3u8 index file can reach 3MB (megabytes), and the size of the m3u8 index file depends on the ts slice file name and URL encoding. Therefore, it often requires a large time overhead for CDN nodes to obtain m3u8 index files from the origin site.

2、如果点播的视频节目已被缓存在分派的CDN节点上,由于m3u8索引文件中ts切片地址需要防盗链保护,所以CDN节点需要对m3u8索引文件中ts切片地址进行防盗链加密处理。如果一个ts切片的时长为3秒,则一个90分钟的视频节目中有1800条ts切片地址需要进行实时加密处理,也会产生一定的时间开销。并且加密后的m3u8索引文件可达几兆字节,CDN节点将其回传给客户端也需要一定的时间。2. If the video program on demand has been cached on the assigned CDN node, since the ts slice address in the m3u8 index file needs anti-leech protection, the CDN node needs to perform anti-leech encryption on the ts slice address in the m3u8 index file. If the duration of a ts slice is 3 seconds, there are 1800 ts slice addresses in a 90-minute video program that need to be encrypted in real time, which will also generate a certain time overhead. And the encrypted m3u8 index file can reach several megabytes, and it takes a certain amount of time for the CDN node to send it back to the client.

3、如果节目的TS切片未被缓存在CDN服务节点,则该CDN服务节点需要从源站获取ts切片文件后再回传给客户端,也会额外增加时间开销。3. If the TS slice of the program is not cached in the CDN service node, the CDN service node needs to obtain the ts slice file from the origin site and then send it back to the client, which will also increase the time overhead.

因此,现有视频起播方法的起播时长较长,经现网测试,90分钟的视频节目,正常起播的平均时延大概在1.8秒~3秒之间,如果是冷门视频,起播时长会更长,可能达到5秒以上,影响用户体验。Therefore, the existing video start-up method has a long start-up time. According to the test on the existing network, the average delay of normal start-up of a 90-minute video program is about 1.8 seconds to 3 seconds. If it is an unpopular video, start the broadcast. The duration will be longer, possibly more than 5 seconds, which affects the user experience.

针对现有视频起播时长较长的问题,发明人提出了通过预先从视频文件中截取出第一视频,例如截取视频文件开头5秒的短视频作为第一视频,并将第一视频下发至CDN集群,在播放视频时,点播服务器响应于播放请求获取第一视频的播放地址以及第二视频的播放地址,第二视频的播放地址可以为原始视频文件的播放地址,或者为原始视频文件跳过第一视频后的视频文件的播放地址,并基于第一视频以及第二视频的播放地址将播放请求重定向于CDN集群中对应的CDN节点,CDN节点在下发第一视频的同时将第二视频缓存至客户端,这样,客户端可在播放第一视频的同时缓存第二视频,并在第一视频播放完毕后衔接播放第二视频,由于视频起播时长取决于第一视频的起播时长,且第一视频的起播时长小于第二视频的起播时长(相当于现有的视频起播时长),所以可显著缩短视频起播时长、快速起播,提高用户体验。In view of the problem that the existing video has a long start-up time, the inventor proposes to cut the first video from the video file in advance, for example, cut a short video of the first 5 seconds of the video file as the first video, and deliver the first video. To a CDN cluster, when playing a video, the on-demand server obtains the playback address of the first video and the playback address of the second video in response to the playback request. The playback address of the second video can be the playback address of the original video file, or the original video file. The playback address of the video file after the first video is skipped, and based on the playback addresses of the first video and the second video, the playback request is redirected to the corresponding CDN node in the CDN cluster, and the CDN node sends the first video while delivering the first video. The second video is cached to the client, so that the client can cache the second video while playing the first video, and play the second video after the first video is played, because the start time of the video depends on the start of the first video. The start time of the first video is shorter than the start time of the second video (equivalent to the start time of the existing video), so the start time of the video can be significantly shortened, the start time can be quickly started, and the user experience can be improved.

本发明的第一实施方式涉及一种视频起播方法,应用于视频内容管理服务器。该方法包括:从视频文件中截取出第一视频,将第一视频下发到CDN集群,以供客户端在从CDN集群加载播放第一视频的同时缓存第二视频,第一视频的起播时长小于第二视频的起播时长,第二视频用于衔接第一视频以实现视频文件的播放。下面结合图1对本实施方式的视频起播方法进行详细说明。该方法包括步骤101至步骤103。The first embodiment of the present invention relates to a method for starting a video, which is applied to a video content management server. The method includes: cutting out a first video from a video file, and delivering the first video to a CDN cluster, so that the client can cache the second video while loading and playing the first video from the CDN cluster, and the first video starts playing. The duration is less than the start duration of the second video, and the second video is used to connect the first video to realize the playback of the video file. The video starting method of this embodiment will be described in detail below with reference to FIG. 1 . The method includes steps 101 to 103 .

步骤101:从视频文件中截取出第一视频。Step 101: Cut out the first video from the video file.

具体地,第一视频从视频文件开头截取,第一视频的时长例如为5秒,然不限于此。在一个例子中,视频文件可以为播放时长大于预设时长的长视频。预设时长例如为90分钟,然不限于此,也可以针对所有视频文件均截取第一视频。其中,视频文件可以是视频内容管理服务器中已有的视频文件,或者视频内容管理服务器中新增加的视频文件。Specifically, the first video is intercepted from the beginning of the video file, and the duration of the first video is, for example, 5 seconds, but not limited to this. In one example, the video file may be a long video with a playback duration greater than a preset duration. The preset duration is, for example, 90 minutes, but it is not limited to this, and the first video may also be captured for all video files. The video file may be an existing video file in the video content management server, or a newly added video file in the video content management server.

步骤102:将第一视频转码成至少两种格式的第三视频。Step 102: Transcode the first video into a third video in at least two formats.

具体而言,可以将第一视频按照两种不同码率进行转码压缩生成两种格式的第三视频文件(即短视频A和短视频B)。其中,短视频A采用的视频压制码率可以为600kbps,视频分辨率可以设置为480P,格式可以采用MP4。短视频B采用的视频压制码率可以为1200kbps,视频分辨率可以设置为720P,格式可以采用MP4。其中,MP4为非流媒体格式,且支持边下载边播放。以上第三视频的两种格式是基于客户端显示信息,例如客户端屏幕尺寸来划分的。其中,短视频A例如对应于屏幕为7寸及以下的客户端,短视频B例如对应于屏幕为7寸及以上的客户端。其中,短视频A一般适于在智能手机等小尺寸客户端上播放,短视频B一般适于在平板电脑、笔记本以及高清电视等大尺寸客户端上播放。从而可针对不同规格的客户端按需下发对应格式的第三视频,以使得不同客户端上均获得较为合适的清晰度。同时,短视频A和短视频B的压制过程需要开启边下载边播放选项。本实施方式对于第三视频的具体格式不做限制。需要说明的是,对于MP4格式文件,如果未开启边下载边播放选项,默认需要将整个MP4视频文件全部下载完成才能进行解码和播放,会导致起播变慢。Specifically, the first video may be transcoded and compressed according to two different bit rates to generate third video files (ie, short video A and short video B) in two formats. Among them, the video compression bit rate used by the short video A can be 600kbps, the video resolution can be set to 480P, and the format can be MP4. The video compression bit rate used by short video B can be 1200kbps, the video resolution can be set to 720P, and the format can be MP4. Among them, MP4 is a non-streaming media format, and supports playing while downloading. The above two formats of the third video are divided based on client display information, such as client screen size. The short video A corresponds to, for example, a client with a screen size of 7 inches and below, and the short video B corresponds, for example, to a client with a screen size of 7 inches and above. Among them, short video A is generally suitable for playing on small-sized clients such as smart phones, and short video B is generally suitable for playing on large-sized clients such as tablet computers, notebooks, and high-definition TVs. Therefore, the third video in the corresponding format can be delivered on demand for clients of different specifications, so that a relatively suitable definition can be obtained on different clients. At the same time, the pressing process of short video A and short video B needs to enable the option of playing while downloading. This embodiment does not limit the specific format of the third video. It should be noted that, for MP4 format files, if the option to play while downloading is not enabled, by default, the entire MP4 video file needs to be downloaded before decoding and playback, which will result in slower playback.

在一个例子中,两种格式的第三视频的压缩比均可以大于第二视频的压缩比,且第三视频的码率以及分辨率可以比第二视频的码率以及分辨率更低,从而可以进一步提高第三视频的加载速度,降低起播时延。In one example, the compression ratio of the third video in both formats may be greater than the compression ratio of the second video, and the bit rate and resolution of the third video may be lower than those of the second video, so that The loading speed of the third video can be further improved, and the start-up delay can be reduced.

步骤103:将至少两种格式的第三视频均下发到CDN集群,以供客户端在从CDN集群加载播放第三视频的同时缓存第二视频,第三视频的起播时长小于第二视频的起播时长,第二视频用于衔接第三视频以实现视频文件的播放。Step 103: Deliver the third video in at least two formats to the CDN cluster, so that the client can cache the second video while loading and playing the third video from the CDN cluster, and the starting duration of the third video is shorter than that of the second video The second video is used to connect the third video to realize the playback of the video file.

具体地,第二视频可以为原始视频文件或者原始视频文件中跳过第一视频的视频,本实施方式对此不作具体限制。在实际应用中,第三视频和第二视频均可以下发至CDN集群,可将第三视频优先下发至CDN集群。步骤103中,将至少两种格式的第三视频(即短视频A、短视频B)均优先下发至CDN集群。可选的,可以将第三视频分发到CDN集群中的所有节点或者部分节点。Specifically, the second video may be an original video file or a video in the original video file skipping the first video, which is not specifically limited in this embodiment. In practical applications, both the third video and the second video can be delivered to the CDN cluster, and the third video can be delivered to the CDN cluster preferentially. In step 103, the third videos in at least two formats (ie, short video A and short video B) are preferentially delivered to the CDN cluster. Optionally, the third video may be distributed to all nodes or some nodes in the CDN cluster.

在实际应用中,第二视频可以为HLS流式视频,且支持防盗链,HLS流式视频以及防盗链技术均为本领域技术人员熟知,此处不再赘述。In practical applications, the second video may be an HLS streaming video and support anti-leech. Both the HLS streaming video and the anti-leech technology are well known to those skilled in the art, and will not be repeated here.

与现有技术相比,本实施方式通过从原始视频文件中截取出第一视频,并预先将第一视频分发至CDN集群,以供客户端在从该CDN集群中加载播放第一视频的同时缓存第二视频,在第一视频播放完成后继续衔接播放缓存的第二视频。由于第一视频的起播时长小于第二视频的起播时长,且视频文件的起播时长取决于第一视频的起播时长,所以可显著缩短视频起播时长,快速起播,提高用户体验。并且,将第一视频转换成多种不同格式的第三视频,从而可以根据客户端的显示类型下发对应格式的第三视频,从而保证不同显示类型的客户端的视频播放清晰度。Compared with the prior art, in this embodiment, the first video is cut out from the original video file, and the first video is distributed to the CDN cluster in advance, so that the client can load and play the first video from the CDN cluster at the same time. Cache the second video, and continue to play the cached second video continuously after the first video is played. Since the start-up duration of the first video is shorter than that of the second video, and the start-up duration of the video file depends on the start-up duration of the first video, the start-up duration of the video can be significantly shortened, the video starts up quickly, and the user experience is improved. . In addition, the first video is converted into a third video in multiple different formats, so that the third video in the corresponding format can be delivered according to the display type of the client, thereby ensuring the video playback clarity of the client with different display types.

本发明的第二实施方式涉及一种视频起播方法,第二实施方式在第一实施方式的基础上做出改进,主要改进之处在于:在第二实施方式中,首先确定出CDN集群中回源压力较大的CDN节点的,并优先将第一视频下发到回源压力较大的CDN节点,从而可以确保客户端能够较快地从各个CDN节点获取第一视频,避免出现由于第一视频获取慢导致的起播较慢的情况。The second embodiment of the present invention relates to a method for starting a video. The second embodiment is improved on the basis of the first embodiment. The main improvement lies in that: in the second embodiment, it is firstly determined that in the CDN cluster For CDN nodes with high back-to-source pressure, the first video will be preferentially delivered to CDN nodes with high back-to-source pressure, so as to ensure that the client can quickly obtain the first video from each CDN node and avoid the occurrence of A slow start-up caused by slow video acquisition.

如图2所示,本实施方式的视频起播方法包括步骤201至步骤204。As shown in FIG. 2 , the method for starting a video in this embodiment includes steps 201 to 204 .

步骤201:从视频文件中截取出第一视频。Step 201: Cut out the first video from the video file.

步骤201与第一实施方式中的步骤101相同,此处不再赘述。并且,在步骤201之后以及步骤202之前,还可以将第一视频转码成至少两种格式的第三视频,具体请参考上文中步骤102,此处不再赘述。Step 201 is the same as step 101 in the first embodiment, and will not be repeated here. Moreover, after step 201 and before step 202, the first video may also be transcoded into a third video in at least two formats. For details, please refer to step 102 above, which will not be repeated here.

步骤202:确定待下发至的CDN集群中的CDN节点是否为回源压力大于预设压力值的边缘CDN节点,若是,则执行步骤203,若不是,则执行步骤204。Step 202 : Determine whether the CDN node in the CDN cluster to be delivered is an edge CDN node whose back-to-source pressure is greater than the preset pressure value, if so, go to Step 203 , if not, go to Step 204 .

步骤202具体包括:确定CDN节点在预设时段的带宽占用率是否大于占用率阈值,若大于占用率阈值,则确定该CDN节点为回源压力大于预设压力值的边缘CDN节点,若该CDN节点预设时段的带宽占用率小于或者等于占用率阈值,则确定该CDN节点不为回源压力大于预设压力值的边缘CDN节点。Step 202 specifically includes: determining whether the bandwidth occupancy rate of the CDN node in the preset time period is greater than the occupancy rate threshold, and if it is greater than the occupancy rate threshold, determining that the CDN node is an edge CDN node with a back-to-source pressure greater than a preset pressure value, if the CDN If the bandwidth occupancy rate of the node in the preset period is less than or equal to the occupancy rate threshold, it is determined that the CDN node is not an edge CDN node whose back-to-source pressure is greater than the preset pressure value.

具体而言,可以计算第一视频待下发至的CDN集群中的各CDN节点在预设时段回源获取视频文件时的专线带宽占用率,并将该带宽占用率与占用率阈值做比较以确定该CDN节点是否为回源压力较大的边缘CDN节点。其中,预设时段可以为一天中业务量最高的峰值时段,例如为20:00-21:00之间的时段。占用率阈值例如为80%。本实施方式对预设时段以及占用率阈值均不作具体限制。Specifically, the bandwidth occupancy rate of the dedicated line when each CDN node in the CDN cluster to which the first video is to be delivered can be calculated when returning to the source to obtain the video file in a preset time period, and comparing the bandwidth occupancy rate with the occupancy rate threshold to obtain Determine whether the CDN node is an edge CDN node with high back-to-source pressure. The preset time period may be a peak time period with the highest traffic volume in a day, for example, a time period between 20:00 and 21:00. The occupancy threshold is, for example, 80%. This embodiment does not specifically limit the preset time period and the occupancy rate threshold.

步骤203:将第一视频优先下发到回源压力大于预设压力值的边缘CDN节点。Step 203: The first video is preferentially delivered to the edge CDN node whose back-to-source pressure is greater than the preset pressure value.

具体地,在第一视频被转码成至少两种格式的第三视频时,步骤203中将转码成的不同格式的第三视频均优先下发至回源压力大于预设压力值的边缘CDN节点。在回源压力大于预设压力值的边缘CDN节点均下发完成第一视频之后,可以继续下发第一视频至CDN集群中的其他CDN节点。在实际应用中,可以将第一视频下发至CDN集群中的所有CDN节点,或者部分CDN节点,本实施方式对此不作具体限制。Specifically, when the first video is transcoded into third videos in at least two formats, the transcoded third videos in different formats in step 203 are preferentially delivered to the edge where the return pressure is greater than the preset pressure value CDN node. After the edge CDN nodes whose back-to-source pressure is greater than the preset pressure value all finish delivering the first video, the first video may continue to be delivered to other CDN nodes in the CDN cluster. In practical applications, the first video may be delivered to all CDN nodes in the CDN cluster, or to some CDN nodes, which is not specifically limited in this embodiment.

步骤204:不优先下发第一视频到该CDN节点。Step 204: The first video is not preferentially delivered to the CDN node.

即可以在各回源压力大于预设压力值的边缘CDN节点均下发完成之后再下发第一视频至其余CDN节点。That is, the first video may be delivered to the remaining CDN nodes after the delivery of each edge CDN node whose back-to-source pressure is greater than the preset pressure value is completed.

值得一提的是,本实施方式中,第一视频在CDN集群中的缓存时限大于CDN集群中第二视频的缓存时限。比如,第一视频在CDN节点中的缓存时限可以为CDN节点中第二视频的缓存时限的3倍,然不限于此。其中,缓存时限是CDN节点中内容未被访问时该内容在CDN中保留的最大时长。具体地,可将CDN节点中短视频A以及短视频B的缓存时限设置为第二视频的缓存时限的3倍。现有CDN节点的缓存策略一般为,在最近的时间段T内未被访问的内容将从CDN缓存中淘汰。将第一视频或者第三视频的缓存时限调整为第二视频的缓存时限的3倍,将大幅度提高第一视频的命中率。比如,假设CDN对第二视频的缓存时限设为24小时(即24小时内有访问则CDN有缓存第二视频的副本),对第一视频的缓存时限设置为3倍(即72小时),且该节目(包括第一视频以及第二视频)在24小时被播放过一次及以上的概率为90%,播放节目时会同时访问第一和第二视频。基于此,第二视频24小时内未被访问的概率是10%,此时用户访问时缓存已经被清除需要回源,即回源率为10%。第一视频在72小时以内被访问过一次及以上的概率将是0.9+0.1*0.9+0.1*0.1*0.9=0.999,即72小时内未被用户访问的概率是0.1%,当用户访问时需要回源,即第一视频回源率为0.1%。由于第二视频在进行回源操作时,用户已经在播放第一视频,第二视频回源产生的延迟不会被用户感知。因此第二视频的回源对用户播放体验的影响可大幅降低。It is worth mentioning that, in this embodiment, the cache time limit of the first video in the CDN cluster is longer than the cache time limit of the second video in the CDN cluster. For example, the buffering time limit of the first video in the CDN node may be three times the buffering time limit of the second video in the CDN node, but it is not limited thereto. The cache time limit is the maximum length of time that the content is retained in the CDN when the content in the CDN node is not accessed. Specifically, the cache time limit of the short video A and the short video B in the CDN node may be set to be three times the cache time limit of the second video. The caching strategy of the existing CDN nodes is generally that the content that has not been accessed in the recent time period T will be eliminated from the CDN cache. Adjusting the cache time limit of the first video or the third video to three times the cache time limit of the second video will greatly improve the hit rate of the first video. For example, assuming that the CDN cache time limit for the second video is set to 24 hours (that is, if there is access within 24 hours, the CDN will cache a copy of the second video), and the cache time limit for the first video is set to 3 times (ie 72 hours), And the probability of the program (including the first video and the second video) being played once or more in 24 hours is 90%, and the first and second videos will be accessed simultaneously when the program is played. Based on this, the probability that the second video is not accessed within 24 hours is 10%. At this time, the cache has been cleared when the user accesses and needs to be returned to the source, that is, the return-to-source rate is 10%. The probability that the first video has been accessed once or more within 72 hours will be 0.9+0.1*0.9+0.1*0.1*0.9=0.999, that is, the probability of not being accessed by users within 72 hours is 0.1%. Back-to-source, that is, the first video back-to-source rate is 0.1%. Since the user is already playing the first video when the second video is being returned to the source, the delay caused by the returning of the second video to the source will not be perceived by the user. Therefore, the influence of the back-to-source of the second video on the user's playing experience can be greatly reduced.

与现有技术相比,本实施方式通过从原始视频文件中截取出第一视频,并预先将第一视频分发至CDN集群,以供客户端在从该CDN集群中加载播放第一视频的同时缓存第二视频,在第一视频播放完成后继续衔接播放缓存的第二视频。由于第一视频的起播时长小于第二视频的起播时长,且视频文件的起播时长取决于第一视频的起播时长,所以可显著缩短视频起播时长,快速起播,提高用户体验。并且,通过将第一视频优先下发至回源压力较大的CDN节点,可避免由于一些CDN节点回源获取第一视频时耗时较长导致起播较慢的情况。此外,通过将第一视频在CDN中的缓存时限调大,可以显著提高第一视频在CDN缓存中的命中率。Compared with the prior art, in this embodiment, the first video is cut out from the original video file, and the first video is distributed to the CDN cluster in advance, so that the client can load and play the first video from the CDN cluster at the same time. Cache the second video, and continue to play the cached second video continuously after the first video is played. Since the start-up duration of the first video is shorter than that of the second video, and the start-up duration of the video file depends on the start-up duration of the first video, the start-up duration of the video can be significantly shortened, the video starts up quickly, and the user experience is improved. . In addition, by preferentially delivering the first video to a CDN node with greater pressure to go back to the source, it is possible to avoid a situation in which the playback is slow due to the long time taken by some CDN nodes to obtain the first video back to the source. In addition, by increasing the cache time limit of the first video in the CDN, the hit rate of the first video in the CDN cache can be significantly improved.

本发明的第三实施方式涉及一种视频起播方法,应用于点播服务器。如图3所示,该方法包括:The third embodiment of the present invention relates to a video starting method, which is applied to an on-demand server. As shown in Figure 3, the method includes:

步骤301:响应于客户端的播放请求获取待播放的视频文件的播放地址。播放地址包括第一视频的播放地址以及第二视频的播放地址,第一视频从视频文件中截取,且第一视频的起播时长小于第二视频的起播时长,第二视频用于衔接第一视频以实现视频文件的播放。Step 301: Acquire the play address of the video file to be played in response to the play request of the client. The playback address includes the playback address of the first video and the playback address of the second video. The first video is intercepted from the video file, and the start-up duration of the first video is shorter than the start-up duration of the second video. The second video is used to connect the first video. A video to realize the playback of video files.

本实施方式的第一视频以及第二视频的处理方式与第一实施方式中的第一视频以及第二视频的处理方式相同,此处不再赘述。The processing methods of the first video and the second video in this embodiment are the same as the processing methods of the first video and the second video in the first embodiment, which will not be repeated here.

具体地,当点播服务器接收到用户选择播放的某个视频文件时,可以根据待播放的视频文件的标识获取该视频文件对应的第一视频的播放地址url_s以及第二视频的播放地址url_l,并将其返回至客户端。其中,点播服务器可以根据客户端的显示信息,例如客户端的屏幕尺寸获取对应格式的第一视频的播放地址。比如,屏幕尺寸为7寸以下的客户端对应的第一视频为短视频A,屏幕尺寸为7寸以及以上的客户端对应的第一视频为短视频B。如前文所述,短视频A可以为分辨率为480P的第一视频,短视频B可以为分辨率为720P的第一视频。短视频A以及短视频B均为第一视频转码成的不同格式的第三视频。Specifically, when the on-demand server receives a certain video file selected to be played by the user, it can obtain the playback address url_s of the first video and the playback address url_1 of the second video corresponding to the video file according to the identifier of the video file to be played, and return it to the client. The VOD server may obtain the playback address of the first video in the corresponding format according to the display information of the client, such as the screen size of the client. For example, the first video corresponding to a client with a screen size of less than 7 inches is short video A, and the first video corresponding to a client with a screen size of 7 inches and above is short video B. As mentioned above, the short video A may be the first video with a resolution of 480P, and the short video B may be the first video with a resolution of 720P. Both the short video A and the short video B are third videos of different formats transcoded from the first video.

其中,第二视频的播放地址url_l可以为原始视频文件跳过第一视频后的视频的播放地址。这样,客户端在第一视频播放结束时,可以直接按照第二视频的播放地址继续播放。本实施方式中,第三视频可以为MP4格式,第二视频可以为HLS流格式。HLS是一种基于http的在线播放的流格式,该种格式的视频文件包括:m3u8索引文件以及若干个ts切片。其中,HLS流格式在视频播放到具体时段时才下载相应的ts切片,无需将整个视频文件全部下载到本地。由于第三视频很短,因此无需再切分成更细小的切片,所以可以直接采用MP4等的非流媒体格式,这样还可以在播放第三视频时省去m3u8索引文件的生成和下载耗时。Wherein, the playback address url_1 of the second video may be the playback address of the video after the original video file skips the first video. In this way, when the playback of the first video ends, the client can continue to play directly according to the playback address of the second video. In this embodiment, the third video may be in MP4 format, and the second video may be in HLS stream format. HLS is a streaming format for online playback based on http. The video files in this format include: m3u8 index file and several ts slices. Among them, the HLS stream format downloads the corresponding ts slices only when the video is played to a specific time period, and there is no need to download the entire video file to the local. Since the third video is very short, it does not need to be divided into smaller slices, so non-streaming media formats such as MP4 can be directly used, which also saves the time-consuming generation and download of the m3u8 index file when playing the third video.

步骤302:根据第一视频的播放地址将播放请求重定向于用于提供第一视频的CDN节点,根据第二视频的播放地址将播放请求重定向于用于提供第二视频的CDN节点。Step 302: Redirect the playback request to the CDN node for providing the first video according to the playback address of the first video, and redirect the playback request to the CDN node for providing the second video according to the playback address of the second video.

其中,可以通过资源调度服务将播放请求重定向于第一视频以及第二视频的CDN服务节点。资源调度服务可以集成于点播服务器或者也可以由独立的资源调度服务器实现,本实施方式对此不作具体限制。The play request may be redirected to the CDN service nodes of the first video and the second video through the resource scheduling service. The resource scheduling service may be integrated into the VOD server or may also be implemented by an independent resource scheduling server, which is not specifically limited in this embodiment.

与现有技术相比,本实施方式在视频点播时将播放请求重定向于第一视频的播放地址以及第二视频的播放地址,以供客户端在通过第一视频的播放地址加载并播放第一视频的同时,通过第二视频的播放地址缓存第二视频,并在第一视频播放结束后衔接播放第二视频以实现视频播放。由于第一视频的起播时长小于第二视频的起播时长,所以可显著缩短起播时长,提高起播速度,提升用户体验。Compared with the prior art, this embodiment redirects the playback request to the playback address of the first video and the playback address of the second video during video-on-demand, so that the client can load and play the first video through the playback address of the first video. At the same time as one video, the second video is cached through the play address of the second video, and after the first video is played, the second video is continuously played to realize video playback. Since the start-up duration of the first video is shorter than the start-up duration of the second video, the start-up duration can be significantly shortened, the start-up speed can be improved, and the user experience can be improved.

本发明的第四实施方式涉及一种视频起播方法,应用于CDN集群。请参阅图4,该方法包括步骤401、步骤402。The fourth embodiment of the present invention relates to a video broadcasting method, which is applied to a CDN cluster. Referring to FIG. 4 , the method includes steps 401 and 402 .

步骤401:响应于客户端的播放请求下发第一视频。Step 401: Deliver a first video in response to a playback request from the client.

步骤402:同时下发第二视频供客户端缓存。Step 402: Simultaneously deliver the second video for the client to cache.

其中,第一视频的起播时长小于第二视频的起播时长,第二视频用于衔接第一视频以实现视频文件的播放。步骤401以及步骤402中,下发第一视频和第二视频的CDN节点可以是CDN集群中的同一节点或者不同节点。Wherein, the start-up duration of the first video is shorter than the start-up duration of the second video, and the second video is used to connect the first video to realize the playback of the video file. In steps 401 and 402, the CDN nodes that deliver the first video and the second video may be the same node or different nodes in the CDN cluster.

本实施方式中,第一视频以及第二视频的处理方式请参考第一实施方式,此处不再赘述。In this embodiment, for the processing methods of the first video and the second video, please refer to the first embodiment, which will not be repeated here.

由于第一视频已经主动下发到CDN节点,所以CDN可以从缓存中抓取第一视频,并迅速回传至客户端进行播放。本实施方式中,CDN集群可以采用现有方式下发第二视频至客户端,此处不再赘述。Since the first video has been actively delivered to the CDN node, the CDN can grab the first video from the cache and quickly send it back to the client for playback. In this embodiment, the CDN cluster can deliver the second video to the client in the existing manner, which is not repeated here.

与现有技术相比,本实施方式中,CDN集群在下发第一视频的同时将第二视频下发至客户端供其缓存,这样客户端在播放第一视频的同时缓存第二视频,在第一视频播放结束后即可切换播放缓存的第二视频,由于第一视频起播时长较小,因此可显著缩短视频起播时长,提高起播速度,提升用户体验。Compared with the prior art, in this embodiment, the CDN cluster delivers the second video to the client for caching while delivering the first video, so that the client buffers the second video while playing the first video, and After the first video is played, the cached second video can be switched to play. Since the first video has a shorter start-up duration, the video start-up duration can be significantly shortened, the start-up speed can be improved, and the user experience can be improved.

本发明的第五实施方式涉及一种视频起播方法,应用于客户端,包括但不限于智能手机、平板电脑、笔记本、机顶盒以及高清电视等。请参阅图5,该方法包括步骤501至步骤503。The fifth embodiment of the present invention relates to a video playback method, which is applied to clients, including but not limited to smart phones, tablet computers, notebooks, set-top boxes, and high-definition TVs. Referring to FIG. 5 , the method includes steps 501 to 503 .

步骤501:加载并播放从待播放的视频文件中截取的第一视频,同时缓存第二视频。Step 501: Load and play the first video clipped from the video file to be played, and cache the second video at the same time.

步骤502:确定第一视频是否播放完毕,若播放完毕,则执行步骤503,若未播放完毕,则返回执行步骤501。Step 502 : determine whether the first video has finished playing, if the playing has finished, go to Step 503 , and if it has not finished playing, go back to executing Step 501 .

步骤503:衔接于第一视频继续播放第二视频。Step 503: Continue to play the second video in connection with the first video.

其中,第一视频以及第二视频的处理以及下发方式请参考前述实施方式,此处不再赘述。Wherein, for the processing and delivery methods of the first video and the second video, please refer to the foregoing embodiments, which will not be repeated here.

与现有技术而言,本实施方式中客户端在前台加载并播放第一视频,同步在后台缓存第二视频,在第一视频播放结束后即可切换至缓存的第二视频继续播放。由于第一视频采用MP4格式,不需要实时进行m3u8索引文件的二次加密处理,因此相比第二视频,可显著缩短起播时长,提高起播速度。采用本实施方式的视频起播方法,平均起播时延可缩短到0.5秒,且不区分冷门热门视频。Compared with the prior art, in this embodiment, the client loads and plays the first video in the foreground, synchronously caches the second video in the background, and can switch to the cached second video to continue playing after the first video finishes playing. Since the first video is in MP4 format, it is not necessary to perform secondary encryption processing of the m3u8 index file in real time. Therefore, compared with the second video, the start-up time can be significantly shortened and the start-up speed can be improved. With the video start-up method in this embodiment, the average start-up delay can be shortened to 0.5 seconds, and unpopular and popular videos are not distinguished.

本发明的第六实施方式涉及一种视频内容管理服务器。如图6所示,该视频内容管理服务器包括:存储器602和处理器601;A sixth embodiment of the present invention relates to a video content management server. As shown in FIG. 6 , the video content management server includes: a memory 602 and a processor 601;

其中,所述存储器602存储有可被所述至少一个处理器601执行的指令,所述指令被所述至少一个处理器601执行以实现:从视频文件中截取出第一视频;将所述第一视频下发到CDN集群,以供客户端在从所述CDN集群加载播放所述第一视频的同时缓存第二视频,所述第一视频的起播时长小于所述第二视频的起播时长,所述第二视频用于衔接所述第一视频以实现所述视频文件的播放。Wherein, the memory 602 stores instructions that can be executed by the at least one processor 601, and the instructions are executed by the at least one processor 601 to implement: cutting out a first video from a video file; A video is delivered to the CDN cluster, so that the client can cache the second video while loading and playing the first video from the CDN cluster, and the start-up duration of the first video is shorter than the start-up time of the second video The second video is used to connect the first video to realize the playback of the video file.

一个或多个处理器601以及存储器602,图6中以一个处理器601为例。处理器601、存储器602可以通过总线或者其他方式连接,图6中以通过总线连接为例。存储器602作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块。处理器601通过运行存储在存储器602中的非易失性软件程序、指令以及模块,从而执行设备的各种功能应用以及数据处理,即实现第一或者第二实施方式所述的视频起播方法。One or more processors 601 and a memory 602, one processor 601 is taken as an example in FIG. 6 . The processor 601 and the memory 602 may be connected by a bus or in other ways, and the connection by a bus is taken as an example in FIG. 6 . As a non-volatile computer-readable storage medium, the memory 602 can be used to store non-volatile software programs, non-volatile computer-executable programs and modules. The processor 601 executes various functional applications and data processing of the device by running the non-volatile software programs, instructions and modules stored in the memory 602, that is, to implement the video starting method described in the first or second embodiment .

存储器602可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序。此外,存储器602可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实施方式中,存储器602可选包括相对于处理器601远程设置的存储器,这些远程存储器可以通过网络连接至外接设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 602 may include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program required for at least one function. Additionally, memory 602 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, the memory 602 may optionally include memory located remotely from the processor 601, and these remote memories may be connected to external devices via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

一个或者多个模块存储在存储器602中,当被一个或者多个处理器601执行时,执行第一或者第二实施方式所述的视频起播方法。One or more modules are stored in the memory 602, and when executed by one or more processors 601, execute the video playback method described in the first or second embodiment.

上述设备可执行本发明实施方式所提供的方法,具备执行方法相应的功能模块和有益效果,未在本实施方式中详尽描述的技术细节,可参见本发明实施方式所提供的方法。The above device can execute the method provided by the embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method. For technical details not described in detail in this embodiment, refer to the method provided by the embodiment of the present invention.

本发明的第七实施方式涉及一种CDN集群,包括若干个CDN节点。请继续参阅图6,各CDN节点包括:存储器602和处理器601,存储器602存储计算机程序,处理器601运行所述计算机程序以实现如第四实施方式所述的视频起播方法。The seventh embodiment of the present invention relates to a CDN cluster including several CDN nodes. Please continue to refer to FIG. 6 , each CDN node includes: a memory 602 and a processor 601 , the memory 602 stores a computer program, and the processor 601 runs the computer program to implement the video starting method described in the fourth embodiment.

本发明的第八实施方式涉及一种点播服务器,请继续参阅图6,该点播服务器包括:存储器602和处理器601,存储器602存储计算机程序,处理器601运行所述计算机程序以实现如第三实施方式所述的视频起播方法。The eighth embodiment of the present invention relates to an on-demand server, please continue to refer to FIG. 6, the on-demand server includes: a memory 602 and a processor 601, the memory 602 stores a computer program, and the processor 601 runs the computer program to achieve the third The method for starting a video according to the embodiment.

本发明的第九实施方式涉及一种视频服务系统,请参阅图7,该系统包括:两两之间通信连接的视频内容管理服务器701、CDN集群702以及点播服务器703。The ninth embodiment of the present invention relates to a video service system, please refer to FIG. 7 , the system includes: a video content management server 701 , a CDN cluster 702 , and an on-demand server 703 that are communicatively connected to each other.

其中,视频内容管理服务器701可以为第六实施方式的视频内容管理服务器,CDN集群702可以为第七实施方式的CDN集群,点播服务器703可以为第八实施方式的点播服务器,此处不再赘述。The video content management server 701 may be the video content management server of the sixth embodiment, the CDN cluster 702 may be the CDN cluster of the seventh embodiment, and the VOD server 703 may be the VOD server of the eighth embodiment, which will not be repeated here. .

与现有技术相比,本实施方式的视频服务系统通过视频内容管理服务器预先从视频文件中截取出第一视频,并将第一视频下发到CDN集群,客户端发起播放请求时,点播服务器获取待播放的视频文件的播放地址,播放地址包括第一视频的播放地址以及第二视频的播放地址,并根据播放地址将播放请求重定向于用于提供第一视频的CDN节点以及用于提供第二视频的CDN节点。客户端播放视频时先加载并播放第一视频,同时缓存第二视频,在第一视频播放完毕后衔接播放第二视频,因此第一视频的起播时长决定了视频文件的起播时长,由于第一视频的起播时长小于第二视频的起播时长,所以可以显著缩短视频起播时长、快速起播,提高用户体验。Compared with the prior art, the video service system of this embodiment intercepts the first video from the video file in advance through the video content management server, and delivers the first video to the CDN cluster. When the client initiates a playback request, the on-demand server Obtain the playback address of the video file to be played, where the playback address includes the playback address of the first video and the playback address of the second video, and redirect the playback request to the CDN node for providing the first video and the CDN node for providing the first video according to the playback address. The CDN node of the second video. When the client plays a video, the first video is loaded and played first, and the second video is cached at the same time, and the second video is played after the first video is played. Therefore, the start-up duration of the first video determines the start-up duration of the video file. The start-up duration of the first video is shorter than the start-up duration of the second video, so the start-up duration of the video can be significantly shortened, the start-up duration can be quickly started, and the user experience can be improved.

本发明的第十实施方式涉及一种非易失性存储介质,用于存储计算机可读程序,所述计算机可读程序用于供计算机执行上述部分或全部的方法实施例。The tenth embodiment of the present invention relates to a non-volatile storage medium for storing a computer-readable program, and the computer-readable program is used for a computer to execute some or all of the above method embodiments.

即,本领域技术人员可以理解,实现上述实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-OnlyMemory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。That is, those skilled in the art can understand that all or part of the steps in the method for implementing the above embodiments can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium and includes several instructions to make a device ( It may be a single chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: U disk, removable hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes.

本领域的普通技术人员可以理解,上述各实施方式是实现本发明的具体实施例,而在实际应用中,可以在形式上和细节上对其作各种改变,而不偏离本发明的精神和范围。Those skilled in the art can understand that the above-mentioned embodiments are specific examples for realizing the present invention, and in practical applications, various changes in form and details can be made without departing from the spirit and the spirit of the present invention. scope.

Claims (10)

Translated fromChinese
1.一种视频起播方法,其特征在于,所述方法包括:1. A method for starting a video, wherein the method comprises:从视频文件中截取出第一视频;Cut out the first video from the video file;将所述第一视频下发到CDN集群,以供客户端在从所述CDN集群加载播放所述第一视频的同时缓存第二视频,所述第一视频的起播时长小于所述第二视频的起播时长,所述第二视频用于衔接所述第一视频以实现所述视频文件的播放。Delivering the first video to the CDN cluster, so that the client can cache the second video while loading and playing the first video from the CDN cluster, and the start-up duration of the first video is shorter than that of the second video The start-up duration of the video, and the second video is used to connect the first video to realize the playback of the video file.2.根据权利要求1所述的视频起播方法,其特征在于,在所述从视频文件中截取出第一视频之后,所述将所述第一视频下发到CDN集群之前,还包括:2. The method for starting a video according to claim 1, wherein after the cutting out the first video from the video file and before the delivering the first video to the CDN cluster, the method further comprises:将所述第一视频转码成至少两种格式的第三视频;Transcoding the first video into a third video in at least two formats;所述将所述第一视频下发到CDN集群,具体包括:The delivering the first video to the CDN cluster specifically includes:将所述至少两种格式的第三视频均下发到所述CDN集群。Delivering the third video in the at least two formats to the CDN cluster.3.根据权利要求1所述的视频起播方法,其特征在于,所述将所述第一视频下发到CDN集群,具体包括:3. The video broadcasting method according to claim 1, wherein the delivering the first video to a CDN cluster specifically comprises:确定待下发至的所述CDN集群中的CDN节点是否为回源压力大于预设压力值的边缘CDN节点,若是,则将所述第一视频优先下发到所述边缘CDN节点。Determine whether the CDN node in the CDN cluster to be delivered is an edge CDN node with a back-to-source pressure greater than a preset pressure value, and if so, deliver the first video to the edge CDN node preferentially.4.根据权利要求3所述的视频起播方法,其特征在于,所述确定待下发至的所述CDN集群中的CDN节点是否为回源压力大于预设压力值的边缘CDN节点,具体包括:4. The method for starting a video according to claim 3, wherein the determining whether the CDN node in the CDN cluster to be delivered is an edge CDN node whose back-to-source pressure is greater than a preset pressure value, specifically include:若CDN节点预设时段的带宽占用率大于占用率阈值,则确定所述CDN节点为边缘CDN节点。If the bandwidth occupancy rate of the CDN node in the preset period is greater than the occupancy rate threshold, it is determined that the CDN node is an edge CDN node.5.根据权利要求1至4中任一项所述的视频起播方法,其特征在于,所述第一视频在所述CDN集群中的缓存时限大于CDN集群中所述第二视频的缓存时限。5. The method for starting a video according to any one of claims 1 to 4, wherein the cache time limit of the first video in the CDN cluster is greater than the cache time limit of the second video in the CDN cluster .6.一种视频起播方法,其特征在于,包括:6. a kind of video broadcasting method, is characterized in that, comprises:响应于客户端的播放请求下发第一视频,同时下发第二视频供所述客户端缓存;Delivering the first video in response to the client's play request, and simultaneously delivering the second video for the client to cache;其中,所述第一视频的起播时长小于所述第二视频的起播时长,所述第二视频用于衔接所述第一视频以实现视频文件的播放。Wherein, the start-up duration of the first video is shorter than the start-up duration of the second video, and the second video is used to connect the first video to realize the playback of the video file.7.一种视频起播方法,其特征在于,包括:7. a kind of video broadcasting method, is characterized in that, comprises:响应于客户端的播放请求获取待播放的视频文件的播放地址;所述播放地址包括第一视频的播放地址以及第二视频的播放地址;所述第一视频从所述视频文件中截取,且所述第一视频的起播时长小于所述第二视频的起播时长,所述第二视频用于衔接所述第一视频以实现所述视频文件的播放;The playback address of the video file to be played is obtained in response to the playback request of the client; the playback address includes the playback address of the first video and the playback address of the second video; the first video is intercepted from the video file, and the The start-up duration of the first video is shorter than the start-up duration of the second video, and the second video is used to connect the first video to realize the playback of the video file;根据所述第一视频的播放地址将所述播放请求重定向于用于提供所述第一视频的CDN节点,根据所述第二视频的播放地址将所述播放请求重定向于用于提供所述第二视频的CDN节点。The play request is redirected to the CDN node for providing the first video according to the play address of the first video, and the play request is redirected to the CDN node for providing the first video according to the play address of the second video The CDN node of the second video.8.一种视频起播方法,其特征在于,包括:8. A video starting method, characterized in that, comprising:加载并播放从待播放的视频文件中截取的第一视频,同时缓存第二视频;其中,所述第一视频的起播时长小于所述第二视频的起播时长,所述第二视频用于衔接所述第一视频以实现所述视频文件的播放;Load and play the first video intercepted from the video file to be played, and cache the second video at the same time; wherein, the start-up duration of the first video is shorter than the start-up duration of the second video, and the second video uses in connecting the first video to realize the playback of the video file;若所述第一视频播放完毕,则衔接于所述第一视频继续播放所述第二视频。If the playing of the first video is completed, the second video is continued to be played in connection with the first video.9.一种视频服务系统,其特征在于,包括:视频内容管理服务器,CDN集群以及点播服务器;所述视频内容管理服务器、CDN集群以及所述点播服务器依次通信连接;9. A video service system, comprising: a video content management server, a CDN cluster and an on-demand server; the video content management server, the CDN cluster and the on-demand server are sequentially connected in communication;其中,所述视频内容管理服务器用于实现如权利要求1至5中任一项所述的视频起播方法;Wherein, the video content management server is used to implement the video playback method according to any one of claims 1 to 5;所述CDN集群用于实现如权利要求6所述的视频起播方法;The CDN cluster is used to implement the video playback method as claimed in claim 6;所述点播服务器用于实现如权利要求7所述的视频起播方法。The on-demand server is used to implement the video playback method according to claim 7 .10.一种存储介质,其特征在于,用于存储计算机可读程序,所述计算机可读程序用于供计算机执行如权利要求1至8中任一项所述的视频起播方法。10 . A storage medium, characterized in that it is used for storing a computer-readable program, and the computer-readable program is used for a computer to execute the video playback method according to any one of claims 1 to 8 . 11 .
CN201910163081.XA2019-03-052019-03-05 Video broadcasting method, video service system and storage mediumActiveCN110022482B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201910163081.XACN110022482B (en)2019-03-052019-03-05 Video broadcasting method, video service system and storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201910163081.XACN110022482B (en)2019-03-052019-03-05 Video broadcasting method, video service system and storage medium

Publications (2)

Publication NumberPublication Date
CN110022482Atrue CN110022482A (en)2019-07-16
CN110022482B CN110022482B (en)2021-07-27

Family

ID=67189293

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201910163081.XAActiveCN110022482B (en)2019-03-052019-03-05 Video broadcasting method, video service system and storage medium

Country Status (1)

CountryLink
CN (1)CN110022482B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN110072122A (en)*2019-04-192019-07-30华为技术有限公司Video playing method and related equipment
CN110430442A (en)*2019-08-082019-11-08赛尔网络有限公司Playback method, apparatus and system
CN110636104A (en)*2019-08-072019-12-31咪咕视讯科技有限公司 A resource request method, electronic device and storage medium
CN111182330A (en)*2019-08-152020-05-19腾讯科技(深圳)有限公司Video playing method and device
CN112135173A (en)*2020-10-102020-12-25Vidaa美国公司Method for improving play start code rate of streaming media and display equipment
CN112887740A (en)*2019-11-292021-06-01阿里巴巴集团控股有限公司Data processing method and device, computer storage medium and electronic equipment
CN113824971A (en)*2020-06-182021-12-21中央广播电视总台Three-dimensional sound live broadcast stream scheduling and distributing method and system
CN114547510A (en)*2022-04-212022-05-27云账户技术(天津)有限公司Optimization method and device for short video display
CN114615550A (en)*2022-03-172022-06-10北京奇艺世纪科技有限公司Video acquisition method and device

Citations (14)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101005371A (en)*2006-01-192007-07-25思华科技(上海)有限公司Caching method and system for stream medium
CN105025391A (en)*2014-04-302015-11-04腾讯科技(深圳)有限公司Video playing method and apparatus
CN105872721A (en)*2015-12-142016-08-17乐视云计算有限公司Processing method and device of play-starting speed
CN106534883A (en)*2015-09-112017-03-22中兴通讯股份有限公司Video control method and device
CN106657196A (en)*2015-11-022017-05-10华为技术有限公司Caching content elimination method and caching apparatus
CN106817621A (en)*2016-12-212017-06-09北京奇虎科技有限公司Mobile terminal and its video backup and playing method and device
CN107872478A (en)*2016-09-262018-04-03中国移动通信有限公司研究院 A content caching method, device and system
WO2018086713A1 (en)*2016-11-142018-05-17Telefonaktiebolaget Lm Ericsson (Publ)Initial bitrate selection for a video delivery session
CN108063769A (en)*2017-12-262018-05-22中兴通讯股份有限公司A kind of implementation method of content service, device and content delivery network node
CN108259975A (en)*2018-02-012018-07-06广州市百果园信息技术有限公司Video broadcasting method, storage medium and terminal
CN108566370A (en)*2018-02-112018-09-21北京奇艺世纪科技有限公司A kind of method and device of data Hui Yuan
CN108737544A (en)*2018-05-222018-11-02中国联合网络通信集团有限公司CDN node dispatching method and device
CN108810572A (en)*2018-06-142018-11-13深圳市茁壮网络股份有限公司A kind of video broadcasting method and device
CN109362064A (en)*2018-09-142019-02-19重庆邮电大学 Task Cache Allocation Strategy Based on MEC in Mobile Edge Computing Networks

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101005371A (en)*2006-01-192007-07-25思华科技(上海)有限公司Caching method and system for stream medium
CN105025391A (en)*2014-04-302015-11-04腾讯科技(深圳)有限公司Video playing method and apparatus
CN106534883A (en)*2015-09-112017-03-22中兴通讯股份有限公司Video control method and device
CN106657196A (en)*2015-11-022017-05-10华为技术有限公司Caching content elimination method and caching apparatus
CN105872721A (en)*2015-12-142016-08-17乐视云计算有限公司Processing method and device of play-starting speed
CN107872478A (en)*2016-09-262018-04-03中国移动通信有限公司研究院 A content caching method, device and system
WO2018086713A1 (en)*2016-11-142018-05-17Telefonaktiebolaget Lm Ericsson (Publ)Initial bitrate selection for a video delivery session
CN106817621A (en)*2016-12-212017-06-09北京奇虎科技有限公司Mobile terminal and its video backup and playing method and device
CN108063769A (en)*2017-12-262018-05-22中兴通讯股份有限公司A kind of implementation method of content service, device and content delivery network node
CN108259975A (en)*2018-02-012018-07-06广州市百果园信息技术有限公司Video broadcasting method, storage medium and terminal
CN108566370A (en)*2018-02-112018-09-21北京奇艺世纪科技有限公司A kind of method and device of data Hui Yuan
CN108737544A (en)*2018-05-222018-11-02中国联合网络通信集团有限公司CDN node dispatching method and device
CN108810572A (en)*2018-06-142018-11-13深圳市茁壮网络股份有限公司A kind of video broadcasting method and device
CN109362064A (en)*2018-09-142019-02-19重庆邮电大学 Task Cache Allocation Strategy Based on MEC in Mobile Edge Computing Networks

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
贺青: ""基于CDN的视频独立队列缓存策略研究_贺青"", 《中国新通信》*

Cited By (15)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN110072122B (en)*2019-04-192022-03-08华为技术有限公司Video playing method and related equipment
CN110072122A (en)*2019-04-192019-07-30华为技术有限公司Video playing method and related equipment
WO2020211731A1 (en)*2019-04-192020-10-22华为技术有限公司Video playing method and related device
CN110636104A (en)*2019-08-072019-12-31咪咕视讯科技有限公司 A resource request method, electronic device and storage medium
CN110430442A (en)*2019-08-082019-11-08赛尔网络有限公司Playback method, apparatus and system
CN111182330A (en)*2019-08-152020-05-19腾讯科技(深圳)有限公司Video playing method and device
CN111182330B (en)*2019-08-152021-11-09腾讯科技(深圳)有限公司Video playing method and device
CN112887740A (en)*2019-11-292021-06-01阿里巴巴集团控股有限公司Data processing method and device, computer storage medium and electronic equipment
CN112887740B (en)*2019-11-292022-11-11阿里巴巴集团控股有限公司Data processing method and device, computer storage medium and electronic equipment
CN113824971A (en)*2020-06-182021-12-21中央广播电视总台Three-dimensional sound live broadcast stream scheduling and distributing method and system
CN112135173A (en)*2020-10-102020-12-25Vidaa美国公司Method for improving play start code rate of streaming media and display equipment
CN112135173B (en)*2020-10-102023-03-21Vidaa美国公司Method for improving play-starting code rate of streaming media and display equipment
CN114615550A (en)*2022-03-172022-06-10北京奇艺世纪科技有限公司Video acquisition method and device
CN114615550B (en)*2022-03-172023-12-08北京奇艺世纪科技有限公司Video acquisition method and device
CN114547510A (en)*2022-04-212022-05-27云账户技术(天津)有限公司Optimization method and device for short video display

Also Published As

Publication numberPublication date
CN110022482B (en)2021-07-27

Similar Documents

PublicationPublication DateTitle
CN110022482B (en) Video broadcasting method, video service system and storage medium
US11792296B2 (en)Edge cache segment prefetching
US10230958B2 (en)Audio splitting with codec-enforced frame sizes
US9787747B2 (en)Optimizing video clarity
US9351020B2 (en)On the fly transcoding of video on demand content for adaptive streaming
US9961395B2 (en)Video caching
US6792449B2 (en)Startup methods and apparatuses for use in streaming content
US9015779B2 (en)Streaming video server with segment length control and methods for use therewith
CN103546540B (en)CDN realizes the method and system of data cached control
US8090761B2 (en)Storage and distribution of segmented media data
CN113141522B (en)Resource transmission method, device, computer equipment and storage medium
US20230217085A1 (en)Presenting media items on a playing device
KR20220158275A (en) A method for playing content streamed over a network in a player on a client device
JP6550405B2 (en) Method of operating a network device arranged along a transmission path between a client terminal and at least one server and corresponding network device
CN112243136B (en)Content playing method, video storage method and device
KR20160105803A (en)Method for providing a content part of a multimedia content to a client terminal, corresponding cache
US10938939B2 (en)Client-side quality-of-service (QOS) for viewing of adaptive bitrate (ABR) streams
WO2024251816A1 (en)Method and cache server for live video content delivery

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp