CN113660517A - Video file storage method and device, storage medium and electronic device - Google Patents

Video file storage method and device, storage medium and electronic device Download PDF

Info

Publication number
CN113660517A
CN113660517A CN202110945512.5A CN202110945512A CN113660517A CN 113660517 A CN113660517 A CN 113660517A CN 202110945512 A CN202110945512 A CN 202110945512A CN 113660517 A CN113660517 A CN 113660517A
Authority
CN
China
Prior art keywords
video file
target
video
database
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110945512.5A
Other languages
Chinese (zh)
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.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua 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 Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202110945512.5A priority Critical patent/CN113660517A/en
Publication of CN113660517A publication Critical patent/CN113660517A/en
Pending legal-status Critical Current

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/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • 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/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4335Housekeeping operations, e.g. prioritizing content for deletion because of storage space restrictions

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a video file storage method and device, a storage medium and an electronic device, wherein the method comprises the following steps: under the condition that the target event is determined to occur, storing a target video file in a database, wherein the target video file comprises a first video file in which the target event occurs; storing first mark information in a database, wherein the first mark information comprises a first time point for starting to acquire a target video file, a second time point for finishing acquiring the target video file and first identification information, and the first identification information is used for identifying that the target video file comprises the first video file. By the method and the device, the problem that storage space is occupied by video file storage in the related technology is solved, and the effect of saving the storage space is achieved.

Description

