CN117676183A - Video storage method, video playing device, video storage equipment and storage medium - Google Patents

Video storage method, video playing device, video storage equipment and storage medium Download PDF

Info

Publication number
CN117676183A
CN117676183A CN202311661840.8A CN202311661840A CN117676183A CN 117676183 A CN117676183 A CN 117676183A CN 202311661840 A CN202311661840 A CN 202311661840A CN 117676183 A CN117676183 A CN 117676183A
Authority
CN
China
Prior art keywords
video
target
recording
target video
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
CN202311661840.8A
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.)
OP Retail Suzhou Technology Co Ltd
Original Assignee
OP Retail Suzhou 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 OP Retail Suzhou Technology Co Ltd filed Critical OP Retail Suzhou Technology Co Ltd
Priority to CN202311661840.8A priority Critical patent/CN117676183A/en
Publication of CN117676183A publication Critical patent/CN117676183A/en
Pending legal-status Critical Current

Links

Landscapes

  • Television Signal Processing For Recording (AREA)

Abstract

The invention discloses a video storage method, a video playing method, a device, equipment and a storage medium, which relate to the technical field of monitoring and are applied to a target cloud server and comprise the following steps: receiving a target video stream pushed by target video recording equipment; slicing the target video stream; converting each target video clip into each target video file; storing each target video file to a local target disk, and numbering each target video file; and establishing an association relation between the video recording time of each target video clip and the corresponding video recording file identification number, and establishing a target index table based on the association relation. The video streaming pushed by the video recording equipment is sliced, the video clips are stored in the local disk of the cloud server, the video permanent loss caused by the local disk damage of the video recording equipment can be avoided, when the video is played, the corresponding relation between the video recording time and the video clips is inquired from the established target index table, and then the video is played from the appointed video recording starting time.

Description

