CN113329238B - Video file management method and device and server - Google Patents

Video file management method and device and server Download PDF

Info

Publication number
CN113329238B
CN113329238B CN202110889748.1A CN202110889748A CN113329238B CN 113329238 B CN113329238 B CN 113329238B CN 202110889748 A CN202110889748 A CN 202110889748A CN 113329238 B CN113329238 B CN 113329238B
Authority
CN
China
Prior art keywords
video
file
target
time
unit
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
CN202110889748.1A
Other languages
Chinese (zh)
Other versions
CN113329238A (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.)
Wuhan Zhongke Tongda High New Technology Co Ltd
Original Assignee
Wuhan Zhongke Tongda High New 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 Wuhan Zhongke Tongda High New Technology Co Ltd filed Critical Wuhan Zhongke Tongda High New Technology Co Ltd
Priority to CN202110889748.1A priority Critical patent/CN113329238B/en
Publication of CN113329238A publication Critical patent/CN113329238A/en
Application granted granted Critical
Publication of CN113329238B publication Critical patent/CN113329238B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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, manipulating MPEG-4 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/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • H04N21/2385Channel allocation; Bandwidth allocation
    • 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

Abstract

The embodiment of the application provides a video file management method, a video file management device and a server, wherein the method comprises the steps of firstly receiving a video file playing request from a client, wherein the video file playing request comprises a file identifier and a playing mode identifier of a video file requested to be played, and the video file comprises a plurality of video units with a time sequence relation; then, acquiring an abstract file of the target video file corresponding to the file identifier, wherein the abstract file comprises abstract information of each video unit; then, according to the summary file and the playing mode identification, determining the summary information of the target video unit to be sent in the target video file; and finally, generating a target video unit according to the target abstract information and the target video file and sending the target video unit to the client. According to the method and the device, the video file is divided into the plurality of video units with the time sequence relation, and the video file is sequentially sent to the client side according to the form of the video units, so that the network space is saved.

Description