Video file storage method and device, storage medium and electronic device
Technical Field
The embodiment of the invention relates to the field of communication, in particular to a video file storage method and device, a storage medium and an electronic device.
Background
With the improvement of the safety requirement of the modern society, the security industry comes up, and the security industry is continuously developed because various unsafe and uncertain factors exist in the society. The main security products comprise entrance guard, video monitoring and anti-theft alarm, wherein the most mainstream equipment in the market is still video monitoring. With the continuous improvement of video monitoring technology, the video monitoring system is widely applied to important scenes such as public security, traffic and the like, helps a user preview scene on site in real time, stores video and picture data and the like, wherein alarm information can help the user find danger in the first time and process the danger in time, so that the alarm video is an important and practical function in security protection, and after an alarm event is promoted, the user can see the alarm scene at that time completely as soon as possible through the alarm video.
The innovation of the technology of the video monitoring industry comprises the continuous improvement of the technologies of video image quality, each path of video code stream, video storage time, storage size and the like, wherein the development of cloud storage can help a user to store more data, but for the storage of alarm videos in the storage process, most of the existing cloud storage services are used for storing the generated alarm videos individually, so that the user can inquire the alarm videos conveniently, and meanwhile, a certain storage space is occupied.
Disclosure of Invention
The embodiment of the invention provides a video file storage method and device, a storage medium and an electronic device, and aims to at least solve the problem that storage space is occupied by video file storage in the related art.
According to an embodiment of the present invention, there is provided a method for storing a video file, including: under the condition that the target event is determined to occur, storing a target video file in a database, wherein the target video file comprises a first video file in which the target event occurs; storing first mark information in a database, wherein the first mark information comprises a first time point for starting to acquire a target video file, a second time point for finishing acquiring the target video file and first identification information, and the first identification information is used for identifying that the target video file comprises the first video file.
According to another embodiment of the present invention, there is provided a storage apparatus of a video file, including: the system comprises a first storage module, a second storage module and a third storage module, wherein the first storage module is used for storing a target video file in a database under the condition that a target event is determined to occur, and the target video file comprises a first video file in which the target event occurs; a second storage module, configured to store first tag information in the database, where the first tag information includes a first time point at which the target video file starts to be acquired, a second time point at which the target video file ends to be acquired, and first identification information, and the first identification information is used to identify that the target video file includes the first video file.
In an exemplary embodiment, the first storage module includes: the first determining unit is used for determining a video recording period; a second determining unit, configured to determine, when the target event occurs in the video recording period, a video file recorded in the video recording period as the target video file, where the target video file further includes a second video file in a first preset time period before the target event occurs and a third video file in a second preset time period after the target event occurs; a first storage unit, configured to store the target video file in the database.
In an exemplary embodiment, the first storage module includes: a third determining unit, configured to determine a pre-recorded file, where the pre-recorded file is used to record a video in a preset time period in a circulating manner; a fourth determining unit, configured to determine, as the target video file, a video file in the pre-recorded file in which the target event occurs, if it is determined that the target event occurs; and the second storage unit is used for storing the target video file in the database.
In an exemplary embodiment, the second storage module includes: a fifth determining unit, configured to determine a first time point at which the target event occurs and a second time point at which the target event ends; a first setting unit, configured to set an identifier of the first video file to a first preset identifier value if the target event is a preset event; and the second setting unit is used for setting the first time point, the second time point and the first preset identification value in a first preset file to obtain the first mark information.
In an exemplary embodiment, the apparatus further includes: the first determining module is used for determining a third time point for acquiring the second video file and a fourth time point for finishing acquiring the third video file under the conditions that the target event is determined to occur, the second video file in a first preset time period before the target event occurs and the third video file in a second preset time period after the target event occurs are also included in the target video file after the target video file is stored in the database; the first setting module is used for setting the identifier of the target video file to be a second preset identifier value; a second setting module, configured to set the third time point, the fourth time point, and the second preset identifier value in a second preset file to obtain second tag information, where the second tag information is used to tag the target video file in the database.
In an exemplary embodiment, the apparatus further includes: a first receiving module, configured to receive a first video request after storing first tag information in the database, where the first video request is used to request to play the first video file, and the first video request includes a video playing time period; the first searching module is used for searching the first video file from the database according to the video playing time period; and the first sending module is used for sending the first video file to a client so as to play the first video file in the client.
According to a further embodiment of the present invention, there is also provided a computer-readable storage medium having a computer program stored thereon, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the invention, under the condition that the target event is determined to occur, the target video file is stored in the database, wherein the target video file comprises a first video file in which the target event occurs; storing first mark information in a database, wherein the first mark information comprises a first time point for starting to acquire a target video file, a second time point for finishing acquiring the target video file and first identification information, and the first identification information is used for identifying that the target video file comprises the first video file. The aim of storing the target event and other events together in the database can be achieved. No separate storage of the video of the target event is required. Therefore, the problem that the storage space is occupied by the storage of the video files in the related technology can be solved, and the effect of saving the storage space is achieved.
Drawings
Fig. 1 is a block diagram of a hardware configuration of a mobile terminal of a video file storage method according to an embodiment of the present invention;
fig. 2 is a flowchart of a storage method of a video file according to an embodiment of the present invention;
FIG. 3 is an overall block diagram of a storage video according to an embodiment of the invention;
FIG. 4 is a schematic diagram of a storage format for alarm recordings with recording schedules, according to an embodiment of the invention;
FIG. 5 is a flow diagram of alert recording storage with recording schedules according to an embodiment of the present invention;
FIG. 6 is a flow diagram of an alarm recording query according to an embodiment of the present invention;
fig. 7 is a block diagram of a structure of a storage apparatus for video files according to an embodiment of the present invention.
Detailed Description
Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings in conjunction with the embodiments.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The method embodiments provided in the embodiments of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking an example of the method running on a mobile terminal, fig. 1 is a block diagram of a hardware structure of the mobile terminal of the method for storing a video file according to the embodiment of the present invention. As shown in fig. 1, the mobile terminal may include one or more (only one shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), and a memory 104 for storing data, wherein the mobile terminal may further include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration, and does not limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the storage method of the video file in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, so as to implement the above-mentioned method. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In this embodiment, a method for storing a video file is provided, and fig. 2 is a flowchart of a method for storing a video file according to an embodiment of the present invention, as shown in fig. 2, the flowchart includes the following steps:
step S202, under the condition that a target event is determined to occur, storing a target video file in a database, wherein the target video file comprises a first video file in which the target event occurs;
step S204, storing first mark information in the database, wherein the first mark information comprises a first time point for starting to acquire the target video file, a second time point for finishing acquiring the target video file and first identification information, and the first identification information is used for identifying that the target video file comprises the first video file.
The execution subject of the above steps may be a terminal, but is not limited thereto.
The embodiment includes but is not limited to the application in the scene of alarming the video file.
In the present embodiment, the target event includes, but is not limited to, an abnormal event, such as an alarm event.
Through the steps, under the condition that the target event is determined to occur, the target video file is stored in the database, wherein the target video file comprises a first video file of the target event; storing first mark information in a database, wherein the first mark information comprises a first time point for starting to acquire a target video file, a second time point for finishing acquiring the target video file and first identification information, and the first identification information is used for identifying that the target video file comprises the first video file. The aim of storing the target event and other events together in the database can be achieved. No separate storage of the video of the target event is required. Therefore, the problem that the storage space is occupied by the storage of the video files in the related technology can be solved, and the effect of saving the storage space is achieved.
In one exemplary embodiment, in the event that it is determined that the target event occurs, storing the target video file in a database includes:
s1, determining a video recording period;
s2, under the condition that a target event occurs in a video recording period, determining a video file recorded in the video recording period as a target video file, wherein the target video file further comprises a second video file in a first preset time period before the target event occurs and a third video file in a second preset time period after the target event occurs;
s3, storing the target video file in the database.
In this embodiment, for example, when the target event is an alarm event, the alarm record is not separately stored for an event with a video recording plan, but when an alarm is triggered, a piece of data is added to the database and marked as alarm data, and the record in a period of time before and after the alarm and the record in the alarm period are collectively used as the alarm record.
In one exemplary embodiment, in the event that it is determined that the target event occurs, storing the target video file in a database includes:
s1, determining a prerecorded file, wherein the prerecorded file is used for circularly recording the video within a preset time period;
s2, under the condition that the target event is determined to occur, determining the video file of the target event in the prerecorded file as a target video file;
s3, storing the target video file in the database.
The embodiment is suitable for the alarm scene without a video recording plan. Setting a prerecorded file for recording videos within a period of time in a circulating manner, starting to record the videos within the alarm time when an alarm is triggered, continuing to record the videos within the period of time after the alarm is finished, storing the videos in the prerecorded file, the videos within the alarm time and the videos within the period of time after the alarm as the alarm videos together, and simultaneously adding a piece of data in a database to mark the data as the alarm data.
In an alternative embodiment, storing the first tag information in a database includes:
s1, determining a first time point of the target event and a second time point of the target event;
s2, setting the mark of the first video file as a first preset mark value under the condition that the target event is a preset event;
and S3, setting the first time point, the second time point and the first preset identification value in a first preset file to obtain first mark information.
In this embodiment, a piece of data is added to the database and marked as an alarm video, so that the final alarm video can be queried according to the data in the database.
In an exemplary embodiment, after storing the target video file in the database in the case where it is determined that the target event occurs, the method further comprises:
s1, under the condition that the target video file also comprises a second video file in a first preset time period before the target event occurs and a third video file in a second preset time period after the target event occurs, determining a third time point for acquiring the second video file and a fourth time point for finishing acquiring the third video file;
s2, setting the mark of the target video file as a second preset mark value;
and S3, setting the third time point, the fourth time point and the second preset identification value in a second preset file to obtain second marking information, wherein the second marking information is used for marking the target video file in the database.
In an exemplary embodiment, after storing the first tag information in the database, the method further comprises:
s1, receiving a first video request, wherein the first video request is used for requesting to play a first video file, and the first video request comprises a video playing time period;
s2, searching a first video file from the database according to the video playing time period;
and S3, sending the first video file to the client to play the first video file in the client.
In this embodiment, the first video file can be quickly found through the video playing time period.
The present invention will be described in detail with reference to the following specific examples:
the embodiment provides a storage scheme for an alarm video, which mainly includes adding devices, adding video, adding event alarms, playing back video, and the like, and a structure diagram is shown in fig. 3, and specifically includes:
adding equipment: when the application adds equipment to Software as a Service (SaaS), the SaaS Service Platform firstly adds equipment to a Platform as a Service (PaaS) access Service, then channels are continuously and sequentially added, the access Service adds equipment information into an equipment table, channel information is stored in the channel table, and after the equipment is successfully logged in, online information of the equipment channel reaches the application through the SaaS.
Video recording: the application adds a video plan through SaaS, wherein one video plan comprises a channel, a code stream, a time template, a life cycle, N + M configuration and the like, the SaaS disassembles the whole video plan according to the channel, each channel forms a video plan, the video plan is issued to PaaS storage service, the storage service stores and executes the video plan, the code stream is requested to an access service within the planning time, the access service requests the code stream to a front end, the access service forwards the code stream to the storage service, and the storage service stores the code stream into a cloud storage bucket to which the channel belongs.
And (3) event alarm flow: the method comprises the steps that an alarm plan is issued on an event center module of the SaaS service platform and comprises an alarm source, an alarm type, an associated user, an alarm linkage type, a linkage video and the like, alarm information from front-end equipment is consumed to a message queue of the PaaS by an alarm processing module of the event center, the alarm processing module of the event center speaks an alarm sending message pushing module, and the alarm sending message pushing module is pushed to a client side in real time.
Video playback: the application obtains a playback Uniform Resource Locator (URL) pointing to a PaaS forwarding service management node through a SaaS service platform, the application uses the URL to make a request to the forwarding service management node and is redirected to a child node of the forwarding service, the child node inquires a video file from a storage service according to a requested time period, the storage service inquires the cloud storage, the forwarding child node reads the video file from the cloud storage and forwards the video file to the application, and playback of a video is achieved.
In the embodiment, the alarm with a video plan is considered, the alarm video is not stored independently, but when the alarm is triggered, a piece of data is added into a database and marked as alarm data, and the video before and after the alarm and the video within the alarm time are used as the alarm video together; when the alarm of the video plan is not configured, a pre-recorded file is set and used for recording videos within a period of time in a circulating mode, when the alarm is triggered, the videos within the alarm time are recorded, after the alarm is finished, the videos within the period of time are recorded continuously, the videos in the pre-recorded file, the videos within the alarm time and the videos within the period of time after the alarm are stored as alarm videos together, and meanwhile, a piece of data is added into a database and marked as alarm data.
As shown in fig. 4, the alarm video and the general video are stored in the same file, and the alarm video does not need to be stored separately, but the database includes two pieces of data, one piece of data is the alarm data, and the other piece of data is the data of the general video. As shown in fig. 4, (1) is a piece of data of the alarm video recorded in the database, and the start time and the end time of the alarm are recorded, wherein the start time and the end time of the alarm are related to the linkage video configured in the alarm plan, when the alarm video is configured, videos before and after the linkage alarm incident are set for a period of time, for example, videos before and after the linkage alarm incident are set for 60s, the start time of the alarm video is the time of receiving the alarm signal minus 60s, the end time of the alarm video is the time of ending the alarm plus 60s, and meanwhile, the flag mark in the database is 1, that is, the piece of data is stored as the alarm video data.
The specific process of this embodiment is shown in fig. 5, and mainly includes the following steps:
s501, configuring a video recording plan for the front-end equipment on the service platform, wherein the video recording plan comprises a channel of the equipment, a life cycle of storage and the like;
s502, configuring an alarm plan for the front-end equipment on the service platform, wherein the alarm plan comprises an alarm source, an alarm type, an associated user, an alarm linkage type and a linkage video (a video in a certain period of time before and after the alarm);
s503, storing the video of the channel to which the video recording plan is configured in S501;
s504: adding a piece of data in the database to query the video files stored in S503, and continuously updating the data in the database according to the change of time;
s505, when an alarm signal is received, the video which is started to be recorded is an alarm video, and the linkage video which is set in S502, namely the video in a period of time before and after the alarm and the video in the alarm are stored as the alarm video together;
s506, adding a piece of data in the database, marking the data as the alarm video, and inquiring the final alarm video according to the data in the database.
In this embodiment, after the service platform issues the alarm plan, the alarm video may be stored through cloud storage, and the outgoing alarm information, including alarm time, alarm type, alarm source, alarm location, and priority, may be checked in the event center of the client. The specific flow is shown in fig. 6, and includes the following steps:
s601, the client sends a request to the service platform to obtain a playback URL;
s602, the service platform acquires a playback URL pointing to the forwarding service management node;
s603, the RTSP request is carried out by the forwarding service management node and is redirected to a child node of the forwarding service, and the child node inquires the video file from the storage service according to the request time period;
s604, the storage service queries the cloud storage:
and S605, the cloud storage returns the file corresponding to the alarm video data in the database to the forwarding service, and the forwarding sub-node forwards the alarm video file read from the cloud storage to the client, so that the playback of the alarm video is realized.
In summary, the alarm route and the common video are stored in the same file, so that the use of space can be reduced. The mode of increasing the file ID stored in the database stores the alarm video and the common video file ID in the database, and the alarm video is recorded by increasing the data in the database, so that the read-write speed is improved.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, a storage device for video files is further provided, and the storage device is used to implement the foregoing embodiments and preferred embodiments, which have already been described and are not described again. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 7 is a block diagram of a structure of a storage apparatus for video files according to an embodiment of the present invention, as shown in fig. 7, the apparatus including:
a first storage module 72, configured to store a target video file in a database in a case where it is determined that a target event occurs, where the target video file includes a first video file where the target event occurs;
the second storage module 74 is configured to store first tag information in the database, where the first tag information includes a first time point when the target video file starts to be acquired, a second time point when the target video file ends to be acquired, and first identification information, and the first identification information is used to identify that the target video file includes the first video file.
In an exemplary embodiment, the first storage module includes:
the first determining unit is used for determining a video recording period;
a second determining unit, configured to determine, when the target event occurs in the video recording period, a video file recorded in the video recording period as the target video file, where the target video file further includes a second video file in a first preset time period before the target event occurs and a third video file in a second preset time period after the target event occurs;
a first storage unit, configured to store the target video file in the database.
In an exemplary embodiment, the first storage module includes:
a third determining unit, configured to determine a pre-recorded file, where the pre-recorded file is used to record a video in a preset time period in a circulating manner;
a fourth determining unit, configured to determine, as the target video file, a video file in the pre-recorded file in which the target event occurs, if it is determined that the target event occurs;
and the second storage unit is used for storing the target video file in the database.
In an exemplary embodiment, the second storage module includes:
a fifth determining unit, configured to determine a first time point at which the target event occurs and a second time point at which the target event ends;
a first setting unit, configured to set an identifier of the first video file to a first preset identifier value if the target event is a preset event;
and the second setting unit is used for setting the first time point, the second time point and the first preset identification value in a first preset file to obtain the first mark information.
In an exemplary embodiment, the apparatus further includes:
the first determining module is used for determining a third time point for acquiring the second video file and a fourth time point for finishing acquiring the third video file under the conditions that the target event is determined to occur, the second video file in a first preset time period before the target event occurs and the third video file in a second preset time period after the target event occurs are also included in the target video file after the target video file is stored in the database;
the first setting module is used for setting the identifier of the target video file to be a second preset identifier value;
a second setting module, configured to set the third time point, the fourth time point, and the second preset identifier value in a second preset file to obtain second tag information, where the second tag information is used to tag the target video file in the database.
In an exemplary embodiment, the apparatus further includes:
a first receiving module, configured to receive a first video request after storing first tag information in the database, where the first video request is used to request to play the first video file, and the first video request includes a video playing time period;
the first searching module is used for searching the first video file from the database according to the video playing time period;
and the first sending module is used for sending the first video file to a client so as to play the first video file in the client.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program is arranged to perform the steps of any of the above-mentioned method embodiments when executed.
In the present embodiment, the above-described computer-readable storage medium may be configured to store a computer program for executing the above steps.
In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
In an exemplary embodiment, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
In an exemplary embodiment, the processor may be configured to perform the above steps by a computer program.
For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary embodiments, and details of this embodiment are not repeated herein.
It will be apparent to those skilled in the art that the various modules or steps of the invention described above may be implemented using a general purpose computing device, they may be centralized on a single computing device or distributed across a network of computing devices, and they may be implemented using program code executable by the computing devices, such that they may be stored in a memory device and executed by the computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into various integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (9)

