[go: up one dir, main page]

CN116095417B - Video on demand method, device, equipment and storage medium - Google Patents

Video on demand method, device, equipment and storage medium Download PDF

Info

Publication number
CN116095417B
CN116095417B CN202310017725.0A CN202310017725A CN116095417B CN 116095417 B CN116095417 B CN 116095417B CN 202310017725 A CN202310017725 A CN 202310017725A CN 116095417 B CN116095417 B CN 116095417B
Authority
CN
China
Prior art keywords
video
segment
target
terminal
original
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.)
Active
Application number
CN202310017725.0A
Other languages
Chinese (zh)
Other versions
CN116095417A (en
Inventor
武国斌
王映新
郭颖
冯显扬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Thunisoft Information Technology Co ltd
Original Assignee
Beijing Thunisoft Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Thunisoft Information Technology Co ltd filed Critical Beijing Thunisoft Information Technology Co ltd
Priority to CN202310017725.0A priority Critical patent/CN116095417B/en
Publication of CN116095417A publication Critical patent/CN116095417A/en
Application granted granted Critical
Publication of CN116095417B publication Critical patent/CN116095417B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47202End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for requesting content on demand, e.g. video on demand
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/24Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention provides a video-on-demand method, a device, equipment and a storage medium, which comprise the steps that a server can timely determine a target video set containing corresponding video fragments when receiving a video-on-demand request, accurately judge whether the video fragments contained in the target video set are complete or not by comparing the duration of an original video corresponding to the video-on-demand request with the duration of the target video set, and can rapidly intercept the video fragments lacking in the target video set from the original video and add the video fragments to the target video set when determining that the video fragments contained in the target video set are incomplete, so that the target video set can contain the complete video fragments of the original video, and the terminal can display complete video content by sequentially playing the video fragments in the target video set.

Description

Video-on-demand method, device, equipment and storage medium
Technical Field
The present disclosure relates to the technical field of video data processing, and in particular, to a video on demand method, apparatus, device, and storage medium.
Background
Existing video players have limitations on the size of the video played, and therefore often require converting a larger video into a plurality of smaller video clips, which the video player presents the complete video content by playing in turn. However, during both the generation and subsequent management of the video clips, the video clips may be omitted, resulting in a failure to properly use the video clips to present the complete video content.
Disclosure of Invention
The present disclosure provides a video-on-demand method, apparatus, device, and storage medium.
According to a first aspect of the present disclosure, there is provided a video-on-demand method, including:
receiving a video-on-demand request sent by a terminal, and determining a target video set corresponding to the video-on-demand request from a video database, wherein the target video set comprises a plurality of continuous video fragments in an original video;
Calculating the total playing time length of the target video set based on the playing time length of each video segment in the target video set, calculating the original playing time length of the original video based on the starting time stamp and the ending time stamp of the original video, and comparing the total playing time length with the original playing time length;
determining that the number of video clips in the target video set is complete in response to the total playing time being equal to the original playing time, and returning the total playing time to the terminal so as to enable the user to select the initial playing time in the total playing time, or
In response to the total playing time length not being equal to the original playing time length, determining that the number of video clips in the target video set is incomplete, intercepting video clips lacking in the target video set from the original video, adding the video clips into the target video set, calculating the total playing time length of the target video set again based on the playing time length of each video clip in the target video set, and returning the total playing time length to the terminal;
Receiving initial playing time returned by the terminal, and determining initial video clips corresponding to the initial playing time from the target video set, wherein the initial playing time is selected from total playing time displayed by a user at the terminal;
And sequentially sending the video streams of the initial video segment and other video segments after the initial video segment to the terminal, so that the terminal displays the corresponding video content.
In some embodiments of the present disclosure, the plurality of consecutive video segments in the original video are obtained by:
Playing the original video and starting recording the original video;
when the time length of the currently recorded video clip reaches the preset time length or the capacity of the currently recorded video clip reaches the preset capacity, storing the currently recorded video clip and starting to record the next video clip;
and selecting one key video frame from a plurality of video frames corresponding to the video clips in the original video for marking every time one video clip is saved, and recording the key frame number of the key video frame in the header information of the video clip.
In some embodiments of the present disclosure, capturing video clips from an original video that are missing in a target video set and adding to the target video set, comprising:
Analyzing a key frame number from the head information of each video segment in the target video set, and determining a plurality of marked key video frames from the original video;
matching the key frame number with the key video frame, and determining a target key video frame which is not matched with the corresponding key frame number from a plurality of key video frames;
determining a previous key video frame and a next key video frame adjacent to the target key video frame;
Determining a first video segment corresponding to a previous key video frame and a second video segment corresponding to a next key video frame from a plurality of video segments contained in a target video set;
based on the ending time stamp of the first video segment and the starting time stamp of the second video segment, video segments lacking in the target video set are intercepted from the original video and added to the target video set.
In some embodiments of the present disclosure, sequentially transmitting video streams of a start video clip and other video clips following the start video clip to a terminal includes:
Forming a video queue to be transmitted according to the time sequence of the video streams of the initial video segment and other video segments behind the initial video segment;
Transmitting the data stream of the (n+i) th video segment to the terminal according to the time sequence from the video queue, and loading the header information of the (n+i+1) th video segment during the transmission of the video stream of the (n+i) th video segment, wherein N is the sequence number of the initial video segment, and i is an integer not less than 0;
determining whether the (n+i+1) th video clip is damaged based on the header information of the (n+i+1) th video clip;
in response to determining that the (n+i+1) th video clip is not damaged, continuing to transmit the data stream of the (n+i+1) th video clip to the terminal after the video stream transmission of the (n+i) th video clip is completed.
In some embodiments of the present disclosure, the video on demand method further comprises:
And transmitting file damage prompt information to the terminal in response to the fact that the (N+i+1) th video clip is damaged.
In some embodiments of the present disclosure, the video on demand method further comprises:
in response to determining that the (n+i+1) th video clip is damaged, sending a wait for repair request to the terminal;
In response to receiving a confirmation message of the terminal for waiting for a repair request, loading header information of an (n+i+2) th video segment, and determining whether the (n+i+2) th video segment is damaged or not based on the header information of the (n+i+2) th video segment, wherein the confirmation message is generated by the terminal based on a confirmation operation of a user for waiting for the repair request;
In response to determining that the (n+i+2) th video segment is not corrupted, deleting the (n+i+1) th video segment, intercepting a new (n+i+1) th video segment from the original video based on the ending timestamp of the (n+i) th video segment and the starting timestamp of the (n+i+2) th video segment, and transmitting the data stream of the new (n+i) th video segment to the terminal.
In some embodiments of the present disclosure, the video on demand method further comprises:
in response to determining that the (n+i+1) th video clip is damaged, sending a wait for repair request to the terminal;
And in response to receiving a confirmation message of the terminal for waiting for the repair request, deleting the (N+i+1) th video fragment under the condition that the (N+i+1) th video fragment is determined to be the last video fragment in the video queue, intercepting a new (N+i+1) th video fragment from the original video based on the ending time stamp of the (N+i) th video fragment, and transmitting the data stream of the new (N+i) th video fragment to the terminal.
According to a second aspect of the present disclosure, there is provided a video-on-demand apparatus, including a target video determining module, a duration comparing module, a total time feedback module, a start video determining module, and a video transmitting module;
the target video determining module is used for receiving the video-on-demand request sent by the terminal, and determining a target video set corresponding to the video-on-demand request from the video database, wherein the target video set comprises a plurality of continuous video fragments in an original video;
The time length comparison module is used for calculating the total playing time length of the target video set based on the playing time length of each video segment in the target video set, calculating the original playing time length of the original video based on the starting time stamp and the ending time stamp of the original video, and comparing the total playing time length with the original playing time length;
The total time feedback module is used for determining that the number of video clips in the target video set is complete in response to the total playing time length being equal to the original playing time length, and returning the total playing time length to the terminal so as to enable a user to select initial playing time in the total playing time length;
The initial video determining module is used for receiving initial playing time returned by the terminal, and determining initial video fragments corresponding to the initial playing time from the target video set, wherein the initial playing time is selected from total playing time displayed by the terminal by a user;
The video sending module is used for sequentially sending the video streams of the initial video segment and other video segments after the initial video segment to the terminal, so that the terminal displays corresponding video content.
In some embodiments of the present disclosure, the video on demand apparatus further includes a video clip obtaining module that obtains a plurality of consecutive video clips in the original video by:
Playing the original video and starting recording the original video;
when the time length of the currently recorded video clip reaches the preset time length or the capacity of the currently recorded video clip reaches the preset capacity, storing the currently recorded video clip and starting to record the next video clip;
and selecting one key video frame from a plurality of video frames corresponding to the video clips in the original video for marking every time one video clip is saved, and recording the key frame number of the key video frame in the header information of the video clip.
In some embodiments of the present disclosure, the total time feedback module, when used to intercept video segments missing in the target video set from the original video and add to the target video set, is specifically used to:
Analyzing a key frame number from the head information of each video segment in the target video set, and determining a plurality of marked key video frames from the original video;
matching the key frame number with the key video frame, and determining a target key video frame which is not matched with the corresponding key frame number from a plurality of key video frames;
determining a previous key video frame and a next key video frame adjacent to the target key video frame;
Determining a first video segment corresponding to a previous key video frame and a second video segment corresponding to a next key video frame from a plurality of video segments contained in a target video set;
based on the ending time stamp of the first video segment and the starting time stamp of the second video segment, video segments lacking in the target video set are intercepted from the original video and added to the target video set.
In some embodiments of the present disclosure, the video sending module, when configured to send the video streams of the initial video segment and other video segments that follow the initial video segment to the terminal in sequence, is specifically configured to:
Forming a video queue to be transmitted according to the time sequence of the video streams of the initial video segment and other video segments behind the initial video segment;
Transmitting the data stream of the (n+i) th video segment to the terminal according to the time sequence from the video queue, and loading the header information of the (n+i+1) th video segment during the transmission of the video stream of the (n+i) th video segment, wherein N is the sequence number of the initial video segment, and i is an integer not less than 0;
determining whether the (n+i+1) th video clip is damaged based on the header information of the (n+i+1) th video clip;
in response to determining that the (n+i+1) th video clip is not damaged, continuing to transmit the data stream of the (n+i+1) th video clip to the terminal after the video stream transmission of the (n+i) th video clip is completed.
In some embodiments of the present disclosure, the video transmission module is further configured to:
And transmitting file damage prompt information to the terminal in response to the fact that the (N+i+1) th video clip is damaged.
In some embodiments of the present disclosure, the video transmission module is further configured to:
in response to determining that the (n+i+1) th video clip is damaged, sending a wait for repair request to the terminal;
In response to receiving a confirmation message of the terminal for waiting for a repair request, loading header information of an (n+i+2) th video segment, and determining whether the (n+i+2) th video segment is damaged or not based on the header information of the (n+i+2) th video segment, wherein the confirmation message is generated by the terminal based on a confirmation operation of a user for waiting for the repair request;
In response to determining that the (n+i+2) th video segment is not corrupted, deleting the (n+i+1) th video segment, intercepting a new (n+i+1) th video segment from the original video based on the ending timestamp of the (n+i) th video segment and the starting timestamp of the (n+i+2) th video segment, and transmitting the data stream of the new (n+i) th video segment to the terminal.
In some embodiments of the present disclosure, the video transmission module is further configured to:
in response to determining that the (n+i+1) th video clip is damaged, sending a wait for repair request to the terminal;
And in response to receiving a confirmation message of the terminal for waiting for the repair request, deleting the (N+i+1) th video fragment under the condition that the (N+i+1) th video fragment is determined to be the last video fragment in the video queue, intercepting a new (N+i+1) th video fragment from the original video based on the ending time stamp of the (N+i) th video fragment, and transmitting the data stream of the new (N+i) th video fragment to the terminal.
According to a third aspect of the present disclosure, there is provided an electronic device comprising:
and a memory communicatively coupled to the at least one processor;
wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the video-on-demand method provided in the first aspect above.
According to a fourth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the video-on-demand method provided in the above first aspect.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
The beneficial effects that this disclosure provided technical scheme brought are:
According to the video-on-demand method, when the video-on-demand request is received, the server can timely determine the target video set containing the corresponding video fragments, accurately judge whether the video fragments contained in the target video set are complete or not by comparing the time length of the original video corresponding to the video-on-demand request with the time length of the target video set, and can rapidly intercept the video fragments lacking in the target video set from the original video when determining that the video fragments contained in the target video set are incomplete, so that the terminal can display complete video content by sequentially playing the video fragments in the target video set.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 is a schematic flow chart of a video-on-demand method according to an embodiment of the disclosure;
FIG. 2 is a flow chart of a method for capturing a plurality of consecutive video clips according to an embodiment of the present disclosure;
Fig. 3 is a schematic flow chart of a video on demand device according to an embodiment of the disclosure;
fig. 4 is a schematic flow chart of another video on demand apparatus according to an embodiment of the disclosure;
Fig. 5 shows a schematic block diagram of an example electronic device that may be used to implement the video-on-demand method provided by embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Existing video players have limitations on the size of the video played, and therefore often require converting a larger video into a plurality of smaller video clips, which the video player presents the complete video content by playing in turn. However, during both the generation and subsequent management of the video clips, the video clips may be omitted, resulting in a failure to properly use the video clips to present the complete video content.
The video on demand method, device, equipment and storage medium provided by the embodiments of the present disclosure aim to solve at least one of the above technical problems in the prior art.
Fig. 1 shows a flow chart of a video-on-demand method provided by an embodiment of the present disclosure, where an execution subject of the video-on-demand method is a server, as shown in fig. 1, the method may mainly include the following steps:
S110, receiving a video-on-demand request sent by a terminal, and determining a target video set corresponding to the video-on-demand request from a video database.
The target video set comprises a plurality of continuous video segments in an original video, and in particular, the plurality of continuous video segments can be obtained by performing segmented recording on the original video. The specific process of obtaining a plurality of consecutive video clips will be further described herein.
The method comprises the steps that a player is deployed in a terminal, the terminal displays a video-on-demand interface by running the player, and then a video-on-demand request is generated and sent to a server in response to video selection operation of a user in the video-on-demand interface. Here, the video on demand request includes identity information of an original video desired to be requested by the user, and the server may parse the identity information from the video on demand request, and determine a target video set corresponding to the video on demand request from the video database based on the identity information.
S120, calculating the total playing time length of the target video set based on the playing time length of each video segment in the target video set, calculating the original playing time length of the original video based on the starting time stamp and the ending time stamp of the original video, and comparing the total playing time length with the original playing time length.
Here, the total playing time length of the target video set refers to the sum of the playing time lengths of the video clips in the target video set. It should be noted that, each video clip in the target video set has header information, and the header information may include information such as a start time stamp, an end time stamp, and a playing duration of the video clip. In S120, header information of each video clip in the target video set may be parsed to obtain a play duration of each video clip, and the play durations of the video clips may be added to obtain a total play duration of the target video set.
It can be understood that if the number of video clips in the target video set is complete, the total playing time period of the target video set should be equal to the original playing time period of the original video, and if the number of video clips in the target video set is incomplete, the total playing time period of the target video set should be less than the original playing time period of the original video. Here, it may be determined to perform S130 or S140 based on the comparison result of the total play duration and the original play duration.
S130, determining that the number of video clips in the target video set is complete in response to the total playing time length being equal to the original playing time length, and returning the total playing time length to the terminal.
After receiving the total playing time, the terminal can display the total playing time according to a preset form, so that a user can select the initial playing time from the total playing time. For example, the terminal displays the total playing time length as 1 hour in the form of a progress bar, and the user can select the 3 rd minute 20 second as the initial playing time. Specifically, the terminal may determine the start play time from the total play time length in response to a time selection operation of the user.
S140, determining that the number of video clips in the target video set is incomplete in response to the total playing time length not being equal to the original playing time length, intercepting video clips which are lack in the target video set from the original video, adding the video clips into the target video set, calculating the total playing time length of the target video set again based on the playing time length of each video clip in the target video set, and returning the total playing time length to the terminal.
When the number of video clips in the target video set is determined to be incomplete, the video clips in the target video set can be compared with the original video, so that the video clips which are lack in the target video set are determined, then the video clips which are lack in the target video set are intercepted in the original video and added into the target video set, and the total playing time length of the target video set is calculated again based on the playing time length of each video clip in the target video set and returned to the terminal. After receiving the total playing time, the terminal can display the total playing time according to a preset form, so that a user can select the initial playing time from the total playing time. For example, the terminal displays the total playing time length as 1 hour in the form of a progress bar, and the user can select the 3 rd minute 20 second as the initial playing time. Specifically, the terminal may determine the start play time from the total play time length in response to a time selection operation of the user. It should be noted that, a specific process of determining the video segments missing in the target video set will be described in detail later.
And S150, receiving the initial playing time returned by the terminal, and determining an initial video clip corresponding to the initial playing time from the target video set.
The terminal may determine the start play time from the total play time in response to a user's time selection operation, and then start the play time, so that the server receives the start play time. The server may determine a video clip containing the start play time from the target video set, and take the video clip containing the start play time as the start video clip.
And S160, sequentially sending the video streams of the initial video clip and other video clips after the initial video clip to the terminal.
After the start video clip is determined, a video stream in the start video clip after the start play time may be transmitted to the terminal. For other video clips after the initial video clip, the video clips can be sequentially sent to the terminal according to the time sequence of each video clip, and the terminal sequentially receives the video streams of the initial video clip and other video clips after the initial video clip sent by the service and displays corresponding video content.
According to the video-on-demand method, when the video-on-demand request is received, the server can timely determine the target video set containing the corresponding video fragments, accurately judge whether the video fragments contained in the target video set are complete or not by comparing the time length of the original video corresponding to the video-on-demand request with the time length of the target video set, and can rapidly intercept the video fragments lacking in the target video set from the original video when determining that the video fragments contained in the target video set are incomplete, so that the terminal can display complete video content by sequentially playing the video fragments in the target video set.
Fig. 2 is a schematic flow chart of capturing a plurality of continuous video clips according to an embodiment of the disclosure, and as shown in fig. 2, the flow may mainly include the following steps:
And S210, playing the original video and starting recording the original video.
And S220, when the time length of the currently recorded video clip reaches the preset time length or the capacity of the currently recorded video clip reaches the preset capacity, storing the currently recorded video clip and starting to record the next video clip.
For example, the preset duration may be set to 10 seconds, one video clip may be obtained after each pair of original videos is recorded for 10 seconds, the 10 seconds of video clip is saved and the next video clip is started to be recorded, or the preset capacity may be set to 4G, and when the capacity of the recorded video clip reaches 4G, the 4G of video clip is saved and the next video clip is started to be recorded. And repeating the recording process to obtain a plurality of video clips of the original video.
And S230, selecting one key video frame from a plurality of video frames corresponding to the video clips in the original video to mark each video clip, and recording the key frame number of the key video frame in the header information of the video clip.
Here, the frame number of the selected key video frame may be determined according to actual design requirements. For example, a first video frame may be determined in a video clip, a video frame in the original video corresponding to the first video frame is marked as a key video frame, a key frame number of the key video frame is recorded in header information of the video clip, or an intermediate video frame may be determined in the video clip, a video frame in the original video corresponding to the intermediate video frame is marked as a key video frame, and a key frame number of the key video frame is recorded in header information of the video clip.
On the basis of the key frame numbers of the key video frames of the original video recorded in the head information records of the video clips, in S140, the key frame numbers can be resolved from the head information of each video clip in the target video set, a plurality of marked key video frames are determined from the original video, the key frame numbers and the key video frames are matched, the target key video frames which are not matched with the corresponding key frame numbers are determined from the key video frames, the previous key video frame and the next key video frame adjacent to the target key video frame are determined, the first video clip corresponding to the previous key video frame and the second video clip corresponding to the next key video frame are determined from the video clips contained in the target video set, and the video clips which are lack in the target video set are intercepted from the original video and added into the target video set on the basis of the end time stamp of the first video clip and the start time stamp of the second video clip.
It will be appreciated that if the number of video segments in the target video set is complete, then the key frame number in the header information of the video segments and the key video frames in the original video should be in one-to-one correspondence. If a certain key video frame in the original video is not matched with the corresponding key frame number, the video segment containing the key video frame is ensured to be contained in the target video set, and then the video segment containing the key video frame needs to be intercepted from the original video and added to the target video set. Specifically, in order to accurately intercept a required video segment, a key video frame that is not matched with a corresponding key frame number may be defined as a target key video frame, a previous key video frame and a next key video frame adjacent to the target key video frame are determined, a video segment in the target video set that includes the previous key video frame is defined as a first video segment, a video segment in the target video set that includes the next key video frame is defined as a second video segment, and then a video segment between the first video segment and the second video segment is a video segment that is missing in the target video set, where the missing video segment should include the target key video frame. On the basis, the ending time stamp of the first video segment can be used as a new starting time stamp, the starting time stamp of the second video segment can be used as a new ending time stamp, and the video segment is intercepted from the original video based on the new starting time stamp and the new ending time stamp, so that the video segment which is absent from the target video set is obtained.
Optionally, in S160, the server may form a video queue to be transmitted from the video stream of the starting video segment and the video streams of other video segments after the starting video segment in time sequence, transmit the data stream of the (n+i) -th video segment from the video queue to the terminal in time sequence, and load header information of the (n+i+1) -th video segment during the transmission of the video stream of the (n+i) -th video segment, determine whether the (n+i+1) -th video segment is damaged based on the header information of the (n+i+1) -th video segment, and in response to determining that the (n+i+1) -th video segment is not damaged, continue transmitting the data stream of the (n+i+1) -th video segment to the terminal after the transmission of the video stream of the (n+i) -th video segment is completed. Here, N is a sequence number of the starting video clip, i is an integer not less than 0, and it is understood that when i is 0, the (n+i) th video clip represents the starting video clip.
Alternatively, if the (n+i+1) th video clip is damaged, the server may transmit a file damage hint information to the terminal in response to determining that the (n+i+1) th video clip is damaged. After receiving the file damage prompt information, the terminal can display corresponding text contents in the interface of the player, wherein the text contents are used for prompting the damaged video contents and temporarily failing to continue playing.
Alternatively, if the (n+i+1) th video clip is damaged, the server may transmit a wait repair request to the terminal in response to determining that the (n+i+1) th video clip is damaged. After receiving the request for waiting for repair, the terminal may display corresponding query content, where the query content is used to query the user that the user can wait for repair of the video file, if the user is willing to wait for repair of the video file, a confirmation operation (such as clicking a confirmation control) may be completed in the interface for the request for waiting for repair, and the terminal generates a confirmation message for the request for waiting for repair in response to the confirmation operation, and then sends the confirmation message to the server. The server responds to the received confirmation message of the terminal for waiting for the repair request, loads the head information of the (N+i+2) th video fragment, and determines whether the (N+i+2) th video fragment is damaged or not based on the head information of the (N+i+2) th video fragment.
It may be understood that the (n+i+2) th video clip is the next video clip of the (n+i+1) th video clip, if the (n+i+2) th video clip is not damaged, it is only necessary to repair the (n+i+1) th video clip, without consuming too much time, without seriously affecting the viewing experience of the user, specifically, the server deletes the (n+i+1) th video clip in response to determining that the (n+i+2) th video clip is not damaged, intercepts a new (n+i+1) th video clip from the original video based on the end timestamp of the (n+i) th video clip and the start timestamp of the (n+i+2) th video clip, and sends the data stream of the new (n+i) th video clip to the terminal. Here, the ending time stamp of the (n+i) th video clip is the starting time stamp of the (n+i+1) th video clip, the starting time stamp of the (n+i+2) th video clip is the ending time stamp of the (n+i+1) th video clip, and the video clip cut out based on the determined starting time stamp and ending time stamp is the new (n+i+1) th video clip.
Alternatively, if the (n+i+1) th video clip is damaged, the server may transmit a wait repair request to the terminal in response to determining that the (n+i+1) th video clip is damaged. After receiving the request for waiting for repair, the terminal may display corresponding query content, where the query content is used to query the user that the user can wait for repair of the video file, if the user is willing to wait for repair of the video file, a confirmation operation (such as clicking a confirmation control) may be completed in the interface for the request for waiting for repair, and the terminal generates a confirmation message for the request for waiting for repair in response to the confirmation operation, and then sends the confirmation message to the server. And the server responds to the received confirmation message of the terminal for waiting for the repair request, and deletes the (N+i+1) th video fragment under the condition that the (N+i+1) th video fragment is determined to be the last video fragment in the video queue, intercepts a new (N+i+1) th video fragment from the original video based on the ending time stamp of the (N+i) th video fragment, and sends the data stream of the new (N+i) th video fragment to the terminal.
Based on the same principle as the video on demand method described above, the embodiment of the present disclosure provides a video on demand device, and fig. 3 shows a schematic diagram of a video on demand device provided by the embodiment of the present disclosure, and as shown in fig. 3, the video on demand device 300 includes a target video determining module 310, a duration comparing module 320, a total time feedback module 330, a start video determining module 340, and a video transmitting module 350.
The target video determining module 310 is configured to receive a video-on-demand request sent by a terminal, and determine a target video set corresponding to the video-on-demand request from a video database, where the target video set includes a plurality of continuous video segments in an original video;
the duration comparison module 320 is configured to calculate a total playing duration of the target video set based on the playing duration of each video segment in the target video set, calculate an original playing duration of the original video based on the start timestamp and the end timestamp of the original video, and compare the total playing duration with the original playing duration;
The total time feedback module 330 is configured to determine that the number of video segments in the target video set is complete in response to the total playing time length being equal to the original playing time length, and return the total playing time length to the terminal so that the user can select the initial playing time in the total playing time length;
The initial video determining module 340 is configured to receive an initial playing time returned by the terminal, and determine an initial video segment corresponding to the initial playing time from the target video set, where the initial playing time is selected from total playing time displayed by the user at the terminal;
The video sending module 350 is configured to send the video streams of the initial video clip and other video clips after the initial video clip to the terminal in sequence, so that the terminal displays the corresponding video content.
The video on demand device provided by the disclosure can timely determine the target video set containing the corresponding video segments when receiving the video on demand request, accurately judge whether the video segments contained in the target video set are complete by comparing the duration of the original video corresponding to the video on demand request with the duration of the target video set, and rapidly intercept the video segments lacking in the target video set from the original video when determining that the video segments contained in the target video set are incomplete, so that the terminal can display complete video content by sequentially playing the video segments in the target video set.
Fig. 4 is a schematic diagram of another video on demand apparatus according to an embodiment of the present disclosure, where, as shown in fig. 4, the video on demand apparatus 300 further includes a video segment acquisition module 360, where the video segment acquisition module 360 obtains a plurality of consecutive video segments in an original video by:
Playing the original video and starting recording the original video;
when the time length of the currently recorded video clip reaches the preset time length or the capacity of the currently recorded video clip reaches the preset capacity, storing the currently recorded video clip and starting to record the next video clip;
and selecting one key video frame from a plurality of video frames corresponding to the video clips in the original video for marking every time one video clip is saved, and recording the key frame number of the key video frame in the header information of the video clip.
In some embodiments of the present disclosure, the total time feedback module 330, when used to intercept video segments missing in the target video set from the original video and add to the target video set, is specifically used to:
Analyzing a key frame number from the head information of each video segment in the target video set, and determining a plurality of marked key video frames from the original video;
matching the key frame number with the key video frame, and determining a target key video frame which is not matched with the corresponding key frame number from a plurality of key video frames;
determining a previous key video frame and a next key video frame adjacent to the target key video frame;
Determining a first video segment corresponding to a previous key video frame and a second video segment corresponding to a next key video frame from a plurality of video segments contained in a target video set;
based on the ending time stamp of the first video segment and the starting time stamp of the second video segment, video segments lacking in the target video set are intercepted from the original video and added to the target video set.
In some embodiments of the present disclosure, the video sending module 350, when configured to send the video streams of the initial video segment and other video segments that follow the initial video segment to the terminal sequentially, is specifically configured to:
Forming a video queue to be transmitted according to the time sequence of the video streams of the initial video segment and other video segments behind the initial video segment;
Transmitting the data stream of the (n+i) th video segment to the terminal according to the time sequence from the video queue, and loading the header information of the (n+i+1) th video segment during the transmission of the video stream of the (n+i) th video segment, wherein N is the sequence number of the initial video segment, and i is an integer not less than 0;
determining whether the (n+i+1) th video clip is damaged based on the header information of the (n+i+1) th video clip;
in response to determining that the (n+i+1) th video clip is not damaged, continuing to transmit the data stream of the (n+i+1) th video clip to the terminal after the video stream transmission of the (n+i) th video clip is completed.
In some embodiments of the present disclosure, the video transmission module 350 is further configured to:
And transmitting file damage prompt information to the terminal in response to the fact that the (N+i+1) th video clip is damaged.
In some embodiments of the present disclosure, the video transmission module 350 is further configured to:
in response to determining that the (n+i+1) th video clip is damaged, sending a wait for repair request to the terminal;
In response to receiving a confirmation message of the terminal for waiting for a repair request, loading header information of an (n+i+2) th video segment, and determining whether the (n+i+2) th video segment is damaged or not based on the header information of the (n+i+2) th video segment, wherein the confirmation message is generated by the terminal based on a confirmation operation of a user for waiting for the repair request;
In response to determining that the (n+i+2) th video segment is not corrupted, deleting the (n+i+1) th video segment, intercepting a new (n+i+1) th video segment from the original video based on the ending timestamp of the (n+i) th video segment and the starting timestamp of the (n+i+2) th video segment, and transmitting the data stream of the new (n+i) th video segment to the terminal.
In some embodiments of the present disclosure, the video transmission module 350 is further configured to:
in response to determining that the (n+i+1) th video clip is damaged, sending a wait for repair request to the terminal;
And in response to receiving a confirmation message of the terminal for waiting for the repair request, deleting the (N+i+1) th video fragment under the condition that the (N+i+1) th video fragment is determined to be the last video fragment in the video queue, intercepting a new (N+i+1) th video fragment from the original video based on the ending time stamp of the (N+i) th video fragment, and transmitting the data stream of the new (N+i) th video fragment to the terminal.
It can be understood that the above modules of the vod apparatus in the embodiments of the disclosure have functions of implementing the corresponding steps of the vod method. The functions can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above. The modules may be software and/or hardware, and each module may be implemented separately or may be implemented by integrating multiple modules. For the functional description of each module of the vod apparatus, reference may be specifically made to the corresponding description of the vod method, which is not repeated herein.
In the technical scheme of the disclosure, the related processes of collecting, storing, using, processing, transmitting, providing, disclosing and the like of the personal information of the user accord with the regulations of related laws and regulations, and the public order colloquial is not violated.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
FIG. 5 illustrates a schematic block diagram of an example electronic device that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 5, the apparatus 500 includes a computing unit 501 that can perform various suitable actions and processes according to a computer program stored in a Read Only Memory (ROM) 502 or a computer program loaded from a storage unit 508 into a Random Access Memory (RAM) 503. In the RAM503, various programs and data required for the operation of the device 500 can also be stored. The computing unit 501, ROM502, and RAM503 are connected to each other by a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The various components in the device 500 are connected to an I/O interface 505, including an input unit 506, e.g., a keyboard, a mouse, etc., an output unit 507, e.g., various types of displays, speakers, etc., a storage unit 508, e.g., a magnetic disk, optical disk, etc., and a communication unit 509, e.g., a network card, modem, wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 501 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 501 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above, such as a video-on-demand method. For example, in some embodiments, the video-on-demand method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 500 via the ROM502 and/or the communication unit 509. When the computer program is loaded into RAM503 and executed by computing unit 501, one or more steps of the video-on-demand method described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the video-on-demand method in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include being implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be a special or general purpose programmable processor, operable to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user, for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback), and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a Local Area Network (LAN), a Wide Area Network (WAN), and the Internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially, or in a different order, provided that the desired results of the disclosed aspects are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (10)

