Method and device for setting video list
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for setting a video list.
Background
With the rapid development of computer technology and network communication technology, network video has gradually gained popularity and rapid development. The user can play the network video through a terminal (such as a mobile terminal like a mobile phone or a tablet computer, or a fixed terminal like a desktop computer). The network video can be divided into live video and playback video, the live video refers to the network video which is played synchronously with the television program, and the playback video refers to the video which is obtained by recording the television program or the live video and is stored in a video library after the television program is played.
Generally, live video and playback video need to be played through different applications or different interfaces of the same application respectively. A video list is set in an application program (or interface) for playing the playback video, the video list is a video list of a video library, entries of network videos (playback videos) stored in the video library are set in the video list, and corresponding network videos can be played by clicking the entries. In an application (or interface) that plays live video, a live channel may be selected to play a web video (live video) that the live channel is live.
In the process of implementing the invention, the inventor finds that the technology at least has the following problems:
the video list of the video library only includes entries of network videos stored in the video library, and in the process of playing the playback video, if a user needs to acquire related information of a live video (for example, to view a live or to-be-live network video related to a currently played back video), the user needs to switch from an application program (or interface) of the playback video to an application program (or interface) of the live video to acquire the information. For example, a user plays a certain video group in a video library (the video group is composed of videos of the same series, for example, videos of episodes of a certain drama constitute a video group, or videos of seasons of a certain entertainment program constitute a video group, and so on, in a video list of the video library, an entry of the video group is set, which can be expanded, and includes entries of videos belonging to the video group stored in the video library, which are sub-entries of the video group, and if part of videos in the video group are not live or are live, the playback videos of the video group stored in the video library are only part of videos of the video group, and the user needs to switch to an application (or interface) of the live video to check whether other videos of the video group are live or are about to be live. By adopting the technology, the efficiency of acquiring the related information of the live video is low.
Disclosure of Invention
In order to solve the technical problem, embodiments of the present invention provide a method and an apparatus for setting a video list, so as to improve efficiency of acquiring related information of a live video. The technical scheme is as follows:
in one aspect, a method for setting a video list is provided, and the method includes:
acquiring an identifier of a network video which is live or is about to be live;
if the network video is determined not to be stored in a video library according to the identifier of the network video, adding a table entry of the network video in a video list of the video library, wherein the video library is used for storing playback videos;
wherein the entry of the network video is added to a video group to which the network video belongs, the video group being composed of associated videos.
In another aspect, there is provided an apparatus for setting a video list, the apparatus including:
the acquisition module is used for acquiring the identifier of the network video which is live or is about to be live;
an adding module, configured to add a table entry of the network video to a video list of a video library if it is determined that the network video is not stored in the video library according to the identifier of the network video, where the video library is used to store a playback video;
wherein the entry of the network video is added to a video group to which the network video belongs, the video group being composed of associated videos.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, the identifier of the network video which is live broadcast or is about to be live broadcast is obtained, and if the network video is determined not to be stored in the video library according to the identifier of the network video, the list item of the network video is added into the video list of the video library, so that a user can obtain the related information of the live broadcast video in the video list of the video library without switching an application program or an interface, and the efficiency of obtaining the related information of the live broadcast video can be improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a method for setting a video list according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an apparatus for setting a video list according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Example one
An embodiment of the present invention provides a method for setting a video list, and as shown in fig. 1, a processing flow of the method may include the following steps:
step 101, acquiring an identifier of a network video which is live or is about to be live.
Step 102, if it is determined that the network video is not stored in the video library according to the obtained identifier of the network video, adding the entry of the network video in the video list of the video library.
In the embodiment of the invention, the identifier of the network video which is live broadcast or is about to be live broadcast is obtained, and if the network video is determined not to be stored in the video library according to the identifier of the network video, the list item of the network video is added into the video list of the video library, so that a user can obtain the related information of the live broadcast video in the video list of the video library without switching an application program or an interface, and the efficiency of obtaining the related information of the live broadcast video can be improved.
Example two
The embodiment of the invention provides a method for setting a video list, wherein an execution main body of the method can be a server, preferably a background server of an application program for playing network videos, the application program can be used for playing playback videos, and the application program is provided with the video list of a video library.
The following describes the processing flow shown in fig. 1 in detail with reference to the execution process, and specific contents may be as follows:
step 101, acquiring an identifier of a network video which is live or is about to be live. The live network video may be a network video currently live in a certain live channel (such as center 1, center 2, etc.), that is, the network video to be live may be a network video in which a certain live channel has been scheduled to be live in a future period.
In implementation, the identifier of the network video which is live or is about to be live can be obtained in the live video information table. The live video information table is an information table for recording network videos live in each live channel, wherein the network videos live in each live channel in each time period can be recorded, identifiers of the network videos live in each time period, the live channels and the live time periods can be recorded, and the live video information table can be an Electronic Program Guide (EPG). The identifier of the network video may be a title of the network video, such as the 5 th episode of the television drama, the 3 rd season of the first season of the singer, and the like, or may be an identifier code set for the network video in advance. The live broadcast time interval is a time interval in which the network video is live broadcast, and the live broadcast time interval can be recorded by the live broadcast start time and the live broadcast end time.
The live video information table can be obtained by integrating live video information obtained from each television station server, can also be obtained by integrating live video information obtained from information websites, and can also be obtained by directly inputting and storing the live video information into the server in a manual mode.
According to the current time and the live broadcast time period corresponding to each network video in the live broadcast video information table, the network video which is live or is about to be live broadcast can be determined, the live broadcast time period comprises the network video at the current time as the network video which is live broadcast, and the network video which starts after the current time in the live broadcast time period is the network video which is about to be live broadcast.
In an implementation, a trigger condition may be set for the execution of step 101, for example, the trigger condition may be that an update of the live video information table is detected. Alternatively, preferably, the triggering condition may be that a preset period (e.g. 10 minutes, 15 minutes, 30 minutes, etc.) is reached, and the corresponding processing of step 101 may be: and acquiring the identifier of the network video which is live or is about to be live according to a preset period. In this way, the processing flow of the embodiment of the present invention may be executed according to a preset period, so as to set the video list.
Step 102, if it is determined that the network video is not stored in the video library according to the obtained identifier of the network video, adding the entry of the network video in the video list of the video library.
The video library can be used for storing network videos (playback videos), and a video list can be set, and the network videos stored in the video library are recorded in the video list. The video list is provided with entries of each network video, and the entries can record identifiers of the network videos and link addresses of the entries (the link addresses can be addresses stored in the video library by the network videos). The server may send the video list to the terminal, so that the terminal displays the video list in the application program, where an identifier (such as a name) of a network video in each entry of the network video is used to display a title of the entry, and a link address in each entry of the network video is used to read data of the link address after the entry is clicked.
In implementation, the server may pre-record an identifier of each network video in the video library, and when step 102 is executed, the server may query, according to the obtained identifier of the network video, whether the identifier of each network video stored in the pre-recorded video library includes the obtained identifier of the network video, if the query is obtained, it is indicated that the network video has been live broadcast before, the video library already stores a corresponding playback video, and the video list already has an entry of the network video, so that the video list does not need to be modified, that is, the processing of adding the entry of the network video in the video list of the video library is not performed.
If the server does not inquire the obtained network video identifier in the network video identifiers stored in the video library recorded in advance, the list item of the network video can be added in the video list of the video library.
Preferably, for the case that the network video belongs to a certain video group, if no other network video in the video group is stored in the video library, the entry of the network video may not be added in the video list. The corresponding process of step 102 may be:
first, a video group to which the network video belongs is determined.
The video group is composed of videos related to the same series, for example, videos of episodes of a certain drama constitute a video group, videos of seasons of a certain variety program constitute a video group, and the like. In the video list of the video library, a video group entry may be set, the video group entry may be expanded, and the expanded video group entry includes entries of network videos belonging to the video group and stored in the video library, which are sub-entries of the video group.
There are many methods for determining the video group to which the network video belongs, and the following methods are exemplified. In the first method, video groups corresponding to network videos are recorded in a live video information table, and a server can acquire the video groups to which the network videos belong from the live video information table. In the second method, the identifier of the network video includes two parts, one part is the identifier of the video group to which the network video belongs, and the other part is the period number of the network video, so that the video group to which the network video belongs can be determined according to the identifier of the network video, for example, the identifier of the network video is 'tv play fighting set 5', and the video group to which the network video belongs is a tv play fighting video group. And thirdly, the server can record the corresponding relation between the video group and each network video included in the video group in advance, and can determine the video group to which the network video belongs according to the corresponding relation.
Then, if the network video is determined not to be stored in the video library according to the acquired identifier of the network video, and the video list of the video library comprises the item of the video group to which the network video belongs, the item of the network video is added in the video list of the video library.
Through such processing, when the video list of the video library includes the entry of the video group to which the network video belongs, that is, when other network videos in the video group to which the network video belongs are stored in the video library, the entry of the network video is added to the video list of the video library. The processing procedure of adding the entry of the network video may be: and adding the table entry of the network video in the table entry of the video group as a sub-table entry of the video group.
In implementation, the above processing of adding the entry of the network video to the video list of the video library may have multiple processing manners, for example, the entry of the network video may be simply generated according to the identifier of the network video and the address corresponding to the live channel of the network video, the identifier of the network video may be set as a title of the entry, and the address corresponding to the live channel may be set as a link address of the entry. Preferably, the treatment can be performed as follows:
firstly, an address corresponding to a live channel of the network video and a live time period of the network video are obtained.
The address corresponding to the live channel is the address of the streaming media data server of the live channel, that is, the address connected when the live video of the live channel is played.
Preferably, the live channel and the live time period of the network video can be obtained from a live video information table. In the server, the address corresponding to each live channel can be recorded in advance, and the address corresponding to the live channel of the network video can be determined according to the obtained live channel of the network video.
Then, adding a network video list in a video list of a video library, setting a link address of the network video list as an address corresponding to the live channel, and setting the network video list to be in a click link state in a live time period and to be in a non-click state in a time period other than the live time period.
The term is in a click link state, which means that the term can be clicked in the video list of the terminal and connected to the corresponding link address to receive the streaming media data, and the term is in a non-click state, which means that the term cannot be clicked in the video list of the terminal.
And setting the link address of the table entry of the network video as the address corresponding to the live channel, namely, after the video list is sent to the terminal, when the user clicks the table entry of the network video in the video list, the terminal is connected with the address corresponding to the live channel to receive the streaming media data.
The method includes the steps that the list item of the network video is set to be in a click link state in a live broadcast period, namely, after a video list is sent to a terminal, the list item of the network video in the video list can be clicked within the time range of the live broadcast period, and when a user clicks the list item of the network video in the video list, the terminal is connected with an address corresponding to a live broadcast channel to receive streaming media data.
And setting the table entry of the network video to be in a non-click state in a period except the live broadcast period, namely, after the video list is sent to the terminal, the table entry of the network video in the video list cannot be clicked outside the time range of the live broadcast period.
In the embodiment of the present invention, in order to reduce the number of entries in the video list, after step 102, the entries added in the above process may also be deleted under a certain trigger condition, and two preferable processing manners are given below:
in the first processing mode, when the network video is stored in a video library, the table entry is deleted.
At some point after the live of the network video ends, the network video may be stored in a video library, at which time the network video has been converted from live video to playback video. According to normal processing, when the network video is stored in the video library, the server may add an entry of the network video to a video list of the video library, where the entry is an entry of the network video as a playback video (a link address of the entry is a storage address of the network video in the video library).
The entry of the network video added in step 102 is an entry of the network video as a live video (the link address of the entry is an address corresponding to a live channel of the network video). When the network video is added to the video list of the video library as the entry of the playback video, the network video can be deleted as the entry of the live video.
When the video list is displayed at the terminal, for the entry of the network video added in the above step 102, if the live broadcast of the network video is finished, the entry may be hidden and not displayed.
And in the second processing mode, after the live broadcast of the network video is finished, deleting the table entry.
Preferably, the entry may be deleted when the live broadcast of the network video is finished. The live broadcast ending time can be determined according to the live broadcast time interval of the network video.
In the embodiment of the invention, the identifier of the network video which is live broadcast or is about to be live broadcast is obtained, and if the network video is determined not to be stored in the video library according to the identifier of the network video, the list item of the network video is added into the video list of the video library, so that a user can obtain the related information of the live broadcast video in the video list of the video library without switching an application program or an interface, and the efficiency of obtaining the related information of the live broadcast video can be improved.
EXAMPLE III
An embodiment of the present invention further provides a device for setting a video list, as shown in fig. 2, the device includes:
an obtaining module 210, configured to obtain an identifier of a network video that is being live or is about to be live;
an adding module 220, configured to add an entry of the network video to a video list of the video library if it is determined that the network video is not stored in the video library according to the identifier of the network video.
Preferably, the obtaining module 210 is configured to:
and acquiring the identifier of the network video which is live or is about to be live in the live video information table.
Preferably, the obtaining module 210 is configured to:
and acquiring the identifier of the network video which is live or is about to be live according to a preset period.
Preferably, the adding module 220 is configured to:
determining a video group to which the network video belongs;
and if the network video is not stored in a video library according to the identifier of the network video and the video list of the video library comprises the list item of the video group, adding the list item of the network video in the video list of the video library.
Preferably, the adding module 220 is configured to:
and adding the table entry of the network video in the table entry of the video group as a sub-table entry of the video group.
Preferably, the adding module 220 is configured to:
acquiring an address corresponding to a live channel of the network video and a live time period of the network video;
adding the network video list into the video list of the video library, setting the link address of the network video list as the address corresponding to the live broadcast channel, and setting the network video list to be in a click link state in the live broadcast period and to be in a non-click state in the period except the live broadcast period.
Preferably, the system further comprises a deleting module, configured to:
deleting the table entry when the network video is stored in the video library; or,
and deleting the table entry after the live broadcast of the network video is finished.
In the embodiment of the invention, the identifier of the network video which is live broadcast or is about to be live broadcast is obtained, and if the network video is determined not to be stored in the video library according to the identifier of the network video, the list item of the network video is added into the video list of the video library, so that a user can obtain the related information of the live broadcast video in the video list of the video library without switching an application program or an interface, and the efficiency of obtaining the related information of the live broadcast video can be improved.
Example four
The embodiment also provides an apparatus for setting a video list, which includes:
one or more processors;
a memory; and
one or more modules (programs) stored in the memory and configured to be executed by the one or more processors, wherein the one or more modules have functionality to:
the acquisition module is used for acquiring the identifier of the network video which is live or is about to be live;
and the adding module is used for adding the table entry of the network video into the video list of the video library if the network video is not stored in the video library according to the identifier of the network video.
Preferably, the obtaining module is configured to:
and acquiring the identifier of the network video which is live or is about to be live in the live video information table.
Preferably, the obtaining module is configured to:
and acquiring the identifier of the network video which is live or is about to be live according to a preset period.
Preferably, the adding module is configured to:
determining a video group to which the network video belongs;
and if the network video is not stored in a video library according to the identifier of the network video and the video list of the video library comprises the list item of the video group, adding the list item of the network video in the video list of the video library.
Preferably, the adding module is configured to:
and adding the table entry of the network video in the table entry of the video group as a sub-table entry of the video group.
Preferably, the adding module is configured to:
acquiring an address corresponding to a live channel of the network video and a live time period of the network video;
adding the network video list into the video list of the video library, setting the link address of the network video list as the address corresponding to the live broadcast channel, and setting the network video list to be in a click link state in the live broadcast period and to be in a non-click state in the period except the live broadcast period.
Preferably, the system further comprises a deleting module, configured to:
deleting the table entry when the network video is stored in the video library; or,
and deleting the table entry after the live broadcast of the network video is finished.
In the embodiment of the invention, the identifier of the network video which is live broadcast or is about to be live broadcast is obtained, and if the network video is determined not to be stored in the video library according to the identifier of the network video, the list item of the network video is added into the video list of the video library, so that a user can obtain the related information of the live broadcast video in the video list of the video library without switching an application program or an interface, and the efficiency of obtaining the related information of the live broadcast video can be improved.
It should be noted that: in the apparatus for setting a video list according to the above embodiment, when setting a video list, only the division of the above functional modules is taken as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules, so as to complete all or part of the above described functions. In addition, the apparatus for setting a video list and the method for setting a video list provided in the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments, and are not described herein again.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.