1. A method for storing a video file, comprising:
under the condition that a target event is determined to occur, storing a target video file in a database, wherein the target video file comprises a first video file of the target event;
storing first mark information in the database, wherein the first mark information includes a first time point for starting to acquire the target video file, a second time point for ending to acquire the target video file, and first identification information, and the first identification information is used for identifying that the target video file includes the first video file.
2. The method of claim 1, wherein storing the target video file in a database upon determining that the target event occurred comprises:
determining a video recording period;
determining a video file recorded in the video recording period as the target video file under the condition that the target event occurs in the video recording period, wherein the target video file further comprises a second video file in a first preset time period before the target event occurs and a third video file in a second preset time period after the target event occurs;
storing the target video file in the database.
3. The method of claim 1, wherein storing the target video file in a database upon determining that the target event occurred comprises:
determining a prerecorded file, wherein the prerecorded file is used for circularly recording a video in a preset time period;
under the condition that a target event is determined to occur, determining a video file of the pre-recorded file in which the target event occurs as the target video file;
storing the target video file in the database.
4. The method of claim 1, wherein storing first tag information in the database comprises:
determining a first time point at which the target event occurs and a second time point at which the target event ends;
setting the identifier of the first video file to be a first preset identifier value under the condition that the target event is a preset event;
and setting the first time point, the second time point and the first preset identification value in a first preset file to obtain the first mark information.
5. The method of claim 1, wherein after storing the target video file in the database in the event that the target event is determined to occur, the method further comprises:
under the condition that the target video file further comprises a second video file within a first preset time period before the target event occurs and a third video file within a second preset time period after the target event occurs, determining a third time point for acquiring the second video file and a fourth time point for finishing acquiring the third video file;
setting the identifier of the target video file to be a second preset identifier value;
and setting the third time point, the fourth time point and the second preset identification value in a second preset file to obtain second marking information, wherein the second marking information is used for marking the target video file in the database.
6. The method of claim 1, wherein after storing the first tag information in the database, the method further comprises:
receiving a first video request, wherein the first video request is used for requesting to play the first video file, and the first video request comprises a video playing time period;
searching the first video file from the database according to the video playing time period;
and sending the first video file to a client so as to play the first video file in the client.
7. A storage device for video files, comprising:
the device comprises a first storage module, a second storage module and a third storage module, wherein the first storage module is used for storing a target video file in a database under the condition that a target event is determined to occur, and the target video file comprises a first video file in which the target event occurs;
the second storage module is configured to store first tag information in the database, where the first tag information includes a first time point at which the target video file starts to be acquired, a second time point at which the target video file ends to be acquired, and first identification information, and the first identification information is used to identify that the target video file includes the first video file.
8. A computer-readable storage medium, in which a computer program is stored, which computer program, when being executed by a processor, carries out the method of any one of claims 1 to 6.
9. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 6.
CN202110945512.5A 2021-08-17 2021-08-17 Video file storage method and device, storage medium and electronic device Pending CN113660517A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110945512.5A CN113660517A (en) 2021-08-17 2021-08-17 Video file storage method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110945512.5A CN113660517A (en) 2021-08-17 2021-08-17 Video file storage method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN113660517A true CN113660517A (en) 2021-11-16

Family

ID=78480749

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110945512.5A Pending CN113660517A (en) 2021-08-17 2021-08-17 Video file storage method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN113660517A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113038248A (en) * 2021-03-25 2021-06-25 浙江大华技术股份有限公司 File processing method and device, video playing method and device and electronic device
CN114885187A (en) * 2022-06-23 2022-08-09 深圳市必提教育科技有限公司 Live broadcast playback method and system for online education
CN115361597A (en) * 2022-07-14 2022-11-18 北京京东乾石科技有限公司 Video data storage method and device, and video data processing method and device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02132599A (en) * 1988-07-18 1990-05-22 Mitsubishi Electric Corp Monitor device
US20100287161A1 (en) * 2007-04-05 2010-11-11 Waseem Naqvi System and related techniques for detecting and classifying features within data
WO2012146273A1 (en) * 2011-04-26 2012-11-01 Better4Drive Ug (Haftungsbeschränkt) Method and system for video marker insertion
CN104573037A (en) * 2015-01-16 2015-04-29 北京中电兴发科技有限公司 Method and system for quickly querying supervision video through multiple color time shaft
US9077956B1 (en) * 2013-03-22 2015-07-07 Amazon Technologies, Inc. Scene identification
CN110120113A (en) * 2019-04-29 2019-08-13 北京睿家科技有限公司 Data processing method and device, access control equipment and access control system
CN110324698A (en) * 2018-03-28 2019-10-11 努比亚技术有限公司 A kind of video recording method, terminal and computer readable storage medium
CN110572691A (en) * 2019-08-01 2019-12-13 浙江大华技术股份有限公司 Video reading method, device, equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02132599A (en) * 1988-07-18 1990-05-22 Mitsubishi Electric Corp Monitor device
US20100287161A1 (en) * 2007-04-05 2010-11-11 Waseem Naqvi System and related techniques for detecting and classifying features within data
WO2012146273A1 (en) * 2011-04-26 2012-11-01 Better4Drive Ug (Haftungsbeschränkt) Method and system for video marker insertion
US9077956B1 (en) * 2013-03-22 2015-07-07 Amazon Technologies, Inc. Scene identification
CN104573037A (en) * 2015-01-16 2015-04-29 北京中电兴发科技有限公司 Method and system for quickly querying supervision video through multiple color time shaft
CN110324698A (en) * 2018-03-28 2019-10-11 努比亚技术有限公司 A kind of video recording method, terminal and computer readable storage medium
CN110120113A (en) * 2019-04-29 2019-08-13 北京睿家科技有限公司 Data processing method and device, access control equipment and access control system
CN110572691A (en) * 2019-08-01 2019-12-13 浙江大华技术股份有限公司 Video reading method, device, equipment and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113038248A (en) * 2021-03-25 2021-06-25 浙江大华技术股份有限公司 File processing method and device, video playing method and device and electronic device
CN113038248B (en) * 2021-03-25 2023-03-31 浙江大华技术股份有限公司 File processing method and device, video playing method and device and electronic device
CN114885187A (en) * 2022-06-23 2022-08-09 深圳市必提教育科技有限公司 Live broadcast playback method and system for online education
CN114885187B (en) * 2022-06-23 2023-08-08 深圳市必提教育科技有限公司 Live broadcast playback method and system for online education
CN115361597A (en) * 2022-07-14 2022-11-18 北京京东乾石科技有限公司 Video data storage method and device, and video data processing method and device