Video file management method and device and server
Technical Field
The application relates to the field of intelligent traffic, in particular to a video file management method, a video file management device and a video file management server.
Background
In the process of video playing, a user may often need to perform fast-forward playing or rewind playing on a stored video, so that the played video jumps to a target segment in which the user is interested.
The traditional method for fast-forward playing or reverse playing the video is that a server sends all video data of a video file to a client, the client finds target data corresponding to a target segment which is interested by a user from all the video data of the video file and then displays the target data to the user.
Disclosure of Invention
The embodiment of the application provides a video file management method for saving network space.
In order to solve the above technical problem, an embodiment of the present application provides the following technical solutions:
in one aspect, the present application provides a video file management method, including:
receiving a video file playing request from a client, wherein the video file playing request comprises a file identifier and a playing mode identifier of a video file requested to be played; the video file comprises a plurality of video units with time sequence relation;
acquiring an abstract file of a target video file corresponding to the file identifier; the summary file comprises summary information of each video unit, and the summary information comprises content information and position information of the video units;
determining the target abstract information of the target video unit to be sent in the target video file according to the abstract file and the play mode identifier;
and generating the target video unit according to the target abstract information and the target video file and sending the target video unit to the client.
Optionally, in some possible implementations of the present application, before the step of receiving a video file playing request from a client, the method further includes:
receiving original video data;
dividing the original video data into a plurality of video units with time sequence relation according to a preset dividing mode, and storing video files corresponding to the video units;
acquiring data information of the video unit;
obtaining abstract information corresponding to the video unit according to the data information;
and generating a summary file according to the summary information, and storing the summary file.
Optionally, in some possible implementations of the present application, the play mode identifier includes a play time identifier; the step of determining the target summary information of the target video unit to be sent in the target video file according to the summary file and the play mode identifier includes:
determining a first video time corresponding to a target video unit to be sent in the target video file according to the playing time identifier;
determining the target video unit according to the first video time;
and acquiring the target abstract information of the target video unit in the abstract file.
Optionally, in some possible implementations of the present application, the play mode identifier further includes a play double speed identifier; after the step of generating the target video unit and sending the target video unit to the client, the method further comprises:
acquiring a second video time of a next video unit of the target video unit;
determining a second video playing time of the next video unit according to the playing speed doubling identifier, the first video time and the second video time;
and when the current time reaches the second video playing time, acquiring the next video unit and sending the next video unit to the client.
In one aspect, the present application provides a video file management apparatus, including:
the first receiving module is used for receiving a video file playing request from a client, wherein the video file playing request comprises a file identifier and a playing mode identifier of a video file requested to be played; the video file comprises a plurality of video units with time sequence relation;
the first acquisition module is used for acquiring the abstract file of the target video file corresponding to the file identifier; the summary file comprises summary information of each video unit, and the summary information comprises content information and position information of the video units;
a first determining module, configured to determine, according to the summary file and the play mode identifier, summary information of a target video unit that needs to be sent in the target video file;
and the first generation module is used for generating the target video unit according to the target abstract information and the target video file and sending the target video unit to the client.
In one embodiment, the video file management apparatus further comprises:
the second receiving module is used for receiving the original video data;
the dividing module is used for dividing the original video data into a plurality of video units with time sequence relation according to a preset dividing mode and storing video files corresponding to the video units;
the second acquisition module is used for acquiring the data information of the video unit;
the second determining module is used for obtaining summary information corresponding to the video unit according to the data information;
and the second generation module is used for generating a summary file according to the summary information and storing the summary file.
In one embodiment, the video file management apparatus further comprises:
a third obtaining module, configured to obtain a second video time of a next video unit of the target video unit;
a third determining module, configured to determine a second video playing time of the next video unit according to the playing double-speed identifier, the first video time, and the second video time;
and the fourth obtaining module is used for obtaining the next video unit and sending the next video unit to the client when the current time reaches the second video playing time.
The embodiment of the application provides a server, which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the video file management method when executing the computer program.
An embodiment of the present application provides a computer-readable storage medium, where a plurality of instructions are stored in the computer-readable storage medium, and the instructions are suitable for being loaded by a processor to perform the steps in the video file management method.
Embodiments of the present application provide a computer program product or computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium; the processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to make the computer device execute the steps in the video file management method.
The embodiment of the application provides a video file management method, a video file management device and a server, wherein the method comprises the steps of firstly receiving a video file playing request from a client, wherein the video file playing request comprises a file identifier and a playing mode identifier of a video file requested to be played, and the video file comprises a plurality of video units with a time sequence relation; then, acquiring an abstract file of the target video file corresponding to the file identifier, wherein the abstract file comprises abstract information of each video unit; then, according to the summary file and the playing mode identification, determining the summary information of the target video unit to be sent in the target video file; and finally, generating a target video unit according to the target abstract information and the target video file and sending the target video unit to the client. According to the method and the device, the video file is divided into the plurality of video units with the time sequence relation, and the video file is sequentially sent to the client side according to the form of the video units, so that the network space is saved, and the utilization rate of the network space is improved.
Drawings
The technical solution and other advantages of the present application will become apparent from the detailed description of the embodiments of the present application with reference to the accompanying drawings.
Fig. 1a is a schematic view of a first scene of a video file management system according to an embodiment of the present application.
Fig. 1b is a schematic view of a second scenario of a video file management system according to an embodiment of the present application.
Fig. 2 is a schematic flowchart of a video file management method according to an embodiment of the present application.
Fig. 3 is a schematic flowchart of a second video file management method according to an embodiment of the present application.
Fig. 4a is a schematic structural diagram of a video file according to an embodiment of the present application.
Fig. 4b is a schematic structural diagram of a summary file according to an embodiment of the present application.
Fig. 4c is a second schematic structural diagram of a summary file provided in the embodiment of the present application.
Fig. 5 is a schematic flowchart of a third method for managing video files according to an embodiment of the present disclosure.
Fig. 6a is a schematic view of a first structure of a video file management apparatus according to an embodiment of the present application.
Fig. 6b is a schematic diagram of a second structure of a video file management apparatus according to an embodiment of the present application.
Fig. 6c is a schematic structural diagram of a third video file management apparatus according to an embodiment of the present application.
Fig. 7 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the embodiment of the present application, the intelligent traffic system is an integrated network system that is constructed by comprehensively applying technologies such as audio/video monitoring, communication, computer network, system integration, etc. and has functions of information acquisition, transmission, exchange, control, display, storage, processing, etc. and can realize interconnection, intercommunication, and mutual control between different devices and systems in the traffic field for the purpose of maintaining national security and social stability and preventing and fighting against illegal criminal activities. The intelligent traffic system comprises a front-end camera, a data server and a traffic police terminal.
In the embodiment of the present application, the front-end camera refers to a camera installed in a monitoring site in an intelligent traffic system and used for information acquisition, encoding, processing, storage, transmission and safety control.
In the embodiment of the present application, the traffic police terminal refers to a client device registered and authorized by the intelligent transportation system and having an operation requirement on data and devices in the system, and may specifically include a client for traffic police and a client for developers.
Referring to fig. 1a and 1b, fig. 1a and 1b are schematic views of a scene of a video file management system according to an embodiment of the present application, where the scene of the video file management system shown in fig. 1a includes a traffic police terminal 101 and a server 102; wherein:
the traffic police terminal 101 includes, but is not limited to, a tablet Computer, a notebook Computer, a Personal Computer (PC), a micro processing box, or other devices;
the server 102 includes a local server and/or a remote server, etc.;
the server 102 communicates with the front-end device 101 through a wired or wireless network, and controls video playing in the front-end device 101.
In the scene diagram of the video file management system shown in fig. 1b, the rectangular frame with double solid lines represents the display frame of the traffic alert terminal 101, and the display interface includes: the method comprises the steps of playing a video, a progress bar and a cursor, wherein the total duration of the video is 10 minutes, the current playing time point is 6 minutes, if a user wants to play the video in progress backwards for 3 minutes, a mouse cursor only needs to click a point with the playing time of 3 minutes on the progress bar, when the mouse cursor clicks the point on the progress bar corresponding to 03:00:00, a system generates a video file playing request, a server 102 receives the video file playing request from a client, the video file playing request comprises a file identifier and a playing mode identifier of a video file requested to be played, the video file comprises a plurality of video units with a time sequence relation, the server 102 obtains a summary file of a target video file corresponding to the file identifier, the summary file comprises summary information of each video unit, and the summary information comprises content information and position information of the video units, the server 102 determines the summary information of the target video unit to be sent in the target video file according to the summary file and the play mode identifier, and finally, the server 102 generates the target video unit according to the summary information of the target and the target video file and sends the target video unit to the traffic police terminal 101.
In an embodiment, a user selects video backward or forward on a display device of a video playing device through a gesture, a front-end device generates a video file playing request according to the backward or forward operation, and a video request generating manner is not limited herein, and may be a cursor of a mouse, a gesture, or other methods capable of generating a video forward or backward request operation.
It should be noted that the system scenario diagrams shown in fig. 1a and fig. 1b are only an example, the server and the scenario described in the embodiment of the present application are for more clearly illustrating the technical solution of the embodiment of the present application, and do not form a limitation on the technical solution provided in the embodiment of the present application, and as a person having ordinary skill in the art knows that along with the evolution of the system and the occurrence of a new service scenario, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems. The following are detailed below. It should be noted that the following description of the embodiments is not intended to limit the preferred order of the embodiments.
Referring to fig. 2, fig. 2 is a first flowchart illustrating a video file management method according to an embodiment of the present application, where the method includes:
step 201: and receiving a video file playing request from the client, wherein the video file playing request comprises a file identifier and a playing mode identifier of the video file requested to be played.
A user sends a playing request of a video file on a client, the playing request of the video file includes a file identifier and a playing mode identifier of the video file requested to be played, the video file includes a plurality of video units having a time sequence relationship, for example, if the user selects a certain section of video on the client of a computer, the client will send the playing request of the video file of the user to a server, the server finds a corresponding video file from a database according to the playing request of the video file, the file identifier of the video file can be a video name plus a video generation date, such as: the traffic video 20200603 represents a traffic video generated in year 2020, 6/month 3, and the playback mode identifier may be a playback time, for example, if the user wants to view a video clip corresponding to the 2 nd minute of the video, the playback mode identifier is 0200, and if the user wants to view a clip corresponding to the 2 nd minute of the traffic video generated in year 2020, 6/month 3, the generated user request is 202006030200.
In one embodiment, before the step of receiving a video file playing request from a client, the method further includes:
receiving original video data; dividing the original video data into a plurality of video units with time sequence relation according to a preset dividing mode, and storing video files corresponding to the video units; acquiring data information of the video unit; obtaining abstract information corresponding to the video unit according to the data information; and generating a summary file according to the summary information, and storing the summary file.
Before the step of the server receiving the video file playing request from the client, the server needs to accept the original data, where the original video comes from the front-end device, for example: front end camera, install in the wisdom traffic system promptly and be used for information acquisition, coding, processing, storage, transmission, safety control's that is used for the control scene camera, if: traffic video data 1 generated by a traffic intersection in No. 6/3 of 2020 is obtained from a camera of the traffic intersection, and the traffic video data 1 is divided into a plurality of video units with a time sequence relationship according to a preset division mode, namely: the video time is divided into N equal time units, each time unit corresponds to a video unit, where the value of N is not limited herein and can be determined according to actual requirements, as shown in fig. 4a, assuming that the total duration of traffic video data 1 is 10 minutes, 10 minutes is now divided into 1 time unit, that is, video data corresponding to traffic video data 1 every 60 seconds is divided into one video unit according to a time sequence relationship, video data corresponding to the time from the video start to the 1 minute is divided into video units 1, video data corresponding to the time from the video 1 minute to the video 2 minute is divided into video units 2, video data corresponding to the time from the video 2 minute to the video 3 minute is divided into video units 3, and so on, video data corresponding to the time from the video 9 minute to the video 10 minute is divided into video units 10.
After the video units are obtained, data information of each video unit is obtained, and then summary information corresponding to the video units is obtained according to the data information, where the summary information includes content information and location information of the video units, that is, the data information of the video units to be obtained includes an address corresponding to each video unit in a video file and a data length corresponding to each video unit, the address corresponding to video unit 1 is ID1, the corresponding data length is L1, the address corresponding to video unit 2 is ID2, the corresponding data length is L2, the address corresponding to video unit 3 is ID3, the corresponding data length is L3, and so on, the address corresponding to video unit 10 is ID10, and the corresponding data length is L10.
And finally, generating an abstract file according to the abstract information, namely binding the address and the data length corresponding to each video unit in the video data 1 with the corresponding video unit to obtain the abstract information, arranging the abstract information according to the time sequence relation of the video units to form the abstract file, wherein the abstract name is the same as the file name corresponding to the video data 1 and is 20200603, and finally storing the abstract file in a database, for example, as shown in fig. 4b, the abstract file corresponding to the video data 1 is shown, wherein the file identification of the same video file is the same as the abstract identification.
Step 202: and acquiring the abstract file of the target video file corresponding to the file identifier.
If the corresponding summary file is found according to the file identifier in the video file playing request sent by the user through the client, for example, the file identifier in the video file playing request is 20200603, the summary file corresponding to 20200603 is found in the database.
Step 203: and determining the target abstract information of the target video unit to be sent in the target video file according to the abstract file and the play mode identifier.
As shown in fig. 3, which is a second flowchart schematic diagram of a video file management method provided in the embodiment of the present application, and is applied to the server, in this embodiment, step 203 specifically includes the following steps:
step 3031: and determining the first video time corresponding to the target video unit needing to be sent in the target video file according to the playing time identifier.
Step 3032: determining a scaled video unit based on the first video time;
taking the above as an example, the abstract file name of the target video file is the traffic video 20200603, the play mode flag is 0200, the first video time is the 2 nd minute, and the target video cell is video cell 3.
In one embodiment, the video file is a compressed file, and the summary information includes type information of the video unit; the step of determining the target video unit according to the first video time includes: determining an original video unit required to be sent in the target video file according to the first video time; acquiring the type of the original video unit; and determining a target video unit required to be sent in the target video file according to the type of the original video unit.
Wherein, the step of determining the target video unit to be sent in the target video file according to the type of the original video unit comprises: acquiring a target video unit type; if the type of the original video unit is the type of the target video unit, the original video unit is a target video unit; and if the type of the original video unit is not the type of the target video unit, determining a target video unit in the abstract file according to a preset selection mode.
Wherein the step of determining a targeted video unit in the summary file according to a preset selection mode comprises: determining a plurality of video units of the original video unit in the opposite direction of video playing in the summary file; determining a video unit of the plurality of video units, the type of which is the type of the target video unit, as a candidate video unit; acquiring candidate playing time of the candidate video unit; determining a candidate playing time which is closest to the original playing time of the original visual unit in the candidate playing times as a target playing time; and determining the candidate video unit corresponding to the target playing time as a target video unit.
The following example is used to describe how to determine a target video unit according to the first video time when the video file is a compressed file.
Fig. 4c is a schematic diagram of a second structure of a summary file according to an embodiment of the present application, where the summary information includes type information of video units, the video units are classified into I type, P type, and B type, if the summary file name of the target video file is traffic video 20200603, and the play mode flag is 0200, the first video time is 2 nd minute, since the first video time is the start play time of the corresponding video unit, the original video unit corresponding to the 2 nd minute is video unit 3, the unit type of the video unit 3 is determined to be P type according to the summary file, and assuming that the target video unit type is I type, a plurality of video units in the reverse video play direction of the original video unit are: the video unit 1, the video unit 2, and then the video unit of which the type of the video unit is the type of the target video unit among the plurality of video units are determined as candidate video units, because the type of the video unit 1 is I, the video unit 1 is a candidate video unit, and because there is only one candidate video unit, the video unit 1 is a target video unit.
If the play mode flag is 0800, the first video time is 8 minutes, the original video unit corresponding to the 8 minute is a video unit 9, the unit type of the video unit 9 is determined to be B type according to the summary file, and if the target video unit type is I type, a plurality of video units of the original video unit in the opposite direction of video play are assumed, that is: video unit 1, video unit 2, video unit 3, video unit 4, video unit 5, video unit 6, video unit 7, video unit 8, and then a video unit whose type of video unit is the type of target video unit among the plurality of video units is determined as a candidate video unit, since video unit 1, video unit 4, and video unit 7 are all of type I, video unit 1, video unit 4, and video unit 7 are candidate video units, the candidate playing time for video unit 1 is 0 minutes time, the candidate playing time for video unit 3 is 4 minutes time, the candidate playing time for video unit 7 is 6 minutes time, since the candidate playback time closest to the original playback time of the original view unit among the candidate playback times is the 6-minute time, thus 6 minutes is the target playing time and the video unit 7 corresponding to the moment of 6 minutes is determined as the target video unit.
Step 3033: target summary information of the target video unit in the summary file is obtained.
If the target video unit is video unit 3, the target summary information is the target address ID3, and the target data length is L3.
In one embodiment, the video file is a compressed file, and the summary information includes type information of the video unit; the step of determining the target video unit according to the first video time includes: determining an original video unit required to be sent in the target video file according to the first video time; acquiring the type of the original video unit; and determining a target video unit required to be sent in the target video file according to the type of the original video unit.
Wherein, the step of determining the target video unit to be sent in the target video file according to the type of the original video unit comprises: acquiring a target video unit type; if the type of the original video unit is the type of the target video unit, the original video unit is a target video unit; and if the type of the original video unit is not the type of the target video unit, determining a target video unit in the abstract file according to a preset selection mode.
Step 204: and generating a target video unit according to the target abstract information and the target video file and sending the target video unit to the client.
After the summary information is obtained, according to the target address in the target summary information, a video file with the video file name of traffic video 20200603 is obtained in the database, a video unit with the address of ID3 and the data length of L3 is found in the traffic video 20200603, namely the target video unit, and the video unit is sent to the client, namely a video clip corresponding to the 2 nd minute of the traffic video 20200603 is sent to the client on the computer.
The video file management method provided by the embodiment of the application comprises the steps of compressing a video file to obtain different types of video units, determining an original video unit to be sent in a target video file according to first video time, then obtaining the type of the original video unit, and determining a target video unit to be sent in the target video file according to the type of the original video unit.
As shown in fig. 5, a third flowchart of the video file management method provided in this embodiment of the present application is shown, where the play mode identifier further includes a play double speed identifier, and after step 204, the method further includes the following steps:
step 501: acquiring a second video time of a next video unit of the target video unit;
if the target video unit is the video unit 3, the next video unit of the target video unit is the video unit 4, and the second video time is the playing start time of the corresponding video unit, so the second video time corresponding to the video unit 4 is 3 minutes.
Step 502: and determining the second video playing time of the next video unit according to the playing double-speed identifier, the first video time and the second video time.
In one embodiment, the step of determining the second video playing time of the next video unit according to the playing double speed identifier, the first video time and the second video time includes: obtaining an original time interval according to the first video time and the second video time; obtaining a target time interval according to the playing speed doubling identification and the original time interval; and obtaining the second video playing time of the next video unit according to the first video time and the target time interval.
The playing speed doubling identification is used for controlling the playing speed of the video, the original playing speed of the video is defaulted to 1 speed doubling playing, and when the playing speed doubling identification is 2, the video is played according to 2 speed doubling. An original time interval is obtained according to the first video time and the second video time, so that the first video time is a 2-minute time, and the second video time is a 3-minute time, so that the original time interval is 1 minute, then a target time interval is obtained according to the original time interval, and the target time interval T = T1/N, where T denotes a target time interval, N denotes a double speed, and T1 denotes an original time interval, and when a play double speed flag denotes a 2-double speed, the target time interval is 1/2 minutes, and finally, a second video play time of a next video unit, that is, the second video play time = the first video time + the target time interval, is obtained according to the first video time and the target time interval, so that the second video play time of a next video unit of the video unit 3 is 03: 30.
Step 503: and when the current time reaches the second video playing time, acquiring a next video unit and sending the next video unit to the client.
And when the current playing time reaches 3 minutes and 30 seconds of the second video playing time, the server acquires the video data of the video unit 4 from the database and sends the video data to the client.
After the video data of the video unit 4 is sent to the client, the video data of the video unit 5, the video unit 6, the video unit 7, the video unit 8, the video unit 9 and the video unit 10 can be sent to the client in sequence according to the method until the playing of the remaining videos is completed.
The embodiment of the application provides a video file management method, which comprises the steps of firstly receiving a video file playing request from a client, wherein the video file playing request comprises a file identifier and a playing mode identifier of a video file requested to be played, and the video file comprises a plurality of video units with a time sequence relation; then, acquiring an abstract file of the target video file corresponding to the file identifier, wherein the abstract file comprises abstract information of each video unit; then, according to the summary file and the playing mode identification, determining the summary information of the target video unit to be sent in the target video file; and finally, generating a target video unit according to the target abstract information and the target video file and sending the target video unit to the client. According to the method and the device, the video file is divided into the plurality of video units with the time sequence relation, and the video file is sequentially sent to the client side according to the form of the video units, so that the network space is saved.
On the basis of the method in the foregoing embodiment, the present embodiment will be further described from the perspective of a video file management apparatus, please refer to fig. 6a, and fig. 6a specifically describes a first structural schematic diagram of the video file management apparatus provided in the embodiment of the present application, which may include:
a first receiving module 601, configured to receive a video file playing request from a client, where the video file playing request includes a file identifier and a playing mode identifier of a video file requested to be played; the video file comprises a plurality of video units with time sequence relation;
a first obtaining module 602, configured to obtain a summary file of a target video file corresponding to the file identifier; the summary file comprises summary information of each video unit, and the summary information comprises content information and position information of the video units;
a first determining module 603, configured to determine, according to the summary file and the play mode identifier, summary information of a target video unit that needs to be sent in the target video file;
in one embodiment, the first determining module 603 includes:
the first determining submodule is used for determining first video time corresponding to a target video unit needing to be sent in the target video file according to the playing time identifier;
a second determining submodule, configured to determine the target video unit according to the first video time;
and the first obtaining sub-module is used for obtaining the target abstract information of the target video unit in the abstract file.
In an embodiment, the second determining submodule is specifically configured to determine, according to the first video time, an original video unit that needs to be sent in the target video file; acquiring the type of the original video unit; and determining a target video unit required to be sent in the target video file according to the type of the original video unit.
A first generating module 604, configured to generate the target video unit according to the target abstract information and the target video file, and send the target video unit to the client.
In one embodiment, as shown in fig. 6b, the video file management apparatus further comprises:
a second receiving module 605, configured to receive original video data;
a dividing module 606, configured to divide the original video data into multiple video units with a time sequence relationship according to a preset dividing manner, and store video files corresponding to the video units;
a second obtaining module 607, configured to obtain data information of the video unit;
a second determining module 608, configured to obtain summary information corresponding to the video unit according to the data information;
the second generating module 609 is configured to generate a summary file according to the summary information, and store the summary file.
In one embodiment, as shown in fig. 6c, the video file management apparatus further comprises:
a third obtaining module 610, configured to obtain a second video time of a video unit next to the target video unit;
a third determining module 611, configured to determine a second video playing time of the next video unit according to the playing double speed identifier, the first video time, and the second video time;
a fourth obtaining module 612, configured to obtain the next video unit and send the next video unit to the client when the current time reaches the second video playing time.
In one embodiment, the third determining module 611 includes:
the third determining submodule is used for obtaining an original time interval according to the first video time and the second video time;
the fourth determining submodule is used for obtaining a target time interval according to the playing speed doubling identification and the original time interval;
and the fifth determining submodule is used for obtaining the second video playing time of the next video unit according to the first video time and the target time interval.
The embodiment of the present application further provides a server, as shown in fig. 7, which shows a schematic structural diagram of the server according to the embodiment of the present application, specifically:
the server includes components such as a processor 701 of one or more processing cores, memory 702 of one or more computer-readable storage media, a power supply 704, and an input unit 703. Those skilled in the art will appreciate that the server architecture shown in FIG. 7 is not meant to be limiting, and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the processor 701 is a control center of the server, connects various parts of the entire server using various interfaces and lines, and performs various functions of the server and processes data by running or executing software programs and/or modules stored in the memory 702 and calling data stored in the memory 702, thereby performing overall monitoring of the server. Optionally, processor 701 may include one or more processing cores; preferably, the processor 701 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 701.
The memory 702 may be used to store software programs and modules, and the processor 701 executes various functional applications and data processing by operating the software programs and modules stored in the memory 702. The memory 702 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to the use of the server, and the like. Further, the memory 702 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 702 may also include a memory controller to provide the processor 701 with access to the memory 702.
The server further includes a power supply 704 for supplying power to each component, and preferably, the power supply 704 is logically connected to the processor 701 through a power management system, so that functions of managing charging, discharging, and power consumption are realized through the power management system. The power supply 704 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The server may further include an input unit 703, and the input unit 703 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the server may further include a display processor and the like, which will not be described in detail herein. Specifically, in this embodiment, the processor 701 in the server loads the executable file corresponding to the process of one or more application programs into the memory 702 according to the following instructions, and the processor 701 runs the application program stored in the memory 702, thereby implementing various functions as follows:
receiving a video file playing request from a client, wherein the video file playing request comprises a file identifier and a playing mode identifier of a video file requested to be played; the video file comprises a plurality of video units with time sequence relation;
acquiring an abstract file of a target video file corresponding to the file identifier; the summary file comprises summary information of each video unit, and the summary information comprises content information and position information of the video units;
determining the target abstract information of the target video unit to be sent in the target video file according to the abstract file and the play mode identifier;
and generating the target video unit according to the target abstract information and the target video file and sending the target video unit to the client.
In the above embodiments, the descriptions of the embodiments have respective emphasis, and parts that are not described in detail in a certain embodiment may refer to the above detailed description of the video file management method, which is not described herein again.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present application provide a computer-readable storage medium, in which a plurality of instructions are stored, where the instructions can be loaded by a processor to execute the steps in any one of the video file management methods provided in the present application. For example, the instructions may perform the steps of:
receiving a video file playing request from a client, wherein the video file playing request comprises a file identifier and a playing mode identifier of a video file requested to be played; the video file comprises a plurality of video units with time sequence relation;
acquiring an abstract file of a target video file corresponding to the file identifier; the summary file comprises summary information of each video unit, and the summary information comprises content information and position information of the video units;
determining the target abstract information of the target video unit to be sent in the target video file according to the abstract file and the play mode identifier;
and generating the target video unit according to the target abstract information and the target video file and sending the target video unit to the client.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the computer-readable storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the computer-readable storage medium can execute the steps of any video file management method provided by the present application, the beneficial effects that can be achieved by any video file management method provided by the present application can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
Also, the present application provides a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method provided in the various alternative implementations described above. For example, the following functions are implemented:
receiving a video file playing request from a client, wherein the video file playing request comprises a file identifier and a playing mode identifier of a video file requested to be played; the video file comprises a plurality of video units with time sequence relation;
acquiring an abstract file of a target video file corresponding to the file identifier; the summary file comprises summary information of each video unit, and the summary information comprises content information and position information of the video units;
determining the target abstract information of the target video unit to be sent in the target video file according to the abstract file and the play mode identifier;
and generating the target video unit according to the target abstract information and the target video file and sending the target video unit to the client.
The video file management method, the video file management device and the video file management server provided by the application are described in detail, specific examples are applied in the description to explain the principle and the implementation of the application, and the description of the above embodiments is only used to help understand the method and the core idea of the application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (8)

1. A video file management method, comprising:
receiving a video file playing request from a client, wherein the video file playing request comprises a file identifier and a playing mode identifier of a video file requested to be played; the video file comprises a plurality of video units with a time sequence relation, and the play mode identifier comprises a play time identifier and a play speed identifier;
acquiring an abstract file of a target video file corresponding to the file identifier; the summary file comprises summary information of each video unit, and the summary information comprises content information and position information of the video units;
determining a first video time corresponding to a target video unit to be sent in the target video file according to the playing time identifier;
determining the target video unit according to the first video time;
acquiring target abstract information of the target video unit in the abstract file;
generating the target video unit according to the target abstract information and the target video file and sending the target video unit to the client;
deleting the target video unit from the client when the target video unit is played, and acquiring a second video time of a next video unit of the target video unit;
determining a second video playing time of the next video unit according to the playing speed doubling identifier, the first video time and the second video time;
and when the current time reaches the second video playing time, acquiring the next video unit and sending the next video unit to the client.
2. The video file management method according to claim 1, wherein before the step of receiving a video file play request from a client, further comprising:
receiving original video data;
dividing the original video data into a plurality of video units with time sequence relation according to a preset dividing mode, and storing video files corresponding to the video units;
acquiring data information of the video unit;
obtaining abstract information corresponding to the video unit according to the data information;
and generating a summary file according to the summary information, and storing the summary file.
3. The video file management method according to claim 1, wherein the video file is a compressed file, and the summary information includes type information of a video unit; the step of determining the target video unit according to the first video time includes:
determining an original video unit required to be sent in the target video file according to the first video time;
acquiring the type of the original video unit;
and determining a target video unit required to be sent in the target video file according to the type of the original video unit.
4. The video file management method according to claim 3, wherein said step of determining a target video unit to be transmitted in said target video file based on the type of said original video unit comprises:
acquiring a target video unit type;
if the type of the original video unit is the type of the target video unit, the original video unit is a target video unit;
and if the type of the original video unit is not the type of the target video unit, determining a target video unit in the abstract file according to a preset selection mode.
5. The video file management method according to claim 4, wherein said step of determining a targeted video unit in said summary file in a preset selection manner comprises:
determining a plurality of video units of the original video unit in the opposite direction of video playing in the summary file;
determining a video unit of the plurality of video units, the type of which is the type of the target video unit, as a candidate video unit;
acquiring candidate playing time of the candidate video unit;
determining a candidate playing time which is closest to the original playing time of the original video unit in the candidate playing times as a target playing time;
and determining the candidate video unit corresponding to the target playing time as a target video unit.
6. The video file management method according to claim 1, wherein said step of determining a second video playback time of said next video unit based on said playback speed flag, said first video time, and said second video time comprises:
obtaining an original time interval according to the first video time and the second video time;
obtaining a target time interval according to the playing speed doubling identification and the original time interval;
and obtaining the second video playing time of the next video unit according to the first video time and the target time interval.
7. A video file management apparatus, characterized by comprising:
the first receiving module is used for receiving a video file playing request from a client, wherein the video file playing request comprises a file identifier and a playing mode identifier of a video file requested to be played; the video file comprises a plurality of video units with a time sequence relation, and the play mode identifier comprises a play time identifier and a play speed identifier;
the first acquisition module is used for acquiring the abstract file of the target video file corresponding to the file identifier; the summary file comprises summary information of each video unit, and the summary information comprises content information and position information of the video units;
a first time determining module, configured to determine, according to the play time identifier, a first video time corresponding to a target video unit that needs to be sent in the target video file;
a first video unit determination module for determining the target video unit according to the first video time;
the first acquisition module is used for acquiring the target abstract information of the target video unit in the abstract file by a user;
the first generation module is used for generating the target video unit according to the target abstract information and the target video file and sending the target video unit to the client;
a second obtaining module, configured to delete the target video unit from the client when the target video unit is completely played, and obtain a second video time of a next video unit of the target video unit;
a second time determining module, configured to determine a second video playing time of the next video unit according to the playing double-speed identifier, the first video time, and the second video time;
and the third acquisition module is used for acquiring the next video unit and sending the next video unit to the client when the current time reaches the second video playing time.
8. A server, characterized in that the server comprises a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the video file management method according to any one of claims 1 to 6 when executing the computer program.
CN202110889748.1A 2021-08-03 2021-08-03 Video file management method and device and server Active CN113329238B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110889748.1A CN113329238B (en) 2021-08-03 2021-08-03 Video file management method and device and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110889748.1A CN113329238B (en) 2021-08-03 2021-08-03 Video file management method and device and server