Video storage method, video playing device, video storage equipment and storage medium
Technical Field
The present invention relates to the field of monitoring technologies, and in particular, to a video storage method, a video playing device, a video playing apparatus, and a storage medium.
Background
Conventional NVR (Network Video Recorder, network hard disk recorder) stores video on a local disk, however, if the local disk is destroyed, the video is permanently lost. It can be seen that how to provide a technical solution for avoiding the permanent loss of video caused by the local disk damage is a problem that needs to be solved by those skilled in the art.
Disclosure of Invention
Accordingly, the present invention is directed to a video storage method, a video playing method, a device and a storage medium, which can avoid permanent video loss caused by local disk damage. The specific scheme is as follows:
in a first aspect, the present invention discloses a video storage method, applied to a target cloud server, comprising:
receiving a target video stream pushed by target video recording equipment;
performing equal-time long slicing on the target video stream to obtain a plurality of target video clips with the same duration;
converting each target video clip into a corresponding video file to obtain a target video file corresponding to each target video clip;
storing the target video files corresponding to the target video clips into a local target disk, numbering the target video files, and obtaining video file identification numbers corresponding to the target video files;
and establishing an association relation between the video recording time of each target video clip and the corresponding video recording file identification number, and establishing a corresponding target index table based on the association relation.
Optionally, before receiving the target video stream pushed by the target video recording device, the method includes:
receiving a video request with a video requirement attribute sent by a client through a central scheduling server, and configuring a corresponding video task according to the video request;
and the video recording task is issued to target video recording equipment through the central scheduling server, so that the target video recording equipment records video based on task attributes in video recording task configuration information, and simultaneously, the recorded target video stream is pushed to a target cloud server corresponding to the push server address in real time according to the push server address in the video recording task configuration information.
Optionally, the recording based on the task attribute in the recording task configuration information includes:
if the task attribute in the video recording task configuration information indicates that the video recording task is a periodic task, video recording is carried out according to a preset video recording period;
and if the task attribute in the video task configuration information indicates that the video task is an event task, video recording is carried out when a target event corresponding to the event task is detected.
Optionally, the video storage method further includes:
the target video equipment and the target cloud server are respectively numbered through the central scheduling server, so that a video equipment identification number corresponding to the target video equipment and a cloud server identification number corresponding to the target cloud server are obtained;
and establishing an association relationship between the target video equipment and the target cloud server based on the video equipment identification number and the cloud server identification number through the central scheduling server, and storing the association relationship in a table form.
Optionally, the performing the equal-time-length slicing on the target video stream to obtain a plurality of target video segments with the same duration includes:
and performing equal-time-length slicing on the target video stream according to the preset video time length to obtain a plurality of target video fragments with the same time length.
The second aspect of the present invention discloses a video playing method, which is applied to a central scheduling server and comprises the following steps:
receiving a video reading request sent by a client; the video reading request is a request carrying video starting time or video starting and ending time and a video equipment identification number;
determining a target cloud server associated with a target video device corresponding to the video device identification number from a locally stored table according to the video device identification number carried in the video reading request;
determining a target index table which is established by the target cloud server and corresponds to the target video equipment;
playing the corresponding target video file under the target index table based on the video start time or the video start-stop time carried in the video reading request;
the target video file is stored in the target cloud server based on the video storage method disclosed by the prior art.
Optionally, the playing the corresponding target video file under the target index table based on the video start time or the video start-stop time carried in the video reading request includes:
if the video reading request carries the video starting time, sequentially playing all target video files according to the video file identification numbers corresponding to the video starting time under the target index table and the identification number sequence;
if the video recording start-stop time is carried in the video recording reading request, determining a video recording file identification number and the number of video recording files corresponding to the video recording start-stop time under the target index table based on the video recording start-stop time, and playing corresponding target video recording files according to the video recording file identification number and the number of video recording files.
In a third aspect, the present invention discloses a video storage device, applied to a target cloud server, comprising:
the video stream receiving module is used for receiving the target video stream pushed by the target video recording equipment;
the video stream slicing module is used for carrying out equal-time long slicing on the target video stream so as to obtain a plurality of target video fragments with the same duration;
the video stream conversion module is used for converting each target video clip into a corresponding video file so as to obtain a target video file corresponding to each target video clip;
the video stream storage module is used for storing the target video files corresponding to the target video clips into a local target disk;
the file numbering module is used for numbering each target video file to obtain a video file identification number corresponding to each target video file;
the index table establishing module is used for establishing an association relation between the video recording time of each target video clip and the corresponding video recording file identification number, and establishing a corresponding target index table based on the association relation.
In a fourth aspect, the present invention discloses an electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the steps of the method disclosed previously.
In a fifth aspect, the present invention discloses a computer-readable storage medium for storing a computer program; wherein the computer program when executed by a processor implements the steps of the method disclosed previously.
It can be seen that the present invention provides a video storage method, applied to a target cloud server, comprising: receiving a target video stream pushed by target video recording equipment; performing equal-time long slicing on the target video stream to obtain a plurality of target video clips with the same duration; converting each target video clip into a corresponding video file to obtain a target video file corresponding to each target video clip; storing the target video files corresponding to the target video clips into a local target disk, numbering the target video files, and obtaining video file identification numbers corresponding to the target video files; and establishing an association relation between the video recording time of each target video clip and the corresponding video recording file identification number, and establishing a corresponding target index table based on the association relation. Therefore, the method and the device can avoid permanent loss of the video caused by damage of the local disk of the target video equipment by carrying out the equal-time long slicing on the target video stream pushed by the target video equipment and storing the video clips to the local target disk of the target cloud server in the form of video files, and establish a corresponding target index table, so that when the video is played, the corresponding relation between the video recording time and the video clips can be inquired from the target index table, and further, the video can be recorded and played from the appointed video recording starting time.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a video storage method of the present invention;
FIG. 2 is a flowchart of a specific video storage method disclosed in the present invention;
FIG. 3 is a schematic diagram of a specific cloud service framework disclosed herein;
FIG. 4 is a schematic diagram of a video recording and storing apparatus according to the present invention;
fig. 5 is a block diagram of an electronic device according to the present disclosure.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Currently, conventional NVR stores video on a local disk, however, if the local disk is destroyed, the video is permanently lost. It can be seen that how to provide a technical solution for avoiding the permanent loss of video caused by the local disk damage is a problem that needs to be solved by those skilled in the art. Therefore, the invention provides a video storage scheme which can avoid permanent loss of video caused by local disk damage.
The embodiment of the invention discloses a video storage method, which is shown in fig. 1 and is applied to a target cloud server, and comprises the following steps:
step S11: and receiving the target video stream pushed by the target video recording equipment.
In this embodiment, the target cloud server receives a target video stream pushed by the target video device. It should be noted that the target video recording device may push not only the real-time video stream to the target cloud service but also the historical video stream to the target cloud server.
In this embodiment, before receiving the target video stream pushed by the target video recording device, the method may further include: receiving a video request with a video requirement attribute sent by a client through a central scheduling server, and configuring a corresponding video task according to the video request; and the video recording task is issued to target video recording equipment through the central scheduling server, so that the target video recording equipment records video based on task attributes in video recording task configuration information, and simultaneously, the recorded target video stream is pushed to a target cloud server corresponding to the push server address in real time according to the push server address in the video recording task configuration information. It can be understood that the client sends a video request carrying a video requirement attribute to the central scheduling server, and then configures a corresponding video task according to the request through the central scheduling server, and sends the video task to the target video device, so that the target video device can record video according to the task attribute in the video task configuration information, and push the recorded video stream to the corresponding target cloud server in real time according to the push server address in the video task configuration information. Note that the client may be a PC (Personal Computer ) client, APP (Application) client, or Web (World Wide Web) client, and the target video recording device may be NVR or IPC (Internet Protocol Camera, web camera).
In this embodiment, the target video recording device records video according to the task attribute in the video recording task configuration information, and if the task attribute in the video recording task configuration information indicates that the video recording task is a periodic task, video recording is performed according to a preset video recording period; and if the task attribute in the video task configuration information indicates that the video task is an event task, video recording is carried out when a target event corresponding to the event task is detected. It can be understood that if the video recording request sent by the client is a request for event video recording, the target video recording device detects a target event and then performs video recording and pushes the target event to the target cloud server; if the video recording request sent by the client is a request for periodic video recording, video recording is carried out according to a preset video recording period, and the target cloud server automatically detects that the data storage reaches the target period and automatically clears the historical data.
In this embodiment, the method may further include: the target video equipment and the target cloud server are respectively numbered through the central scheduling server, so that a video equipment identification number corresponding to the target video equipment and a cloud server identification number corresponding to the target cloud server are obtained; and establishing an association relationship between the target video equipment and the target cloud server based on the video equipment identification number and the cloud server identification number through the central scheduling server, and storing the association relationship in a table form. It can be understood that when the target video recording device pushes the video stream to the target cloud server for the first time, the target video recording device and the target cloud server can be bound through the central scheduling server, specifically, the target video recording device and the target cloud server are numbered, an association relationship between the target video recording device and the target cloud server is established based on the number, and the association relationship is stored in a form of a table, so that when the subsequent target video recording device pushes the video stream, the corresponding target cloud server can be directly found from the table, and then the video stream is pushed to the target cloud server. That is, a table is stored in the central scheduling server, and a correspondence between the ID (Identity document, dedicated number) of the record ECS (Elastic Compute Service) and the ID of the video recording apparatus, that is, a relationship between the target cloud servers to which the target video recording apparatus corresponds is stored in the central scheduling server. It should be noted that one ECS may correspond to multiple video recorders, each with 1 or more channels, but one ECS may carry up to 150 channels.
Step S12: and performing equal-time long slicing on the target video stream to obtain a plurality of target video fragments with the same time length.
In this embodiment, the target video stream is sliced at equal time intervals according to a preset slicing rule, so as to obtain a plurality of target video segments with the same duration. Specifically, the target video stream is sliced at equal time intervals according to a preset video time length, so as to obtain a plurality of target video fragments with the same time length.
Step S13: and converting each target video segment into a corresponding video file to obtain a target video file corresponding to each target video segment.
In this embodiment, the target video stream is sliced at equal time intervals to obtain a plurality of target video segments with the same time duration, and then each target video segment is converted into a corresponding video file to obtain a target video file corresponding to each target video segment.
Step S14: storing the target video files corresponding to the target video clips into a local target disk, numbering the target video files, and obtaining video file identification numbers corresponding to the target video files.
In this embodiment, the target video file corresponding to each target video clip is stored in a local target disk, for example, a video stream pushed by a target video recording device is sliced, and each video clip is stored in the form of a video file in S3 (Simple Storage Service, a simple storage service) of a local amazon standard. It should be noted that the amazon standard S3 store is typically used to store fragmented files, such as music video material, and each file has a unique URL (Uniform Resource Locator ).
In this embodiment, the target video stream is sliced, then each target video clip is sequentially converted into target video files, and each target video file is numbered to obtain a video file identification number corresponding to each target video file. For example, RTSP (Real Time Streaming Protocol), real-time streaming protocol) video stream is sequentially converted into a bin file stored once every 30s, and the ID and the storing time of the converted bin file are automatically recorded. It can be understood that when a continuous video stream is cut into bin files with a preset short time and stored sequentially according to the storage time, and the video stream is stored in the cloud in a fragmentation form of the files with the preset short time, the storage is free from capacity limitation, and recording with infinite duration can be realized by expanding a cloud server.
Step S15: and establishing an association relation between the video recording time of each target video clip and the corresponding video recording file identification number, and establishing a corresponding target index table based on the association relation.
In this embodiment, an association relationship between the recording time of each target video clip and the corresponding recording file identification number is established, and a corresponding target index table is established based on the association relationship. It can be understood that the index table is built by the numbers, the index table is also used for the subsequent video playing process, so that a great amount of data loss caused by interruption or failure of the video stream in the storage or playing process is effectively avoided, the user experience is influenced, the noninductive playing is realized, namely, the Amazon S3 storage collocation index table is built into a set of service capable of supporting storage and reading, periodic and continuous data streams, and finally, the streaming monitoring data is supported to be stored in the Amazon S3 storage for 7x24 hours, and the noninductive viewing is supported.
It should be noted that, for different types of requirements, a corresponding index table of a target cloud server in the target cluster is determined, where the classification of the target cluster may be classified according to a cloud platform type or a target country type, and the cloud platform type may be amazon, ali cloud, or Hua cloud, and the like.
Therefore, in the embodiment of the invention, the video is prevented from being permanently lost due to the damage of the local disk of the target video equipment by performing the equal-time long slicing on the target video stream pushed by the target video equipment and storing the video clip in the local target disk of the target cloud server in the form of the video file, and the corresponding target index table is established, so that the corresponding relation between the video recording time and the video clip can be queried from the target index table when the video is played, and further the video playing can be performed from the appointed video recording starting time.
The embodiment of the invention discloses a video playing method, which is shown in fig. 2 and is applied to a central scheduling server, and comprises the following steps:
step S21: receiving a video reading request sent by a client; the video reading request is a request carrying video starting time or video starting and ending time and video equipment identification number.
In this embodiment, the client sends a video reading request to the central scheduling server, that is, the central scheduling server receives the video reading request sent by the client, where the video reading request is a request carrying a video start time or a video start-stop time and a video equipment identification number.
Step S22: and determining a target cloud server associated with the target video equipment corresponding to the video equipment identification number from a locally stored table according to the video equipment identification number carried in the video reading request.
In this embodiment, a table is stored in the central scheduling server, where a correspondence between an ID of the ECS and an ID of the video recording device is recorded, so that the central scheduling server determines, from the locally stored table, a target cloud server associated with a target video recording device corresponding to the video recording device identification number according to the video recording device identification number carried in the video reading request.
Step S23: and determining a target index table which is established by the target cloud server and corresponds to the target video equipment.
In this embodiment, after determining, from a locally stored table, a target cloud server associated with a target video device corresponding to the video device identification number according to the video device identification number carried in the video reading request, a target index table corresponding to the target video device and established by the target cloud server is determined.
Step S24: playing the corresponding target video file under the target index table based on the video start time or the video start-stop time carried in the video reading request; the target video file is stored in the target cloud server based on the video storage method disclosed by the prior art.
In this embodiment, when the video is stored, an association relationship between the video time of each target video clip and the corresponding video file identification number is established, and a corresponding target index table is established based on the association relationship, so after the target index table corresponding to the target video device is determined, the corresponding target video file under the target index table is played based on the video start time or the video start-stop time carried in the video reading request; the target video file is stored in the target cloud server based on the video storage method disclosed by the prior art.
In a specific embodiment, if the video start time is carried in the video read request, all the target video files are sequentially played according to the video file identification numbers corresponding to the video start time under the target index table and the identification number sequence. It can be understood that, when the video recording start time is only carried in the video recording request, all the bin files under the target index table corresponding to the target video recording device are sequentially played from the bin file corresponding to the video recording start time until the video stream is played.
In another specific embodiment, if the video start-stop time is carried in the video reading request, determining a video file identification number and the number of video files corresponding to the video start-stop time under the target index table based on the video start-stop time, and playing corresponding target video files according to the video file identification number and the number of video files. It can be understood that, reading the video start-stop time carried in the video request, that is, indicating that a video with a certain duration is to be played, determining the video file identification number and the video file number corresponding to the video start-stop time under the target index table based on the video start-stop time, and playing the corresponding target video file according to the video file identification number and the video file number until the video stream is played.
For example, the embodiment of the invention also discloses a cloud service framework with flexible, extensible and strong fault tolerance, as shown in fig. 3, a channel database and a central scheduling server are arranged in the scheduling group, record global task information and are responsible for issuing the task information to NVR equipment, wherein the NVR equipment supports configuration plug-flow tasks, and the tasks support periodic tasks and event tasks; the task configuration comprises attributes such as a task ID, a push server address, task parameters and the like, and the task also supports a deletion operation, namely, a central scheduling server in a scheduling Group receives a video request with a video requirement attribute sent by a client (a WEB page or an APP mobile terminal), then configures a corresponding video task according to the video request, and issues the video task to target video equipment through the central scheduling server, so that the target video equipment carries out video based on the task attribute in video task configuration information, simultaneously pushes the recorded target video stream to a target cloud server corresponding to the push server address according to the push server address in video task configuration information, further saves the video stream to an OSS (Object Storage Service ) storage, namely, the central scheduling server also selects push nodes (push servers) at the same time of configuring the video task, for example, cloud storage [ Group001 ] or cloud storage [ Group002 ], wherein each storage comprises a corresponding cloud storage table and an index stream index table corresponding to the cloud storage table, and the index table has an index table corresponding to the index table. It should be noted that, a table is stored in the central scheduling server, in which a correspondence between the ID of the ECS and the ID of the video recording device is recorded, that is, an association between the target cloud servers corresponding to the target video recording devices is stored in the central scheduling server, and one ECS may correspond to a plurality of video recording devices, each video recording device has 1 path or multiple paths, but one ECS may carry 150 paths at most.
The periodic task represents video recording all the time until the video recording time length reaches the configured length, and the video recording is covered in a follow-up cycle; the event task indicates that no video is recorded at ordinary times, and when some events occur at target time such as mobile detection, IO alarm and the like, video recording is started.
When the video stream of the NVR device is pushed to the push server, the push server uses gRPC technology to query the central scheduling server for task attributes, and informs the event to the video server in the same lan, and the video server takes FLV (flash format) address and the task attributes to start recording the video stream. For example, the video server first queries whether the task has been recorded, if so, the index database, finds the latest slice ID, and continues writing data from this slice; otherwise, writing data from the 0 th slice; each time slice data (video of about 30 s) is written, an index is written, which is accurate to each GOP (Group of Pictures ). The video server supports real-time video and historical video, the real-time video uses a physical timestamp as a starting timestamp, the historical video uses a ts_start value in ScriptData in an FLV header as a starting timestamp, the video server supports a video query function, a video viewing function is supported according to time period query and month query (see which days in a month are recorded), the video server firstly queries slice IDs from an index database according to starting time provided by a user, then GOP data corresponding to the slice IDs are read, then video streams in an FLV format are repackaged for the user to play, and when one GOP is read completely, the next GOP is read along. It should be noted that, the push server may receive video data from the NVR, and use the FLV address to distribute the video data to play the video data to the user, where the video server and the push server are in the same cloud lan, and are used to pull the video record from the FLV provided by the push server, and store the video record in S3, where the data source represents the data source of the monitoring data, and is generally the lan FLV address provided by the push server in the cloud lan.
Correspondingly, the embodiment of the invention also discloses a video storage device, which is applied to the target cloud server as shown in fig. 4, and comprises the following steps:
a video stream receiving module 11, configured to receive a target video stream pushed by a target video recording device;
the video stream slicing module 12 is configured to slice the target video stream at equal time intervals to obtain a plurality of target video segments with the same duration;
the video stream conversion module 13 is configured to convert each target video clip into a corresponding video file, so as to obtain a target video file corresponding to each target video clip;
a video stream storage module 14, configured to store the target video files corresponding to each of the target video segments into a local target disk;
the file numbering module 15 is configured to number each target video file to obtain a video file identification number corresponding to each target video file;
the index table establishing module 16 is configured to establish an association relationship between a recording time of each target video clip and the corresponding recording file identification number, and establish a corresponding target index table based on the association relationship.
In the embodiment of the invention, the video is prevented from being permanently lost due to the damage of the local disk of the target video equipment by carrying out the equal-time slicing on the target video stream pushed by the target video equipment and storing the video clip in the form of the video file to the target disk of the local cloud server, and the corresponding target index table is established, so that the corresponding relation between the video recording time and the video clip can be queried from the target index table when the video is played, and further, the video playing can be carried out from the appointed video recording starting time.
In some specific embodiments, the video storage device may specifically further include:
the video request receiving module is used for receiving a video request with video requirement attributes sent by a client through the central scheduling server and configuring corresponding video tasks according to the video request;
and the task issuing module is used for issuing the video recording task to target video recording equipment through the central scheduling server so that the target video recording equipment can record video based on task attributes in video recording task configuration information, and pushing the recorded target video stream to a target cloud server corresponding to the push server address in real time according to the push server address in the video recording task configuration information.
In some specific embodiments, the task issuing module may specifically include:
the first video recording sub-module is used for recording video according to a preset video recording period when the task attribute in the video recording task configuration information indicates that the video recording task is a periodic task;
and the second video recording sub-module is used for recording video when detecting a target event corresponding to the event task when the task attribute in the video recording task configuration information indicates that the video recording task is the event task.
In some specific embodiments, the video storage device may specifically further include:
the numbering module is used for numbering the target video equipment and the target cloud server through the central scheduling server respectively to obtain a video equipment identification number corresponding to the target video equipment and a cloud server identification number corresponding to the target cloud server;
and the association relation establishing module is used for establishing the association relation between the target video equipment and the target cloud server through the central scheduling server based on the video equipment identification number and the cloud server identification number, and storing the association relation in a form of a table.
In some specific embodiments, the video stream slicing module 12 may specifically further include:
and the video stream slicing sub-module is used for carrying out equal-time long slicing on the target video stream according to the preset video time length so as to obtain a plurality of target video fragments with the same time length.
Further, the embodiment of the invention also provides electronic equipment. Fig. 5 is a block diagram of an electronic device 20, according to an exemplary embodiment, and is not intended to limit the scope of use of the present invention in any way.
Fig. 5 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present invention. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. Wherein the memory 22 is adapted to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps of the method disclosed in any of the previous embodiments. In addition, the electronic device 20 in the present embodiment may be specifically an electronic computer.
In this embodiment, the power supply 23 is configured to provide an operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and the communication protocol to be followed is any communication protocol applicable to the technical solution of the present invention, which is not specifically limited herein; the input/output interface 25 is used for acquiring external input data or outputting external output data, and the specific interface type thereof may be selected according to the specific application requirement, which is not limited herein.
The memory 22 may be a carrier for storing resources, such as a read-only memory, a random access memory, a magnetic disk, or an optical disk, and the resources stored thereon may include an operating system 221, a computer program 222, and the like, and the storage may be temporary storage or permanent storage.
The operating system 221 is used for managing and controlling various hardware devices on the electronic device 20 and computer programs 222, which may be Windows Server, netware, unix, linux, etc. The computer program 222 may further comprise a computer program capable of performing other specific tasks in addition to the computer program capable of performing the method performed by the electronic device 20 as disclosed in any of the previous embodiments.
Further, the embodiment of the invention also discloses a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program realizes the steps of the method disclosed in any of the previous embodiments when being loaded and executed by a processor.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The video storage method, the video playing device, the video playing equipment and the storage medium provided by the invention are described in detail, and specific examples are applied to the description of the principle and the implementation mode of the invention, and the description of the examples is only used for helping to understand the method and the core idea of the invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (10)