1.一种视频点播方法,应用于服务器,其特征在于,包括:1. A video on demand method, applied to a server, comprising: 接收终端发送的视频点播请求,从视频数据库中确定出所述视频点播请求对应的目标视频集合,其中,所述目标视频集合包含一个原始视频中的多个连续的视频片段;Receiving a video on demand request sent by a terminal, and determining a target video set corresponding to the video on demand request from a video database, wherein the target video set includes a plurality of continuous video segments in an original video; 基于所述目标视频集合中每个视频片段的播放时长计算出所述目标视频集合的总播放时长,基于所述原始视频的开始时间戳和结束时间戳计算出所述原始视频的原始播放时长,并对所述总播放时长和所述原始播放时长进行比较;Calculating the total playback time of the target video set based on the playback time of each video segment in the target video set, calculating the original playback time of the original video based on the start timestamp and the end timestamp of the original video, and comparing the total playback time with the original playback time; 响应于所述总播放时长等于所述原始播放时长,确定所述目标视频集合中的视频片段的数量完整,将所述总播放时长返回给所述终端,以便用户在所述总播放时长中选择的起始播放时间;In response to the total playback duration being equal to the original playback duration, determining that the number of video segments in the target video set is complete, returning the total playback duration to the terminal so that the user can select a start playback time in the total playback duration; 响应于所述总播放时长不等于所述原始播放时长,确定所述目标视频集合中的视频片段的数量不完整,从所述原始视频中截取出所述目标视频集合中缺少的视频片段并添加到所述目标视频集合中,重新基于所述目标视频集合中每个视频片段的播放时长计算出所述目标视频集合的总播放时长,将所述总播放时长返回给所述终端;In response to the total playback time not being equal to the original playback time, determining that the number of video segments in the target video set is incomplete, extracting the missing video segments in the target video set from the original video and adding them to the target video set, recalculating the total playback time of the target video set based on the playback time of each video segment in the target video set, and returning the total playback time to the terminal; 接收所述终端返回的所述起始播放时间,从所述目标视频集合中确定出与所述起始播放时间对应的起始视频片段,其中,所述起始播放时间是用户在终端展示的所述总播放时长中选择出来的;Receiving the start playback time returned by the terminal, and determining a start video segment corresponding to the start playback time from the target video set, wherein the start playback time is selected by the user from the total playback time displayed on the terminal; 将所述起始视频片段及其之后的其它视频片段的视频流依次发送给所述终端,使得所述终端展示相应的视频内容。The video streams of the starting video segment and other subsequent video segments are sent to the terminal in sequence, so that the terminal displays corresponding video content. 2.根据权利要求1所述的视频点播方法,其特征在于,所述原始视频中的多个连续的视频片段是通过以下方式得到的:2. The video-on-demand method according to claim 1, wherein the plurality of continuous video segments in the original video are obtained by: 播放所述原始视频,并开始对所述原始视频进行录制;Play the original video and start recording the original video; 在确定当前录制的视频片段的时长达到预设时长、或者当前录制的视频片段的容量达到预设容量时,保存当前录制的视频片段并开始录制下一个视频片段;When it is determined that the duration of the currently recorded video segment reaches a preset duration, or the capacity of the currently recorded video segment reaches a preset capacity, saving the currently recorded video segment and starting to record the next video segment; 每保存一个视频片段,在所述原始视频中对应于所述视频片段的多个视频帧中选择一个关键视频帧进行标记,并在所述视频片段的头信息中记录所述关键视频帧的关键帧号。Each time a video segment is saved, a key video frame is selected from a plurality of video frames corresponding to the video segment in the original video for marking, and the key frame number of the key video frame is recorded in the header information of the video segment. 3.根据权利要求2所述的视频点播方法,其特征在于,所述从所述原始视频中截取出所述目标视频集合中缺少的视频片段并添加到所述目标视频集合中,包括:3. The video on demand method according to claim 2, characterized in that the extracting the video segments missing from the target video set from the original video and adding them to the target video set comprises: 从所述目标视频集合中的每个所述视频片段的头信息中解析出关键帧号,从原始视频中确定出多个被标记的关键视频帧;Parsing the key frame number from the header information of each video segment in the target video set, and determining a plurality of marked key video frames from the original video; 对所述关键帧号和所述关键视频帧进行匹配,从多个所述关键视频帧中确定出未匹配到对应的所述关键帧号的目标关键视频帧;Matching the key frame number with the key video frame, and determining a target key video frame that is not matched to the corresponding key frame number from the plurality of key video frames; 确定出与所述目标关键视频帧相邻的前一个关键视频帧和后一个关键视频帧;Determine a previous key video frame and a next key video frame adjacent to the target key video frame; 从所述目标视频集合包含的多个所述视频片段中,确定出所述前一个关键视频帧对应的第一视频片段和所述后一个关键视频帧对应的第二视频片段;Determining, from the plurality of video segments included in the target video set, a first video segment corresponding to the previous key video frame and a second video segment corresponding to the next key video frame; 基于所述第一视频片段的结束时间戳和所述第二视频片段的开始时间戳,从所述原始视频中截取出所述目标视频集合中缺少的视频片段并添加到所述目标视频集合中。Based on the end timestamp of the first video segment and the start timestamp of the second video segment, the video segment missing from the target video set is extracted from the original video and added to the target video set. 4.根据权利要求1所述的视频点播方法,其特征在于,所述将所述起始视频片段及其之后的其它视频片段的视频流依次发送给所述终端,包括:4. The video on demand method according to claim 1, characterized in that the step of sending the video streams of the starting video segment and other subsequent video segments to the terminal in sequence comprises: 将所述起始视频片段及其之后的其它视频片段的视频流按照时间顺序形成待发送的视频队列;Form a video queue to be sent by chronologically arranging the video streams of the starting video segment and other video segments thereafter; 从所述视频队列中按照时间顺序将第(N+i)个视频片段的数据流发送给所述终端,并在第(N+i)个视频片段的视频流发送期间加载第(N+i+1)个视频片段的头信息,其中,N为所述起始视频片段的序号,i为0;Sending a data stream of the (N+i)th video segment from the video queue to the terminal in chronological order, and loading header information of the (N+i+1)th video segment during the video stream sending of the (N+i)th video segment, wherein N is the sequence number of the starting video segment and i is 0; 基于第(N+i+1)个视频片段的头信息,确定第(N+i+1)个视频片段是否损坏;Determine whether the (N+i+1)th video segment is damaged based on the header information of the (N+i+1)th video segment; 响应于确定第(N+i+1)个视频片段未损坏,在第(N+i)个视频片段的视频流发送完成之后,继续将第(N+i+1)个视频片段的数据流发送给所述终端。In response to determining that the (N+i+1)th video segment is not damaged, after the video stream of the (N+i)th video segment is sent, continue to send the data stream of the (N+i+1)th video segment to the terminal. 5.根据权利要求4所述的视频点播方法,其特征在于,还包括:5. The video-on-demand method according to claim 4, further comprising: 响应于确定第(N+i+1)个视频片段损坏,向所述终端发送文件损坏提示信息。In response to determining that the (N+i+1)th video segment is damaged, sending file damage prompt information to the terminal. 6.根据权利要求4所述的视频点播方法,其特征在于,还包括:6. The video-on-demand method according to claim 4, further comprising: 响应于确定第(N+i+1)个视频片段损坏,向所述终端发送等待修复请求;In response to determining that the (N+i+1)th video segment is damaged, sending a waiting for repair request to the terminal; 响应于接收到所述终端针对所述等待修复请求的确认消息,加载第(N+i+2)个视频片段的头信息,基于第(N+i+2)个视频片段的头信息确定第(N+i+2)个视频片段是否损坏,其中,所述确认消息是所述终端基于所述用户针对所述等待修复请求的确认操作生成的;In response to receiving a confirmation message from the terminal for the waiting-for-repair request, loading header information of the (N+i+2)th video segment, and determining whether the (N+i+2)th video segment is damaged based on the header information of the (N+i+2)th video segment, wherein the confirmation message is generated by the terminal based on a confirmation operation of the user for the waiting-for-repair request; 响应于确定第(N+i+2)个视频片段未损坏,删除第(N+i+1)个视频片段,基于第(N+i)个视频片段的结束时间戳和第(N+i+2)个视频片段的起始时间戳从所述原始视频中截取出新的第(N+i+1)个视频片段,将新的第(N+i+1)个视频片段的数据流发送给所述终端。In response to determining that the (N+i+2)th video segment is not damaged, deleting the (N+i+1)th video segment, extracting a new (N+i+1)th video segment from the original video based on the end timestamp of the (N+i)th video segment and the start timestamp of the (N+i+2)th video segment, and sending a data stream of the new (N+i+1)th video segment to the terminal. 7.根据权利要求4所述的视频点播方法,其特征在于,还包括:7. The video-on-demand method according to claim 4, further comprising: 响应于确定第(N+i+1)个视频片段损坏,向所述终端发送等待修复请求;In response to determining that the (N+i+1)th video segment is damaged, sending a waiting for repair request to the terminal; 响应于接收到所述终端针对所述等待修复请求的确认消息,在确定第(N+i+1)个视频片段为所述视频队列中最后的一个所述视频片段的情况下,删除第(N+i+1)个视频片段,基于第(N+i)个视频片段的结束时间戳从所述原始视频中截取出新的第(N+i+1)个视频片段,In response to receiving a confirmation message from the terminal regarding the waiting repair request, if it is determined that the (N+i+1)th video segment is the last video segment in the video queue, deleting the (N+i+1)th video segment, and extracting a new (N+i+1)th video segment from the original video based on an end timestamp of the (N+i)th video segment, 将新的第(N+i+1)个视频片段的数据流发送给所述终端。The data stream of the new (N+i+1)th video segment is sent to the terminal. 8.一种视频点播装置,其特征在于,包括:8. A video-on-demand device, comprising: 目标视频确定模块,用于接收终端发送的视频点播请求,从视频数据库中确定出所述视频点播请求对应的目标视频集合,其中,所述目标视频集合包含一个原始视频中的多个连续的视频片段;A target video determination module is used to receive a video on demand request sent by a terminal, and determine a target video set corresponding to the video on demand request from a video database, wherein the target video set includes multiple continuous video clips in an original video; 时长比较模块,用于基于所述目标视频集合中每个视频片段的播放时长计算出所述目标视频集合的总播放时长,基于所述原始视频的开始时间戳和结束时间戳计算出所述原始视频的原始播放时长,并对所述总播放时长和所述原始播放时长进行比较;A duration comparison module, configured to calculate the total playback duration of the target video set based on the playback duration of each video segment in the target video set, calculate the original playback duration of the original video based on the start timestamp and the end timestamp of the original video, and compare the total playback duration with the original playback duration; 总时间反馈模块,用于响应于所述总播放时长等于所述原始播放时长,确定所述目标视频集合中的视频片段的数量完整,将所述总播放时长返回给所述终端,以便用户在所述总播放时长中选择的起始播放时间;响应于所述总播放时长不等于所述原始播放时长,确定所述目标视频集合中的视频片段的数量不完整,从所述原始视频中截取出所述目标视频集合中缺少的视频片段并添加到所述目标视频集合中,重新基于所述目标视频集合中每个视频片段的播放时长计算出所述目标视频集合的总播放时长,将所述总播放时长返回给所述终端;A total time feedback module is used to, in response to the total playback time being equal to the original playback time, determine that the number of video segments in the target video set is complete, and return the total playback time to the terminal so that the user can select a starting playback time in the total playback time; in response to the total playback time not being equal to the original playback time, determine that the number of video segments in the target video set is incomplete, extract the missing video segments in the target video set from the original video and add them to the target video set, recalculate the total playback time of the target video set based on the playback time of each video segment in the target video set, and return the total playback time to the terminal; 起始视频确定模块,用于接收所述终端返回的所述起始播放时间,从所述目标视频集合中确定出与所述起始播放时间对应的起始视频片段,其中,所述起始播放时间是用户在终端展示的所述总播放时长中选择出来的;a starting video determination module, configured to receive the starting playback time returned by the terminal, and determine a starting video segment corresponding to the starting playback time from the target video set, wherein the starting playback time is selected by the user from the total playback time displayed on the terminal; 视频发送模块,用于将所述起始视频片段及其之后的其它视频片段的视频流依次发送给所述终端,使得所述终端展示相应的视频内容。The video sending module is used to send the video streams of the starting video segment and other subsequent video segments to the terminal in sequence, so that the terminal displays the corresponding video content. 9.一种电子设备,包括:9. An electronic device, comprising: 至少一个处理器;以及at least one processor; and 与所述至少一个处理器通信连接的存储器;其中,a memory communicatively connected to the at least one processor; wherein, 所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1-7中任一项所述的方法。The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7. 10.一种存储有计算机指令的非瞬时计算机可读存储介质,其中,所述计算机指令用于使所述计算机执行权利要求1-7中任一项所述的方法。10. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 7.
CN202310017725.0A 2023-01-06 2023-01-06 Video on demand method, device, equipment and storage medium Active CN116095417B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310017725.0A CN116095417B (en) 2023-01-06 2023-01-06 Video on demand method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310017725.0A CN116095417B (en) 2023-01-06 2023-01-06 Video on demand method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116095417A CN116095417A (en) 2023-05-09
CN116095417B true CN116095417B (en) 2025-05-13