Similar Documents

Publication Publication Date Title
CN113660517A (en) Video file storage method and device, storage medium and electronic device
US7849227B2 (en) Stream data processing method and computer systems
US10616630B2 (en) Method for querying information of a currently broadcasted TV program and smart TV
US9774642B2 (en) Method and device for pushing multimedia resource and display terminal
CN107528766B (en) Information pushing method, device and system
CN107231581B (en) Method and system for video playing and streaming media playing control server
KR20200083608A (en) Video live broadcasting method and device
CN105872837A (en) User recommendation method and device
CN109819265B (en) Data storage method, data acquisition method and system
CN108093016B (en) Picture storage method and device and video monitoring system
CN113490039B (en) Screen-throwing joint broadcasting method, device, system, electronic equipment and storage medium
US10013486B2 (en) System, content editing server, audio recording slave device and content editing interface for distributed live performance scheduled audio recording, cloud-based audio content editing and online content distribution of audio track and associated metadata
CN104717526A (en) Multimedia data pushing method and device
CN104243598A (en) Information recommendation method and device
CN114222086B (en) Method, system, medium and electronic device for scheduling audio and video code stream
CN112468776A (en) Video monitoring processing method and device, storage medium and electronic device
CN107562568B (en) File backup method and device
CN113297339B (en) Method, apparatus, storage medium and product for storing data
CN106657116B (en) Method and device for remotely starting streaming data transmission
CN107527508B (en) Road condition information acquisition method and device
CN110996137B (en) Video processing method and device
CN112835978A (en) Data storage method and device and computer equipment
CN108234795B (en) Voice alarm method, device, system, storage medium and processor
CN113055213A (en) Alarm information management method, alarm information management system and server
CN116132630A (en) Video processing method, device, equipment 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20211116

RJ01 Rejection of invention patent application after publication