1. The video storage method is characterized by being applied to a target cloud server and comprising the following steps:
receiving a target video stream pushed by target video recording equipment;
performing equal-time long slicing on the target video stream to obtain a plurality of target video clips with the same duration;
converting each target video clip into a corresponding video file to obtain a target video file corresponding to each target video clip;
storing the target video files corresponding to the target video clips into a local target disk, numbering the target video files, and obtaining video file identification numbers corresponding to the target video files;
and establishing an association relation between the video recording time of each target video clip and the corresponding video recording file identification number, and establishing a corresponding target index table based on the association relation.
2. The video storage method according to claim 1, wherein before receiving the target video stream pushed by the target video recording device, the method comprises:
receiving a video request with a video requirement attribute sent by a client through a central scheduling server, and configuring a corresponding video task according to the video request;
and the video recording task is issued to target video recording equipment through the central scheduling server, so that the target video recording equipment records video based on task attributes in video recording task configuration information, and simultaneously, the recorded target video stream is pushed to a target cloud server corresponding to the push server address in real time according to the push server address in the video recording task configuration information.
3. The video recording storage method according to claim 2, wherein the recording based on the task attribute in the video recording task configuration information comprises:
if the task attribute in the video recording task configuration information indicates that the video recording task is a periodic task, video recording is carried out according to a preset video recording period;
and if the task attribute in the video task configuration information indicates that the video task is an event task, video recording is carried out when a target event corresponding to the event task is detected.
4. The video storage method of claim 3, further comprising:
the target video equipment and the target cloud server are respectively numbered through the central scheduling server, so that a video equipment identification number corresponding to the target video equipment and a cloud server identification number corresponding to the target cloud server are obtained;
and establishing an association relationship between the target video equipment and the target cloud server based on the video equipment identification number and the cloud server identification number through the central scheduling server, and storing the association relationship in a table form.
5. The video storage method according to any one of claims 1 to 4, wherein the step of performing the equal-time slicing on the target video stream to obtain a plurality of target video segments with the same duration includes:
and performing equal-time-length slicing on the target video stream according to the preset video time length to obtain a plurality of target video fragments with the same time length.
6. A video playing method is characterized by being applied to a central scheduling server and comprising the following steps:
receiving a video reading request sent by a client; the video reading request is a request carrying video starting time or video starting and ending time and a video equipment identification number;
determining a target cloud server associated with a target video device corresponding to the video device identification number from a locally stored table according to the video device identification number carried in the video reading request;
determining a target index table which is established by the target cloud server and corresponds to the target video equipment;
playing the corresponding target video file under the target index table based on the video start time or the video start-stop time carried in the video reading request;
the target video file is a video file stored in the target cloud server based on the video storage method according to any one of claims 1 to 5.
7. The video playing method according to claim 6, wherein the playing the corresponding target video file under the target index table based on the video start time or the video start-stop time carried in the video reading request includes:
if the video reading request carries the video starting time, sequentially playing all target video files according to the video file identification numbers corresponding to the video starting time under the target index table and the identification number sequence;
if the video recording start-stop time is carried in the video recording reading request, determining a video recording file identification number and the number of video recording files corresponding to the video recording start-stop time under the target index table based on the video recording start-stop time, and playing corresponding target video recording files according to the video recording file identification number and the number of video recording files.
8. A video storage device, applied to a target cloud server, comprising:
the video stream receiving module is used for receiving the target video stream pushed by the target video recording equipment;
the video stream slicing module is used for carrying out equal-time long slicing on the target video stream so as to obtain a plurality of target video fragments with the same duration;
the video stream conversion module is used for converting each target video clip into a corresponding video file so as to obtain a target video file corresponding to each target video clip;
the video stream storage module is used for storing the target video files corresponding to the target video clips into a local target disk;
the file numbering module is used for numbering each target video file to obtain a video file identification number corresponding to each target video file;
the index table establishing module is used for establishing an association relation between the video recording time of each target video clip and the corresponding video recording file identification number, and establishing a corresponding target index table based on the association relation.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to carry out the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program; wherein the computer program when executed by a processor implements the steps of the method according to any of claims 1 to 7.
CN202311661840.8A 2023-12-06 2023-12-06 Video storage method, video playing device, video storage equipment and storage medium Pending CN117676183A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311661840.8A CN117676183A (en) 2023-12-06 2023-12-06 Video storage method, video playing device, video storage equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311661840.8A CN117676183A (en) 2023-12-06 2023-12-06 Video storage method, video playing device, video storage equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117676183A true CN117676183A (en) 2024-03-08