Publications (2)

Publication Number Publication Date
CN113329238A CN113329238A (en) 2021-08-31
CN113329238B true CN113329238B (en) 2021-11-30

Family

ID=77427046

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110889748.1A Active CN113329238B (en) 2021-08-03 2021-08-03 Video file management method and device and server

Country Status (1)

Country Link
CN (1) CN113329238B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101360233A (en) * 2008-09-18 2009-02-04 中兴通讯股份有限公司 Method for network digital video preview label generation, playing method and system
CN101951412A (en) * 2010-10-15 2011-01-19 上海交通大学 Multi-sub-stream media transmission system based on HTTP protocol and transmission method thereof
CN104104895A (en) * 2013-04-09 2014-10-15 杭州海康威视数字技术股份有限公司 Method for carrying out video playback on video data and hard-disk video recorder
CN104661058A (en) * 2013-11-20 2015-05-27 深圳市云帆世纪科技有限公司 MP4 video on demand data stream transmission method, client side and video on demand system
CN105120321A (en) * 2015-08-21 2015-12-02 北京佳讯飞鸿电气股份有限公司 Video searching method, video storage method and related devices
CN106559677A (en) * 2015-09-30 2017-04-05 华为技术有限公司 The method and device of terminal, caching server and acquisition video slicing
CN106572358A (en) * 2016-11-11 2017-04-19 青岛海信宽带多媒体技术有限公司 Live broadcast time shift method and client
CN106899859A (en) * 2015-12-18 2017-06-27 北京奇虎科技有限公司 A kind of playing method and device of multi-medium data
CN107690093A (en) * 2016-08-03 2018-02-13 杭州海康威视数字技术股份有限公司 A kind of video broadcasting method and device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9762955B2 (en) * 2012-11-16 2017-09-12 At&T Mobility Ii Llc Substituting alternative media for presentation during variable speed operation
CN104010232B (en) * 2014-05-23 2017-12-12 惠州Tcl移动通信有限公司 A kind of intelligence plays method, system, player and the mobile terminal of Online Video
CN106331824B (en) * 2016-08-31 2020-02-14 杭州当虹科技股份有限公司 Method for playing streaming media video file at variable rate
CN106911961B (en) * 2017-02-22 2020-03-17 北京小米移动软件有限公司 Multimedia data playing method and device
CN111327965A (en) * 2020-03-27 2020-06-23 深圳市酷开网络科技有限公司 Video slicing speed-multiplying playing method, system and storage medium
CN112104897B (en) * 2020-11-04 2021-03-12 北京达佳互联信息技术有限公司 Video acquisition method, terminal and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101360233A (en) * 2008-09-18 2009-02-04 中兴通讯股份有限公司 Method for network digital video preview label generation, playing method and system
CN101951412A (en) * 2010-10-15 2011-01-19 上海交通大学 Multi-sub-stream media transmission system based on HTTP protocol and transmission method thereof
CN104104895A (en) * 2013-04-09 2014-10-15 杭州海康威视数字技术股份有限公司 Method for carrying out video playback on video data and hard-disk video recorder
CN104661058A (en) * 2013-11-20 2015-05-27 深圳市云帆世纪科技有限公司 MP4 video on demand data stream transmission method, client side and video on demand system
CN105120321A (en) * 2015-08-21 2015-12-02 北京佳讯飞鸿电气股份有限公司 Video searching method, video storage method and related devices
CN106559677A (en) * 2015-09-30 2017-04-05 华为技术有限公司 The method and device of terminal, caching server and acquisition video slicing
CN106899859A (en) * 2015-12-18 2017-06-27 北京奇虎科技有限公司 A kind of playing method and device of multi-medium data
CN107690093A (en) * 2016-08-03 2018-02-13 杭州海康威视数字技术股份有限公司 A kind of video broadcasting method and device
CN106572358A (en) * 2016-11-11 2017-04-19 青岛海信宽带多媒体技术有限公司 Live broadcast time shift method and client