Family

ID=86202013

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310017725.0A Active CN116095417B (en) 2023-01-06 2023-01-06 Video on demand method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116095417B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102210147A (en) * 2008-11-12 2011-10-05 思科技术公司 Processing of a video [aar] program having plural processed representations of a [aar] single video signal for reconstruction and output
CN110913240A (en) * 2019-12-02 2020-03-24 广州酷狗计算机科技有限公司 Video interception method, device, server and computer readable storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018125590A1 (en) * 2016-12-30 2018-07-05 Tivo Solutions Inc. Advanced trick-play modes for streaming video
CN111309632B (en) * 2020-03-20 2023-08-18 北京达佳互联信息技术有限公司 Application program testing method and device, computer equipment and storage medium
CN111342966B (en) * 2020-05-22 2020-08-25 支付宝(杭州)信息技术有限公司 A data storage method, data recovery method, device and equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102210147A (en) * 2008-11-12 2011-10-05 思科技术公司 Processing of a video [aar] program having plural processed representations of a [aar] single video signal for reconstruction and output
CN110913240A (en) * 2019-12-02 2020-03-24 广州酷狗计算机科技有限公司 Video interception method, device, server and computer readable storage medium

Also Published As

Publication number Publication date
CN116095417A (en) 2023-05-09