Family

ID=90065682

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311661840.8A Pending CN117676183A (en) 2023-12-06 2023-12-06 Video storage method, video playing device, video storage equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117676183A (en)

Similar Documents

Publication Publication Date Title
US11350139B2 (en) Video live broadcast method and apparatus
US20140165119A1 (en) Offline download method, multimedia file download method and system thereof
US20180316959A1 (en) Method For Querying Information Of A Currently Broadcasted TV Program And Smart TV
US20050055718A1 (en) Peer-to-peer architecture for sharing video on demand content
CN104967862A (en) Video storage method and device, and video searching method and device
CN105376612A (en) Video playing method, media equipment, playing equipment and multimedia system
CN106326292B (en) Data structure and file aggregation and reading method and device
CN102244758A (en) Video-recording-file-based data acquisition method and equipment
CN108874826B (en) Video segment sequencing method and cloud storage system
CN104426853A (en) Multimedia synchronous playing method, server, terminal and system
CN109819265B (en) Data storage method, data acquisition method and system
CN108989724B (en) Embedded video camera video storage method and file search method
US20150071620A1 (en) Identifying and rerecording only the incomplete units of a program broadcast recording
CN105357544A (en) HLS-based multimedia file processing method and server
CN103856506A (en) Multi-screen synchronization method, device and system
CN109189992A (en) A kind of video time search method in cloud monitoring system
WO2017041663A1 (en) Video control method and device
CN101873354A (en) Data synchronization method and system thereof in interactive television
CN105812831B (en) Network program recording method, device and system and playing method and device
CN103220587A (en) Method and device for obtaining time shifting contents
CN111797060B (en) Offline video recording method, device and equipment and computer readable storage medium
CN114025199A (en) Live video editing method, device and system
CN103648021B (en) The method that network video file is played from USB storage device
CN103179440A (en) Value-added business time-shifted television system for 3G users
CN117676183A (en) Video storage method, video playing device, video storage 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