Also Published As

Publication number Publication date
CN113329238A (en) 2021-08-31

Similar Documents

Publication Publication Date Title
CN109299336B (en) Data backup method and device, storage medium and computing equipment
CN110351572B (en) Method, device and equipment for updating live broadcast room information and storage medium
US9055193B2 (en) System and method of a remote conference
CN107241380B (en) Method and apparatus for time-based adjusted load balancing
CN110830735A (en) Video generation method and device, computer equipment and storage medium
CN112579148B (en) Service message processing method and device based on service agent and electronic equipment
CN109446204B (en) Data storage method and device for instant messaging, electronic equipment and medium
CN108280020A (en) Monitoring method, device, terminal and the computer storage media of computer equipment
CN109885720B (en) Music on demand interaction method, medium, device and computing equipment
CN112131015A (en) Information processing method and device, cloud server and storage medium
US11632581B2 (en) Playlist switching method, apparatus and system, terminal and storage medium
CN112835617B (en) Gray release method, device, server and readable medium
CN112615909B (en) Method for storing data in cascade storage server cluster and related equipment
CN114416012A (en) Audio continuous playing method and device
CN113329238B (en) Video file management method and device and server
CN108881766A (en) Method for processing video frequency, device, terminal and storage medium
US20230229296A1 (en) Notification display in message session
CN106060599A (en) Advertisement display method and device
CN113346973B (en) Event prompting method and device, electronic equipment and computer readable storage medium
US10374988B2 (en) Activity beacon
CN109729410B (en) Live broadcast room interactive event processing method, device, equipment and storage medium
CN113741814A (en) Data processing method, data processing device, computer readable storage medium and computer equipment
CN112162961A (en) Message processing method and device, computer equipment and storage medium
CN113542103B (en) Method and device for monitoring invitations of accounts in social communication group and mobile terminal
CN113747100B (en) Audio and video call method and device, storage medium and electronic equipment

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