Similar Documents

Publication Publication Date Title
CN112994980B (en) Delay test methods, devices, electronic equipment and storage media
CN114223189B (en) Duration statistics method, device, electronic device and computer readable medium
CN113542888B (en) Video processing method and device, electronic equipment and storage medium
CN112738418A (en) Video acquisition method, device and electronic device
CN113596488A (en) Display method and device of live broadcast room, electronic equipment and storage medium
CN112764988B (en) Data segment acquisition method and device
CN116842205A (en) Game playback method, device and storage medium
CN114245229B (en) A short video production method, device, equipment and storage medium
CN116095417B (en) Video on demand method, device, equipment and storage medium
CN114071192A (en) Information acquisition method, terminal, server, electronic device and storage medium
CN116149951B (en) Topology information acquisition method and device of basic input/output system
CN118075531A (en) Multi-screen spliced synchronous display method and device, electronic equipment and storage medium
CN115499707B (en) Video similarity determination method and device
US20230063599A1 (en) Edge computing network, data transmission method and apparatus, device and storage medium
CN114501084B (en) Playing method, device, equipment and medium of player
CN117119211A (en) Live broadcast pushing method and device, electronic equipment and storage medium
CN114493809A (en) Auction message processing method, apparatus, server, device, medium and product
CN115599634A (en) Data processing method, device, equipment and storage medium
CN113438428A (en) Method, apparatus, device and computer-readable storage medium for automated video generation
CN113852835A (en) Live audio processing method, device, electronic device and storage medium
CN119363926B (en) Network video conference data processing method, device and storage medium
CN116017062B (en) Video playing method and device, electronic equipment and storage medium
CN118250341B (en) Form request processing method, device, equipment and storage medium
CN112559926B (en) Online processing method, device, equipment, medium and product for search display items
CN119484956A (en) Video generation method, device, electronic device and 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
GR01 Patent grant
GR01 Patent grant