CN107547919A - A kind of video broadcasting method, device and storage medium - Google Patents
A kind of video broadcasting method, device and storage medium Download PDFInfo
- Publication number
- CN107547919A CN107547919A CN201710914437.XA CN201710914437A CN107547919A CN 107547919 A CN107547919 A CN 107547919A CN 201710914437 A CN201710914437 A CN 201710914437A CN 107547919 A CN107547919 A CN 107547919A
- Authority
- CN
- China
- Prior art keywords
- video
- user
- determining
- duration
- 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 61
- 238000003860 storage Methods 0.000 title claims abstract description 14
- 230000001186 cumulative effect Effects 0.000 claims description 37
- 230000015654 memory Effects 0.000 claims description 16
- 230000011218 segmentation Effects 0.000 claims description 11
- 238000010586 diagram Methods 0.000 description 16
- 230000008569 process Effects 0.000 description 7
- 238000004364 calculation method Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 239000008833 migu Substances 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000005728 strengthening Methods 0.000 description 2
- 238000004590 computer program Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Landscapes
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
本发明公开了一种视频播放方法,包括:接收终端发送的播放第一视频的请求,其中,所述请求中包括所述终端所属用户的标识信息;根据所述标识信息确定所述用户为非指定用户时,确定所述用户针对所述第一视频的可观看时长;根据所述可观看时长确定所述第一视频的可播放内容,向所述终端发送所述可播放内容对应的视频数据,以使所述终端播放。本发明还同时公开了一种视频播放装置、以及存储介质。
The invention discloses a video playing method, comprising: receiving a request for playing a first video sent by a terminal, wherein the request includes identification information of a user to which the terminal belongs; determining that the user is not When specifying a user, determine the watchable duration of the user for the first video; determine the playable content of the first video according to the watchable duration, and send video data corresponding to the playable content to the terminal , to make the terminal play. The invention also discloses a video playing device and a storage medium at the same time.
Description
技术领域technical field
本发明涉及多媒体通信领域,尤其涉及一种视频播放方法、装置及存储介质。The invention relates to the field of multimedia communication, in particular to a video playing method, device and storage medium.
背景技术Background technique
在现有技术中,视频播放应用软件中的视频可以分为普通视频和会员VIP视频两种,其中,VIP视频仅VIP用户可以观看。In the prior art, the videos in the video playing application software can be divided into two types: ordinary videos and member VIP videos, wherein only VIP users can watch the VIP videos.
用户在观看普通视频的过程中,当观看到精彩的视频片段时,可以将该精彩视频片段进行截取,并将截取得到的视频片段分享给好友,使得好友可以通过用户分享的链接观看到该精彩的视频片段。然而,VIP用户的好友可能是VIP用户,也可能是普通用户,为了防止普通用户通过VIP用户分享的链接观看到VIP视频的大部分内容,损害视频播放应用软件的利益,因此,现有技术中,VIP用户在观看VIP视频的过程中,无法对VIP视频的内容进行截取以及分享。In the process of watching ordinary videos, when a user watches a wonderful video segment, he can intercept the wonderful video segment and share the captured video segment with his friends, so that friends can watch the wonderful video through the link shared by the user. video clip. However, a friend of a VIP user may be a VIP user or an ordinary user. In order to prevent ordinary users from watching most of the content of the VIP video through the link shared by the VIP user, which will damage the interests of the video playback application software, therefore, in the prior art , VIP users cannot intercept and share the content of the VIP video while watching the VIP video.
现有技术中,VIP用户无法截取VIP视频以及将截取的VIP视频分享给好友,导致VIP用户的好友无法观看到VIP用户想要分享的视频,从而降低了用户体验,影响了视频播放应用软件的推广。In the prior art, the VIP user cannot intercept the VIP video and share the intercepted VIP video with friends, resulting in the VIP user's friends being unable to watch the video that the VIP user wants to share, thereby reducing the user experience and affecting the performance of the video playback application software. promote.
发明内容Contents of the invention
有鉴于此,本发明实施例期望提供一种视频播放方法、装置及存储介质,能最大限度的满足用户的视频分享需求,提高用户体验。In view of this, the embodiments of the present invention expect to provide a video playing method, device, and storage medium, which can satisfy users' video sharing needs to the greatest extent and improve user experience.
为达到上述目的,本发明实施例的技术方案是这样实现的:In order to achieve the above object, the technical solution of the embodiment of the present invention is achieved in this way:
本发明实施例提供一种视频播放方法,所述方法包括:An embodiment of the present invention provides a video playback method, the method comprising:
接收终端发送的播放第一视频的请求,其中,所述请求中包括所述终端所属用户的标识信息;receiving a request from the terminal to play the first video, wherein the request includes identification information of the user to which the terminal belongs;
根据所述标识信息确定所述用户为非指定用户时,确定所述用户针对所述第一视频的可观看时长;When determining that the user is an unspecified user according to the identification information, determine the watchable duration of the first video for the user;
根据所述可观看时长确定所述第一视频的可播放内容,向所述终端发送所述可播放内容对应的视频数据,以使所述终端播放。Determine playable content of the first video according to the watchable duration, and send video data corresponding to the playable content to the terminal, so that the terminal can play it.
上述方案中,所述第一视频为从第二视频中截取的视频;In the above solution, the first video is a video intercepted from the second video;
所述确定所述用户针对所述第一视频的可观看时长包括:The determining the watchable duration of the user for the first video includes:
确定所述用户针对所述第二视频的可观看时长,以及累计观看时长;Determining the watchable duration of the user for the second video, and the cumulative viewing duration;
根据所述用户针对所述第二视频的可观看时长以及累计观看时长确定所述用户针对所述第一视频的可观看时长。The user's watchable time for the first video is determined according to the user's watchable time for the second video and the accumulated watch time.
上述方案中,所述确定所述用户针对所述第二视频的可观看时长包括:In the above solution, the determination of the watchable duration of the user for the second video includes:
获取所述第二视频的视频长度;Obtain the video length of the second video;
根据所述用户在历史记录中作为指定用户的累积时间,确定所述用户的用户等级;determining the user level of the user according to the accumulated time of the user as a specified user in the historical records;
根据所述第二视频的视频长度和所述用户的用户等级确定所述用户针对所述第二视频的可观看时长。The user's watchable duration of the second video is determined according to the video length of the second video and the user level of the user.
上述方案中,所述确定所述用户针对所述第二视频的累计观看时长包括:In the above solution, the determination of the cumulative viewing time of the user for the second video includes:
根据所述用户的历史观看记录确定所述用户累计观看的所述第二视频的片段;determining the segments of the second video cumulatively watched by the user according to the historical viewing records of the user;
获取确定的所述第二视频的片段的时长;Acquiring the determined duration of the segment of the second video;
根据获取的所述第二视频的片段的时长确定所述用户针对所述第二视频的累计观看时长。The accumulated viewing time of the second video by the user is determined according to the acquired duration of the segment of the second video.
上述方案中,所述用户的历史观看记录中包括所述用户观看所述第一视频的记录;In the above solution, the historical viewing records of the user include the record of the user watching the first video;
所述确定所述用户针对所述第二视频的累计观看时长包括:The determining the cumulative viewing time of the user for the second video includes:
根据所述用户的历史观看记录确定所述用户累计观看的所述第二视频的片段;determining the segments of the second video cumulatively watched by the user according to the historical viewing records of the user;
从所述第二视频的片段中确定重叠的片段;determining overlapping segments from the segments of the second video;
获取确定的所述第二视频的片段的时长以及所述重叠的片段的时长;Acquiring the determined duration of the segment of the second video and the duration of the overlapped segment;
根据获取的所述第二视频的片段的时长,以及所述重叠的片段的时长确定所述用户针对所述第二视频的累计观看时长。The accumulated viewing time of the second video by the user is determined according to the acquired duration of the segments of the second video and the duration of the overlapped segments.
上述方案中,若所述用户针对所述第二视频的累计观看时长小于针对所述第二视频的可观看时长;In the above solution, if the accumulated viewing time of the second video by the user is less than the watchable time of the second video;
所述确定所述用户针对所述第一视频的可观看时长包括:The determining the watchable duration of the user for the first video includes:
计算所述累计观看时长与所述用户针对所述第二视频的可观看时长的差值,确定所述差值为所述用户针对所述第一视频的可观看时长。calculating the difference between the cumulative viewing time and the user's watchable time for the second video, and determining the difference as the user's watchable time for the first video.
上述方案中,所述根据所述可观看时长确定所述第一视频的可播放内容包括:In the above solution, the determining the playable content of the first video according to the watchable duration includes:
根据所述用户针对所述第一视频的可观看时长确定单位长度;determining the unit length according to the watchable duration of the first video by the user;
根据所述单位长度对所述第一视频进行分段统计,得到统计结果;performing segmentation statistics on the first video according to the unit length to obtain statistical results;
根据所述统计结果确定所述第一视频的可播放内容。The playable content of the first video is determined according to the statistics result.
上述方案中,所述根据所述单位长度对所述第一视频进行分段统计包括:In the above solution, the performing segment statistics on the first video according to the unit length includes:
根据所述用户的历史观看记录确定所述用户针对所述第一视频未观看的内容;determining the content that the user has not watched for the first video according to the historical viewing records of the user;
根据所述单位长度对所述第一视频未观看的内容进行分段统计。Perform segmentation statistics on unwatched content of the first video according to the unit length.
上述方案中,在接收终端发送的播放第一视频的请求之后,所述方法还包括:In the above solution, after receiving the request sent by the terminal to play the first video, the method further includes:
根据所述标识信息确定所述用户为指定用户时,向所述终端发送所述第一视频对应的视频数据,以使所述终端播放。When determining that the user is a specified user according to the identification information, sending video data corresponding to the first video to the terminal, so that the terminal can play it.
本发明实施例还提供一种视频播放装置,所述装置包括:接收模块、第一确定模块、第二确定模块、第一发送模块;其中,The embodiment of the present invention also provides a video playback device, which includes: a receiving module, a first determining module, a second determining module, and a first sending module; wherein,
所述接收模块,用于接收终端发送的播放第一视频的请求,其中,所述请求中包括所述终端所属用户的标识信息;The receiving module is configured to receive a request sent by a terminal to play the first video, wherein the request includes identification information of a user to which the terminal belongs;
所述第一确定模块,用于根据所述标识信息确定所述用户为非指定用户时,确定所述用户针对所述第一视频的可观看时长;The first determination module is configured to determine the watchable duration of the user for the first video when determining that the user is an unspecified user according to the identification information;
所述第二确定模块,用于根据所述可观看时长确定所述第一视频的可播放内容;The second determination module is configured to determine the playable content of the first video according to the watchable duration;
所述第一发送模块,用于向所述终端发送所述可播放内容对应的视频数据,以使所述终端播放。The first sending module is configured to send video data corresponding to the playable content to the terminal, so that the terminal can play it.
上述方案中,所述第一视频为从第二视频中截取的视频;In the above solution, the first video is a video intercepted from the second video;
所述第一确定模块包括第三确定模块、第四确定模块和第五确定模块;其中,The first determination module includes a third determination module, a fourth determination module and a fifth determination module; wherein,
所述第三确定模块,用于确定所述用户针对所述第二视频的可观看时长;The third determination module is configured to determine the watchable duration of the user for the second video;
所述第四确定模块,用于确定所述用户针对所述第二视频的累计观看时长;The fourth determination module is configured to determine the cumulative viewing time of the user for the second video;
所述第五确定模块,用于根据所述用户针对所述第二视频的可观看时长以及累计观看时长确定所述用户针对所述第一视频的可观看时长。The fifth determination module is configured to determine the watchable duration of the user for the first video according to the watchable duration of the user for the second video and the cumulative viewing duration.
上述方案中,所述第三确定模块具体用于:In the above solution, the third determining module is specifically used for:
获取所述第二视频的视频长度;Obtain the video length of the second video;
根据所述用户在历史记录中作为指定用户的累积时间,确定所述用户的用户等级;determining the user level of the user according to the accumulated time of the user as a specified user in the historical records;
根据所述第二视频的视频长度和所述用户的用户等级确定所述用户针对所述第二视频的可观看时长。The user's watchable duration of the second video is determined according to the video length of the second video and the user level of the user.
上述方案中,所述第四确定模块具体用于:In the above solution, the fourth determining module is specifically used for:
根据所述用户的历史观看记录确定所述用户累计观看的所述第二视频的片段;determining the segments of the second video cumulatively watched by the user according to the historical viewing records of the user;
获取确定的所述第二视频的片段的时长;Acquiring the determined duration of the segment of the second video;
根据获取的所述第二视频的片段的时长确定所述用户针对所述第二视频的累计观看时长。The accumulated viewing time of the second video by the user is determined according to the acquired duration of the segment of the second video.
上述方案中,所述用户的历史观看记录中包括所述用户观看所述第一视频的记录;In the above solution, the historical viewing records of the user include the record of the user watching the first video;
所述第四确定模块具体用于:The fourth determination module is specifically used for:
根据所述用户的历史观看记录确定所述用户累计观看的所述第二视频的片段;determining the segments of the second video cumulatively watched by the user according to the historical viewing records of the user;
从所述第二视频的片段中确定重叠的片段;determining overlapping segments from the segments of the second video;
获取确定的所述第二视频的片段的时长以及所述重叠的片段的时长;Acquiring the determined duration of the segment of the second video and the duration of the overlapped segment;
根据获取的所述第二视频的片段的时长,以及所述重叠的片段的时长确定所述用户针对所述第二视频的累计观看时长。The accumulated viewing time of the second video by the user is determined according to the acquired duration of the segments of the second video and the duration of the overlapped segments.
上述方案中,所述第五确定模块具体用于:In the above solution, the fifth determining module is specifically used for:
计算所述累计观看时长与所述用户针对所述第二视频的可观看时长的差值,确定所述差值为所述用户针对所述第一视频的可观看时长。calculating the difference between the cumulative viewing time and the user's watchable time for the second video, and determining the difference as the user's watchable time for the first video.
上述方案中,所述第二确定模块具体用于:In the above solution, the second determination module is specifically used for:
根据所述用户针对所述第一视频的可观看时长确定单位长度;determining the unit length according to the watchable duration of the first video by the user;
根据所述单位长度对所述第一视频进行分段统计,得到统计结果;performing segmentation statistics on the first video according to the unit length to obtain statistical results;
根据所述统计结果确定所述第一视频的可播放内容。The playable content of the first video is determined according to the statistics result.
上述方案中,所述第二确定模块具体用于:In the above solution, the second determination module is specifically used for:
根据所述用户的历史观看记录确定所述用户针对所述第一视频未观看的内容;determining the content that the user has not watched for the first video according to the historical viewing records of the user;
根据所述单位长度对所述第一视频未观看的内容进行分段统计。Perform segmentation statistics on unwatched content of the first video according to the unit length.
上述方案中,所述装置还包括第二发送模块,用于根据所述标识信息确定所述用户为指定用户时,向所述终端发送所述第一视频对应的视频数据,以使所述终端播放。In the above solution, the device further includes a second sending module, configured to send the video data corresponding to the first video to the terminal when it is determined according to the identification information that the user is a designated user, so that the terminal play.
本发明实施例还提供一种存储介质,其上存储有可执行程序,所述可执行程序被处理器执行时实现前述任意一种视频播放方法所述步骤。An embodiment of the present invention also provides a storage medium on which an executable program is stored, and when the executable program is executed by a processor, the steps described in any one of the aforementioned video playback methods are implemented.
本发明实施例还提供一种视频播放装置,包括存储器、处理器及存储在存储器上并能够由所述处理器运行的可执行程序,所述处理器运行所述可执行程序时执行前述任意一种视频播放方法所述步骤。An embodiment of the present invention also provides a video playback device, including a memory, a processor, and an executable program stored on the memory and capable of being run by the processor. When the processor runs the executable program, it executes any one of the aforementioned The steps described in a video playback method.
本发明实施例所提供的视频播放方法、装置及存储介质,接收终端发送的播放第一视频的请求,其中,所述请求中包括所述终端所属用户的标识信息;根据所述标识信息确定所述用户为非指定用户时,确定所述用户针对所述第一视频的可观看时长;根据所述可观看时长确定所述第一视频的可播放内容,向所述终端发送所述可播放内容对应的视频数据,以使所述终端播放。如此,能够在保障视频播放应用软件利益的基础上,最大限度的满足用户尤其是非指定用户观看视频的需求,进而提高用户体验,并能加强视频播放应用软件的推广。The video playing method, device, and storage medium provided by the embodiments of the present invention receive a request from a terminal to play the first video, wherein the request includes identification information of the user to which the terminal belongs; When the user is an unspecified user, determine the watchable duration of the user for the first video; determine the playable content of the first video according to the watchable duration, and send the playable content to the terminal Corresponding video data, so that the terminal plays. In this way, on the basis of guaranteeing the interests of the video playing application software, the needs of users, especially non-designated users, to watch videos can be satisfied to the greatest extent, thereby improving user experience and strengthening the promotion of the video playing application software.
本发明实施例中,可以进一步根据用户的用户等级以及用户对第二视频的历史观看记录,来确定该用户针对第一视频的可观看时长,并根据该确定的可观看时长对第一视频进行分段统计,以确定第一视频的可播放内容,这样,通过精确地统计计算,能够最大限度地获取到最优的视频片段,从而为用户提供更好更优的使用体验。In the embodiment of the present invention, it is possible to further determine the watchable duration of the user for the first video according to the user's user level and the user's historical viewing record of the second video, and perform the first video according to the determined watchable duration. Segmentation statistics are used to determine the playable content of the first video. In this way, through accurate statistical calculation, the optimal video segment can be obtained to the maximum extent, thereby providing users with a better and better experience.
附图说明Description of drawings
图1为本发明实施例提供的视频播放方法的流程示意图;FIG. 1 is a schematic flow diagram of a video playback method provided by an embodiment of the present invention;
图2为本发明实施例提供的视频播放方法对应的实体交互图;FIG. 2 is an entity interaction diagram corresponding to a video playback method provided by an embodiment of the present invention;
图3为本发明实施例一提供的视频播放方法的实现流程示意图;FIG. 3 is a schematic diagram of an implementation flow of a video playback method provided by Embodiment 1 of the present invention;
图4为本发明实施例二提供的视频播放方法的实现流程示意图;FIG. 4 is a schematic diagram of the implementation flow of the video playback method provided by Embodiment 2 of the present invention;
图5为本发明实施例提供的视频播放装置的组成结构示意图;5 is a schematic diagram of the composition and structure of a video playback device provided by an embodiment of the present invention;
图6为本发明实施例提供的视频播放装置的硬件结构示意图。FIG. 6 is a schematic diagram of a hardware structure of a video playback device provided by an embodiment of the present invention.
具体实施方式detailed description
为了能够更加详尽地了解本发明实施例的特点与技术内容,下面结合附图对本发明实施例的实现进行详细阐述,所附附图仅供参考说明之用,并非用来限定本发明。In order to understand the characteristics and technical contents of the embodiments of the present invention in more detail, the implementation of the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. The attached drawings are only for reference and description, and are not intended to limit the present invention.
在本发明实施例中,所述终端可以包括但不限于:手机、平板、掌上电脑等电子设备。In the embodiment of the present invention, the terminal may include, but is not limited to, electronic devices such as mobile phones, tablets, and palmtop computers.
如图1所示,本发明实施例中视频播放方法的实现流程,包括以下步骤:As shown in Figure 1, the implementation process of the video playback method in the embodiment of the present invention includes the following steps:
步骤101:接收终端发送的播放第一视频的请求,其中,所述请求中包括所述终端所属用户的标识信息。Step 101: Receive a request from a terminal to play a first video, wherein the request includes identification information of a user to which the terminal belongs.
其中,第一视频是由所述终端所属用户的好友分享的,这里,可以将所述终端命名为终端A,将终端A所属的用户命名为用户A。Wherein, the first video is shared by friends of the user to which the terminal belongs. Here, the terminal may be named terminal A, and the user to which terminal A belongs is named user A.
在一个应用场景中,VIP用户可以截取VIP视频的视频片段,并可以对截取得到的视频片段进行分享;也可以不截取VIP视频,直接对整个VIP视频进行分享。本实施例中,可以将VIP用户分享的VIP视频的视频片段或VIP用户分享的整个VIP视频统称为第一视频,将未截取过的完整的VIP视频称为第二视频。一种情况下,如果VIP用户分享的为VIP视频的视频片段,则第一视频为从第二视频中截取的视频;如果VIP用户分享的为一个完整的VIP视频,则第一视频即为第二视频。In an application scenario, a VIP user can capture video segments of a VIP video and share the captured video segments; or directly share the entire VIP video without capturing the VIP video. In this embodiment, the video segment of the VIP video shared by the VIP user or the entire VIP video shared by the VIP user may be collectively referred to as the first video, and the complete VIP video that has not been intercepted may be referred to as the second video. In one case, if a VIP user shares a video clip of a VIP video, the first video is a video intercepted from the second video; if a VIP user shares a complete VIP video, the first video is the second video Two videos.
具体地,第一视频可以由用户A的好友用户B通过终端B分享给用户A。如图2所示,用户B为VIP用户,用户A为VIP用户或普通用户,且用户A为用户B的好友,用户B可以通过终端B或终端B上的视频客户端,如咪咕直播的视频客户端的视频截取工具来对VIP视频,如第二视频进行截取,截取得到第一视频;在得到第一视频后,用户B可以点击对应的分享按键并选择分享到的目标用户A。用户B的终端B在监测到用户B点击了对应的分享按键以及选择了分享到的目标用户A后,可以基于用户B截取的第一视频,以及用户B选择的分享到的目标用户A生成对应的请求分享消息,其中,该请求分享消息中可以包括用户B的标识信息、第一视频的标识信息(或第二视频的标识信息以及与第一视频对应的时间戳信息),以及分享到的目标用户A的标识信息。需要说明的是,分享到的目标用户A的标识信息可以包括用户标识信息(分享给某个人或某些人时)或地址标识信息(分享到空间如朋友圈时)。Specifically, the first video can be shared with user A by user B, a friend of user A, through terminal B. As shown in Figure 2, user B is a VIP user, user A is a VIP user or an ordinary user, and user A is a friend of user B. User B can use terminal B or a video client on terminal B, such as Migu Live The video interception tool of the video client is used to intercept the VIP video, such as the second video, to obtain the first video; after obtaining the first video, user B can click the corresponding share button and select the target user A to share. After user B's terminal B detects that user B clicks the corresponding share button and selects the target user A to be shared, it can generate a corresponding video based on the first video intercepted by user B and the target user A selected by user B to share. request sharing message, wherein the request sharing message may include user B's identification information, the identification information of the first video (or the identification information of the second video and the timestamp information corresponding to the first video), and the shared Identification information of target user A. It should be noted that the shared identification information of the target user A may include user identification information (when sharing to a certain person or certain people) or address identification information (when sharing to a space such as circle of friends).
终端B在生成请求分享消息后,可以将该请求分享消息发送给服务器。After terminal B generates the sharing request message, it may send the sharing request message to the server.
服务器接收到该请求分享消息后,可以基于该请求分享消息生成分享消息,其中,该分享消息中包括服务器添加的分享标识信息,第一视频的标识信息(或第二视频的标识信息以及与第一视频对应的时间戳信息),以及分享到的目标用户A的标识信息,并将该分享消息发送给终端A,以使终端A接收该分享消息。After the server receives the sharing request message, it can generate a sharing message based on the sharing request message, wherein the sharing message includes the sharing identification information added by the server, the identification information of the first video (or the identification information of the second video and the Time stamp information corresponding to a video), and the identification information of the shared target user A, and send the sharing message to terminal A, so that terminal A receives the sharing message.
终端A接收到服务器发送的分享消息后,可以将该分享消息展示给用户A,用户A可以通过点击操作来触发播放该分享消息对应的第一视频。此时,终端A可以向服务器发送播放第一视频的请求,其中,该请求中包括终端A所属用户A的标识信息、第一视频的标识信息(或第二视频的标识信息以及与第一视频对应的时间戳信息)、分享标识信息。After terminal A receives the sharing message sent by the server, it may display the sharing message to user A, and user A may click to trigger the playing of the first video corresponding to the sharing message. At this point, terminal A may send a request to the server to play the first video, wherein the request includes the identification information of user A to which terminal A belongs, the identification information of the first video (or the identification information of the second video, and corresponding timestamp information), share identification information.
具体地,服务器接收到终端A发送的播放第一视频的请求后,可以检测该请求中是否携带了分享标识信息,若检测到该请求中携带了分享标识信息,则可以确定该请求为针对第一视频的播放请求消息;若未检测到该请求中携带分享标识信息,则可以确定该请求不为针对第一视频的播放请求消息。Specifically, after receiving the request from terminal A to play the first video, the server can detect whether the request carries sharing identification information, and if it detects that the request carries sharing identification information, it can determine that the request is for the first video. A play request message for a video; if it is not detected that the request carries sharing identification information, it can be determined that the request is not a play request message for the first video.
本实施例中,服务器检测到该请求中携带了分享标识信息,则根据该请求中的用户标识信息确定该用户是否为指定用户,这里指定用户可以为VIP用户。In this embodiment, the server detects that the sharing identification information is carried in the request, and then determines whether the user is a designated user according to the user identification information in the request, where the designated user may be a VIP user.
需要说明的是,在实施例中,向终端A发送分享消息的服务器与接收终端A发送的播放第一视频的请求的服务器可以为同一服务器,也可以为不同服务器,本实施例不做限制。It should be noted that, in this embodiment, the server that sends the sharing message to terminal A and the server that receives terminal A's request to play the first video may be the same server or different servers, which are not limited in this embodiment.
步骤102:根据标识信息确定用户为非指定用户时,确定用户针对第一视频的可观看时长。Step 102: When it is determined according to the identification information that the user is an unspecified user, determine the watchable duration of the first video for the user.
在确定终端发送的请求为针对第一视频的播放请求后,获取该请求中的用户标识信息,并根据获取的标识信息来确定该用户是否为指定用户。这里,具体如何根据用户标识信息来确定请求播放第一视频的用户是否为指定用户,可以采用已有技术实现,本实施例在此不再赘述。After determining that the request sent by the terminal is a play request for the first video, obtain user identification information in the request, and determine whether the user is a specified user according to the obtained identification information. Here, how to specifically determine whether the user requesting to play the first video is a specified user according to the user identification information can be implemented by using existing technologies, and details will not be described in this embodiment here.
优选地,根据标识信息确定用户为非指定用户时,针对第一视频的可观看时长的确定过程进一步可以包括步骤1021和1022。Preferably, when the user is determined to be an unspecified user according to the identification information, the process of determining the watchable duration of the first video may further include steps 1021 and 1022 .
步骤1021:确定用户针对第二视频的可观看时长,以及累计观看时长。Step 1021: Determine the user's watchable time for the second video and the cumulative watch time.
优选地,服务器可以根据第二视频的视频长度和用户的用户等级来确定用户针对第二视频的可观看时长。Preferably, the server can determine the watchable duration of the second video for the user according to the video length of the second video and the user level of the user.
具体地,服务器可以获取第二视频的视频长度,然后,根据该用户在历史记录中作为指定用户的累积时间,确定用户的用户等级;其中,第二视频的视频长度越长,该用户的用户等级越高时,确定的该用户针对第二视频的可观看时长越长。Specifically, the server can obtain the video length of the second video, and then determine the user level of the user according to the accumulated time of the user as a specified user in the historical records; the longer the video length of the second video, the higher the user level of the user When the level is higher, the determined watchable duration of the second video for the user is longer.
优选地,服务器可以根据该用户的历史观看记录来确定该用户针对第二视频的累计观看时长。Preferably, the server can determine the user's cumulative viewing time for the second video according to the user's historical viewing records.
具体地,服务器对该用户的历史观看记录进行检测,可以包括两种情况:Specifically, the server detects the user's historical viewing records, which may include two situations:
一种情况下,确定该用户的历史观看记录中不包括该用户观看第一视频的记录,则根据该用户的历史观看记录确定该用户累计观看的第二视频的片段,然后,获取确定的第二视频的片段的时长,再根据获取的第二视频的片段的时长确定该用户针对第二视频的累计观看时长;这里,可以设定第二视频为视频M,包括若干视频片段M1、M2….Mn,第一视频为从第二视频中截取的视频片段M3。In one case, it is determined that the user's historical viewing record does not include the user's viewing record of the first video, then determine the segment of the second video that the user has watched accumulatively according to the user's historical viewing record, and then obtain the determined second video. The length of the segment of the second video, and then determine the cumulative viewing time of the user for the second video according to the acquired duration of the segment of the second video; here, the second video can be set as video M, including several video segments M1, M2... .Mn, the first video is a video segment M3 intercepted from the second video.
例如,服务器对用户A的历史观看记录进行检测,并确定用户A曾观看过视频M中的两个视频片段M5与M6,未观看过视频片段M3;服务器对用户A曾观看过的两个视频片段M5与M6的时长进行统计,具体地,服务器可以先确定视频片段M5为视频M的第10分第1秒至第13分第7秒、视频片段M6为视频M的第12分第8秒至第15分第10秒,然后,服务器获取视频片段M5的时长为3分6秒、视频片段M6的时长为2分3秒,则服务器可以对该获取的两个时长进行叠加计算,得到累计观看时长5分9秒。For example, the server detects the historical viewing records of user A, and determines that user A has watched two video clips M5 and M6 in video M, but has not watched video clip M3; The duration of segments M5 and M6 is counted. Specifically, the server can first determine that the video segment M5 is the 10th minute, 1st second to the 13th minute, 7th second of the video M, and the video segment M6 is the 12th minute, 8th second of the video M. At the 15th minute and the 10th second, the server obtains the video segment M5 with a duration of 3 minutes and 6 seconds, and the video segment M6 with a duration of 2 minutes and 3 seconds, then the server can superimpose the obtained two durations to obtain the accumulated Watching time is 5 minutes and 9 seconds.
另一种情况下,确定该用户的历史观看记录中包括该用户观看第一视频的记录,则根据该用户的历史观看记录确定该用户累计观看的第二视频的片段,然后,从确定的第二视频的片段中确定重叠的片段,获取确定的第二视频的片段的时长以及重叠的片段的时长,再根据获取的第二视频的片段的时长,以及重叠的片段的时长确定该用户针对第二视频的累计观看时长;这里,可以设定第二视频为视频M,包括若干视频片段M1、M2….Mn,第一视频为从第二视频中截取的视频片段M3。In another case, if it is determined that the user's historical viewing record includes a record of the user watching the first video, then determine the segment of the second video that the user has watched accumulatively according to the user's historical viewing record, and then, from the determined first video Determining overlapping segments in the segments of the second video, obtaining the determined duration of the segment of the second video and the duration of the overlapping segment, and then determining the user's goal for the second segment according to the acquired duration of the segment of the second video and the duration of the overlapping segment The cumulative viewing time of the second video; here, the second video can be set as video M, including several video segments M1, M2...Mn, and the first video is the video segment M3 intercepted from the second video.
例如,服务器对用户A的历史观看记录进行检测,并确定用户A曾观看过视频M中的三个视频片段,分别为M3、M5与M6,其中,视频片段M3为请求播放的第一视频,则确定视频片段M3为重叠的片段;服务器对用户A曾观看过的三个视频片段M3、M5与M6的时长进行统计,具体地,服务器可以先确定视频片段M3为视频M的第5分第5秒至第8分第7秒、M5为视频M的第10分第1秒至第13分第7秒、视频片段M6为视频M的第12分第8秒至第15分第10秒,然后,服务器获取视频片段M3的时长为3分2秒、视频片段M5的时长为3分6秒、视频片段M6的时长为2分3秒,则服务器可以对该获取的三个视频片段的时长进行叠加计算,得到累计时长为8分11秒,再减去重叠的片段M3的时长,从而得到累计观看时长5分9秒。For example, the server detects the historical viewing records of user A, and determines that user A has watched three video clips in video M, namely M3, M5 and M6, wherein video clip M3 is the first video requested to be played, Then determine that the video segment M3 is an overlapping segment; the server counts the duration of the three video segments M3, M5 and M6 that user A has watched. 5 seconds to the 8th minute and 7th second, M5 is the 10th minute, 1st second to the 13th minute, 7th second of the video M, and the video clip M6 is the 12th minute, 8th second to the 15th minute, 10th second of the video M, Then, the server obtains the video segment M3 with a duration of 3 minutes and 2 seconds, the video segment M5 with a duration of 3 minutes and 6 seconds, and the video segment M6 with a duration of 2 minutes and 3 seconds, then the server can determine the duration of the three obtained video segments Perform superimposed calculations to obtain a cumulative viewing time of 8 minutes and 11 seconds, and then subtract the duration of the overlapping segment M3 to obtain a cumulative viewing time of 5 minutes and 9 seconds.
需要说明的是,服务器在对该确定的第二视频片段进行统计时,不对重叠的片段进行重复统计。It should be noted that when the server performs statistics on the determined second video segment, it does not perform repeated statistics on overlapping segments.
步骤1022:根据用户针对第二视频的可观看时长以及累计观看时长确定用户针对第一视频的可观看时长。Step 1022: Determine the user's available viewing time for the first video according to the user's available viewing time for the second video and the accumulated viewing time.
具体地,若确定用户针对第二视频的累计观看时长小于针对第二视频的可观看时长,则计算累计观看时长与用户针对第二视频的可观看时长的差值,确定该差值为该用户针对第一视频的可观看时长;若确定用户针对第二视频的累计观看时长等于针对第二视频的可观看时长,则确定该用户没有观看权限,不向发送播放第一视频请求的终端发送视频数据。Specifically, if it is determined that the user's cumulative viewing time for the second video is less than the watchable time for the second video, then calculate the difference between the cumulative viewing time and the user's watchable time for the second video, and determine that the difference is the user's For the watchable duration of the first video; if it is determined that the user’s cumulative viewing duration for the second video is equal to the watchable duration for the second video, then it is determined that the user has no viewing authority, and the video is not sent to the terminal that sends the request to play the first video data.
在实际应用中,若根据标识信息确定用户为指定用户时,则确定该用户对第一视频具有观看权限,此时,服务器可以直接向发送播放第一视频请求的终端发送第一视频的视频数据,以使终端播放。In practical applications, if it is determined according to the identification information that the user is a designated user, then it is determined that the user has the right to watch the first video. At this time, the server can directly send the video data of the first video to the terminal that sends the request to play the first video. , to make the terminal play.
步骤103:根据用户针对第一视频的可观看时长确定第一视频的可播放内容,向终端发送可播放内容对应的视频数据,以使终端播放。Step 103: Determine the playable content of the first video according to the watchable duration of the first video by the user, and send video data corresponding to the playable content to the terminal, so that the terminal can play it.
具体地,服务器可以根据该用户针对第一视频的可观看时长确定单位长度,根据该用户的历史观看记录确定该用户针对第一视频未观看的内容,再以该可观看时长为单位长度,对第一视频未观看的内容进行分段,并统计每段视频对应的观看次数、弹幕数量以及分享次数,在完成统计后,服务器可以对每段视频的统计结果进行加权求和,得到和值,将对应于最大和值的那段视频确定为第一视频中的可播放内容。其中,与视频片段对应的观看次数、弹幕数量以及分享次数对应的权重值可以由用户自定义设置,或为服务器设置的默认值。Specifically, the server may determine the unit length according to the watchable duration of the user for the first video, determine the content that the user has not watched for the first video according to the user's historical viewing records, and then use the watchable duration as the unit length for The unwatched content of the first video is divided into segments, and the number of views, bullet screens, and sharing times corresponding to each video is counted. After the statistics are completed, the server can weight and sum the statistical results of each video to obtain the sum value , determine the segment of video corresponding to the maximum sum value as the playable content in the first video. Wherein, the weight values corresponding to the viewing times, barrage numbers and sharing times corresponding to the video clips may be customized by the user, or may be default values set by the server.
例如,用户针对第一视频的可观看时长为30秒,服务器确定该用户针对第一视频未观看的内容为1分30秒,则可以以30秒为单位长度将第一视频分为三段,并分别统计每段视频对应的观看次数、弹幕数量以及分享次数,可以假设该三段视频对应的观看次数分别为:500次、600次、400次,该三段视频对应的弹幕数量分别为:100、200、150,该三段视频对应的分享次数分别为20、40、30,与视频片段对应的观看次数、弹幕数量以及分享次数对应的权重值可以为0.3、0.4以及0.3,则第1段视频对应的和值为((500*0.3)+(100*0.3)+(20*0.3))=186;第2段视频对应的和值为((600*0.4)+(200*0.4)+(40*0.4))=336;第3段视频对应的和值为((400*0.3)+(150*0.3)+(30*0.3))=174,由336>186>174可知,第2段视频对应的和值最大,此时,服务器可以将第2段视频确定为第一视频中的可播放内容,并向发送播放第一视频请求的终端发送第一视频的可播放内容对应的视频数据,以使该终端播放。For example, the user can watch the first video for 30 seconds, and the server determines that the content that the user has not watched for the first video is 1 minute and 30 seconds, then the first video can be divided into three sections with a unit length of 30 seconds, And count the number of views, the number of barrages, and the number of shares corresponding to each video. It can be assumed that the number of views corresponding to the three videos is: 500, 600, and 400 times. The number of barrages corresponding to the three videos is respectively are: 100, 200, 150, the share times corresponding to the three videos are 20, 40, 30 respectively, and the weight values corresponding to the number of views, the number of bullet screens and the number of shares corresponding to the video clips can be 0.3, 0.4 and 0.3, Then the sum value corresponding to the first video is ((500*0.3)+(100*0.3)+(20*0.3))=186; the sum value corresponding to the second video is ((600*0.4)+(200 *0.4)+(40*0.4))=336; the sum value corresponding to the third video is ((400*0.3)+(150*0.3)+(30*0.3))=174, from 336>186>174 It can be seen that the sum value corresponding to the second segment of video is the largest. At this time, the server can determine the second segment of video as the playable content in the first video, and send the playable content of the first video to the terminal that sends the request to play the first video. The video data corresponding to the content, so that the terminal can play it.
下面对本发明实施例视频播放方法的具体实现过程做进一步地详细说明。The specific implementation process of the video playing method in the embodiment of the present invention will be further described in detail below.
图3为本发明实施例一提供的视频播放方法的实现流程示意图,本实施例中,发送播放第一视频请求的终端所属用户为非指定用户;如图3所示,本实施例的视频播放方法包括以下步骤:Fig. 3 is a schematic diagram of the implementation flow of the video playing method provided by Embodiment 1 of the present invention. In this embodiment, the user belonging to the terminal that sends the request to play the first video is an unspecified user; as shown in Fig. 3 , the video playing method of this embodiment The method includes the following steps:
步骤301:接收终端发送的播放第一视频的请求,其中,所述请求中包括所述终端所属用户的标识信息。Step 301: Receive a request from a terminal to play a first video, wherein the request includes identification information of a user to which the terminal belongs.
其中,第一视频是由所述终端所属用户的好友分享的,这里,可以将所述终端命名为终端A,将终端A所属的用户命名为用户A。Wherein, the first video is shared by friends of the user to which the terminal belongs. Here, the terminal may be named terminal A, and the user to which terminal A belongs is named user A.
在一个应用场景中,VIP用户可以截取VIP视频的视频片段,并可以对截取得到的视频片段进行分享;也可以不截取VIP视频,直接对整个VIP视频进行分享。本实施例中,可以将VIP用户分享的VIP视频的视频片段或VIP用户分享的整个VIP视频统称为第一视频,将未截取过的完整的VIP视频称为第二视频。一种情况下,如果VIP用户分享的为VIP视频的视频片段,则第一视频为从第二视频中截取的视频;如果VIP用户分享的为一个完整的VIP视频,则第一视频即为第二视频。In an application scenario, a VIP user can capture video segments of a VIP video and share the captured video segments; or directly share the entire VIP video without capturing the VIP video. In this embodiment, the video segment of the VIP video shared by the VIP user or the entire VIP video shared by the VIP user may be collectively referred to as the first video, and the complete VIP video that has not been intercepted may be referred to as the second video. In one case, if a VIP user shares a video clip of a VIP video, the first video is a video intercepted from the second video; if a VIP user shares a complete VIP video, the first video is the second video Two videos.
具体地,第一视频可以由用户A的好友用户B通过终端B分享给用户A。如图2所示,用户B为VIP用户,用户A为VIP用户或普通用户,且用户A为用户B的好友,用户B可以通过终端B或终端B上的视频客户端,如咪咕直播的视频客户端的视频截取工具来对VIP视频,如第二视频进行截取,截取得到第一视频;在得到第一视频后,用户B可以点击对应的分享按键并选择分享到的目标用户A。用户B的终端B在监测到用户B点击了对应的分享按键以及选择了分享到的目标用户A后,可以基于用户B截取的第一视频,以及用户B选择的分享到的目标用户A生成对应的请求分享消息,其中,该请求分享消息中可以包括用户B的标识信息、第一视频的标识信息(或第二视频的标识信息以及与第一视频对应的时间戳信息),以及分享到的目标用户A的标识信息。需要说明的是,分享到的目标用户A的标识信息可以包括用户标识信息(分享给某个人或某些人时)或地址标识信息(分享到空间如朋友圈时)。Specifically, the first video can be shared with user A by user B, a friend of user A, through terminal B. As shown in Figure 2, user B is a VIP user, user A is a VIP user or an ordinary user, and user A is a friend of user B. User B can use terminal B or a video client on terminal B, such as Migu Live The video interception tool of the video client is used to intercept the VIP video, such as the second video, to obtain the first video; after obtaining the first video, user B can click the corresponding share button and select the target user A to share. After user B's terminal B detects that user B clicks the corresponding share button and selects the target user A to be shared, it can generate a corresponding video based on the first video intercepted by user B and the target user A selected by user B to share. request sharing message, wherein the request sharing message may include user B's identification information, the identification information of the first video (or the identification information of the second video and the timestamp information corresponding to the first video), and the shared Identification information of target user A. It should be noted that the shared identification information of the target user A may include user identification information (when sharing to a certain person or certain people) or address identification information (when sharing to a space such as circle of friends).
终端B在生成请求分享消息后,可以将该请求分享消息发送给服务器。After terminal B generates the sharing request message, it may send the sharing request message to the server.
服务器接收到该请求分享消息后,可以基于该请求分享消息生成分享消息,其中,该分享消息中包括服务器添加的分享标识信息,第一视频的标识信息(或第二视频的标识信息以及与第一视频对应的时间戳信息),以及分享到的目标用户A的标识信息,并将该分享消息发送给终端A,以使终端A接收该分享消息。After the server receives the sharing request message, it can generate a sharing message based on the sharing request message, wherein the sharing message includes the sharing identification information added by the server, the identification information of the first video (or the identification information of the second video and the Time stamp information corresponding to a video), and the identification information of the shared target user A, and send the sharing message to terminal A, so that terminal A receives the sharing message.
终端A接收到服务器发送的分享消息后,可以将该分享消息展示给用户A,用户A可以通过点击操作来触发播放该分享消息对应的第一视频。此时,终端A可以向服务器发送播放第一视频的请求,其中,该请求中包括终端A所属用户A的标识信息、第一视频的标识信息(或第二视频的标识信息以及与第一视频对应的时间戳信息)、分享标识信息。After terminal A receives the sharing message sent by the server, it may display the sharing message to user A, and user A may click to trigger the playing of the first video corresponding to the sharing message. At this point, terminal A may send a request to the server to play the first video, wherein the request includes the identification information of user A to which terminal A belongs, the identification information of the first video (or the identification information of the second video, and corresponding timestamp information), share identification information.
步骤302:检测播放第一视频的请求中是否有分享标识信息。Step 302: Detect whether there is sharing identification information in the request to play the first video.
具体地,服务器接收到终端A发送的播放第一视频的请求后,可以检测该请求中是否携带了分享标识信息,若检测到该请求中携带了分享标识信息,则可以确定该请求为针对第一视频的播放请求消息;若未检测到该请求中携带分享标识信息,则可以确定该请求不为针对第一视频的播放请求消息。Specifically, after receiving the request from terminal A to play the first video, the server can detect whether the request carries sharing identification information, and if it detects that the request carries sharing identification information, it can determine that the request is for the first video. A play request message for a video; if it is not detected that the request carries sharing identification information, it can be determined that the request is not a play request message for the first video.
需要说明的是,在实施例中,向终端A发送分享消息的服务器与接收终端A发送的播放第一视频的请求的服务器可以为同一服务器,也可以为不同服务器,本实施例不做限制。It should be noted that, in this embodiment, the server that sends the sharing message to terminal A and the server that receives terminal A's request to play the first video may be the same server or different servers, which are not limited in this embodiment.
步骤303:获取播放第一视频的请求中的用户标识信息。Step 303: Obtain user identification information in the request to play the first video.
在确定终端发送的请求为针对第一视频的播放请求后,获取该请求中的用户标识信息,并根据获取的标识信息来确定该用户是否为指定用户,这里指定用户可以为VIP用户。After determining that the request sent by the terminal is a play request for the first video, obtain the user identification information in the request, and determine whether the user is a designated user according to the obtained identification information, where the designated user may be a VIP user.
步骤304:根据用户标识信息确定该用户为非指定用户。Step 304: Determine that the user is an unspecified user according to the user identification information.
这里,具体如何根据用户标识信息来确定请求播放第一视频的用户是否为指定用户,可以采用已有技术实现,本实施例在此不再赘述。Here, how to specifically determine whether the user requesting to play the first video is a specified user according to the user identification information can be implemented by using existing technologies, and details will not be described in this embodiment here.
步骤305:根据第二视频的视频长度和用户的用户等级确定用户针对第二视频的可观看时长。Step 305: Determine the watchable duration of the second video for the user according to the video length of the second video and the user level of the user.
具体地,服务器可以获取第二视频的视频长度,然后,根据该用户在历史记录中作为指定用户的累积时间,确定用户的用户等级;其中,第二视频的视频长度越长,该用户的用户等级越高时,确定的该用户针对第二视频的可观看时长越长。Specifically, the server can obtain the video length of the second video, and then determine the user level of the user according to the accumulated time of the user as a specified user in the historical records; the longer the video length of the second video, the higher the user level of the user When the level is higher, the determined watchable duration of the second video for the user is longer.
步骤306:根据用户的历史观看记录确定用户针对第二视频的累计观看时长。Step 306: Determine the user's cumulative viewing time for the second video according to the user's historical viewing records.
具体地,服务器对该用户的历史观看记录进行检测,可以包括两种情况:Specifically, the server detects the user's historical viewing records, which may include two situations:
一种情况下,确定该用户的历史观看记录中不包括该用户观看第一视频的记录,则根据该用户的历史观看记录确定该用户累计观看的第二视频的片段,然后,获取确定的第二视频的片段的时长,再根据获取的第二视频的片段的时长确定该用户针对第二视频的累计观看时长;这里,可以设定第二视频为视频M,包括若干视频片段M1、M2….Mn,第一视频为从第二视频中截取的视频片段M3。In one case, it is determined that the user's historical viewing record does not include the user's viewing record of the first video, then determine the segment of the second video that the user has watched accumulatively according to the user's historical viewing record, and then obtain the determined second video. The length of the segment of the second video, and then determine the cumulative viewing time of the user for the second video according to the acquired duration of the segment of the second video; here, the second video can be set as video M, including several video segments M1, M2... .Mn, the first video is a video segment M3 intercepted from the second video.
例如,服务器对用户A的历史观看记录进行检测,并确定用户A曾观看过视频M中的两个视频片段M5与M6,未观看过视频片段M3;服务器对用户A曾观看过的两个视频片段M5与M6的时长进行统计,具体地,服务器可以先确定视频片段M5为视频M的第10分第1秒至第13分第7秒、视频片段M6为视频M的第12分第8秒至第15分第10秒,然后,服务器获取视频片段M5的时长为3分6秒、视频片段M6的时长为2分3秒,则服务器可以对该获取的两个时长进行叠加计算,得到累计观看时长5分9秒。For example, the server detects the historical viewing records of user A, and determines that user A has watched two video clips M5 and M6 in video M, but has not watched video clip M3; The duration of segments M5 and M6 is counted. Specifically, the server can first determine that the video segment M5 is the 10th minute, 1st second to the 13th minute, 7th second of the video M, and the video segment M6 is the 12th minute, 8th second of the video M. At the 15th minute and the 10th second, the server obtains the video segment M5 with a duration of 3 minutes and 6 seconds, and the video segment M6 with a duration of 2 minutes and 3 seconds, then the server can superimpose the obtained two durations to obtain the accumulated Watching time is 5 minutes and 9 seconds.
另一种情况下,确定该用户的历史观看记录中包括该用户观看第一视频的记录,则根据该用户的历史观看记录确定该用户累计观看的第二视频的片段,然后,从确定的第二视频的片段中确定重叠的片段,获取确定的第二视频的片段的时长以及重叠的片段的时长,再根据获取的第二视频的片段的时长,以及重叠的片段的时长确定该用户针对第二视频的累计观看时长;这里,可以设定第二视频为视频M,包括若干视频片段M1、M2….Mn,第一视频为从第二视频中截取的视频片段M3。In another case, if it is determined that the user's historical viewing record includes a record of the user watching the first video, then determine the segment of the second video that the user has watched accumulatively according to the user's historical viewing record, and then, from the determined first video Determining overlapping segments in the segments of the second video, obtaining the determined duration of the segment of the second video and the duration of the overlapping segment, and then determining the user's goal for the second segment according to the acquired duration of the segment of the second video and the duration of the overlapping segment The cumulative viewing time of the second video; here, the second video can be set as video M, including several video segments M1, M2...Mn, and the first video is the video segment M3 intercepted from the second video.
例如,服务器对用户A的历史观看记录进行检测,并确定用户A曾观看过视频M中的三个视频片段,分别为M3、M5与M6,其中,视频片段M3为请求播放的第一视频,则确定视频片段M3为重叠的片段;服务器对用户A曾观看过的三个视频片段M3、M5与M6的时长进行统计,具体地,服务器可以先确定视频片段M3为视频M的第5分第5秒至第8分第7秒、M5为视频M的第10分第1秒至第13分第7秒、视频片段M6为视频M的第12分第8秒至第15分第10秒,然后,服务器获取视频片段M3的时长为3分2秒、视频片段M5的时长为3分6秒、视频片段M6的时长为2分3秒,则服务器可以对该获取的三个视频片段的时长进行叠加计算,得到累计时长为8分11秒,再减去重叠的片段M3的时长,从而得到累计观看时长5分9秒。For example, the server detects the historical viewing records of user A, and determines that user A has watched three video clips in video M, namely M3, M5 and M6, wherein video clip M3 is the first video requested to be played, Then determine that the video segment M3 is an overlapping segment; the server counts the duration of the three video segments M3, M5 and M6 that user A has watched. 5 seconds to the 8th minute and 7th second, M5 is the 10th minute, 1st second to the 13th minute, 7th second of the video M, and the video clip M6 is the 12th minute, 8th second to the 15th minute, 10th second of the video M, Then, the server obtains the video segment M3 with a duration of 3 minutes and 2 seconds, the video segment M5 with a duration of 3 minutes and 6 seconds, and the video segment M6 with a duration of 2 minutes and 3 seconds, then the server can determine the duration of the three obtained video segments Perform superimposed calculations to obtain a cumulative viewing time of 8 minutes and 11 seconds, and then subtract the duration of the overlapping segment M3 to obtain a cumulative viewing time of 5 minutes and 9 seconds.
需要说明的是,服务器在对该确定的第二视频片段进行统计时,不对重叠的片段进行重复统计。It should be noted that when the server performs statistics on the determined second video segment, it does not perform repeated statistics on overlapping segments.
步骤307:判断用户针对第二视频的累计观看时长是否小于针对第二视频的可观看时长。Step 307: Determine whether the accumulated viewing time of the second video by the user is less than the watchable time of the second video.
具体地,若确定用户针对第二视频的累计观看时长小于针对第二视频的可观看时长,则执行步骤308;若确定用户针对第二视频的累计观看时长等于针对第二视频的可观看时长,则执行步骤312:确定该用户没有观看权限,不向发送播放第一视频请求的终端发送视频数据。Specifically, if it is determined that the user's cumulative viewing time for the second video is less than the watchable time for the second video, step 308 is performed; if it is determined that the user's cumulative viewing time for the second video is equal to the watchable time for the second video, Then execute step 312: determine that the user does not have viewing authority, and do not send video data to the terminal that sends the request to play the first video.
步骤308:根据用户针对第二视频的可观看时长以及累计观看时长确定用户针对第一视频的可观看时长。Step 308: Determine the user's available viewing time for the first video according to the user's available viewing time for the second video and the accumulated viewing time.
具体地,计算累计观看时长与用户针对第二视频的可观看时长的差值,确定该差值为该用户针对第一视频的可观看时长。Specifically, the difference between the accumulated viewing time and the user's watchable time for the second video is calculated, and the difference is determined as the user's watchable time for the first video.
步骤309:根据用户的历史观看记录确定用户针对第一视频未观看的内容。Step 309: Determine the content that the user has not watched for the first video according to the user's historical viewing records.
具体地,根据该用户的历史观看记录确定第一视频未观看的内容。例如,第一视频为第二视频的第35分钟第2秒至第37分钟第30秒,在一种情况下,可以假设该用户未观看过第二视频,则服务器在检测该用户的历史观看记录时,无法检测到与第二视频有关的观看记录,此时,服务器可以确定该用户请求观看的第一视频中该用户未观看的内容为第二视频的第35分钟第2秒至第37分钟第30秒;在另一种情况下,可以假设该用户观看过第二视频,且观看的是第二视频的第33分钟第56秒至第35分钟第49秒,则服务器在检测该用户的历史观看记录时,可以检测到与第二视频有关的观看记录,并根据检测到的观看记录确定该用户请求观看的第一视频中该用户未观看的内容为第二视频的第35分钟第50秒至第37分钟第30秒。Specifically, the unwatched content of the first video is determined according to the user's historical viewing records. For example, the first video is the 2nd second of the 35th minute to the 30th second of the 37th minute of the second video. In one case, it can be assumed that the user has never watched the second video, and the server detects the user's historical viewing When recording, the viewing record related to the second video cannot be detected. At this time, the server can determine that the content that the user has not watched in the first video requested by the user is the 35th minute, 2nd second to the 37th second of the second video. In another case, it can be assumed that the user has watched the second video, and watched the second video from the 33rd minute 56th second to the 35th minute 49th second, then the server is detecting the user When the historical viewing records of the user can be detected, the viewing records related to the second video can be detected, and according to the detected viewing records, it can be determined that the content that the user has not watched in the first video that the user requests to watch is the 35th minute of the second video 50 seconds to the 30th second of the 37th minute.
步骤310:根据用户针对第一视频的可观看时长确定第一视频的可播放内容。Step 310: Determine the playable content of the first video according to the watchable duration of the first video by the user.
具体地,服务器可以根据该用户针对第一视频的可观看时长确定单位长度,再以该可观看时长为单位长度,对第一视频未观看的内容进行分段,并统计每段视频对应的观看次数、弹幕数量以及分享次数,在完成统计后,服务器可以对每段视频的统计结果进行加权求和,得到和值,将对应于最大和值的那段视频确定为第一视频中的可播放内容。其中,与视频片段对应的观看次数、弹幕数量以及分享次数对应的权重值可以由用户自定义设置,或为服务器设置的默认值。Specifically, the server can determine the unit length according to the watchable duration of the user for the first video, and then use the watchable duration as the unit length to segment the unwatched content of the first video, and count the viewing time corresponding to each video segment. The number of times, the number of barrage, and the number of sharing times. After the statistics are completed, the server can carry out weighted summation on the statistical results of each video to obtain the sum value, and determine the video corresponding to the maximum sum value as the available video in the first video. Play content. Wherein, the weight values corresponding to the viewing times, barrage numbers and sharing times corresponding to the video clips may be customized by the user, or may be default values set by the server.
步骤311:向发送播放第一视频请求的终端发送第一视频的可播放内容对应的视频数据,以使该终端播放。Step 311: Send the video data corresponding to the playable content of the first video to the terminal that sends the request to play the first video, so that the terminal can play it.
图4为本发明实施例二提供的视频播放方法的实现流程示意图,本实施例中,发送播放第一视频请求的终端所属用户为指定用户;如图4所示,本实施例的视频播放方法包括以下步骤:Fig. 4 is a schematic diagram of the implementation flow of the video playback method provided by Embodiment 2 of the present invention. In this embodiment, the user who belongs to the terminal that sends the request to play the first video is a designated user; as shown in Fig. 4, the video playback method of this embodiment Include the following steps:
步骤401:接收终端发送的播放第一视频的请求,其中,所述请求中包括所述终端所属用户的标识信息。Step 401: Receive a request from a terminal to play a first video, wherein the request includes identification information of a user to which the terminal belongs.
其中,第一视频是由所述终端所属用户的好友分享的,这里,可以将所述终端命名为终端A,将终端A所属的用户命名为用户A。Wherein, the first video is shared by friends of the user to which the terminal belongs. Here, the terminal may be named terminal A, and the user to which terminal A belongs is named user A.
在一个应用场景中,VIP用户可以截取VIP视频的视频片段,并可以对截取得到的视频片段进行分享;也可以不截取VIP视频,直接对整个VIP视频进行分享。本实施例中,可以将VIP用户分享的VIP视频的视频片段或VIP用户分享的整个VIP视频统称为第一视频,将未截取过的完整的VIP视频称为第二视频。一种情况下,如果VIP用户分享的为VIP视频的视频片段,则第一视频为从第二视频中截取的视频;如果VIP用户分享的为一个完整的VIP视频,则第一视频即为第二视频。In an application scenario, a VIP user can capture video segments of a VIP video and share the captured video segments; or directly share the entire VIP video without capturing the VIP video. In this embodiment, the video segment of the VIP video shared by the VIP user or the entire VIP video shared by the VIP user may be collectively referred to as the first video, and the complete VIP video that has not been intercepted may be referred to as the second video. In one case, if a VIP user shares a video clip of a VIP video, the first video is a video intercepted from the second video; if a VIP user shares a complete VIP video, the first video is the second video Two videos.
具体地,第一视频可以由用户A的好友用户B通过终端B分享给用户A。如图2所示,用户B为VIP用户,用户A为VIP用户或普通用户,且用户A为用户B的好友,用户B可以通过终端B或终端B上的视频客户端,如咪咕直播的视频客户端的视频截取工具来对VIP视频,如第二视频进行截取,截取得到第一视频;在得到第一视频后,用户B可以点击对应的分享按键并选择分享到的目标用户A。用户B的终端B在监测到用户B点击了对应的分享按键以及选择了分享到的目标用户A后,可以基于用户B截取的第一视频,以及用户B选择的分享到的目标用户A生成对应的请求分享消息,其中,该请求分享消息中可以包括用户B的标识信息、第一视频的标识信息(或第二视频的标识信息以及与第一视频对应的时间戳信息),以及分享到的目标用户A的标识信息。需要说明的是,分享到的目标用户A的标识信息可以包括用户标识信息(分享给某个人或某些人时)或地址标识信息(分享到空间如朋友圈时)。Specifically, the first video can be shared with user A by user B, a friend of user A, through terminal B. As shown in Figure 2, user B is a VIP user, user A is a VIP user or an ordinary user, and user A is a friend of user B. User B can use terminal B or a video client on terminal B, such as Migu Live The video interception tool of the video client is used to intercept the VIP video, such as the second video, to obtain the first video; after obtaining the first video, user B can click the corresponding share button and select the target user A to share. After user B's terminal B detects that user B clicks the corresponding share button and selects the target user A to be shared, it can generate a corresponding video based on the first video intercepted by user B and the target user A selected by user B to share. request sharing message, wherein the request sharing message may include user B's identification information, the identification information of the first video (or the identification information of the second video and the timestamp information corresponding to the first video), and the shared Identification information of target user A. It should be noted that the shared identification information of the target user A may include user identification information (when sharing to a certain person or certain people) or address identification information (when sharing to a space such as circle of friends).
终端B在生成请求分享消息后,可以将该请求分享消息发送给服务器。After terminal B generates the sharing request message, it may send the sharing request message to the server.
服务器接收到该请求分享消息后,可以基于该请求分享消息生成分享消息,其中,该分享消息中包括服务器添加的分享标识信息,第一视频的标识信息(或第二视频的标识信息以及与第一视频对应的时间戳信息),以及分享到的目标用户A的标识信息,并将该分享消息发送给终端A,以使终端A接收该分享消息。After the server receives the sharing request message, it can generate a sharing message based on the sharing request message, wherein the sharing message includes the sharing identification information added by the server, the identification information of the first video (or the identification information of the second video and the Time stamp information corresponding to a video), and the identification information of the shared target user A, and send the sharing message to terminal A, so that terminal A receives the sharing message.
终端A接收到服务器发送的分享消息后,可以将该分享消息展示给用户A,用户A可以通过点击操作来触发播放该分享消息对应的第一视频。此时,终端A可以向服务器发送播放第一视频的请求,其中,该请求中包括终端A所属用户A的标识信息、第一视频的标识信息(或第二视频的标识信息以及与第一视频对应的时间戳信息)、分享标识信息。After terminal A receives the sharing message sent by the server, it may display the sharing message to user A, and user A may click to trigger the playing of the first video corresponding to the sharing message. At this point, terminal A may send a request to the server to play the first video, wherein the request includes the identification information of user A to which terminal A belongs, the identification information of the first video (or the identification information of the second video, and corresponding timestamp information), share identification information.
步骤402:检测播放第一视频的请求中是否有分享标识信息。Step 402: Detect whether there is sharing identification information in the request to play the first video.
具体地,服务器接收到终端A发送的播放第一视频的请求后,可以检测该请求中是否携带了分享标识信息,若检测到该请求中携带了分享标识信息,则可以确定该请求为针对第一视频的播放请求消息;若未检测到该请求中携带分享标识信息,则可以确定该请求不为针对第一视频的播放请求消息。Specifically, after receiving the request from terminal A to play the first video, the server can detect whether the request carries sharing identification information, and if it detects that the request carries sharing identification information, it can determine that the request is for the first video. A play request message for a video; if it is not detected that the request carries sharing identification information, it can be determined that the request is not a play request message for the first video.
需要说明的是,在实施例中,向终端A发送分享消息的服务器与接收终端A发送的播放第一视频的请求的服务器可以为同一服务器,也可以为不同服务器,本实施例不做限制。It should be noted that, in this embodiment, the server that sends the sharing message to terminal A and the server that receives terminal A's request to play the first video may be the same server or different servers, which are not limited in this embodiment.
步骤403:获取播放第一视频的请求中的用户标识信息。Step 403: Obtain user identification information in the request to play the first video.
在确定终端发送的请求为针对第一视频的播放请求后,获取该请求中的用户标识信息,并根据获取的标识信息来确定该用户是否为指定用户,这里指定用户可以为VIP用户。After determining that the request sent by the terminal is a play request for the first video, obtain the user identification information in the request, and determine whether the user is a designated user according to the obtained identification information, where the designated user may be a VIP user.
步骤404:根据用户标识信息确定该用户为指定用户。Step 404: Determine that the user is a specified user according to the user identification information.
这里,具体如何根据用户标识信息来确定请求播放第一视频的用户是否为指定用户,可以采用已有技术实现,本实施例在此不再赘述。Here, how to specifically determine whether the user requesting to play the first video is a specified user according to the user identification information can be implemented by using existing technologies, and details will not be described in this embodiment here.
步骤405:向发送播放第一视频请求的终端发送第一视频的视频数据,以使该终端播放。Step 405: Send the video data of the first video to the terminal that sends the request to play the first video, so that the terminal can play it.
根据标识信息确定用户为指定用户时,则确定该用户对第一视频具有观看权限,此时,服务器可以直接向发送播放第一视频请求的终端发送第一视频的视频数据,以使终端播放。When it is determined that the user is a designated user according to the identification information, it is determined that the user has viewing authority for the first video, and at this time, the server can directly send the video data of the first video to the terminal that sends the request to play the first video, so that the terminal can play it.
为实现上述方法,本发明实施例还提供了一种视频播放装置,如图5所示,该装置包括接收模块501、第一确定模块502、第二确定模块503、第一发送模块504;其中,In order to implement the above method, an embodiment of the present invention also provides a video playing device, as shown in FIG. 5 , the device includes a receiving module 501, a first determining module 502, a second determining module 503, and a first sending module 504; wherein ,
所述接收模块501,用于接收终端发送的播放第一视频的请求,其中,所述请求中包括所述终端所属用户的标识信息。The receiving module 501 is configured to receive a request sent by a terminal to play the first video, wherein the request includes identification information of a user to which the terminal belongs.
所述第一确定模块502,用于根据所述标识信息确定所述用户为非指定用户时,确定所述用户针对所述第一视频的可观看时长。The first determining module 502 is configured to determine the watchable duration of the first video by the user when it is determined according to the identification information that the user is an unspecified user.
所述第一确定模块502包括第三确定模块505、第四确定模块506和第五确定模块507;其中,The first determination module 502 includes a third determination module 505, a fourth determination module 506 and a fifth determination module 507; wherein,
所述第三确定模块505,用于确定所述用户针对所述第二视频的可观看时长;The third determination module 505 is configured to determine the watchable duration of the user for the second video;
所述第三确定模块505具体用于:获取所述第二视频的视频长度;根据所述用户在历史记录中作为指定用户的累积时间,确定所述用户的用户等级;根据所述第二视频的视频长度和所述用户的用户等级确定所述用户针对所述第二视频的可观看时长。The third determination module 505 is specifically configured to: obtain the video length of the second video; determine the user level of the user according to the accumulated time of the user as a designated user in the history; determine the user level of the user according to the second video The length of the video and the user level of the user determine the watchable duration of the second video for the user.
所述第四确定模块506,用于确定所述用户针对所述第二视频的累计观看时长。The fourth determination module 506 is configured to determine the cumulative viewing time of the user for the second video.
所述第四确定模块506具体用于:根据所述用户的历史观看记录确定所述用户累计观看的所述第二视频的片段;获取确定的所述第二视频的片段的时长;根据获取的所述第二视频的片段的时长确定所述用户针对所述第二视频的累计观看时长。The fourth determination module 506 is specifically configured to: determine the segment of the second video that the user has watched accumulatively according to the historical viewing record of the user; obtain the determined duration of the segment of the second video; The duration of the segment of the second video determines the cumulative viewing duration of the user for the second video.
所述用户的历史观看记录中包括所述用户观看所述第一视频的记录;所述第四确定模块506具体用于:根据所述用户的历史观看记录确定所述用户累计观看的所述第二视频的片段;从所述第二视频的片段中确定重叠的片段;获取确定的所述第二视频的片段的时长以及所述重叠的片段的时长;根据获取的所述第二视频的片段的时长,以及所述重叠的片段的时长确定所述用户针对所述第二视频的累计观看时长。The user's historical viewing record includes the user's viewing record of the first video; the fourth determining module 506 is specifically configured to: determine the user's cumulatively watched first video according to the user's historical viewing record; A segment of the second video; determining an overlapping segment from the segment of the second video; obtaining the determined duration of the segment of the second video and the duration of the overlapping segment; according to the obtained segment of the second video and the duration of the overlapping segments determine the user's cumulative viewing time for the second video.
所述第五确定模块507,用于根据所述用户针对所述第二视频的可观看时长以及累计观看时长确定所述用户针对所述第一视频的可观看时长;其中,所述第一视频为从第二视频中截取的视频。The fifth determining module 507 is configured to determine the user's watchable time for the first video according to the user's watchable time for the second video and the cumulative watch time; wherein, the first video is the video clipped from the second video.
所述第五确定模块507具体用于:计算所述累计观看时长与所述用户针对所述第二视频的可观看时长的差值,确定所述差值为所述用户针对所述第一视频的可观看时长。The fifth determining module 507 is specifically configured to: calculate the difference between the cumulative viewing time and the user's watchable time for the second video, and determine that the difference is the user's viewing time for the first video available viewing time.
所述第二确定模块503,用于根据所述可观看时长确定所述第一视频的可播放内容。The second determination module 503 is configured to determine the playable content of the first video according to the watchable duration.
所述第二确定模块503具体用于:根据所述用户针对所述第一视频的可观看时长确定单位长度;根据所述单位长度对所述第一视频进行分段统计,得到统计结果;根据所述统计结果确定所述第一视频的可播放内容。The second determination module 503 is specifically configured to: determine the unit length according to the watchable duration of the first video by the user; perform segment statistics on the first video according to the unit length, and obtain statistical results; The statistics result determines the playable content of the first video.
所述第二确定模块503具体用于:根据所述用户的历史观看记录确定所述用户针对所述第一视频未观看的内容;根据所述单位长度对所述第一视频未观看的内容进行分段统计。The second determining module 503 is specifically configured to: determine the unwatched content of the first video by the user according to the historical viewing records of the user; perform the unwatched content of the first video according to the unit length Segment statistics.
所述第一发送模块504,用于向所述终端发送所述可播放内容对应的视频数据,以使所述终端播放。The first sending module 504 is configured to send video data corresponding to the playable content to the terminal, so that the terminal can play it.
所述装置还包括第二发送模块508,用于根据所述标识信息确定所述用户为指定用户时,向所述终端发送所述第一视频对应的视频数据,以使所述终端播放。The device also includes a second sending module 508, configured to send video data corresponding to the first video to the terminal when it is determined according to the identification information that the user is a designated user, so that the terminal can play it.
在实际应用中,所述接收模块501、第一确定模块502、第二确定模块503、第一发送模块504、第二发送模块508均可由位于服务器上的中央处理器(CPU,Central ProcessingUnit)、微处理器(MPU,Micro Processor Unit)、数字信号处理器(DSP,Digital SignalProcessor)、或现场可编程门阵列(FPGA,Field Programmable Gate Array)等实现。In practical applications, the receiving module 501, the first determining module 502, the second determining module 503, the first sending module 504, and the second sending module 508 can all be provided by a central processing unit (CPU, Central Processing Unit) located on the server, Implementations such as a microprocessor (MPU, Micro Processor Unit), a digital signal processor (DSP, Digital Signal Processor), or a field programmable gate array (FPGA, Field Programmable Gate Array).
需要说明的是:上述实施例提供的视频播放装置在进行视频播放时,仅以上述各程序模块的划分进行举例说明,实际应用中,可以根据需要而将上述处理分配由不同的程序模块完成,即将装置的内部结构划分成不同的程序模块,以完成以上描述的全部或者部分处理。另外,上述实施例提供的视频播放装置与视频播放方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that: when the video playback device provided by the above-mentioned embodiments is playing video, the division of the above-mentioned program modules is used as an example for illustration. In practical applications, the above-mentioned processing allocation can be completed by different program modules according to needs. That is, the internal structure of the device is divided into different program modules to complete all or part of the processing described above. In addition, the video playback device provided by the above embodiments and the video playback method embodiments belong to the same idea, and the specific implementation process thereof is detailed in the method embodiments, and will not be repeated here.
为实现上述方法,本发明实施例还提供了另一种视频播放装置,该装置包括存储器、处理器及存储在存储器上并能够由所述处理器运行的可执行程序,所述处理器运行所述可执行程序时,执行以下操作:In order to implement the above method, the embodiment of the present invention also provides another video playback device, which includes a memory, a processor, and an executable program stored on the memory and capable of being run by the processor, and the processor runs the When describing an executable program, do the following:
接收终端发送的播放第一视频的请求,其中,所述请求中包括所述终端所属用户的标识信息;receiving a request from the terminal to play the first video, wherein the request includes identification information of the user to which the terminal belongs;
根据所述标识信息确定所述用户为非指定用户时,确定所述用户针对所述第一视频的可观看时长;When determining that the user is an unspecified user according to the identification information, determine the watchable duration of the first video for the user;
根据所述可观看时长确定所述第一视频的可播放内容,向所述终端发送所述可播放内容对应的视频数据,以使所述终端播放。Determine playable content of the first video according to the watchable duration, and send video data corresponding to the playable content to the terminal, so that the terminal can play it.
所述处理器还用于运行所述可执行程序时,执行以下操作:The processor is also configured to perform the following operations when running the executable program:
确定所述用户针对所述第二视频的可观看时长,以及累计观看时长;Determining the watchable duration of the user for the second video, and the cumulative viewing duration;
根据所述用户针对所述第二视频的可观看时长以及累计观看时长确定所述用户针对所述第一视频的可观看时长。The user's watchable time for the first video is determined according to the user's watchable time for the second video and the accumulated watch time.
所述处理器还用于运行所述可执行程序时,执行以下操作:The processor is also configured to perform the following operations when running the executable program:
获取所述第二视频的视频长度;Obtain the video length of the second video;
根据所述用户在历史记录中作为指定用户的累积时间,确定所述用户的用户等级;determining the user level of the user according to the accumulated time of the user as a specified user in the historical records;
根据所述第二视频的视频长度和所述用户的用户等级确定所述用户针对所述第二视频的可观看时长。The user's watchable duration of the second video is determined according to the video length of the second video and the user level of the user.
所述处理器还用于运行所述可执行程序时,执行以下操作:The processor is also configured to perform the following operations when running the executable program:
根据所述用户的历史观看记录确定所述用户累计观看的所述第二视频的片段;determining the segments of the second video cumulatively watched by the user according to the historical viewing records of the user;
获取确定的所述第二视频的片段的时长;Acquiring the determined duration of the segment of the second video;
根据获取的所述第二视频的片段的时长确定所述用户针对所述第二视频的累计观看时长。The accumulated viewing time of the second video by the user is determined according to the acquired duration of the segment of the second video.
所述处理器还用于运行所述可执行程序时,执行以下操作:The processor is also configured to perform the following operations when running the executable program:
根据所述用户的历史观看记录确定所述用户累计观看的所述第二视频的片段;determining the segments of the second video cumulatively watched by the user according to the historical viewing records of the user;
从所述第二视频的片段中确定重叠的片段;determining overlapping segments from the segments of the second video;
获取确定的所述第二视频的片段的时长以及所述重叠的片段的时长;Acquiring the determined duration of the segment of the second video and the duration of the overlapped segment;
根据获取的所述第二视频的片段的时长,以及所述重叠的片段的时长确定所述用户针对所述第二视频的累计观看时长。The accumulated viewing time of the second video by the user is determined according to the acquired duration of the segments of the second video and the duration of the overlapped segments.
所述处理器还用于运行所述可执行程序时,执行以下操作:The processor is also configured to perform the following operations when running the executable program:
计算所述累计观看时长与所述用户针对所述第二视频的可观看时长的差值,确定所述差值为所述用户针对所述第一视频的可观看时长。calculating the difference between the cumulative viewing time and the user's watchable time for the second video, and determining the difference as the user's watchable time for the first video.
所述处理器还用于运行所述可执行程序时,执行以下操作:The processor is also configured to perform the following operations when running the executable program:
根据所述用户针对所述第一视频的可观看时长确定单位长度;determining the unit length according to the watchable duration of the first video by the user;
根据所述单位长度对所述第一视频进行分段统计,得到统计结果;performing segmentation statistics on the first video according to the unit length to obtain statistical results;
根据所述统计结果确定所述第一视频的可播放内容。The playable content of the first video is determined according to the statistics result.
所述处理器还用于运行所述可执行程序时,执行以下操作:The processor is also configured to perform the following operations when running the executable program:
根据所述用户的历史观看记录确定所述用户针对所述第一视频未观看的内容;determining the content that the user has not watched for the first video according to the historical viewing records of the user;
根据所述单位长度对所述第一视频未观看的内容进行分段统计。Perform segmentation statistics on unwatched content of the first video according to the unit length.
所述处理器还用于运行所述可执行程序时,执行以下操作:The processor is also configured to perform the following operations when running the executable program:
根据所述标识信息确定所述用户为指定用户时,向所述终端发送所述第一视频对应的视频数据,以使所述终端播放。When determining that the user is a specified user according to the identification information, sending video data corresponding to the first video to the terminal, so that the terminal can play it.
下面以视频播放装置实施为用于视频播放的服务器为例,对该视频播放装置的硬件结构做进一步说明。The hardware structure of the video playback device will be further described below by taking the video playback device implemented as a server for video playback as an example.
图6给出了本发明实施例的视频播放装置的硬件结构示意图,图6所示的视频播放装置600包括:至少一个处理器601、存储器602和至少一个网络接口603。所述视频播放装置600中的各个组件通过总线系统604耦合在一起。可理解,总线系统604用于实现这些组件之间的连接通信。总线系统604除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图6中将各种总线都标为总线系统604。FIG. 6 shows a schematic diagram of a hardware structure of a video playback device according to an embodiment of the present invention. The video playback device 600 shown in FIG. 6 includes: at least one processor 601 , a memory 602 and at least one network interface 603 . Various components in the video playback device 600 are coupled together through a bus system 604 . It can be understood that the bus system 604 is used to realize connection and communication between these components. In addition to the data bus, the bus system 604 also includes a power bus, a control bus and a status signal bus. However, for clarity of illustration, the various buses are labeled as bus system 604 in FIG. 6 .
可以理解,存储器602可以是易失性存储器或非易失性存储器,也可包括易失性和非易失性存储器两者。It can be understood that the memory 602 may be a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories.
本发明实施例中的存储器602用于存储各种类型的数据以支持视频播放装置600的操作。这些数据的示例包括:用于在视频播放装置600上操作的任何计算机程序,如可执行程序6021,实现本发明实施例方法的程序可以包含在可执行程序6021中。The memory 602 in the embodiment of the present invention is used to store various types of data to support the operation of the video playback device 600 . Examples of these data include: any computer program for operating on the video playback device 600 , such as an executable program 6021 , and the program for implementing the method of the embodiment of the present invention may be included in the executable program 6021 .
上述本发明实施例揭示的方法可以应用于处理器601中,或者由处理器601实现。处理器601可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器601中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器601可以是通用处理器、DSP,或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。处理器601可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本发明实施例所公开的方法的步骤,可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于存储介质中,该存储介质位于存储器602,处理器601读取存储器602中的信息,结合其硬件完成前述方法的步骤。The methods disclosed in the foregoing embodiments of the present invention may be applied to the processor 601 or implemented by the processor 601 . The processor 601 may be an integrated circuit chip and has signal processing capabilities. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor 601 or instructions in the form of software. The aforementioned processor 601 may be a general processor, DSP, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. The processor 601 may implement or execute various methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the methods disclosed in the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, and the storage medium is located in the memory 602. The processor 601 reads the information in the memory 602, and completes the steps of the foregoing method in combination with its hardware.
在示例性实施例中,本发明实施例还提供了一种存储介质,其上存储有可执行程序,所述可执行程序被视频播放装置600的处理器601运行时,执行以下操作:In an exemplary embodiment, the embodiment of the present invention also provides a storage medium on which an executable program is stored. When the executable program is run by the processor 601 of the video playback device 600, the following operations are performed:
接收终端发送的播放第一视频的请求,其中,所述请求中包括所述终端所属用户的标识信息;receiving a request from the terminal to play the first video, wherein the request includes identification information of the user to which the terminal belongs;
根据所述标识信息确定所述用户为非指定用户时,确定所述用户针对所述第一视频的可观看时长;When determining that the user is an unspecified user according to the identification information, determine the watchable duration of the first video for the user;
根据所述可观看时长确定所述第一视频的可播放内容,向所述终端发送所述可播放内容对应的视频数据,以使所述终端播放。Determine playable content of the first video according to the watchable duration, and send video data corresponding to the playable content to the terminal, so that the terminal can play it.
所述可执行程序被视频播放装置600的处理器601运行时,还执行以下操作:When the executable program is run by the processor 601 of the video playback device 600, the following operations are also performed:
确定所述用户针对所述第二视频的可观看时长,以及累计观看时长;Determining the watchable duration of the user for the second video, and the cumulative viewing duration;
根据所述用户针对所述第二视频的可观看时长以及累计观看时长确定所述用户针对所述第一视频的可观看时长。The user's watchable time for the first video is determined according to the user's watchable time for the second video and the accumulated watch time.
所述可执行程序被视频播放装置600的处理器601运行时,还执行以下操作:When the executable program is run by the processor 601 of the video playback device 600, the following operations are also performed:
获取所述第二视频的视频长度;Obtain the video length of the second video;
根据所述用户在历史记录中作为指定用户的累积时间,确定所述用户的用户等级;determining the user level of the user according to the accumulated time of the user as a specified user in the historical records;
根据所述第二视频的视频长度和所述用户的用户等级确定所述用户针对所述第二视频的可观看时长。The user's watchable duration of the second video is determined according to the video length of the second video and the user level of the user.
所述可执行程序被视频播放装置600的处理器601运行时,还执行以下操作:When the executable program is run by the processor 601 of the video playback device 600, the following operations are also performed:
根据所述用户的历史观看记录确定所述用户累计观看的所述第二视频的片段;determining the segments of the second video cumulatively watched by the user according to the historical viewing records of the user;
获取确定的所述第二视频的片段的时长;Acquiring the determined duration of the segment of the second video;
根据获取的所述第二视频的片段的时长确定所述用户针对所述第二视频的累计观看时长。The accumulated viewing time of the second video by the user is determined according to the acquired duration of the segment of the second video.
所述可执行程序被视频播放装置600的处理器601运行时,还执行以下操作:When the executable program is run by the processor 601 of the video playback device 600, the following operations are also performed:
根据所述用户的历史观看记录确定所述用户累计观看的所述第二视频的片段;determining the segments of the second video cumulatively watched by the user according to the historical viewing records of the user;
从所述第二视频的片段中确定重叠的片段;determining overlapping segments from the segments of the second video;
获取确定的所述第二视频的片段的时长以及所述重叠的片段的时长;Acquiring the determined duration of the segment of the second video and the duration of the overlapped segment;
根据获取的所述第二视频的片段的时长,以及所述重叠的片段的时长确定所述用户针对所述第二视频的累计观看时长。The accumulated viewing time of the second video by the user is determined according to the acquired duration of the segments of the second video and the duration of the overlapped segments.
所述可执行程序被视频播放装置600的处理器601运行时,还执行以下操作:When the executable program is run by the processor 601 of the video playback device 600, the following operations are also performed:
计算所述累计观看时长与所述用户针对所述第二视频的可观看时长的差值,确定所述差值为所述用户针对所述第一视频的可观看时长。calculating the difference between the cumulative viewing time and the user's watchable time for the second video, and determining the difference as the user's watchable time for the first video.
所述可执行程序被视频播放装置600的处理器601运行时,还执行以下操作:When the executable program is run by the processor 601 of the video playback device 600, the following operations are also performed:
根据所述用户针对所述第一视频的可观看时长确定单位长度;determining the unit length according to the watchable duration of the first video by the user;
根据所述单位长度对所述第一视频进行分段统计,得到统计结果;performing segmentation statistics on the first video according to the unit length to obtain statistical results;
根据所述统计结果确定所述第一视频的可播放内容。The playable content of the first video is determined according to the statistics result.
所述可执行程序被视频播放装置600的处理器601运行时,还执行以下操作:When the executable program is run by the processor 601 of the video playback device 600, the following operations are also performed:
根据所述用户的历史观看记录确定所述用户针对所述第一视频未观看的内容;determining the content that the user has not watched for the first video according to the historical viewing records of the user;
根据所述单位长度对所述第一视频未观看的内容进行分段统计。Perform segmentation statistics on unwatched content of the first video according to the unit length.
所述可执行程序被视频播放装置600的处理器601运行时,还执行以下操作:When the executable program is run by the processor 601 of the video playback device 600, the following operations are also performed:
根据所述标识信息确定所述用户为指定用户时,向所述终端发送所述第一视频对应的视频数据,以使所述终端播放。When determining that the user is a specified user according to the identification information, sending video data corresponding to the first video to the terminal, so that the terminal can play it.
本发明实施例所提供的视频播放方法、装置及存储介质,接收终端发送的播放第一视频的请求,其中,所述请求中包括所述终端所属用户的标识信息;根据所述标识信息确定所述用户为非指定用户时,确定所述用户针对所述第一视频的可观看时长;根据所述可观看时长确定所述第一视频的可播放内容,向所述终端发送所述可播放内容对应的视频数据,以使所述终端播放。如此,能够在保障视频播放应用软件利益的基础上,最大限度的满足用户尤其是非指定用户观看视频的需求,进而提高用户体验,并能加强视频播放应用软件的推广。The video playing method, device, and storage medium provided by the embodiments of the present invention receive a request from a terminal to play the first video, wherein the request includes identification information of the user to which the terminal belongs; When the user is an unspecified user, determine the watchable duration of the user for the first video; determine the playable content of the first video according to the watchable duration, and send the playable content to the terminal Corresponding video data, so that the terminal plays. In this way, on the basis of guaranteeing the interests of the video playing application software, the needs of users, especially non-designated users, to watch videos can be satisfied to the greatest extent, thereby improving user experience and strengthening the promotion of the video playing application software.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或可执行程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的可执行程序产品的形式。Those skilled in the art should understand that the embodiments of the present invention may be provided as methods, systems, or executable program products. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of an executable program product embodied on one or more computer-usable storage media (including but not limited to magnetic disk storage, optical storage, etc.) having computer-usable program code embodied therein.
本发明是参照根据本发明实施例的方法、设备(系统)、和可执行程序产品的流程图和/或方框图来描述的。应理解可由可执行程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些可执行程序指令到通用计算机、专用计算机、嵌入式处理机或参考可编程数据处理设备的处理器以产生一个机器,使得通过计算机或参考可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and executable program products according to embodiments of the invention. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by executable program instructions. These executable program instructions can be provided to a general purpose computer, special purpose computer, embedded processor or processor of a reference programmable data processing device to produce a machine such that the instructions executed by the computer or a processor of a reference programmable data processing device produce Means for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些可执行程序指令也可存储在能引导计算机或参考可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These executable program instructions may also be stored in a computer-readable memory capable of directing a computer or reference programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the The instruction means implements the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些可执行程序指令也可装载到计算机或参考可编程数据处理设备上,使得在计算机或参考可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或参考可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These executable program instructions can also be loaded onto a computer or reference programmable data processing device, causing a series of operational steps to be performed on the computer or reference programmable device to produce a computer-implemented process for execution on the computer or reference programmable device The instructions provide steps for implementing the functions specified in the procedure or procedures of the flowchart and/or the block or blocks of the block diagram.
以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。The above description is only a preferred embodiment of the present invention, and is not used to limit the protection scope of the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention shall be included in the within the protection scope of the present invention.
Claims (20)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710914437.XA CN107547919A (en) | 2017-09-30 | 2017-09-30 | A kind of video broadcasting method, device and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710914437.XA CN107547919A (en) | 2017-09-30 | 2017-09-30 | A kind of video broadcasting method, device and storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN107547919A true CN107547919A (en) | 2018-01-05 |
Family
ID=60963737
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710914437.XA Pending CN107547919A (en) | 2017-09-30 | 2017-09-30 | A kind of video broadcasting method, device and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN107547919A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109089154A (en) * | 2018-07-10 | 2018-12-25 | 武汉斗鱼网络科技有限公司 | A kind of video extraction method, apparatus, equipment and medium |
| CN113332715A (en) * | 2020-03-02 | 2021-09-03 | 富士胶片商业创新有限公司 | Information processing system, information processing device, and storage medium |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101743540A (en) * | 2007-07-16 | 2010-06-16 | 三星电子株式会社 | Method and system for downloading drm content |
| CN105847988A (en) * | 2016-03-25 | 2016-08-10 | 合网络技术(北京)有限公司 | Video sharing method and apparatus |
| CN105979380A (en) * | 2016-03-31 | 2016-09-28 | 乐视控股(北京)有限公司 | Test broadcasting method and device for multimedia contents on demand |
| CN106131604A (en) * | 2016-06-24 | 2016-11-16 | 腾讯科技(深圳)有限公司 | The transmission method of a kind of multimedia messages and device |
| CN106454415A (en) * | 2016-09-27 | 2017-02-22 | 乐视控股(北京)有限公司 | Video playing control method and device |
| CN106941624A (en) * | 2017-04-28 | 2017-07-11 | 北京小米移动软件有限公司 | The treating method and apparatus that Internet video is tried |
-
2017
- 2017-09-30 CN CN201710914437.XA patent/CN107547919A/en active Pending
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101743540A (en) * | 2007-07-16 | 2010-06-16 | 三星电子株式会社 | Method and system for downloading drm content |
| CN105847988A (en) * | 2016-03-25 | 2016-08-10 | 合网络技术(北京)有限公司 | Video sharing method and apparatus |
| CN105979380A (en) * | 2016-03-31 | 2016-09-28 | 乐视控股(北京)有限公司 | Test broadcasting method and device for multimedia contents on demand |
| CN106131604A (en) * | 2016-06-24 | 2016-11-16 | 腾讯科技(深圳)有限公司 | The transmission method of a kind of multimedia messages and device |
| CN106454415A (en) * | 2016-09-27 | 2017-02-22 | 乐视控股(北京)有限公司 | Video playing control method and device |
| CN106941624A (en) * | 2017-04-28 | 2017-07-11 | 北京小米移动软件有限公司 | The treating method and apparatus that Internet video is tried |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109089154A (en) * | 2018-07-10 | 2018-12-25 | 武汉斗鱼网络科技有限公司 | A kind of video extraction method, apparatus, equipment and medium |
| CN113332715A (en) * | 2020-03-02 | 2021-09-03 | 富士胶片商业创新有限公司 | Information processing system, information processing device, and storage medium |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN104488277B (en) | Method and apparatus for monitoring media presentation | |
| US11818444B2 (en) | Methods and apparatus to synthesize reference media signatures | |
| CN105450724B (en) | Method, apparatus, and tangible computer-readable storage medium for monitoring a media presentation device | |
| WO2020215827A1 (en) | Block chain-based advertisement playback monitoring method and apparatus, and electronic device | |
| US10116976B2 (en) | System and method for distributing media content associated with an event | |
| US20200404345A1 (en) | Video system and video processing method, device and computer readable medium | |
| CN106792208A (en) | Video preference information processing method, apparatus and system | |
| CN107682711B (en) | Video interception method, server and online video playing system | |
| CN108769749B (en) | Method for determining data embezzlement, client and server | |
| CN108650526B (en) | An identification method, computer equipment and storage medium | |
| CN106031183A (en) | Communication method, user device, content server and controller | |
| WO2017028736A1 (en) | Method for recording television programs and server | |
| CN107547919A (en) | A kind of video broadcasting method, device and storage medium | |
| CN106791961B (en) | Video preference information processing method, device and system | |
| WO2020093862A1 (en) | Method for processing vr video, and related apparatus | |
| US20140314389A1 (en) | Segmented content reference circulation | |
| CN107734396B (en) | A method, device and storage medium for playing multimedia resources | |
| CN110546932B (en) | System and method for improving device map accuracy using media viewing data | |
| CN109194971A (en) | Method and device for generating multimedia file | |
| US9451323B2 (en) | Methods and apparatus to measure an audience of an online media service | |
| US20210142354A1 (en) | Systems and methods to enable time-based rewards for streaming media consumption | |
| CN110381375A (en) | A kind of determining method, client and server for stealing brush data | |
| WO2017197817A1 (en) | Data processing method and apparatus, electronic device and server | |
| TW201640905A (en) | A cloud system for digital television | |
| HK1223210B (en) | Method and aapparatus for monitoring media presentation device, and tangible computer readable storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180105 |