CN105916030A - A method, device and system for recording video-on-demand breakpoint information - Google Patents
A method, device and system for recording video-on-demand breakpoint information Download PDFInfo
- Publication number
- CN105916030A CN105916030A CN201610408200.XA CN201610408200A CN105916030A CN 105916030 A CN105916030 A CN 105916030A CN 201610408200 A CN201610408200 A CN 201610408200A CN 105916030 A CN105916030 A CN 105916030A
- Authority
- CN
- China
- Prior art keywords
- video
- information
- breakpoint information
- breakpoint
- playback terminal
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 38
- 230000008569 process Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 238000012545 processing Methods 0.000 description 6
- 238000004364 calculation method Methods 0.000 description 3
- 238000012790 confirmation Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/45—Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
- H04N21/462—Content or additional data management, e.g. creating a master electronic program guide from data received from the Internet and a Head-end, controlling the complexity of a video stream by scaling the resolution or bit-rate based on the client capabilities
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/472—End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
- H04N21/47217—End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for controlling playback functions for recorded or on-demand content, e.g. using progress bars, mode or play-point indicators or bookmarks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/83—Generation or processing of protective or descriptive data associated with content; Content structuring
- H04N21/845—Structuring of content, e.g. decomposing content into time segments
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/83—Generation or processing of protective or descriptive data associated with content; Content structuring
- H04N21/845—Structuring of content, e.g. decomposing content into time segments
- H04N21/8455—Structuring of content, e.g. decomposing content into time segments involving pointers to the content, e.g. pointers to the I-frames of the video stream
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/85—Assembly of content; Generation of multimedia applications
- H04N21/854—Content authoring
- H04N21/8547—Content authoring involving timestamps for synchronizing content
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Computer Security & Cryptography (AREA)
- Human Computer Interaction (AREA)
- Television Signal Processing For Recording (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
Description
技术领域technical field
本发明涉及互联网应用技术领域,特别涉及一种记录点播视频断点信息的方法、装置及系统。The invention relates to the technical field of Internet applications, in particular to a method, device and system for recording video-on-demand breakpoint information.
背景技术Background technique
随着互联网技术的发展,在线观看电影、电视剧、综艺节目等视频已经成为一种重要的娱乐项目。随着各类电子产品的普及,用户可以通过计算机、手机、平板电脑等多种视频播放终端点播视频,当用户切换视频播放终端继续观看同一个视频文件时,如何实现视频文件的接续播放成为亟待解决的问题。为实现点播视频文件的接续播放,需要记录点播视频文件在上一个视频播放终端进行播放结束时的断点信息,从而当前视频播放终端能够根据断点信息继续对点播视频文件进行播放。With the development of Internet technology, watching videos such as movies, TV dramas, and variety shows online has become an important entertainment item. With the popularity of various electronic products, users can order videos through various video playback terminals such as computers, mobile phones, and tablet computers. When users switch video playback terminals and continue to watch the same video file, how to realize continuous playback of video files has become an urgent need. solved problem. In order to realize the continuous playback of video-on-demand files, it is necessary to record the breakpoint information of the video-on-demand files at the end of the last video playback terminal, so that the current video playback terminal can continue to play the video-on-demand files according to the breakpoint information.
目前,记录点播视频断点信息的方法主要包括:正在播放视频文件的视频播放终端,每隔一定时间向服务器发送一次视频的播放进度,以最近一次播放进度作为点播视频的断点信息。At present, the method for recording video-on-demand breakpoint information mainly includes: the video playback terminal that is playing the video file sends the video playback progress to the server at regular intervals, and uses the latest playback progress as the video-on-demand breakpoint information.
针对于现有技术记录点播视频断点信息的方法,视频播放终端每隔一定时间向服务器发送一次视频的播放进度,以对点播视频的断点信息进行更新,由于同一个服务器同时对多个视频播放终端进行服务,每个视频播放终端每隔一定时间都会向服务器发送一次视频的播放进度,造成服务器的负载较大。Aiming at the method of recording video-on-demand breakpoint information in the prior art, the video playback terminal sends the video playback progress to the server at regular intervals to update the breakpoint information of the video-on-demand. The playback terminal provides services, and each video playback terminal will send the video playback progress to the server at regular intervals, resulting in a large load on the server.
发明内容Contents of the invention
本发明实施例提供了一种记录点播视频断点信息的方法、装置及系统,能够降低服务器的负载。Embodiments of the present invention provide a method, device and system for recording video-on-demand breakpoint information, which can reduce server load.
本发明实施例提供了一种记录点播视频断点信息的方法,包括:An embodiment of the present invention provides a method for recording video-on-demand breakpoint information, including:
针对于任意一个视频播放终端,实时接收所述视频播放终端发送的获取切片视频文件的请求信息;For any video playback terminal, receive the request information for obtaining sliced video files sent by the video playback terminal in real time;
获取最近一次接收到所述请求信息的第一时间;Obtain the first time when the request information was received last time;
判断当前时间至所述第一时间的时长是否大于预设的超时时长;judging whether the duration from the current time to the first time is greater than a preset timeout duration;
如果是,根据所述最近一次接收到的请求信息,形成对应的断点信息,并将所述断点信息存储到预设的断点信息数据库中,其中所述断点信息包括用户ID、视频文件ID及时间戳;If so, according to the last received request information, form corresponding breakpoint information, and store the breakpoint information in the preset breakpoint information database, wherein the breakpoint information includes user ID, video File ID and timestamp;
如果否,执行所述获取最近一次接收到所述请求的第一时间。If not, perform the acquiring the first time when the request was last received.
优选地,Preferably,
在所述实时接收所述视频播放终端发送的获取切片视频文件的请求信息之后进一步包括:Further comprising:
将所述请求信息发送给推流服务器,使所述推流服务器根据所述请求信息,将所述视频播放终端所需的切片视频文件发送给所述视频播放终端。Sending the request information to the streaming server, so that the streaming server sends the sliced video files required by the video playback terminal to the video playback terminal according to the request information.
优选地,Preferably,
所述将所述请求信息发送给推流服务器包括:The sending of the request information to the streaming server includes:
针对于包括至少一个推流服务器的推流服务器集群,分别获取每一个所述推流服务器的网络输出带宽占用及磁盘I/O速度,根据所述网络输出带宽占用及磁盘I/O速度,确定每一个所述推流服务器的负载,将所述请求信息发送给负载最小的推流服务器。For a streaming server cluster including at least one streaming server, obtain the network output bandwidth occupancy and disk I/O speed of each of the streaming streaming servers respectively, and determine according to the network output bandwidth occupancy and disk I/O speed For each load of the streaming server, the request information is sent to the streaming server with the smallest load.
优选地,Preferably,
所述根据所述最近一次接收到的请求信息,形成对应的断点信息包括:The forming of corresponding breakpoint information according to the latest received request information includes:
对所述最近一次接收到的请求信息进行解析,从中获取登录在所述视频播放终端上的用户ID、在所述视频播放终端上所点播视频的视频文件ID以及所要获取的切片视频文件的起始位置对应的时间戳,形成包括所述用户ID、视频文件ID及时间戳的断点信息。The request information received last time is analyzed, and the user ID logged in on the video playback terminal, the video file ID of the video requested on the video playback terminal and the sliced video file to be obtained are obtained from it. The time stamp corresponding to the starting position forms breakpoint information including the user ID, video file ID and time stamp.
优选地,Preferably,
所述将所述断点信息存储到预设的断点信息数据库中包括:The storing the breakpoint information in the preset breakpoint information database includes:
判断所述断点信息数据库中是否包括与所述断点信息对应于同一个用户ID及同一个视频文件ID的其他断点信息,如果是,用所述断点信息覆盖所述其他断点信息,否则直接将所述断点信息存储到所述断点信息数据库中。Judging whether the breakpoint information database includes other breakpoint information corresponding to the same user ID and the same video file ID as the breakpoint information, if so, covering the other breakpoint information with the breakpoint information , otherwise directly store the breakpoint information in the breakpoint information database.
本发明实施例还提供了一种记录点播视频断点信息的装置,包括:接收单元、判断单元及执行单元;The embodiment of the present invention also provides a device for recording video-on-demand breakpoint information, including: a receiving unit, a judging unit, and an executing unit;
所述接收单元,用于针对于任意一个视频播放终端,实时接收所述视频播放终端发送的获取切片视频文件的请求信息;The receiving unit is configured to receive, in real time, the request information for obtaining sliced video files sent by the video playback terminal for any video playback terminal;
所述判断单元,用于获取所述接收单元最近一次接收到所述请求信息的第一时间,并判断当前时间至所述第一时间的时长是否大于预设的超时时长;The judging unit is configured to obtain the first time when the receiving unit received the request information last time, and judge whether the time from the current time to the first time is greater than a preset timeout time;
所述执行单元,用于根据所述的判断单元的判断结果,如果是,根据所述最近一次接收到的请求信息形成对应的断点信息,并将所述断点信息存储到预设的断点信息数据库中,其中所述断点信息包括用户ID、视频文件ID及时间戳;如果否,触发所述判断单元执行所述获取所述接收单元最近一次接收到所述请求信息的第一时间。The executing unit is configured to, according to the judgment result of the judging unit, if yes, form corresponding breakpoint information according to the latest received request information, and store the breakpoint information in a preset breakpoint In the point information database, wherein the breakpoint information includes user ID, video file ID and time stamp; if not, trigger the judgment unit to execute the acquisition of the first time when the receiving unit received the request information last time .
优选地,该装置进一步包括:转发单元;Preferably, the device further includes: a forwarding unit;
所述转发单元,用于将所述接收单元接收到的请求信息发送给推流服务器,使所述推流服务器根据所述请求信息,将所述视频播放终端所需的切片视频文件发送给所述视频播放终端。The forwarding unit is configured to send the request information received by the receiving unit to the streaming server, so that the streaming server sends the sliced video files required by the video playback terminal to the streaming server according to the request information. The above video playback terminal.
优选地,Preferably,
所述转发单元,用于针对于包括至少一个推流服务器的推流服务器集群,分别获取每一个所述推流服务器的网络输出带宽占用及磁盘I/O速度,根据所述网络输出带宽占用及磁盘I/O速度,确定每一个所述推流服务器的负载,将所述请求信息发送给负载最小的推流服务器。The forwarding unit is configured to obtain the network output bandwidth occupancy and the disk I/O speed of each of the streaming server for a streaming server cluster including at least one streaming server, and obtain the network output bandwidth occupation and disk I/O speed according to the network output bandwidth occupancy and The disk I/O speed determines the load of each streaming server, and sends the request information to the streaming server with the least load.
优选地,Preferably,
所述执行单元,用于对所述最近一次接收到的请求信息进行解析,从中获取登录在所述视频播放终端上的用户ID、在所述视频播放终端上所点播视频的视频文件ID以及所要获取的切片视频文件的起始位置对应的时间戳,行程包括所述用户ID、视频文件ID及时间戳的断点信息。The execution unit is configured to analyze the request information received last time, and obtain the user ID logged in on the video playback terminal, the video file ID of the video requested on the video playback terminal, and the required The time stamp corresponding to the starting position of the obtained segmented video file, and the itinerary includes the breakpoint information of the user ID, video file ID and time stamp.
优选地,Preferably,
所述执行单元,用于判断所述断点信息数据库中是否包括与所述断点信息对应于同一个用户ID及同一个视频文件ID的其他断点信息,如果是,用所述断点信息覆盖所述其他断点信息,否则直接将所述断点信息存储到所述断点信息数据库中。The execution unit is used to judge whether the breakpoint information database includes other breakpoint information corresponding to the same user ID and the same video file ID as the breakpoint information, and if so, use the breakpoint information Overwrite the other breakpoint information, or directly store the breakpoint information in the breakpoint information database.
本发明实施例还提供了一种记录点播视频断点信息的系统,包括:断点信息数据库、至少一个视频播放终端及本发明实施例提供的任意一种记录点播视频断点信息的装置;The embodiment of the present invention also provides a system for recording video-on-demand breakpoint information, including: a breakpoint information database, at least one video playback terminal, and any device for recording video-on-demand breakpoint information provided by the embodiments of the present invention;
所述视频播放终端,用于向所述记录点播视频断点信息的装置发送获取切片视频文件的请求信息;The video playback terminal is configured to send request information for obtaining sliced video files to the device for recording video-on-demand breakpoint information;
所述断点信息数据库,用于存储所述记录点播视频断点信息的装置形成的断点信息。The breakpoint information database is used to store the breakpoint information formed by the device for recording video-on-demand breakpoint information.
优选地,该系统进一步包括:推流服务器;Preferably, the system further includes: a streaming server;
所述推流服务器,用于接收所述记录点播视频断点信息的装置发送的请求信息,根据所述请求信息,将所述视频播放终端所需的切片视频文件发送给所述视频播放终端。The streaming server is configured to receive the request information sent by the device for recording video-on-demand breakpoint information, and send the sliced video files required by the video playback terminal to the video playback terminal according to the request information.
本发明实施例提供了一种记录点播视频断点信息的方法、装置及系统,由于视频播放终端在播放点播视频时需要不断发送获取切片视频文件的请求信息,当视频播放终端不发送请求信息的时长大于超时时长后,可以确定视频播放终端停止了点播视频的播放,根据最近一次视频播放终端发送的请求信息可以确定视频的播放进度,从而形成对应的断点信息。这样,视频播放终端无需单独发送点播视频的播放进度信息,通过视频播放终端发送的请求信息便可以对点播视频的断点信息进行记录,节省了服务器对播放进度信息进行接收和处理时消耗的计算资源,从而降低了服务器的负载。Embodiments of the present invention provide a method, device and system for recording video-on-demand breakpoint information. Since the video playback terminal needs to continuously send request information for obtaining sliced video files when playing video-on-demand, when the video playback terminal does not send the request information After the duration is greater than the timeout duration, it can be determined that the video playback terminal has stopped playing the on-demand video, and the video playback progress can be determined according to the request information sent by the video playback terminal last time, thereby forming corresponding breakpoint information. In this way, the video playback terminal does not need to send the playback progress information of the video on demand separately, and the breakpoint information of the video on demand can be recorded through the request information sent by the video playback terminal, which saves the calculation consumed by the server when receiving and processing the playback progress information resources, thereby reducing the load on the server.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are For some embodiments of the present invention, those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1是本发明一个实施例提供的一种记录点播视频断点信息的方法流程图;Fig. 1 is a kind of flow chart of the method for recording video-on-demand breakpoint information provided by one embodiment of the present invention;
图2是本发明一个实施例提供的一种记录点播视频断点信息的装置示意图;Fig. 2 is a schematic diagram of a device for recording video-on-demand breakpoint information provided by an embodiment of the present invention;
图3是本发明另一个实施例提供的一种记录点播视频断点信息的装置示意图;Fig. 3 is a schematic diagram of a device for recording video-on-demand breakpoint information provided by another embodiment of the present invention;
图4是本发明一个实施例提供的一种记录点播视频断点信息的装置所在设备的示意图;FIG. 4 is a schematic diagram of a device for recording video-on-demand breakpoint information provided by an embodiment of the present invention;
图5是本发明一个实施例提供的一种记录点播视频断点信息的系统示意图;5 is a schematic diagram of a system for recording video-on-demand breakpoint information provided by an embodiment of the present invention;
图6是本发明另一个实施例提供的一种记录点播视频断点信息的系统示意图;6 is a schematic diagram of a system for recording video-on-demand breakpoint information provided by another embodiment of the present invention;
图7是本发明另一个实施例提供的一种记录点播视频断点信息的方法流程图;FIG. 7 is a flowchart of a method for recording video-on-demand breakpoint information provided by another embodiment of the present invention;
图8是本发明一个实施例提供的一种断点信息的适用方法流程图。Fig. 8 is a flowchart of a method for applying breakpoint information provided by an embodiment of the present invention.
具体实施方式detailed description
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例,基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work belong to the protection of the present invention. scope.
如图1所示,本发明实施例提供了一种记录点播视频断点信息的方法,该方法可以包括以下步骤:As shown in Figure 1, the embodiment of the present invention provides a kind of method for recording video-on-demand breakpoint information, and this method may comprise the following steps:
步骤101:针对于任意一个视频播放终端,实时接收所述视频播放终端发送的获取切片视频文件的请求信息;Step 101: For any video playback terminal, receive the request information for obtaining sliced video files sent by the video playback terminal in real time;
步骤102:获取最近一次接收到所述请求信息的第一时间;Step 102: Obtain the first time when the request information was last received;
步骤103:判断当前时间至所述第一时间的时长是否大于预设的超时时长,如果是,执行步骤104,否则执行步骤102;Step 103: judging whether the duration from the current time to the first time is greater than the preset timeout duration, if yes, execute step 104, otherwise execute step 102;
步骤104:根据所述最近一次接收到的请求信息,形成对应的断点信息,并将所述断点信息存储到预设的断点信息数据库中,其中所述断点信息包括用户ID、视频文件ID及时间戳。Step 104: According to the request information received last time, form corresponding breakpoint information, and store the breakpoint information in a preset breakpoint information database, wherein the breakpoint information includes user ID, video File ID and timestamp.
本发明实施例提供了一种记录点播视频断点信息的方法,由于视频播放终端在播放点播视频时需要不断发送获取切片视频文件的请求信息,当视频播放终端不发送请求信息的时长大于超时时长后,可以确定视频播放终端停止了点播视频的播放,根据最近一次视频播放终端发送的请求信息可以确定视频的播放进度,从而形成对应的断点信息。这样,视频播放终端无需单独发送点播视频的播放进度信息,通过视频播放终端发送的请求信息便可以对点播视频的断点信息进行记录,节省了服务器对播放进度信息进行接收和处理时消耗的计算资源,从而降低了服务器的负载。The embodiment of the present invention provides a method for recording video-on-demand breakpoint information. Since the video playback terminal needs to continuously send request information for obtaining sliced video files when playing video-on-demand, when the video playback terminal does not send the request information, the time length is longer than the timeout period. Finally, it can be determined that the video playback terminal has stopped playing the on-demand video, and the video playback progress can be determined according to the request information sent by the video playback terminal last time, thereby forming corresponding breakpoint information. In this way, the video playback terminal does not need to send the playback progress information of the video on demand separately, and the breakpoint information of the video on demand can be recorded through the request information sent by the video playback terminal, which saves the calculation consumed by the server when receiving and processing the playback progress information resources, thereby reducing the load on the server.
在本发明一个实施例中,在接收到视频播放终端发送的请求信息后,可以将接收到的请求信息发送给推流服务器,推流服务器接收到请求信息后,根据请求信息将视频播放终端所需的切片视频文件直接发送给视频播放终端。这样,在记录点播视频断点信息的同时,不会影响视频播放终端正常地获取所需的切片视频文件,保证视频播放终端能够正常地进行视频的播放。In one embodiment of the present invention, after receiving the request information sent by the video playback terminal, the received request information can be sent to the push stream server, and after receiving the request information, the push stream server sends the request information sent by the video playback terminal according to the request information. The required sliced video files are directly sent to the video playback terminal. In this way, while recording the video-on-demand breakpoint information, it will not affect the normal acquisition of the required sliced video files by the video playback terminal, ensuring that the video playback terminal can normally play the video.
在本发明一个实施例中,在向推流服务器发送请求信息时,一个推流服务器集群中包括有至少一个推流服务器可供选择,分别获取每一个推流服务器的网络输出带宽占用及磁盘I/O速度,根据获取到的网络输出带宽占用及磁盘I/O速度确定每一个推流服务器的负载,将请求信息发送给负载最小的一个推流服务器。将请求信息发送给负载较小的推流服务器,由负载较小的推流服务器向视频播放终端发送切片视频文件,可以使各个推流服务器的负载更加均衡,提高切片视频文件的发送速度,保证视频播放终端能够流畅地播放视频。In one embodiment of the present invention, when sending request information to the streaming server, a streaming server cluster includes at least one streaming server to choose from, and obtains the network output bandwidth occupation and disk I of each streaming server respectively. /O speed, determine the load of each streaming server according to the obtained network output bandwidth occupation and disk I/O speed, and send the request information to the streaming server with the smallest load. Send the request information to the streaming server with a small load, and the streaming server with a small load will send sliced video files to the video playback terminal, which can make the load of each streaming server more balanced, increase the sending speed of sliced video files, and ensure The video playback terminal can play videos smoothly.
在本发明一个实施例中,在确定第一时间至当前时间的时长超过超时时长后,对请求信息进行解密,从中获取到登录在对应视频播放终端上的用户ID、在对应视频播放终端上所点播视频的视频文件ID以及该请求信息所要获取的切片视频文件的起始位置对应的时间戳,根据获取到的用户ID、视频文件ID及时间戳形成对应的断点信息。通过断点信息中包括的用户ID、视频文件ID及时间戳便可以确定一个用户对一个视频的观看进度,从而通过断点信息可以使用户在更换视频播放终端或重启播放软件后继续观看同一个视频,无需手动调整播放进度,提升用户观看视频的体验。In one embodiment of the present invention, after it is determined that the duration from the first time to the current time exceeds the timeout duration, the request information is decrypted, from which the user ID logged in on the corresponding video playback terminal, and the user ID registered on the corresponding video playback terminal are obtained. The video file ID of the video-on-demand and the time stamp corresponding to the start position of the sliced video file to be obtained by the request information form corresponding breakpoint information according to the obtained user ID, video file ID and time stamp. The user ID, video file ID and time stamp included in the breakpoint information can determine a user’s viewing progress of a video, so that the user can continue to watch the same video after changing the video playback terminal or restarting the playback software through the breakpoint information. Video, no need to manually adjust the playback progress, improving the user experience of watching videos.
在本发明一个实施例中,在对断点信息进行存储时,首先判断用于存储断点信息的断点信息数据库中是否包括与待存储断点信息对应的用户ID及视频文件ID均相同的其他断点信息,如果是,用待存储的断点信息将与之对应用户ID及视频文件ID均相同的其他断点信息覆盖,否则直接将待存储的断点信息存储到断点信息数据库中。这样,断点信息数据库中存储的断点信息都是反映用户观看视频的最新进度,保证根据断点信息能够将视频的播放进度调整到用户上次观看到的位置,保证对断点信息进行记录的准确性。In one embodiment of the present invention, when storing the breakpoint information, it is first judged whether the breakpoint information database used to store the breakpoint information includes the same user ID and video file ID corresponding to the breakpoint information to be stored. Other breakpoint information, if yes, cover other breakpoint information with the same user ID and video file ID with the breakpoint information to be stored, otherwise directly store the breakpoint information to be stored in the breakpoint information database . In this way, the breakpoint information stored in the breakpoint information database reflects the latest progress of the user watching the video, ensuring that the playback progress of the video can be adjusted to the position that the user watched last time according to the breakpoint information, and that the breakpoint information is recorded accuracy.
如图2所示,本发明一个实施例提供了一种记录点播视频断点信息的装置,包括:接收单元201、判断单元202及执行单元203;As shown in Figure 2, an embodiment of the present invention provides a device for recording video-on-demand breakpoint information, including: a receiving unit 201, a judging unit 202, and an executing unit 203;
接收单元201,用于针对于任意一个视频播放终端,实时接收该视频播放终端发送的后去切片视频文件的请求信息;The receiving unit 201 is configured to receive, in real time, the request information for de-slicing video files sent by the video playback terminal for any video playback terminal;
判断单元202,用于获取接收单元201最近一次接收到所述请求信息的第一时间,并判断当前施加至第一时间的时长是否大于预设的超时时长;The judging unit 202 is configured to acquire the first time when the receiving unit 201 received the request information last time, and judge whether the duration currently applied to the first time is greater than a preset timeout duration;
执行单元203,用于根据判断单元202的判断结果,如果是,根据所述最近一次接收到的请求信息形成对应的断点信息,并将所述断点信息存储到预设的断点信息数据库中,其中断点信息包括用户ID、视频文件ID及时间戳;如果否,触发判断单元202执行所述获取接收单元201最近一次接收到所述请求信息的第一时间。The execution unit 203 is configured to, according to the judgment result of the judging unit 202, if yes, form corresponding breakpoint information according to the last received request information, and store the breakpoint information in a preset breakpoint information database , wherein the breakpoint information includes user ID, video file ID and time stamp; if not, the trigger judgment unit 202 executes the acquisition of the first time when the receiving unit 201 received the request information last time.
本发明实施例提供了一种记录点播视频断点信息的装置,执行单元根据判断单元的判断结果,针对于任意一个视频播放终端,当接收单元最近一次接收到该视频播放终端发送的请求信息的第一时间至当前时间的时长超过超时时长后,执行单元根据接收单元最近一次接收到的该视频播放终端发送的请求信息,形成对应的断点信息并进行存储。执行单元根据视频播放终端发送的获取切片视频文件的请求信息形成断点信息,无需由视频播放终端每隔一定时间单独发送一次视频播放进度信息,实现请求信息的多重利用,节省了服务器接收及处理视频播放进度信息消耗的计算资源,从而降低了服务器的负载。The embodiment of the present invention provides a device for recording video-on-demand breakpoint information. According to the judgment result of the judging unit, the execution unit is aimed at any video playback terminal, when the receiving unit receives the request information sent by the video playback terminal last time. After the time from the first time to the current time exceeds the timeout time, the execution unit generates and stores corresponding breakpoint information according to the request information sent by the video playback terminal received by the receiving unit last time. The execution unit forms breakpoint information according to the request information sent by the video playback terminal to obtain sliced video files, without the need for the video playback terminal to send the video playback progress information separately at regular intervals, so as to realize multiple utilization of request information and save server receiving and processing The computing resource consumed by the video playback progress information reduces the load on the server.
在本发明一个实施例中,如图3所示,该记录点播视频断点信息的装置还可以包括:转发单元204;In one embodiment of the present invention, as shown in FIG. 3 , the device for recording video-on-demand breakpoint information may further include: a forwarding unit 204;
转发单元204将接收单元201接收到的请求信息发送给推流服务器,使推流服务器根据所述请求信息,将视频播放终端所需的切片视频文件发送给视频播放终端。The forwarding unit 204 sends the request information received by the receiving unit 201 to the streaming server, so that the streaming server sends the sliced video files required by the video playback terminal to the video playback terminal according to the request information.
转发单元将请求信息发送给推流服务器后,推流服务器就能够根据请求信息将视频播放终端所需的切片视频文件发送给视频播放终端。这样,执行单元根据请求信息形成断点信息的过程,不会影响推流服务器正常向视频播放终端发送切片视频文件,保证视频播放终端能够正常获取切片视频文件,以对视频文件进行正常播放。After the forwarding unit sends the request information to the streaming server, the streaming server can send the sliced video files required by the video playback terminal to the video playback terminal according to the request information. In this way, the process of the execution unit forming breakpoint information according to the request information will not affect the normal sending of sliced video files to the video playback terminal by the streaming server, ensuring that the video playback terminal can normally obtain the sliced video files for normal playback of the video files.
在本发明一个实施例中,一个推流服务器集群中可能有多个推流服务器可用,转发单元在向推流服务器发送请求信息时,首先获取各个推流服务器的网络输出带宽占用及磁盘I/O速度,根据获取到的网络输出带宽占用及磁盘I/O速度确定每一个推流服务器的负载,最后将请求信息发送给负载最小的一个推流服务器。通过确定推流服务器的负载情况,将请求信息发送给负载最小的推流服务器进行处理,使各个推流服务器的负载更加均衡,保证推流服务器能够及时将所需的切片视频文件发送给视频播放终端,使视频播放终端能够流畅的播放视频文件。In one embodiment of the present invention, there may be multiple streaming servers available in a cluster of streaming servers. When the forwarding unit sends request information to the streaming server, it first obtains the network output bandwidth occupation and disk I/O of each streaming server. O speed, determine the load of each streaming server according to the obtained network output bandwidth occupation and disk I/O speed, and finally send the request information to the streaming server with the smallest load. By determining the load of the push server, the request information is sent to the push server with the smallest load for processing, so that the load of each push server is more balanced, and the push server can promptly send the required sliced video files to the video player The terminal enables the video playback terminal to play video files smoothly.
在本发明一个实施例中,执行单元通过对请求信息进行解析,从中获取到登录在视频播放终端上的用户ID、视频播放终端上播放的视频文件的视频文件ID以及该请求信息所要获取的切片视频文件起始位置对应的时间戳,根据获取到的用户ID、视频文件ID及时间戳形成断点信息。断点信息中包括的用户ID为登录在视频播放终端上的账户名,包括的视频文件ID为视频播放终端上播放的视频文件的ID,包括的时间戳为视频文件的播放进度。通过断点信息中包括的用户ID、视频文件ID及时间戳便可以确定一个用户对一个视频的观看进度,从而通过断点信息可以使用户在更换视频播放终端或重启播放软件后继续观看同一个视频,无需手动调整播放进度,提升用户观看视频的体验。In one embodiment of the present invention, the execution unit parses the request information to obtain the user ID logged in on the video playback terminal, the video file ID of the video file played on the video playback terminal, and the slice to be obtained by the request information The time stamp corresponding to the starting position of the video file is used to form breakpoint information according to the obtained user ID, video file ID and time stamp. The user ID included in the breakpoint information is the account name logged in on the video playback terminal, the included video file ID is the ID of the video file played on the video playback terminal, and the included timestamp is the playback progress of the video file. The user ID, video file ID and time stamp included in the breakpoint information can determine a user’s viewing progress of a video, so that the user can continue to watch the same video after changing the video playback terminal or restarting the playback software through the breakpoint information. Video, no need to manually adjust the playback progress, improving the user experience of watching videos.
在本发明一个实施例中,执行单元在对断点信息进行存储时,首先判断断点信息数据库中是否包括与待存储断点信息对应同一个用户ID及同一个视频文件ID的其他断点信息,如果有,则用存储断点信息覆盖与之对应用户ID及视频文件ID均相同的其他断点信息,否则直接将待存储断点信息存储到断点信息数据库中。这样保证断点信息数据库中存储的断点信息是最新的,保证对断点信息进行记录的准确性。In one embodiment of the present invention, when storing the breakpoint information, the execution unit first judges whether the breakpoint information database includes other breakpoint information corresponding to the same user ID and the same video file ID as the breakpoint information to be stored , if there is, then use the stored breakpoint information to overwrite other breakpoint information corresponding to the same user ID and video file ID, otherwise directly store the breakpoint information to be stored in the breakpoint information database. This ensures that the breakpoint information stored in the breakpoint information database is up-to-date, and ensures the accuracy of recording the breakpoint information.
本发明实施例提供的记录点播视频断点信息的装置,可以通过软件实现,也可以通过硬件或软硬件结合的方法实现。从软件层面而言,上述实施例提供的记录点播视频断点信息的装置作为一个逻辑意义上的装置,是通过其所在设备的CPU将非易失性存储器中对应的计算机程序指令读取到内存中运行形成的。从硬件层面而言,如图4所示,为本发明实施例提供的记录点播视频断点信息的装置所在设备的一种硬件结构图,除了图4所示的处理器、内存、网络接口、以及非易失性存储器之外,实施例中装置所在的设备通常还可以包括其他硬件,如负责处理报文的转发芯片等等。The device for recording video-on-demand breakpoint information provided by the embodiment of the present invention can be realized by software, or by hardware or a combination of software and hardware. From the perspective of software, the device for recording video-on-demand breakpoint information provided by the above-mentioned embodiments is a device in a logical sense, which reads the corresponding computer program instructions in the non-volatile memory into the memory through the CPU of the device where it is formed during operation. From the hardware level, as shown in Figure 4, it is a hardware structure diagram of the device where the device for recording video-on-demand breakpoint information provided by the embodiment of the present invention is located, except for the processor, memory, network interface, In addition to the non-volatile memory, the device where the device in the embodiment is located may generally include other hardware, such as a forwarding chip responsible for processing packets, and the like.
如图5所示,本发明一个实施例提供了一种记录点播视频断点信息的系统,包括:断点信息数据库501、至少一个视频播放终端502及本发明实施例提供的任意一种记录点播视频断点信息的装置503;As shown in Figure 5, an embodiment of the present invention provides a system for recording video-on-demand breakpoint information, including: a breakpoint information database 501, at least one video playback terminal 502, and any recording video-on-demand provided by the embodiments of the present invention A device 503 for video breakpoint information;
视频播放终端502,用于向记录点播视频断点信息的装置503发送获取切片视频文件的请求信息;The video playback terminal 502 is configured to send request information for obtaining sliced video files to the device 503 for recording video-on-demand breakpoint information;
断点信息数据库501,用于存储记录点播视频断点信息的装置503形成的断点信息。The breakpoint information database 501 is used for storing the breakpoint information formed by the device 503 for recording video-on-demand breakpoint information.
在本发明一个实施例中,如图6所示,记录点播视频断点信息的系统还包括:推流服务器504;In one embodiment of the present invention, as shown in FIG. 6 , the system for recording video-on-demand breakpoint information further includes: a streaming server 504;
推流服务器504,用于接收记录点播视频断点信息的装置403发送的请求信息,根据请求信息,将视频播放终端401所需的切片视频文件发送给视频播放终端401。The streaming server 504 is configured to receive the request information sent by the device 403 for recording video-on-demand breakpoint information, and send the sliced video files required by the video playback terminal 401 to the video playback terminal 401 according to the request information.
在本发明一个实施例中,记录点播视频断点信息的装置可以通过会话资源管理服务器(Sessions Resources Management,SRM)实现。In an embodiment of the present invention, the device for recording video-on-demand breakpoint information may be implemented by a session resource management server (Sessions Resources Management, SRM).
下面结合上述实施例提供的记录点播视频断点信息的装置及系统,以用户中断观看某一视频为例,对本发明实施例提供的记录点播视频断点信息的方法作进一步说明。如图7所示,本发明一个实施例提供了一种记录点播视频断点信息的方法,该方法可以包括以下步骤:In the following, the method for recording video-on-demand breakpoint information provided by the embodiment of the present invention will be further described in combination with the device and system for recording video-on-demand breakpoint information provided by the above-mentioned embodiments, taking the user interrupting watching a certain video as an example. As shown in Figure 7, one embodiment of the present invention provides a kind of method for recording video-on-demand breakpoint information, and this method may comprise the following steps:
步骤701:接收视频播放终端获取索引文件的请求信息,并下发索引文件。Step 701: Receive the request information of the video player terminal to obtain the index file, and deliver the index file.
在本发明一个实施例中,用户要观看一个视频时,在视频播放终端提供的导航页上选择所要观看的视频,对该视频进行点播。用户点播视频后,视频播放终端向记录点播视频断点信息的装置发送一条请求信息,该请求信息的目的为获取所要观看视频的索引文件,记录点播视频断点信息的装置接收到该请求信息后,从推流服务器上获取所需的索引文件,并将获取到的索引文件发送给视频播放终端。In one embodiment of the present invention, when a user wants to watch a video, he selects the video to watch on the navigation page provided by the video playback terminal, and performs on-demand broadcasting of the video. After the user orders the video, the video player terminal sends a request message to the device that records the video-on-demand breakpoint information. The purpose of the request message is to obtain the index file of the video to be watched. After the device that records the video-on-demand breakpoint information receives the request , obtain the required index file from the streaming server, and send the obtained index file to the video playback terminal.
例如,用户A要在笔记本电脑1上观看电影B,则用户A在笔记本电脑1提供的导航页上直接选择电影B,或通过搜索功能搜索电影B,对电影B进行点播。记录点播视频断点信息的装置通过会话资源管理服务器SRM实现,笔记本电脑1向会话资源管理服务器SRM发送获取电影B的索引文件M3U8的请求信息,会话资源管理服务器SRM在接收到该请求信息后,从推流服务器上获取所需的索引文件M3U8,并将获取到的索引文件M3U8发送给笔记本电脑1。For example, user A wants to watch movie B on notebook computer 1, then user A directly selects movie B on the navigation page provided by notebook computer 1, or searches for movie B through the search function, and orders movie B. The device for recording video-on-demand breakpoint information is realized by the session resource management server SRM. The notebook computer 1 sends the request information for obtaining the index file M3U8 of movie B to the session resource management server SRM. After receiving the request information, the session resource management server SRM, Obtain the required index file M3U8 from the streaming server, and send the obtained index file M3U8 to the notebook computer 1 .
步骤702:接收视频播放终端发送的获取切片视频文件的请求信息,判断最近一次接收到请求信息的时间至当前时间的时长是否超过预设的超时时长,如果是,执行步骤703,否则继续执行步骤702。Step 702: Receive the request information sent by the video playback terminal to obtain the sliced video file, and determine whether the time from the last time the request information is received to the current time exceeds the preset timeout period, if yes, execute step 703, otherwise continue to execute the step 702.
在本发明一个实施例中,视频播放终端在播放视频文件时,视频文件以切片视频文件的形式从推流服务器发送到视频播放终端上,每一个切片视频文件包括视频的一段数据,索引文件中记录有对应视频文件的各个切片视频文件的索引目录及各个切片视频文件的顺序。视频播放终端在接收到索引文件后,根据索引文件依次向记录点播视频断点信息的装置发送获取切片视频文件的请求信息,当视频播放终端暂停播放视频文件或退出视频播放器后,视频播放终端将停止向记录点播视频断点信息的装置发送获取切片视频文件的请求信息。记录点播视频断点信息的装置实时接收视频播放终端发送的获取切片视频文件的请求信息,判断最近一次接收到该视频播放终端发送的请求信息的时间至当前时间的时长是否超过了预设的超时时间,如果是,确定该视频播放终端已经停止播放视频文件,相应地执行步骤703;否则确定该视频播放终端仍在播放视频文件,继续执行702。In one embodiment of the present invention, when the video playback terminal is playing a video file, the video file is sent from the streaming server to the video playback terminal in the form of sliced video files, each sliced video file includes a section of video data, and the index file contains The index directory of each slice video file corresponding to the video file and the sequence of each slice video file are recorded. After receiving the index file, the video playback terminal sends request information for obtaining sliced video files to the device that records the video-on-demand breakpoint information in sequence according to the index file. When the video playback terminal pauses playing the video file or exits the video player, the video playback terminal It will stop sending request information for obtaining segmented video files to the device that records video-on-demand breakpoint information. The device for recording video-on-demand breakpoint information receives in real time the request information sent by the video player terminal to obtain sliced video files, and judges whether the time from the last time the request information sent by the video player terminal to the current time exceeds the preset timeout time, if yes, determine that the video playback terminal has stopped playing the video file, and execute step 703 accordingly; otherwise, determine that the video playback terminal is still playing the video file, and continue to execute 702.
例如,笔记本电脑1根据获取到的索引文件M3U8,依次向会话资源管理服务器SRM发送获取电影B头部的切片视频文件至尾部的切片视频文件的请求信息,请求信息的发送过程与笔记本电脑1的视频播放过程同步进行,当笔记本电脑1停止播放视频时,获取该视频切片视频文件的请求信息也停止发送。会话资源管理服务器SRM实时接收笔记本电脑1发送的请求信息,判断最近一次接收到请求信息的时间至当前时间的时长是否超过预设的超时时间1min,如果是,确定笔记本电脑1已经停止播放电影B,相应地执行步骤703;如果否,确定笔记本电脑1仍在播放电影B,继续执行步骤702。For example, according to the obtained index file M3U8, the notebook computer 1 sends to the session resource management server SRM sequentially the request information for obtaining the sliced video files from the header of movie B to the sliced video files at the end. The sending process of the request information is similar to that of the notebook computer 1. The video playing process is performed synchronously. When the notebook computer 1 stops playing the video, the request information for obtaining the video file of the video slice also stops sending. The session resource management server SRM receives the request information sent by the notebook computer 1 in real time, and judges whether the time from the last time the request information is received to the current time exceeds the preset timeout time of 1 minute, and if so, determines that the notebook computer 1 has stopped playing movie B , execute step 703 accordingly; if not, determine that the laptop computer 1 is still playing movie B, and continue to execute step 702.
步骤703:根据最近一次接收到的请求信息,形成断点信息。Step 703: Generate breakpoint information according to the latest received request information.
在本发明一个实施例中,在确定最近一次接收到请求信息的时间至当前时间的时长超过预设的超时时间后,记录点播视频断点信息的装置对最近一次接收到的请求信息进行解析,从中获取到登录在视频播放终端上的用户ID、该请求信息所要获取的视频文件的ID以及所要获取的切片视频文件起始位置的时间戳,形成包括用户ID、视频文件ID及时间戳的断点信息。In one embodiment of the present invention, after determining that the time from the last time the request information was received to the current time exceeds the preset timeout time, the device for recording video-on-demand breakpoint information analyzes the latest request information received, Obtain therefrom the user ID logged on the video playback terminal, the ID of the video file to be obtained by the request information, and the time stamp of the starting position of the sliced video file to be obtained, and form a segment including the user ID, video file ID and time stamp. point information.
例如,会话资源管理服务器SRM接收到笔记本电脑1发送的请求信息1后,在1min之内没有再次接收到笔记本电脑1发送的获取电影B的切片视频文件的请求信息,会话资源管理服务器SRM对请求信息1进行解析,从中获取到登录在笔记本电脑1上的用户A的用户ID-A,获取到在笔记本1上播放的电影B的视频文件ID-B,获取到所要获取的切片视频文件起始位置的时间戳30min,形成包括用户ID-A、视频文件ID-B及时间戳30min的断点信息1,通过该断点信息1可以确定用户A观看电影B到30min。For example, after the session resource management server SRM receives the request information 1 sent by the notebook computer 1, it does not receive the request information sent by the notebook computer 1 to obtain the sliced video file of movie B within 1 minute, and the session resource management server SRM responds to the request The information 1 is analyzed, and the user ID-A of user A logged in on the notebook computer 1 is obtained, the video file ID-B of the movie B played on the notebook computer 1 is obtained, and the start of the sliced video file to be acquired is obtained. The time stamp of the location is 30 minutes, forming a breakpoint information 1 including user ID-A, video file ID-B and a time stamp of 30 minutes. Through the breakpoint information 1, it can be determined that user A has watched movie B for 30 minutes.
步骤704:将形成的断点信息存储到断点信息数据库中。Step 704: Store the formed breakpoint information into the breakpoint information database.
在本发明一个实施例中,记录点播视频断点信息的装置形成断点信息后,判断用于存储断点信息的断点信息数据库中是否存在与该待存储的断点信息对应于同一个用户ID及同一个视频文件ID的其他断点信息,如果是,用该待存储的断点信息覆盖与之对应于用一个用户ID及同一个视频文件ID的其他断点信息,负责直接将该待存储的断点信息存储到断点信息数据库中。In one embodiment of the present invention, after the device for recording video-on-demand breakpoint information forms the breakpoint information, it determines whether there is a user corresponding to the breakpoint information to be stored in the breakpoint information database for storing the breakpoint information. ID and other breakpoint information of the same video file ID, if so, cover the breakpoint information corresponding to it with a user ID and the same video file ID with the breakpoint information to be stored, be responsible for directly the pending The stored breakpoint information is stored in the breakpoint information database.
例如,形成断点信息1后,判断用户存储断点信息的断点信息数据库中是否包括有一个与断点信息1均包括用户ID-A及视频文件ID-B的断点信息2,如果断点信息2存在,用断点信息1将断点信息2覆盖;如果断点信息2不存在,则直接将断点信息1存储到断点信息数据库中。For example, after the breakpoint information 1 is formed, it is judged whether the breakpoint information database in which the user stores the breakpoint information includes a breakpoint information 2 that both includes the user ID-A and the video file ID-B with the breakpoint information 1. If the point information 2 exists, cover the breakpoint information 2 with the breakpoint information 1; if the breakpoint information 2 does not exist, directly store the breakpoint information 1 in the breakpoint information database.
需要说明的是,记录点播视频断点信息的装置在接收到视频播放终端发送的获取切片视频文件的请求信息后,会将获取到的请求信息发送给负载最低的一个推流服务器,推流服务器根据接收到的请求信息,将视频播放终端所需的切片视频文件直接发送给视频播放终端。It should be noted that after the device for recording video-on-demand breakpoint information receives the request information sent by the video playback terminal to obtain sliced video files, it will send the obtained request information to a streaming server with the lowest load. According to the received request information, the sliced video files required by the video playback terminal are directly sent to the video playback terminal.
下面用户接续观看一个视频文件为例,对断点信息的使用方法进行描述。如图8所示,本发明一个实施例提供了一种断点信息的使用方法,包括:In the following, the user continues to watch a video file as an example to describe the method of using the breakpoint information. As shown in Figure 8, an embodiment of the present invention provides a method for using breakpoint information, including:
步骤801:获取接续播放视频文件的索引文件。Step 801: Obtain the index file of the video file to be played continuously.
在本发明一个实施例中,用户通过用户ID在一个视频播放终端登录后,记录点播视频断点信息的装置从断点信息数据库中查找是否存在对应于该用户ID的断点信息,如果是,将该断点信息发送给视频播放终端,视频播放终端上向用户展示可以进行接续播放的视频以及播放进度,在得到用户接续播放的确认信息后,视频播放终端向记录点播视频断点信息的装置发送获取接续播放视频索引文件的请求信息,记录点播视频断点信息的装置接收到请求信息后,从推推流服务器获取所需的索引文件,并将获取到的索引文件发送给视频播放终端。In one embodiment of the present invention, after the user logs in at a video playback terminal through the user ID, the device for recording video-on-demand breakpoint information searches whether there is breakpoint information corresponding to the user ID from the breakpoint information database, and if so, The breakpoint information is sent to the video playback terminal, and the video playback terminal shows the user the video that can be continued to play and the playback progress. After obtaining the confirmation information of the user's continued playback, the video playback terminal sends the device that records the video-on-demand breakpoint information. After receiving the request information, the device for recording video-on-demand breakpoint information obtains the required index file from the push streaming server, and sends the obtained index file to the video playback terminal.
例如,图7所示的实施例中,用户A之前在笔记本电脑1上观看电影B到30min,形成了断点信息1存储断点信息数据库中。用户A再次在手机1上登录用户ID-A,会话资源管理服务器SRM检测到断点信息数据库中存在对应用户ID-A的断点信息1后,将断点信息1发送给手机1,手机1根据断点信息1向用户A展示可以从30min处接续播放电影B,在得到用户A确认可以接续播放电影B的确认信息后,手机1向会话资源管理服务器SRM发送获取电影B的索引文件M3U8的请求信息,会话资源管理服务器SRM接收到该请求信息后,从推流服务器上获取所需的索引文件M3U8,并将获取到的索引文件M3U8发送给手机1。For example, in the embodiment shown in FIG. 7 , user A has watched movie B on laptop computer 1 for 30 minutes before, and breakpoint information 1 is formed and stored in the breakpoint information database. User A logs in user ID-A on mobile phone 1 again, and the session resource management server SRM detects that breakpoint information 1 corresponding to user ID-A exists in the breakpoint information database, and then sends breakpoint information 1 to mobile phone 1, and mobile phone 1 According to the breakpoint information 1, it is shown to user A that movie B can be played continuously from 30 minutes. After receiving confirmation from user A that movie B can be played continuously, mobile phone 1 sends the index file M3U8 of movie B to the session resource management server SRM. Request information. After receiving the request information, the session resource management server SRM obtains the required index file M3U8 from the streaming server, and sends the obtained index file M3U8 to the mobile phone 1 .
步骤802:视频播放终端根据索引文件向记录点播视频断点信息的装置持续发送获取切片视频文件的请求信息。Step 802: The video playback terminal continuously sends request information for obtaining segmented video files to the device for recording video-on-demand breakpoint information according to the index file.
在本发明一个实施例中,视频播放终端在接收到的索引文件后,根据索引文件中记录的各个切片视频文件的顺序,从接收到的断点信息中记录的时间戳的位置开始,依次向记录点播视频断点信息的装置发送获取时间戳位置之后的各个切片视频文件的请求信息。In one embodiment of the present invention, after receiving the index file, the video playback terminal starts from the position of the time stamp recorded in the received breakpoint information according to the order of the sliced video files recorded in the index file, and proceeds sequentially to The device for recording video-on-demand breakpoint information sends request information for obtaining each segmented video file after the time stamp position.
例如,手机1根据索引文件M3U8中记录的电影B的各个切片视频文件的顺序,依次向会话资源管理服务器SRM发送获取电影B第30分钟后各个切片视频文件的请求信息。For example, the mobile phone 1 sends request information to the session resource management server SRM to acquire each sliced video file after the 30th minute of the movie B according to the order of the sliced video files of the movie B recorded in the index file M3U8.
步骤803:记录点播视频断点信息的装置将接收到的请求信息发送给负载最小的推流服务器。Step 803: The device for recording video-on-demand breakpoint information sends the received request information to the streaming server with the least load.
在本发明一个实施例中,记录点播视频断点信息的装置在接收到视频播放终端发送的获取切片视频文件的请求信息后,获取推流服务器集群中各个推流服务器的网络输出带宽占用及磁盘I/O速度,根据获取到的网络输出带宽占用及磁盘I/O速度确定推流服务器集群中各个推流服务器的负载,将接收到的请求信息发送给负载最小的一个推流服务器。记录点播视频断点信息的装置还将判断最近一次接收到请求信息的时间至当前时间的时长是否超过预设的超时时长,以确定是否需要形成断点信息,具体过程与图7所示的方法相同,在此不再赘述。In one embodiment of the present invention, the device for recording video-on-demand breakpoint information obtains the network output bandwidth occupancy of each streaming server in the streaming streaming server cluster and the disk output bandwidth occupancy of each streaming streaming server in the streaming streaming server cluster after receiving the request information for obtaining sliced video files sent by the video playback terminal. I/O speed, determine the load of each streaming server in the streaming server cluster according to the obtained network output bandwidth occupation and disk I/O speed, and send the received request information to the streaming streaming server with the smallest load. The device for recording video-on-demand breakpoint information will also judge whether the time from the last time the request information is received to the current time exceeds the preset timeout period to determine whether to form breakpoint information. The specific process is the same as the method shown in Figure 7 Same, no more details here.
例如,与会话资源管理服务器SRM相连的推流服务器集群包括有两个推流服务器,分别为推流服务器1和推流服务器2,会话资源管理服务器SRM在接收到手机1发送的一个获取切片视频文件的请求信息后,获取推流服务器1和推流服务器2的网络输出带宽占用及磁盘I/O速度,根据获取到的网络输出带宽占用及磁盘I/O速度确定推流服务器1的负载小于推流服务器2的负载,则将接收到的请求信息发送给推流服务器1。For example, the streaming server cluster connected to the session resource management server SRM includes two streaming servers, namely the streaming server 1 and the streaming server 2. After the request information of the file, obtain the network output bandwidth occupation and disk I/O speed of streaming server 1 and streaming server 2, and determine that the load of streaming server 1 is less than The load of the streaming server 2 will send the received request information to the streaming server 1.
步骤804:推流服务器根据请求信息将所需的切片视频文件直接发送给视频播放终端。Step 804: The streaming server directly sends the required segmented video files to the video playback terminal according to the request information.
在本发明一个实施例中,推流服务器在接收到记录点播视频断点信息的装置发送的请求信息后,根据接收到的请求信息确定所需的切片视频文件,将所需的切片视频文件直接发送给视频播放终端。In one embodiment of the present invention, after receiving the request information sent by the device for recording video-on-demand breakpoint information, the streaming server determines the required sliced video files according to the received request information, and directly downloads the required sliced video files Send it to the video playback terminal.
例如,推流服务器1接收到会话资源管理服务器SRM发送的请求信息后,根据请求信息确定手机1发送该条请求信息所要获取的切片视频文件1,将切片视频文件1直接发送给手机1。For example, after receiving the request information sent by the session resource management server SRM, the streaming server 1 determines the segmented video file 1 to be obtained by the mobile phone 1 sending the request information according to the request information, and directly sends the segmented video file 1 to the mobile phone 1 .
步骤805:视频播放终端根据接收到的切片视频文件播放相应的视频。Step 805: The video playing terminal plays the corresponding video according to the received sliced video file.
在本发明一个实施例中,视频播放终端接收到推流服务器发送的切片视频文件后,依次播放切片视频文件携带的视频。In one embodiment of the present invention, after receiving the sliced video files sent by the streaming server, the video playback terminal plays the videos carried in the sliced video files in sequence.
例如,手机1接收到推流服务器1或推流服务器2发送的切片视频文件户,根据索引文件M3U8中记录各个切片视频文件的顺序,对电影B进行播放。For example, the mobile phone 1 receives the segmented video file user sent by the streaming server 1 or the streaming server 2, and plays the movie B according to the sequence of each segmented video file recorded in the index file M3U8.
本发明提供的各个实施例,至少具有如下有益效果:Various embodiments provided by the present invention have at least the following beneficial effects:
1、本发明实施例中,由于视频播放终端在播放点播视频时需要不断发送获取切片视频文件的请求信息,当视频播放终端不发送请求信息的时长大于超时时长后,可以确定视频播放终端停止了点播视频的播放,根据最近一次视频播放终端发送的请求信息可以确定视频的播放进度,从而形成对应的断点信息。这样,视频播放终端无需单独发送点播视频的播放进度信息,通过视频播放终端发送的请求信息便可以对点播视频的断点信息进行记录,节省了服务器对播放进度信息进行接收和处理时消耗的计算资源,从而降低了服务器的负载。1. In the embodiment of the present invention, since the video playback terminal needs to continuously send the request information for obtaining sliced video files when playing the on-demand video, when the video playback terminal does not send the request information for a period longer than the timeout period, it can be determined that the video playback terminal has stopped For the playback of video-on-demand, the playback progress of the video can be determined according to the request information sent by the video playback terminal last time, so as to form corresponding breakpoint information. In this way, the video playback terminal does not need to send the playback progress information of the video on demand separately, and the breakpoint information of the video on demand can be recorded through the request information sent by the video playback terminal, which saves the calculation consumed by the server when receiving and processing the playback progress information resources, thereby reducing the load on the server.
2、本发明实施例中,再将获取切片视频文件的请求信息发送给推流服务器时,首先判断各个推流服务器的负载情况,将请求信息发送给负载最小的一个推流服务器,由该推流服务器向视频播放终端发送所需的切片视频文件,这样可以是各个推流服务器的负载更加均衡,以快速的将所需的切片视频文件发送给视频播放终端,保证视频播放终端能够流畅的播放视频。2. In the embodiment of the present invention, when the request information for obtaining sliced video files is sent to the streaming server, the load situation of each streaming server is first judged, and the request information is sent to the streaming server with the smallest load. The streaming server sends the required sliced video files to the video playback terminal, so that the load of each streaming server can be more balanced, so as to quickly send the required sliced video files to the video playback terminal, and ensure that the video playback terminal can play smoothly video.
3、本发明实施例中,将断点信息存储在断点信息数据库中,用户在同一个视频播放终端或不同的视频播放终端上登录后,视频播放终端可以根据断点信息接续播放用户之前没有观看结束的视频文件,用户在退出播放软件后更换视频播放终端后,无需手动调整视频的播放进度,提高了用户观看视频的体验。3. In the embodiment of the present invention, the breakpoint information is stored in the breakpoint information database. After the user logs in on the same video playback terminal or a different video playback terminal, the video playback terminal can continue to play the video that the user did not have before according to the breakpoint information. After watching the finished video file, the user does not need to manually adjust the playback progress of the video after exiting the playback software and replacing the video playback terminal, which improves the user's experience in watching videos.
4、本发明实施例中,在将断点信息存储到断点信息数据库中时,判断断点信息数据库中是否包括与待存储断点信息对应于同一个用户ID及同一个视频文件ID的其他断点信息,如果有,用待存储的断点信息将与之对应于同一个用户ID及同一个视频文件ID的其他断点信息覆盖,如果没有直接将待存储的断点信息存储到断点信息数据库中,这样保证断点信息数据库中存储的断点信息都是最新的,保证对断点信息进行记录的准确性。4. In the embodiment of the present invention, when storing the breakpoint information in the breakpoint information database, it is judged whether the breakpoint information database includes other video files corresponding to the same user ID and the same video file ID as the breakpoint information to be stored. Breakpoint information, if there is, overwrite other breakpoint information corresponding to the same user ID and the same video file ID with the breakpoint information to be stored, if not directly store the breakpoint information to be stored in the breakpoint In the information database, this ensures that the breakpoint information stored in the breakpoint information database is all up-to-date, ensuring the accuracy of recording the breakpoint information.
需要说明的是,在本文中,诸如第一和第二之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个〃·····”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同因素。It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is a relationship between these entities or operations. There is no such actual relationship or sequence. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储在计算机可读取的存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质中。Those of ordinary skill in the art can understand that all or part of the steps for realizing the above-mentioned method embodiments can be completed by hardware related to program instructions, and the aforementioned programs can be stored in a computer-readable storage medium. When the program is executed, the It includes the steps of the above method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other various media that can store program codes.
最后需要说明的是:以上所述仅为本发明的较佳实施例,仅用于说明本发明的技术方案,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内所做的任何修改、等同替换、改进等,均包含在本发明的保护范围内。Finally, it should be noted that: the above descriptions are only preferred embodiments of the present invention, and are only used to illustrate the technical solutions of the present invention, and are not used to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610408200.XA CN105916030A (en) | 2016-06-12 | 2016-06-12 | A method, device and system for recording video-on-demand breakpoint information |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610408200.XA CN105916030A (en) | 2016-06-12 | 2016-06-12 | A method, device and system for recording video-on-demand breakpoint information |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105916030A true CN105916030A (en) | 2016-08-31 |
Family
ID=56750943
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610408200.XA Pending CN105916030A (en) | 2016-06-12 | 2016-06-12 | A method, device and system for recording video-on-demand breakpoint information |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105916030A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107529075A (en) * | 2017-07-25 | 2017-12-29 | 触信(厦门)智能科技有限公司 | Across screen continuous playing method, system, server, equipment and the equipment across screen continued broadcasting |
CN109116417A (en) * | 2017-06-23 | 2019-01-01 | 中国石油化工股份有限公司 | A kind of multistage breakpoint guard method in seismic forward simulation |
CN109547860A (en) * | 2018-12-07 | 2019-03-29 | 晶晨半导体(上海)股份有限公司 | A kind of method and IPTV playing device of the video suspension continued broadcasting of program request |
CN111787372A (en) * | 2020-07-01 | 2020-10-16 | 苏州万店掌网络科技有限公司 | Streaming media distribution method based on multiple condition scheduling |
CN111885207A (en) * | 2020-08-06 | 2020-11-03 | 中国银行股份有限公司 | Streaming data breakpoint continuous transmission method and device |
CN111988585A (en) * | 2020-08-17 | 2020-11-24 | 海宇星联(山东)智慧科技有限公司 | A Smart Video Transmission Protocol for Satellite Data Communication Networks |
CN112243161A (en) * | 2019-07-16 | 2021-01-19 | 武汉佳世创科技有限公司 | Recording file playing method and system with label function |
CN113704277A (en) * | 2021-07-14 | 2021-11-26 | 浪潮商用机器有限公司 | Database-based breakpoint continuous transmission method and related device |
CN111523920B (en) * | 2019-04-04 | 2024-02-23 | 维肯智能(深圳)有限公司 | Information pushing method and device and terminal equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101741841A (en) * | 2009-12-10 | 2010-06-16 | 青岛海信宽带多媒体技术有限公司 | Method and device for realizing breakpoint continued playing among multimedia devices |
CN102025736A (en) * | 2010-12-08 | 2011-04-20 | 四川长虹电器股份有限公司 | Continuous playing method for cross-platform program and system |
US20130111529A1 (en) * | 2011-10-28 | 2013-05-02 | Verizon Patent And Licensing Inc. | Video session shifting using a provider network |
US20150201225A1 (en) * | 2014-01-15 | 2015-07-16 | Verizon and Redbox Digital Entertainment Services, LLC | Optimal quality adaptive video delivery |
-
2016
- 2016-06-12 CN CN201610408200.XA patent/CN105916030A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101741841A (en) * | 2009-12-10 | 2010-06-16 | 青岛海信宽带多媒体技术有限公司 | Method and device for realizing breakpoint continued playing among multimedia devices |
CN102025736A (en) * | 2010-12-08 | 2011-04-20 | 四川长虹电器股份有限公司 | Continuous playing method for cross-platform program and system |
US20130111529A1 (en) * | 2011-10-28 | 2013-05-02 | Verizon Patent And Licensing Inc. | Video session shifting using a provider network |
US20150201225A1 (en) * | 2014-01-15 | 2015-07-16 | Verizon and Redbox Digital Entertainment Services, LLC | Optimal quality adaptive video delivery |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109116417A (en) * | 2017-06-23 | 2019-01-01 | 中国石油化工股份有限公司 | A kind of multistage breakpoint guard method in seismic forward simulation |
CN109116417B (en) * | 2017-06-23 | 2020-05-19 | 中国石油化工股份有限公司 | Multistage breakpoint protection method in earthquake forward modeling |
CN107529075A (en) * | 2017-07-25 | 2017-12-29 | 触信(厦门)智能科技有限公司 | Across screen continuous playing method, system, server, equipment and the equipment across screen continued broadcasting |
CN109547860A (en) * | 2018-12-07 | 2019-03-29 | 晶晨半导体(上海)股份有限公司 | A kind of method and IPTV playing device of the video suspension continued broadcasting of program request |
CN111523920B (en) * | 2019-04-04 | 2024-02-23 | 维肯智能(深圳)有限公司 | Information pushing method and device and terminal equipment |
CN112243161A (en) * | 2019-07-16 | 2021-01-19 | 武汉佳世创科技有限公司 | Recording file playing method and system with label function |
CN111787372A (en) * | 2020-07-01 | 2020-10-16 | 苏州万店掌网络科技有限公司 | Streaming media distribution method based on multiple condition scheduling |
CN111885207B (en) * | 2020-08-06 | 2023-03-14 | 中国银行股份有限公司 | Streaming data breakpoint continuous transmission method and device |
CN111885207A (en) * | 2020-08-06 | 2020-11-03 | 中国银行股份有限公司 | Streaming data breakpoint continuous transmission method and device |
CN111988585A (en) * | 2020-08-17 | 2020-11-24 | 海宇星联(山东)智慧科技有限公司 | A Smart Video Transmission Protocol for Satellite Data Communication Networks |
CN111988585B (en) * | 2020-08-17 | 2022-04-29 | 海宇星联(山东)智慧科技有限公司 | A video transmission method suitable for satellite data communication network |
CN113704277B (en) * | 2021-07-14 | 2024-02-02 | 浪潮商用机器有限公司 | A database-based breakpoint resuming method and related devices |
CN113704277A (en) * | 2021-07-14 | 2021-11-26 | 浪潮商用机器有限公司 | Database-based breakpoint continuous transmission method and related device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105916030A (en) | A method, device and system for recording video-on-demand breakpoint information | |
US12058389B2 (en) | Transcoding of video content | |
US10305947B2 (en) | Pre-buffering audio streams | |
US9344517B2 (en) | Downloading and adaptive streaming of multimedia content to a device with cache assist | |
US8190683B2 (en) | Synchronizing multiple user remote content playback | |
CN106572358A (en) | Live broadcast time shift method and client | |
CN112839238B (en) | Screen projection playing method and device and storage medium | |
CA2840106A1 (en) | Offline download method, multimedia file download method and system thereof | |
WO2013044705A1 (en) | Online video playing method and video playing server | |
CN105100961A (en) | Video thumbnail generating method and generating device | |
JP6314252B2 (en) | Network video playback method and apparatus | |
CN113141522B (en) | Resource transmission method, device, computer equipment and storage medium | |
CN102438004B (en) | Method and system for acquiring metadata information of media file and multimedia player | |
CN104936032A (en) | Method and device for playing network video | |
US10230812B1 (en) | Dynamic allocation of subtitle packaging | |
WO2011054319A1 (en) | Method, device and system for realizing hierarchically requesting content in http streaming system | |
CN110933517A (en) | Code rate switching method, client and computer readable storage medium | |
CN105979373A (en) | Play method and device | |
CN102550038A (en) | Method, terminal, server and system for playing media files | |
US20210021655A1 (en) | System and method for streaming music on mobile devices | |
CN113891176B (en) | HLS-based on-demand flow control method, device, equipment and storage medium | |
US20150268808A1 (en) | Method, Device and System for Multi-Speed Playing | |
CN105592369B (en) | A kind of video frequency abstract processing method and processing device | |
CN101459976B (en) | Method, equipment and system for stream media playing control | |
CN115460184A (en) | Method, system and medium for delivering manifestless streaming media content |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20160831 |