CN117472297B - Method, device and storage medium for prolonging storage time of video file - Google Patents

Method, device and storage medium for prolonging storage time of video file Download PDF

Info

Publication number
CN117472297B
CN117472297B CN202311826484.0A CN202311826484A CN117472297B CN 117472297 B CN117472297 B CN 117472297B CN 202311826484 A CN202311826484 A CN 202311826484A CN 117472297 B CN117472297 B CN 117472297B
Authority
CN
China
Prior art keywords
video
storage
target
time
redundant
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311826484.0A
Other languages
Chinese (zh)
Other versions
CN117472297A (en
Inventor
钟国辉
周悦
肖日永
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Everything Safety Technology Co ltd
Original Assignee
Shenzhen Everything Safety 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 Shenzhen Everything Safety Technology Co ltd filed Critical Shenzhen Everything Safety Technology Co ltd
Priority to CN202311826484.0A priority Critical patent/CN117472297B/en
Publication of CN117472297A publication Critical patent/CN117472297A/en
Application granted granted Critical
Publication of CN117472297B publication Critical patent/CN117472297B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0643Management of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0674Disk device
    • G06F3/0676Magnetic disk device
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The application discloses a method, equipment and a storage medium for prolonging the preservation time of a video file, and belongs to the technical field of video data processing. The method comprises the following steps: acquiring video file time marks corresponding to all video channels in a storage space, and determining a redundant disk space according to the video file time marks and storage requirements corresponding to all the video channels; when the video file storage time corresponding to the target channel is detected not to meet the storage requirement, sequencing the redundant disk space according to the redundant storage capacity of the redundant disk space; and determining a video storage chain according to the sorting result, and storing the target video file into the redundant disk space based on the video storage chain. According to the method, the target video files corresponding to the target video channels which do not meet the storage requirement are stored into the target redundant disk space according to the planned video storage chain, so that the storage time of the video files is prolonged.

Description

Method, device and storage medium for prolonging storage time of video file
Technical Field
The present application relates to the field of video data processing technologies, and in particular, to a method, an apparatus, and a storage medium for prolonging the storage time of a video file.
Background
The video can record pictures and sounds on site, and provides important basis for subsequent analysis and examination. When recording, the recording device usually obtains the recording file through the recording channel and stores the recording file in the recording disk of the recording device.
In the related art, when the video recording device determines that the remaining space of the disk is insufficient, the latest video recording file is covered with the earliest video recording file, so as to ensure the normal operation of video recording. And under the condition of damage or missing of the video disc, the storage space in the video disc is smaller, and the earliest video file is covered in a shorter time. This results in a shorter storage time for the video file, which cannot meet the storage requirements in some scenes.
The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present application and is not intended to represent an admission that the foregoing is prior art.
Disclosure of Invention
The application mainly aims to provide a method for prolonging the storage time of video files, which aims to solve the technical problem of shorter storage time of video files under the condition of limited storage space in a magnetic disk.
In order to achieve the above object, the present application provides a method for prolonging the storage time of a video file, the method for prolonging the storage time of a video file comprising the following steps:
Acquiring video file time marks corresponding to all video channels in a storage space, and determining a redundant disk space according to the video file time marks and storage requirements corresponding to all the video channels;
when the video file storage time corresponding to the target video channel is detected not to meet the storage requirement, sequencing the redundant disk space according to the redundant storage capacity of the redundant disk space;
and determining a video storage chain according to the sorting result, and storing the target video file into a target redundant disk space based on the video storage chain.
Optionally, the step of determining a video storage chain according to the sorting result and storing the target video file into the target redundant disk space based on the video storage chain includes:
adding the redundant disk space with the largest redundant memory space into a redundant space queue according to the sequencing result;
Determining the sum of redundant memory amounts of the redundant disk spaces in the redundant space queue, and determining a memory threshold value corresponding to the memory requirement;
When the sum of the redundant memory amounts is smaller than the memory amount threshold value, jumping to execute the step of adding the redundant disk space with the largest redundant memory amount into a redundant space queue according to the sequencing result;
Or when the sum of the redundant storage amounts is larger than the storage amount threshold value, outputting the video storage chain according to the redundant space queue, and emptying the redundant space queue;
And storing the target video file to the corresponding target redundant disk space according to the video storage chain, and updating the target redundant disk space according to the storage action of the target video file.
Optionally, before the step of storing the target video file to the corresponding target redundant disk space according to the video storage chain and updating the target redundant disk space according to the storing action of the target video file, the method further includes:
Determining the corresponding target redundant disk space and the target storage amount of the target video file according to the video storage chain;
And according to the target storage amount, allocating a corresponding channel access parameter for the target redundant disk space, and setting a target video channel corresponding to the target redundant disk space to be started.
Optionally, after the step of determining a video storage chain according to the sorting result and storing the target video file into the target redundant disk space based on the video storage chain, the method further includes:
After receiving the target video file sent by video equipment, acquiring a corresponding video storage chain according to the video equipment;
according to the storage space corresponding to the video storage chain, determining a corresponding target time mark in the storage space;
And calculating the preservation time corresponding to the target time mark, selecting a target storage space with the longest preservation time, and sending the target video file to the target storage space.
Optionally, the step of obtaining the video file time stamp corresponding to each video channel in the storage space and determining the redundant disk space according to the video file time stamp and the storage requirement corresponding to each video channel includes:
determining a video file corresponding to the video channel in the storage space, and determining the video file time mark of the video file;
Determining the storage time of the video file of the video channel according to the video file time mark, and determining a storage time threshold according to the storage requirement;
And determining the redundant disk space according to the time interval between the storage time of the video file and the storage time threshold and the residual storage space corresponding to the video channel.
Optionally, the step of determining a video storage chain according to the sorting result and storing the target video file into the target redundant disk space based on the video storage chain includes:
Determining the corresponding target video file according to the time interval, and determining the target storage amount of the target video file;
adding the redundant disk space with the largest redundant memory space into a redundant space queue according to the sequencing result;
determining the sum of redundant storage amounts of the redundant disk spaces in the redundant space queue;
When the sum of the redundant memory amounts is smaller than the target memory amount, jumping to execute the step of adding the redundant disk space with the largest redundant memory amount into a redundant space queue according to the sequencing result;
Or when the sum of the redundant storage amounts is larger than the target storage amount, outputting the video storage chain according to the redundant space queue, and emptying the redundant space queue;
And storing the target video file to the corresponding target redundant disk space according to the video storage chain, and updating the target redundant disk space according to the storage action of the target video file.
Optionally, after the step of determining a video storage chain according to the sorting result and storing the target video file into the target redundant disk space based on the video storage chain, the method further includes:
Determining the corresponding target redundant disk space and the target video file corresponding to the target redundant disk space according to the video storage chain;
and acquiring the target video file, and splicing the target video file according to the video storage chain to generate a video.
Optionally, before the step of obtaining the video file time stamp corresponding to each video channel in the storage space and determining the redundant disk space according to the video file time stamp and the storage requirement corresponding to each video channel, the method further includes:
Acquiring a video detection plan and determining a detection time period;
determining the detection time of the video equipment according to the detection time of the historical video equipment and the detection time period;
And when the current system time is the detection time of the video equipment, executing the step of acquiring video file time marks corresponding to each video channel in the storage space, and determining redundant disk space according to the video file time marks and the storage requirements corresponding to each video channel.
In addition, in order to achieve the above object, the present application also provides a storage time extension apparatus for video files, the storage time extension apparatus for video files comprising: the storage device comprises a memory, a processor and a video file preservation time extension program which is stored in the memory and can run on the processor, wherein the video file preservation time extension program is configured to realize the steps of the video file preservation time extension method.
In addition, in order to achieve the above object, the present application provides a storage medium having stored thereon a storage time extension program of a video file, which when executed by a processor, implements the steps of the storage time extension method of a video file as described above.
According to the application, by traversing each video channel, determining the redundant disk space in the disk storage space and planning the video storage chain, storing the target storage files corresponding to the video channels which do not meet the storage requirement into the corresponding target redundant disk space, the effect of prolonging the storage time of the video files is achieved, so that the video files can provide more effective support for subsequent analysis and examination. In addition, the application does not need to use extra storage equipment, reduces the deployment cost of video equipment and has high usability.
Drawings
FIG. 1 is a flowchart of a first embodiment of a method for prolonging the storage time of video files according to the present application;
FIG. 2 is a flowchart of a second embodiment of a method for prolonging the storage time of video files according to the present application;
FIG. 3 is a flowchart illustrating a third embodiment of a method for prolonging the storage time of a video file according to the present application;
FIG. 4 is a flowchart of a fourth embodiment of a method for prolonging the storage time of video files according to the present application;
Fig. 5 is a schematic structural diagram of a device for prolonging the storage time of video files in a hardware running environment according to an embodiment of the present application.
The achievement of the objects, functional features and advantages of the present application will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
According to the method, the redundant disk space in the disk is determined through detecting the storage time of the video files, and the target video files corresponding to the target video channels which do not meet the storage requirement are stored into the corresponding target redundant disk space according to the planned video storage chain, so that the storage time of the video files is prolonged.
In order that the above-described aspects may be better understood, exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the application to those skilled in the art.
In order to better understand the above technical solutions, the following detailed description will refer to the accompanying drawings and specific embodiments.
Example 1
During video recording, a situation may be encountered in which the disk is damaged, or disconnected. In this case, it is difficult to satisfy the storage requirement of the video file for the storage time of the video file. In order to prolong the storage time of a video file and meet the storage requirement of the video file, an embodiment of the present application provides a method for prolonging the storage time of the video file, and referring to fig. 1, fig. 1 is a schematic flow chart of a first embodiment of the method for prolonging the storage time of the video file.
In this embodiment, the method for prolonging the storage time of the video file includes:
Step S10: acquiring video file time marks corresponding to all video channels in a storage space, and determining a redundant disk space according to the video file time marks and storage requirements corresponding to all the video channels;
In this embodiment, the video detection system may determine, by traversing each video channel, a video file corresponding to each video channel in the storage space. Meanwhile, according to the time mark of the video file, the recording time of the video file can be determined. According to the video file with the earliest recording time in the video files corresponding to the video channels, the storage time of the video files which can be stored in the storage space corresponding to the video channels can be determined.
Under the actual application scene, each video channel may have different storage requirements according to the video schedule. For example, in a financial scenario, it is common for a video file to require a video file retention time of ninety days or more to ensure that the video file can provide effective support. The video detection system judges whether the storage space meets the storage requirement according to the storage time of the video file in the storage space and according to the storage time threshold value in the storage requirement. Meanwhile, when the storage space meets the storage requirement, the video recording detection system can determine the redundant disk space of the storage space according to the storage time threshold.
It should be noted that, the video recording device performs video recording according to a preset video recording plan, and after each video recording file is generated, the generated video recording file is stored in a corresponding storage space in the magnetic disk through the video recording channel. When the residual space of the storage space is insufficient to store the received video files, the received video files are covered with the video files with the earliest storage time, so that the video files can be ensured to be stored normally, and the normal operation of video is maintained.
As an alternative implementation of determining the redundant disk space, the video detection system may traverse each video channel and determine a video file corresponding to the video channel in the storage space, and a video file time stamp of the video file. According to the video file time mark, the video detection system can determine the video file preservation time of the video channel. Meanwhile, according to the storage requirement corresponding to the video channel, the storage time threshold of the video file can be determined. The video detection system calculates the difference between the storage time of the video file and the threshold value of the storage time, and sums the calculation result with the remaining storage space of the storage space to determine the redundant disk space of the storage space.
As another alternative implementation mode for determining redundant disk space, the video detection system can determine the generation time of the video file through the time watermark of the video file when traversing the video channels, and determine the storage time of the video file of each video channel according to the generation time. Meanwhile, according to the storage time threshold corresponding to the storage requirement of the video channel, the video detection system can calculate redundant disk spaces of all storage spaces.
In an exemplary embodiment, after determining the video file in the storage space of the video channel, the video detection system may extract a target frame picture of the video file, and determine a corresponding time string according to a time watermark on the target frame picture. By identifying the time string, the video detection system may determine the recording time of the video file and determine the save time of the video file. The target frame picture may be a first frame picture in the video file, or may be a last frame picture in the video file.
Step S20: when the video file storage time corresponding to the target video channel is detected not to meet the storage requirement, sequencing the redundant disk space according to the redundant storage capacity of the redundant disk space;
Step S30: and determining a video storage chain according to the sorting result, and storing the target video file into a target redundant disk space based on the video storage chain.
In this embodiment, when it is detected that the storage time of the video file corresponding to the target video channel does not meet the storage requirement, that is, when the storage time of the video file of the target video channel is smaller than the storage time threshold in the storage requirement, the video detection system ranks the redundant disk spaces according to the redundant storage amounts of the redundant disk spaces. According to the sorting result and a preset algorithm, the video detection system can generate a video storage chain. The storage sequence of the target video file in the redundant disk space is recorded in the video storage chain. After the video storage chain is generated, the video detection system can disable the target video channel, and store the target video file into the target redundant disk space according to the video storage chain. The preset algorithm may determine the target video file according to the video file of the target video channel and determine the video storage chain, or may determine the target video file according to a time interval between a storage time and a storage time threshold of the video file of the target video channel and determine the video storage chain.
As an alternative implementation manner for determining the video storage chain, the video detection system may plan the video storage chain according to all video files of the target video channel, and store all video files as target video files according to the video storage chain to the target redundant disk space. The video recording detection system can add the redundant disk space with the largest redundant memory space into the redundant space queue according to the sequencing result of the redundant disk space. Meanwhile, according to the sum of the redundant memory amounts of the redundant disk spaces in the redundant space queue and the memory amount threshold corresponding to the memory requirement, whether the redundant disk spaces in the redundant space queue can meet the memory requirement can be judged.
Further, when the sum of the redundant storage amounts is smaller than the storage amount threshold, the video recording detection system can continuously add the redundant disk space into the redundant space queue in sequence according to the sequencing result. When the sum of the redundant memory amounts is larger than the memory threshold value, the video detection system judges that the redundant disk space in the redundant space queue meets the memory requirement, outputs a video memory chain according to the redundant space queue, and empties the redundant space queue. According to the video storage chain, the target redundant disk space can store target video files according to the storage requirement.
In specific implementation, the video detection system also updates the target redundant disk space according to the storage action of the target video file. The video detection system can determine the storage capacity of the target video files stored in each target redundant disk space according to the video storage chain, and update the redundant storage capacity of the target redundant disk space according to the storage capacity. By updating the redundant memory capacity of the target redundant disk space, the video detection system can update the sequencing result of the redundant disk space according to the redundant memory capacity and more reasonably plan the video memory chain.
For example, when there is a redundant disk space whose redundant storage meets the storage requirement, the video recording detection system may also add the redundant disk space with the largest redundant storage to the redundant space queue according to the sorting result of the redundant disk space. And meanwhile, independently generating a video storage chain according to the redundant disk space meeting the storage requirement, and storing the target video file.
As another alternative implementation manner of determining the video storage chain, the video detection system may determine the time difference of the corresponding missing video file only according to the video time of the target video channel missing based on the storage requirement, and plan the video storage chain. The video detection system can determine the target video file and the target storage amount of the target video file according to the time difference between the video file storage time of the target video channel and the storage time threshold of the storage requirement. The video detection system may generate a video storage chain based on the target storage amount.
Further, the video detection system determines a corresponding target redundant disk space and a target storage amount of a target video file of the target redundant disk space according to a video storage chain. According to the target storage amount, the video detection system can allocate a corresponding channel access parameter for the target redundant disk space, and set a target video channel corresponding to the target redundant disk space to be enabled. The channel access parameters include, but are not limited to, the ip of the camera, the user name, the password, and the number of days required for video recording.
For example, the video recording detection system adds the redundant disk space with the largest redundant memory space to the redundant space queue according to the sequencing result, and determines the sum of the redundant memory spaces of the redundant space queue. When the sum of the redundant storage amounts is smaller than the target storage amount, video detection can continue to sequentially add the redundant disk space into the redundant space queue according to the sequencing result, and when the sum of the redundant storage amounts is larger than the target storage amount, a video storage chain is output according to the redundant space queue, and the redundant space queue is emptied. According to the video storage chain, the video detection system can store the target video file into the target redundant disk space, and update the target redundant disk space according to the storage action of the target video file.
According to the embodiment of the application, by traversing each video channel, determining the redundant disk space in the storage space according to the storage time of the video files in the storage space of each video channel, planning the video storage chain according to the redundant disk space, and storing the target video files corresponding to the target video channels which do not meet the storage requirement into the target redundant disk space, the storage time of the video files is prolonged, so that the video files can provide more effective support for the examination and analysis process.
Example two
Based on the same inventive concept, the present application also provides a second embodiment, and referring to fig. 2, fig. 2 is a schematic flow chart of a second embodiment of the method for prolonging the storage time of video files according to the present application.
In this embodiment, after determining a video storage chain according to the sorting result as described in step S30 and storing the target video file into the target redundant disk space based on the video storage chain, the method further includes:
Step S31: after receiving the target video file sent by video equipment, acquiring a corresponding video storage chain according to the video equipment;
Step S32: according to the storage space corresponding to the video storage chain, determining a corresponding target time mark in the storage space;
step S33: and calculating the preservation time corresponding to the target time mark, selecting a target storage space with the longest preservation time, and sending the target video file to the target storage space.
In this embodiment, after determining that the target video channel does not meet the corresponding storage requirement, the video detection system disables the target video channel and associates the generated video storage chain with the video device corresponding to the target video channel. After the video recording device generates the target video recording file, the video recording device determines a target storage space in the redundant disk space according to the associated video recording storage chain, and sends the target video recording file to the target storage space.
As an alternative implementation of determining the target storage space, the video recording device may determine the storage space corresponding to the video storage chain, and determine the target video file stored in the storage space. According to the target time mark of the target video file, the storage time of the target video file can be determined. The video recording device may select a storage space corresponding to the target recording file with the longest storage time as a target storage space, and send the generated target recording file to the target storage space.
As another alternative implementation way for determining the target storage space, the video recording device may also determine a history storage node of the target video file according to the history storage record. According to the history storage node, the video recording device can determine the next storage node in the video recording storage chain, determine a corresponding target storage space according to the storage node, and send the generated target video file to the target storage space.
In the embodiment of the application, after finishing recording the video file, the video recording device can determine the target storage space according to the video recording storage chain so as to finish storing the target video file. The storage requirement of video can be met by storing the target video file and covering the target video file with the longest storage time corresponding to the video storage chain.
Since the system described in the second embodiment of the present application is a system for implementing the method in the first embodiment of the present application, based on the method described in the first embodiment of the present application, a person skilled in the art can understand the specific structure and the modification of the system, and therefore, the description thereof is omitted herein. All systems used in the method according to the first embodiment of the present application are within the scope of the present application.
Example III
Based on the same inventive concept, the present application further provides a third embodiment, and referring to fig. 3, fig. 3 is a schematic flow chart of a third embodiment of the method for prolonging the storage time of video files according to the present application.
In this embodiment, as described in step S10, before obtaining the video file time stamp corresponding to each video channel in the storage space and determining the redundant disk space according to the video file time stamp and the storage requirement corresponding to each video channel, the method further includes:
step S11: acquiring a video detection plan and determining a detection time period;
Step S12: determining video detection time according to the historical video detection time and the detection time period;
Step S13: and when the current system time is the video detection time, executing the step of acquiring video file time marks corresponding to each video channel in the storage space, and determining redundant disk space according to the video file time marks and the storage requirements corresponding to each video channel.
In this embodiment, the video recording detection system may perform periodic video recording detection according to a preset video recording detection plan. The video recording detection plan includes, but is not limited to, a detection time period and a detected video recording channel range. The video recording detection system can determine the next video recording detection time according to the detection time period and the historical video recording detection time. The video detection plan can determine whether to execute video detection action according to the current system time, and execute video detection action to detect all video channels within the video channel range when the current system time is the video detection time.
For example, when the video recording detection is scheduled to be performed in a period of eight hours, the video recording detection system calculates the next video recording detection time according to the historical video recording detection time. For example, in the historical video detection time, the last video detection time is zero, and the video detection system can calculate that the next video detection time is eight points, and execute the video detection action when the current system time is eight points. Or when the historical video detection time is empty, the video detection system immediately executes a video detection action and records the historical video detection time.
According to the embodiment of the application, through the establishment of the video detection plan, the video detection system carries out video detection according to the preset video detection period, the storage time of the video file is judged at regular time, and whether all video channels can meet the storage requirement is judged in time, so that the video file is prevented from being lost.
Since the system described in the third embodiment of the present application is a system for implementing the method of the first embodiment of the present application, based on the method described in the first embodiment of the present application, a person skilled in the art can understand the specific structure and the modification of the system, and therefore, the description thereof is omitted herein. All systems used in the method according to the first embodiment of the present application are within the scope of the present application.
Example IV
Based on the same inventive concept, the present application also provides a fourth embodiment, and referring to fig. 4, fig. 4 is a schematic flow chart of a fourth embodiment of the method for prolonging the storage time of video files according to the present application.
In this embodiment, after determining a video storage chain according to the sorting result as described in step S30 and storing the target video file into the target redundant disk space based on the video storage chain, the method further includes:
Step S34: determining the corresponding target redundant disk space and the target video file corresponding to the target redundant disk space according to the video storage chain;
Step S35: and acquiring the target video file, and splicing the target video file according to the video storage chain to generate a video.
In this embodiment, after receiving a video call request from a user, a video time period and a corresponding video device that need to be called up may be determined according to the call request. According to the video storage chain corresponding to the video equipment and the video time period, the target video file to be called can be determined. The video recording storage chain is used for acquiring the target video recording files stored in the corresponding target redundant disk space, and splicing the target video recording files according to the recording time of the target video recording files, so that video recording videos required by users can be generated and output.
For example, when a user needs to retrieve a yesterday video, the video recording system may determine, according to a video storage chain associated with the video recording device, a target video file recorded by the video recording device in a time from yesterday zero to today zero, and obtain a corresponding target video file in a corresponding target redundant disk space. And finally, splicing the target video files to generate video and outputting the video, and providing corresponding video data for users.
According to the embodiment of the application, through the video storage chain, the corresponding target video files are called and spliced, and the required video can be called to complete the examination and analysis work.
Since the system described in the fourth embodiment of the present application is a system for implementing the method of the first embodiment of the present application, based on the method described in the first embodiment of the present application, a person skilled in the art can understand the specific structure and the modification of the system, and therefore, the description thereof is omitted herein. All systems used in the method according to the first embodiment of the present application are within the scope of the present application.
Example five
Referring to fig. 5, fig. 5 is a schematic diagram of a device for prolonging storage time of video files in a hardware running environment according to an embodiment of the present application.
As shown in fig. 5, the apparatus for extending the storage time of a video file may include: a processor 1001, such as a central processing unit (Central Processing Unit, CPU), a communication bus 1002, a network interface 1003, a memory 1004. Wherein the communication bus 1002 is used to enable connected communication between these components. The network interface 1003 may optionally include a standard wired interface, a wireless interface (e.g., a wireless FIdelity (WI-FI) interface). The memory 1004 may be a high-speed random access memory (Random Access Memory, RAM) memory or a stable non-volatile memory (NVM), such as a disk memory. The memory 1004 may also optionally be a storage device separate from the processor 1001 described above.
It will be appreciated by those skilled in the art that the configuration shown in fig. 5 does not constitute a limitation of the apparatus for extending the life of video files, and may include more or fewer components than shown, or may combine certain components, or may have a different arrangement of components.
As shown in fig. 5, the memory 1004, which is a storage medium, may include an operating system, a data storage module, a network communication module, and a storage time extension program for video files.
In the storage time extension device of the video file shown in fig. 5, the network interface 1003 is mainly used for data communication with other devices; the processor 1001 and the memory 1004 in the video file save time extension device of the present application may be configured in the video file save time extension device, and the video file save time extension device invokes the video file save time extension program stored in the memory 1004 through the processor 1001, and performs the following operations:
Acquiring video file time marks corresponding to all video channels in a storage space, and determining a redundant disk space according to the video file time marks and storage requirements corresponding to all the video channels;
when the video file storage time corresponding to the target video channel is detected not to meet the storage requirement, sequencing the redundant disk space according to the redundant storage capacity of the redundant disk space;
and determining a video storage chain according to the sorting result, and storing the target video file into a target redundant disk space based on the video storage chain.
Further, the processor 1001 may call a save time extension program of the video file stored in the memory 1004, and further perform the following operations:
adding the redundant disk space with the largest redundant memory space into a redundant space queue according to the sequencing result;
Determining the sum of redundant memory amounts of the redundant disk spaces in the redundant space queue, and determining a memory threshold value corresponding to the memory requirement;
When the sum of the redundant memory amounts is smaller than the memory amount threshold value, jumping to execute the step of adding the redundant disk space with the largest redundant memory amount into a redundant space queue according to the sequencing result;
Or when the sum of the redundant storage amounts is larger than the storage amount threshold value, outputting the video storage chain according to the redundant space queue, and emptying the redundant space queue;
And storing the target video file to the corresponding target redundant disk space according to the video storage chain, and updating the target redundant disk space according to the storage action of the target video file.
Further, the processor 1001 may call a save time extension program of the video file stored in the memory 1004, and further perform the following operations:
Determining the corresponding target redundant disk space and the target storage amount of the target video file according to the video storage chain;
And according to the target storage amount, allocating a corresponding channel access parameter for the target redundant disk space, and setting a target video channel corresponding to the target redundant disk space to be started.
Further, the processor 1001 may call a save time extension program of the video file stored in the memory 1004, and further perform the following operations:
After receiving the target video file sent by video equipment, acquiring a corresponding video storage chain according to the video equipment;
according to the storage space corresponding to the video storage chain, determining a corresponding target time mark in the storage space;
And calculating the preservation time corresponding to the target time mark, selecting a target storage space with the longest preservation time, and sending the target video file to the target storage space.
Further, the processor 1001 may call a save time extension program of the video file stored in the memory 1004, and further perform the following operations:
determining a video file corresponding to the video channel in the storage space, and determining the video file time mark of the video file;
Determining the storage time of the video file of the video channel according to the video file time mark, and determining a storage time threshold according to the storage requirement;
And determining the redundant disk space according to the time interval between the storage time of the video file and the storage time threshold and the residual storage space corresponding to the video channel.
Further, the processor 1001 may call a save time extension program of the video file stored in the memory 1004, and further perform the following operations:
Determining the corresponding target video file according to the time interval, and determining the target storage amount of the target video file;
adding the redundant disk space with the largest redundant memory space into a redundant space queue according to the sequencing result;
determining the sum of redundant storage amounts of the redundant disk spaces in the redundant space queue;
When the sum of the redundant memory amounts is smaller than the target memory amount, jumping to execute the step of adding the redundant disk space with the largest redundant memory amount into a redundant space queue according to the sequencing result;
Or when the sum of the redundant storage amounts is larger than the target storage amount, outputting the video storage chain according to the redundant space queue, and emptying the redundant space queue;
And storing the target video file to the corresponding target redundant disk space according to the video storage chain, and updating the target redundant disk space according to the storage action of the target video file.
Further, the processor 1001 may call a save time extension program of the video file stored in the memory 1004, and further perform the following operations:
Determining the corresponding target redundant disk space and the target video file corresponding to the target redundant disk space according to the video storage chain;
and acquiring the target video file, and splicing the target video file according to the video storage chain to generate a video.
Further, the processor 1001 may call a save time extension program of the video file stored in the memory 1004, and further perform the following operations:
Acquiring a video detection plan and determining a detection time period;
determining the detection time of the video equipment according to the detection time of the historical video equipment and the detection time period;
And when the current system time is the detection time of the video equipment, executing the step of acquiring video file time marks corresponding to each video channel in the storage space, and determining redundant disk space according to the video file time marks and the storage requirements corresponding to each video channel.
In addition, the application also provides a computer readable storage medium, wherein the computer readable storage medium stores a storage time extension program of the video file, and the storage time extension program of the video file can be executed by a processor to realize the steps of each embodiment of the storage time extension method of the video file.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, third, etc. do not denote any order. These words may be interpreted as names.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (7)

1. The method for prolonging the storage time of the video file is characterized by comprising the following steps of:
Acquiring video file time marks corresponding to each video channel in a storage space, and determining video file preservation time of the video channels according to the video file time marks;
Determining a storage time threshold of a video file according to a storage requirement corresponding to the video channel, and calculating a time interval between the storage time threshold and the storage time of the video file;
Determining a residual storage space corresponding to the video channel, and determining a redundant disk space of the video channel according to the residual storage space and the time interval;
When the storage time of the video files corresponding to the target video channels is detected not to meet the storage requirement, determining the data quantity to be stored in the target video channels, and sequencing the redundant disk spaces according to the redundant storage quantity of the redundant disk spaces, wherein the data quantity to be stored can be selected as a storage quantity threshold corresponding to the storage requirement or a target storage quantity of the target video files corresponding to the time interval;
Adding the redundant disk space with the largest redundant memory space into a redundant space queue according to the sequencing result, and determining the sum of the redundant memory spaces of the redundant disk spaces in the redundant space queue;
When the sum of the redundant memory amounts is smaller than the data amount to be stored, jumping to execute the step of adding the redundant disk space with the largest redundant memory amount into a redundant space queue according to the sequencing result;
or when the sum of the redundant storage amounts is larger than the data amount to be stored, outputting a video storage chain according to the redundant space queue, and emptying the redundant space queue;
Determining a corresponding target redundant disk space and a target storage amount of a target video file of the target redundant disk space according to the video storage chain;
setting the target video channel to be disabled, distributing channel access parameters for the target redundant disk space according to the target storage amount, and setting the video channel corresponding to the target redundant disk space to be enabled;
And storing the target video file into a target redundant disk space according to the video storage chain and the channel access parameter, and updating the redundant storage capacity of the target redundant disk space based on the storage action of the target video file and the storage capacity of the target video file.
2. The method for prolonging the storage time of video files according to claim 1, wherein the step of setting the video channel corresponding to the target redundant disk space to be enabled comprises:
Determining the corresponding target redundant disk space and the target storage amount of the target video file according to the video storage chain;
And according to the target storage amount, allocating a corresponding channel access parameter for the target redundant disk space, and setting a target video channel corresponding to the target redundant disk space to be started.
3. The method for prolonging storage time of video files according to claim 1, wherein after the step of storing the target video file in the target redundant disk space according to the video storage chain and the channel access parameter, the method further comprises:
After receiving the target video file sent by video equipment, acquiring a corresponding video storage chain according to the video equipment;
according to the storage space corresponding to the video storage chain, determining a corresponding target time mark in the storage space;
And calculating the preservation time corresponding to the target time mark, selecting a target storage space with the longest preservation time, and sending the target video file to the target storage space.
4. The method for prolonging storage time of video files according to claim 1, wherein after the step of storing the target video file in the target redundant disk space according to the video storage chain and the channel access parameter, the method further comprises:
Determining the corresponding target redundant disk space and the target video file corresponding to the target redundant disk space according to the video storage chain;
and acquiring the target video file, and splicing the target video file according to the video storage chain to generate a video.
5. The method for prolonging the storage time of video files according to claim 1, wherein the steps of obtaining the video file time marks corresponding to each video channel in the storage space and determining the storage time of the video files of the video channels according to the video file time marks further comprise:
Acquiring a video detection plan and determining a detection time period;
determining the detection time of the video equipment according to the detection time of the historical video equipment and the detection time period;
and executing the step of acquiring the video file time marks corresponding to each video channel in the storage space when the current system time is the detection time of the video equipment, and determining the video file preservation time of the video channel according to the video file time marks.
6. A storage time extension apparatus for video files, the storage time extension apparatus comprising: a memory, a processor and a video file save time extension program stored on the memory and executable on the processor, the video file save time extension program configured to implement the steps of the video file save time extension method of any one of claims 1 to 5.
7. A storage medium, wherein a storage medium has stored thereon a storage-time extension program for video files, the storage-time extension program for video files, when executed by a processor, implementing the steps of the storage-time extension method for video files according to any one of claims 1 to 5.
CN202311826484.0A 2023-12-28 2023-12-28 Method, device and storage medium for prolonging storage time of video file Active CN117472297B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311826484.0A CN117472297B (en) 2023-12-28 2023-12-28 Method, device and storage medium for prolonging storage time of video file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311826484.0A CN117472297B (en) 2023-12-28 2023-12-28 Method, device and storage medium for prolonging storage time of video file

Publications (2)

Publication Number Publication Date
CN117472297A CN117472297A (en) 2024-01-30
CN117472297B true CN117472297B (en) 2024-04-16

Family

ID=89635186

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311826484.0A Active CN117472297B (en) 2023-12-28 2023-12-28 Method, device and storage medium for prolonging storage time of video file

Country Status (1)

Country Link
CN (1) CN117472297B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050046174A (en) * 2003-11-13 2005-05-18 주식회사 디지털앤디지털 Method for copying video record products and personal video recorder which is embodied in it
CN101673192A (en) * 2009-10-26 2010-03-17 北京世纪互联宽带数据中心有限公司 Method for time-sequence data processing, device and system therefor
CN107590032A (en) * 2017-09-06 2018-01-16 郑州云海信息技术有限公司 The method and storage cluster system of storage cluster failure transfer
CN111090617A (en) * 2018-10-23 2020-05-01 中国移动通信有限公司研究院 File management method and device in monitoring system and computer readable storage medium
CN112272291A (en) * 2020-10-28 2021-01-26 重庆紫光华山智安科技有限公司 Video storage method, device, management equipment and readable storage medium
CN116962607A (en) * 2023-06-21 2023-10-27 深圳市天视通技术有限公司 Video data processing method and device, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012147123A1 (en) * 2011-04-26 2012-11-01 Hitachi, Ltd. Storage apparatus and control method therefor

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050046174A (en) * 2003-11-13 2005-05-18 주식회사 디지털앤디지털 Method for copying video record products and personal video recorder which is embodied in it
CN101673192A (en) * 2009-10-26 2010-03-17 北京世纪互联宽带数据中心有限公司 Method for time-sequence data processing, device and system therefor
CN107590032A (en) * 2017-09-06 2018-01-16 郑州云海信息技术有限公司 The method and storage cluster system of storage cluster failure transfer
CN111090617A (en) * 2018-10-23 2020-05-01 中国移动通信有限公司研究院 File management method and device in monitoring system and computer readable storage medium
CN112272291A (en) * 2020-10-28 2021-01-26 重庆紫光华山智安科技有限公司 Video storage method, device, management equipment and readable storage medium
CN116962607A (en) * 2023-06-21 2023-10-27 深圳市天视通技术有限公司 Video data processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN117472297A (en) 2024-01-30

Similar Documents

Publication Publication Date Title
CN107026900B (en) Shooting task allocation method and device
CN109428913B (en) Storage capacity expansion method and device
CN109002259B (en) Hard disk allocation method, system, device and storage medium of homing group
US8825684B2 (en) Arrangement for comparing content identifiers of files
CA2447516A1 (en) Management and synchronization application for network file system
CN109756566B (en) Block chain based data storage method, related equipment and storage medium
US11914565B1 (en) System and method for identifying matching portions of two sets of data in a multiprocessor system
CN104182354B (en) A kind of video management method and device
CN111638995A (en) Metadata backup method, device and equipment and storage medium
CN112311902A (en) File sending method and device based on micro-service
CN117472297B (en) Method, device and storage medium for prolonging storage time of video file
US20210382872A1 (en) Blockchain-based Data Storage Method, Related Device and Storage Medium
CN110780944A (en) Application permission starting method and device and machine-readable storage medium
US20170090820A1 (en) Method and device for operating a many-core system
CN110874182B (en) Processing method, device and equipment for strip index
CN113905092A (en) Method, device, terminal and storage medium for determining reusable agent queue
CN112559115A (en) Method, device and equipment for deleting container mirror image
CN117411987B (en) Drop-out time detection method, drop-out time detection equipment and storage medium for monitoring video
CN111385511A (en) Video data processing method and device and video recording equipment
CN114911668B (en) Data resource monitoring method and system
CN109101187B (en) Method and device for reconstructing data
CN117724801A (en) Container eviction method, container eviction apparatus, and readable storage medium
CN116015936B (en) Security capability arrangement method and device and computer readable storage medium
CN115268801B (en) Backup system and method for block device
CN117520010A (en) Message processing method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant