Video data management method and device, electronic equipment and medium

By employing adaptive compression and dynamic storage cycle management, the problems of increasing data volume and rigid storage strategies in video storage systems have been solved, achieving optimized management of video data and improved resource utilization efficiency.

CN121728264APending Publication Date: 2026-03-24SHENZHEN STARCAM TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-09
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

In existing video storage systems, the increase in video resolution and encoding bitrate leads to an increase in data volume, exacerbates the pressure on storage resources, lacks flexibility in storage strategies, and causes critical videos with high access frequency to be accidentally deleted, while low-value videos occupy space.

Method used

By adaptively compressing the video stream, configuring a dynamic storage period based on the video channel's historical access data and scene tags, and implementing a tiered deletion strategy based on access frequency and expiration status, storage resource allocation is optimized.

Benefits of technology

It effectively reduces the amount of raw data in video streams, enables differentiated storage allocation, avoids accidental deletion of critical videos, and improves the efficiency of storage resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121728264A_ABST
    Figure CN121728264A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a video data management method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining a video code stream from each video channel, and compressing the obtained video code stream; according to the historical access data and the scene label corresponding to each video channel, configuring a dynamic storage period corresponding to each video channel; according to the dynamic storage period corresponding to each video channel, storing the compressed video code stream into a target storage area; detecting the residual storage space of the target storage area; when the residual storage space is smaller than a preset early warning storage threshold value, the target video code stream is deleted according to the access frequency of each video code stream and the dynamic storage period corresponding to each video channel, and according to the scheme, storage resource distribution can be optimized, storage occupation can be reduced, and key videos are prevented from being deleted by mistake.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image storage technology, specifically to a video data management method, apparatus, electronic device, and storage medium. Background Technology

[0002] With the popularization of video surveillance technology, network video recorders (NVRs) and extended video recorders (XVRs) are widely used in various scenarios to receive, store, and manage video streams transmitted from front-end IPCs (IP cameras). Currently, the mainstream storage method for back-end storage devices is to directly store the encoded video streams of each front-end video channel onto the hard drive as is.

[0003] However, with the increasing demand for monitoring, video resolution and encoding bitrate have continued to increase, resulting in a significant increase in the data volume of a single video stream; at the same time, the number of monitoring channels is also increasing, further exacerbating the pressure on storage resources.

[0004] Currently, the storage strategy for videos uses a fixed storage period for all video channels. When the hard drive of the storage device reaches its storage limit, considering the access value and importance of the videos, high-frequency and high-importance videos may be mistakenly deleted, while low-value videos that have not been accessed for a long time still occupy storage space. In other words, the related technologies have problems such as large video storage space occupation, lack of flexibility in storage strategies, and unreasonable deletion mechanisms. Summary of the Invention

[0005] This application provides a video data management method, electronic device, apparatus, and storage medium, which can optimize storage resource allocation, reduce storage usage, and prevent accidental deletion of critical videos.

[0006] In a first aspect, embodiments of this application provide a video data management method, including: Obtain video streams from each video channel and compress the obtained video streams; Configure the dynamic storage period for each video channel based on the historical access data and scene tags corresponding to each video channel; Based on the dynamic storage period corresponding to each video channel, the compressed video stream is stored in the target storage area; Detect the remaining storage space of the target storage area; When the remaining storage space is less than the preset warning storage threshold, the target video stream is deleted based on the access frequency of each video stream and the dynamic storage period corresponding to each video channel.

[0007] Optionally, in some embodiments of this application, configuring the dynamic storage period corresponding to each video channel based on the historical access data and scene tags corresponding to each video channel includes: Determine the scene type corresponding to the scene label; Obtain the access frequency and number of accesses from the historical access data; Configure the dynamic storage period for each video channel based on the scenario type, access frequency, and access count.

[0008] Optionally, in some embodiments of this application, configuring the dynamic storage period corresponding to each video channel according to the scene type, access frequency, and access count includes: If the scene type corresponding to the video channel is the first type, then it is detected whether the access frequency is greater than the preset frequency and whether the number of accesses is greater than the preset number. If the access frequency is greater than the preset frequency and the access count is greater than the preset count, then the dynamic storage period corresponding to the video channel is configured as the first period; If the access frequency is less than or equal to the preset frequency, and / or the number of accesses is less than or equal to the preset number of accesses, then the dynamic storage period corresponding to the video channel is configured as the second period.

[0009] Optionally, in some embodiments of this application, it further includes: If the scene type corresponding to the video channel is the second type, then it is detected whether the access frequency is greater than the preset frequency and whether the number of accesses is greater than the preset number. If the access frequency is greater than the preset frequency and the number of accesses is greater than the preset number of accesses, then the dynamic storage period corresponding to the video channel is configured as the third period. If the access frequency is less than or equal to the preset frequency, and / or the number of accesses is less than or equal to the preset number of accesses, then the dynamic storage period corresponding to the video channel is configured as the fourth period.

[0010] Optionally, in some embodiments of this application, the step of deleting the target video stream based on the access frequency of each video stream and the dynamic storage period corresponding to each video channel when the remaining storage space is less than a preset warning storage threshold includes: When the remaining storage space is less than the preset warning storage threshold, the compressed video stream is sorted based on the dynamic storage period corresponding to each video channel. Based on the access frequency and sorting results of each video stream, the target video stream is determined and deleted from the compressed video stream.

[0011] Optionally, in some embodiments of this application, the step of determining and deleting the target video stream in the compressed video stream based on the access frequency and sorting results of each video stream includes: Based on the sorting results, the video streams to be deleted in the compressed video stream; Based on the access frequency of each video stream, the target video stream to be deleted is determined and deleted.

[0012] Optionally, in some embodiments of this application, the step of determining and deleting the target video stream based on the access frequency of each video stream includes: Based on the expiration time of the video streams to be deleted, the video streams to be deleted are classified into Category 1 streams and Category 2 streams; Delete the first type of bitstream, and; Delete the second type of bitstream whose access frequency is less than the preset value.

[0013] Secondly, embodiments of this application provide a video data management device, including: The compression module is used to acquire video streams from each video channel and compress the acquired video streams. The configuration module is used to configure the dynamic storage period for each video channel based on the historical access data and scene tags corresponding to each video channel. The storage module is used to store the compressed video stream into the target storage area according to the dynamic storage period corresponding to each video channel. The detection module is used to detect the remaining storage space of the target storage area; The deletion module is used to delete the target video stream based on the access frequency of each video stream and the dynamic storage period corresponding to each video channel when the remaining storage space is less than a preset warning storage threshold.

[0014] Accordingly, this application also provides an electronic device, including a memory, a processor, and a processor program stored in the memory and executable on the processor, wherein the processor executes the program as described in any of the methods above.

[0015] This application also provides a storage medium storing a processor program that, when executed by a processor, implements any of the methods described above.

[0016] This application provides a video data management method, apparatus, electronic device, and storage medium. The method involves acquiring video streams from various video channels, compressing the acquired video streams, configuring a dynamic storage period for each video channel based on historical access data and scene tags, storing the compressed video streams in a target storage area according to the dynamic storage period, and then detecting the remaining storage space in the target storage area. If the remaining storage space is less than a preset warning storage threshold, the target video stream is deleted based on the access frequency of each video stream and the dynamic storage period of each video channel. In the video data management scheme provided in this application, adaptive compression reduces the amount of original video stream data, and dynamic storage periods are configured based on scene type and historical access data to achieve differentiated storage allocation. Furthermore, a tiered deletion strategy is implemented by combining expiration status and access frequency, solving the problems of large storage space occupation, rigid storage strategies, and accidental deletion of critical videos in traditional video storage. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart illustrating the video data management method provided in an embodiment of this application; Figure 2 This is a schematic diagram of the structure of the video data management device provided in the embodiments of this application; Figure 3 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0019] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0020] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, components, features, and elements with the same names in different embodiments of this application may have the same meaning or different meanings, the specific meaning of which must be determined by its interpretation in that specific embodiment or further in conjunction with the context of that specific embodiment.

[0021] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0022] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustrative purposes and has no specific meaning in itself. Therefore, "module," "part," or "unit" may be used interchangeably.

[0023] The following describes the embodiments involved in this application in detail. It should be noted that the order of description of the embodiments in this application is not intended to limit the priority of the embodiments.

[0024] This application provides a video data management method, apparatus, storage medium, and smart terminal. Specifically, the video data management method of this application can be executed by a smart terminal or a server, wherein the smart terminal can be a terminal. The terminal can be a smartphone, tablet computer, laptop computer, touch screen, game console, personal computer (PC), personal digital assistant (PDA), or other smart terminal. The terminal may also include a client, which can be a media playback client or a real-time video data management client, etc.

[0025] This application provides a video data management method, which can be executed by an electronic device or a server. This application example illustrates the video data management method executed by an electronic device. The electronic device includes a touchscreen display and a processor. The touchscreen display is used to present a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. When the user operates the GUI through the touchscreen display, the GUI can control the local content of the electronic device in response to the received operation commands, or it can control the content on the server side in response to the received operation commands.

[0026] The video data management solution provided in this application reduces the amount of raw video bitstream data through adaptive compression processing, configures dynamic storage cycles based on scene type and historical access data to achieve differentiated storage allocation, and executes a hierarchical deletion strategy in combination with expiration status and access frequency, thus solving the problems of large space occupation, rigid storage strategies, and easy accidental deletion of critical videos in traditional video storage.

[0027] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the priority of the embodiments.

[0028] A video data management method includes: acquiring video streams from various video channels and compressing the acquired video streams; configuring a dynamic storage period for each video channel based on historical access data and scene tags; storing the compressed video streams into a target storage area according to the dynamic storage period for each video channel; detecting the remaining storage space in the target storage area; and deleting the target video streams based on the access frequency of each video stream and the dynamic storage period for each video channel when the remaining storage space is less than a preset warning storage threshold.

[0029] Please see Figure 1 , Figure 1 This application provides a flowchart illustrating a video data management method. The specific flow of this video data management method is as follows: 101. Obtain video streams from each video channel and compress the obtained video streams.

[0030] Specifically, for storage devices such as NVRs and XVRs, connections are established with multiple front-end devices via a network to receive the raw video streams transmitted from each video channel in real time. Each video channel corresponds to an independent stream of data. The core of adaptive compression processing is to dynamically adjust the compression ratio based on the image complexity of the video frames. Image complexity is determined by calculating the weighted sum of the proportion of edge pixels and the proportion of the area of ​​the moving region in the video frame. For example, when the image complexity is higher than a preset threshold, a low compression ratio (e.g., the compressed bitrate is 60%-70% of the original bitrate) is used for H.265 encoding to ensure the integrity of image details. When the image complexity is lower than or equal to the preset threshold, a high compression ratio (e.g., the compressed bitrate is 30%-40% of the original bitrate) is used for H.265 encoding to reduce the amount of data without affecting the identification of key information. During the compression process, complete I-frame data is always retained, and the bitrate is only adjusted for P-frames and B-frames according to the compression ratio to ensure basic continuity during video playback.

[0031] Image complexity is a quantitative indicator that measures the richness of detail and the degree of dynamic change in a single frame of video. It can be calculated by the proportion of edge pixels or the proportion of moving areas. For example, edge pixels in a video frame can be identified by edge detection algorithms (such as the Canny algorithm), and the number of edge pixels ÷ the total number of pixels in the video frame = the proportion of edge pixels. The more edge pixels there are, the richer the image details and the higher the complexity. Alternatively, the difference between the current frame and the previous frame (i.e., the area where the moving target is located) can be identified by inter-frame difference methods or optical flow methods. The ratio between the area of ​​the moving area and the total area of ​​the video frame is the proportion of the moving area. The larger the proportion of the moving area, the more intense the dynamic changes in the image (such as crowd movement or vehicle movement), and the higher the complexity.

[0032] 102. Configure the dynamic storage period for each video channel based on the historical access data and scene tags corresponding to each video channel.

[0033] Specifically, the statistical period for historical access data can be set to 90 days, extracted from the device log system, including the total number of valid accesses and the average daily access frequency within 90 days. Scene tags are obtained through both manual and automatic labeling. Manual labeling is done by the user through the device management interface, with options for core monitoring scenes and general monitoring scenes. Automatic labeling utilizes the device's built-in scene recognition model, which uses image recognition technology to detect key targets in the video feed. If entrances / exits, safes, or critical production equipment are detected, they are automatically labeled as Type 1; if office areas, non-critical corridors, or vacant rooms are detected, they are automatically labeled as Type 2. Furthermore, scene tags support dynamic updates. When the device detects continuous changes in the video channel's content, it sends an update reminder to the user, and the tag update is completed after user confirmation.

[0034] Optionally, in some embodiments of this application, the step "configuring the dynamic storage period corresponding to each video channel based on the historical access data and scene tags corresponding to each video channel" may specifically include: Determine the scene type corresponding to the scene label; Obtain the access frequency and number of accesses from the historical access data; Configure the dynamic storage period for each video channel based on the scenario type, access frequency, and access count.

[0035] For example, specifically, for the first type, it is detected whether the access frequency of the current channel is greater than a preset frequency and whether the number of accesses is greater than a preset number; if both conditions are met, the dynamic storage period is configured as the first period, such as configuring the dynamic storage period as 180 days; if either condition is not met, the dynamic storage period is configured as the second period, such as 60 days. That is, optionally, in some embodiments of this application, the step "configure the dynamic storage period corresponding to each video channel according to the scenario type, access frequency and access number" may specifically include: If the scene type corresponding to the video channel is the first type, then it is detected whether the access frequency is greater than the preset frequency and whether the number of accesses is greater than the preset number. If the access frequency is greater than the preset frequency and the access count is greater than the preset count, then the dynamic storage period corresponding to the video channel is configured as the first period; If the access frequency is less than or equal to the preset frequency, and / or the number of accesses is less than or equal to the preset number of accesses, then the dynamic storage period corresponding to the video channel is configured as the second period.

[0036] For the second type, check whether the access frequency of the current channel is preset and whether the number of accesses is greater than the preset number. If both conditions are met, configure the dynamic storage period to the third period, such as 50 days; if either condition is not met, configure the dynamic storage period to the fourth period, such as 20 days.

[0037] Optionally, in some embodiments of this application, it further includes: If the scene type corresponding to the video channel is the second type, then it is detected whether the access frequency is greater than the preset frequency and whether the number of accesses is greater than the preset number. If the access frequency is greater than the preset frequency and the number of accesses is greater than the preset number of accesses, then the dynamic storage period corresponding to the video channel is configured as the third period. If the access frequency is less than or equal to the preset frequency, and / or the number of accesses is less than or equal to the preset number of accesses, then the dynamic storage period corresponding to the video channel is configured as the fourth period.

[0038] 103. Based on the dynamic storage period corresponding to each video channel, store the compressed video stream into the target storage area.

[0039] Specifically, the target storage area includes local hard drive arrays and cloud storage nodes. A storage strategy that prioritizes local storage and supplements it with cloud backup can be adopted. For example, the first type of video stream is stored simultaneously on both the local hard drive array and the cloud storage nodes. Local storage uses RAID5 redundancy backup, while cloud storage uses off-site multi-node backup. The second type of video stream is stored only on the local hard drive array, using a RAID0+1 combination backup, which saves cloud resources while ensuring basic reliability. During the storage process, a storage ledger is established for each stream, recording information such as channel identifier, storage start time, dynamic storage period, compression ratio, and storage location for easy subsequent management and retrieval.

[0040] 104. Detect the remaining storage space of the target storage area.

[0041] Specifically, the total capacity, used capacity, and remaining capacity data of the target storage area can be collected every 5 minutes. By calculating the remaining capacity against the total capacity, the percentage of remaining storage space can be obtained.

[0042] Furthermore, if the preset warning storage threshold is set to 15% of the total capacity, that is, when the remaining storage space is less than 15%, it is determined that the storage resources are tight, and step 105 is executed; if the percentage is greater than or equal to 15%, the normal storage status is maintained.

[0043] 105. When the remaining storage space is less than the preset warning storage threshold, the target video stream is deleted according to the access frequency of each video stream and the dynamic storage period corresponding to each video channel.

[0044] For example, specifically, when the remaining storage space is less than a preset warning storage threshold, the video streams are sorted by dynamic storage period from shortest to longest for testing purposes. Then, based on the access frequency of each video stream and the sorting result, the target video stream is deleted. That is, optionally, in some embodiments of this application, the step "when the remaining storage space is less than the preset warning storage threshold, the target video stream is deleted based on the access frequency of each video stream and the dynamic storage period corresponding to each video channel" may specifically include: When the remaining storage space is less than the preset warning storage threshold, the compressed video stream is sorted based on the dynamic storage period corresponding to each video channel. Based on the access frequency and sorting results of each video stream, the target video stream is determined and deleted from the compressed video stream.

[0045] Specifically, in the compressed video stream, identify the video streams that are about to expire and need to be deleted, i.e., video streams whose expiration time is less than or equal to the current time, and video streams whose expiration time exceeds the current time within a preset time range. Then, determine the target video stream from the video streams to be deleted based on the access frequency, and delete the target video stream. That is, optionally, in some embodiments of this application, the step "determine and delete the target video stream in the compressed video stream based on the access frequency and sorting results of each video stream" may specifically include: Based on the sorting results, the video streams to be deleted in the compressed video stream; Based on the access frequency of each video stream, the target video stream to be deleted is determined and deleted.

[0046] Specifically, all bitstreams are divided into two categories: the first category is expired bitstreams (i.e., expiration time ≤ current time), and the second category is unexpired bitstreams (expiration time > current time). All bitstreams in the first category are deleted. For the second category of bitstreams, the second category of video bitstreams to be deleted is determined based on their corresponding access frequency. For example, the second category of bitstreams with an access frequency less than a preset value. Optionally, in some embodiments of this application, the step "determining and deleting target video bitstreams in the video bitstreams to be deleted based on the access frequency of each video bitstream" may specifically include: Based on the expiration time of the video streams to be deleted, the video streams to be deleted are classified into Category 1 streams and Category 2 streams; Delete the first type of bitstream, and; Delete the second type of bitstream whose access frequency is less than the preset value.

[0047] For the first type of bitstream, direct deletion can be implemented. After deleting the first type of bitstream, in some embodiments of this application, it can be detected whether the remaining storage space is greater than or equal to a preset warning threshold. If the remaining storage space is greater than or equal to the preset warning threshold, the current process is terminated. If the remaining storage space is less than the preset warning threshold, the second type of bitstream with an access frequency less than a preset value is deleted. Of course, in some embodiments of this application, the second type of bitstream with an access frequency less than a preset value can also be deleted simultaneously when deleting the first type of bitstream.

[0048] The video data management method provided in this application obtains video streams from various video channels, compresses the obtained video streams, configures the dynamic storage period for each video channel based on historical access data and scene tags, then stores the compressed video streams in a target storage area according to the dynamic storage period for each video channel, and then detects the remaining storage space in the target storage area. When the remaining storage space is less than a preset warning storage threshold, the target video stream is deleted based on the access frequency of each video stream and the dynamic storage period for each video channel. In the video data management scheme provided in this application, the amount of original video stream data is reduced through adaptive compression processing, and the dynamic storage period is configured based on scene type and historical access data to achieve differentiated storage allocation. Combined with the expiration status and access frequency, a hierarchical deletion strategy is executed, which solves the problems of large space occupation, rigid storage strategy, and easy accidental deletion of key videos in traditional video storage.

[0049] To facilitate better implementation of the video data management method of this application embodiment, this application embodiment also provides a video data management device. The meanings of the terms used are the same as in the video data management system described above, and specific implementation details can be found in the description of the system embodiment.

[0050] Please see Figure 2 , Figure 2 This is a schematic diagram of the structure of a video data management device provided in an embodiment of this application. Specifically, the video data management device may include a compression module 201, a configuration module 202, a storage module 203, a detection module 204, and a deletion module 205, as follows: Compression module 201 is used to obtain video streams from each video channel and compress the obtained video streams; Configuration module 202 is used to configure the dynamic storage period corresponding to each video channel based on the historical access data and scene tags corresponding to each video channel; Storage module 203 is used to store the compressed video bitstream into the target storage area according to the dynamic storage period corresponding to each video channel; Detection module 204 is used to detect the remaining storage space of the target storage area; The deletion module 205 is used to delete the target video stream based on the access frequency of each video stream and the dynamic storage period corresponding to each video channel when the remaining storage space is less than a preset warning storage threshold.

[0051] Optionally, in some embodiments of this application, the configuration module 202 may specifically be used for: Determine the scene type corresponding to the scene label; Obtain the access frequency and number of accesses from the historical access data; Configure the dynamic storage period for each video channel based on the scenario type, access frequency, and access count.

[0052] Optionally, in some embodiments of this application, the configuration module 202 may specifically be used for: If the scene type corresponding to the video channel is the first type, then it is detected whether the access frequency is greater than the preset frequency and whether the number of accesses is greater than the preset number. If the access frequency is greater than the preset frequency and the access count is greater than the preset count, then the dynamic storage period corresponding to the video channel is configured as the first period; If the access frequency is less than or equal to the preset frequency, and / or the number of accesses is less than or equal to the preset number of accesses, then the dynamic storage period corresponding to the video channel is configured as the second period.

[0053] Optionally, in some embodiments of this application, the configuration module 202 may also be used for: If the scene type corresponding to the video channel is the second type, then it is detected whether the access frequency is greater than the preset frequency and whether the number of accesses is greater than the preset number. If the access frequency is greater than the preset frequency and the number of accesses is greater than the preset number of accesses, then the dynamic storage period corresponding to the video channel is configured as the third period. If the access frequency is less than or equal to the preset frequency, and / or the number of accesses is less than or equal to the preset number of accesses, then the dynamic storage period corresponding to the video channel is configured as the fourth period.

[0054] Optionally, in some embodiments of this application, the deletion module 205 may specifically be used for: When the remaining storage space is less than the preset warning storage threshold, the compressed video stream is sorted based on the dynamic storage period corresponding to each video channel. Based on the access frequency and sorting results of each video stream, the target video stream is determined and deleted from the compressed video stream.

[0055] Optionally, in some embodiments of this application, the deletion module 205 may specifically be used for: Based on the sorting results, the video streams to be deleted in the compressed video stream; Based on the access frequency of each video stream, the target video stream to be deleted is determined and deleted.

[0056] Optionally, in some embodiments of this application, the deletion module 205 may specifically be used for: Based on the expiration time of the video streams to be deleted, the video streams to be deleted are classified into Category 1 streams and Category 2 streams; Delete the first type of bitstream, and; Delete the second type of bitstream whose access frequency is less than the preset value.

[0057] This application provides a video data management device. A compression module 201 acquires video streams from various video channels and compresses them. A configuration module 202 configures the dynamic storage period for each video channel based on historical access data and scene tags. Then, a storage module 203 stores the compressed video streams into a target storage area based on the dynamic storage period. Next, a detection module 204 detects the remaining storage space in the target storage area. When the remaining storage space is less than a preset warning storage threshold, a deletion module 205 deletes the target video stream based on the access frequency of each video stream and the dynamic storage period. In the video data management solution provided in this application, adaptive compression reduces the amount of original video stream data. Dynamic storage periods are configured based on scene type and historical access data to achieve differentiated storage allocation. Combined with expiration status and access frequency, a tiered deletion strategy is implemented, solving the problems of large storage space requirements, rigid storage strategies, and accidental deletion of critical videos in traditional video storage. Furthermore, embodiments of this application also provide an electronic device, such as... Figure 3 As shown, it illustrates a structural schematic diagram of the electronic device involved in the embodiments of this application, specifically: The electronic device may include components such as a processor 301 with one or more processing cores, a memory 302 with one or more processor-readable storage media, a power supply 303, and an input unit 304. Those skilled in the art will understand that... Figure 3 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein: The processor 301 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 302, and by calling data stored in the memory 302, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. Optionally, the processor 301 may include one or more processing cores; preferably, the processor 301 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, while the modem processor mainly handles wireless video data management. It is understood that the modem processor may not be integrated into the processor 301.

[0058] The memory 302 can be used to store software programs and modules. The processor 301 executes various functional applications and video data management methods by running the software programs and modules stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 302 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 302 may also include a memory controller to provide the processor 301 with access to the memory 302.

[0059] The electronic device also includes a power supply 303 that supplies power to various components. Preferably, the power supply 303 can be logically connected to the processor 301 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 303 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0060] The electronic device may also include an input unit 304, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0061] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 301 in the electronic device loads the executable files corresponding to the processes of one or more applications into the memory 302 according to the following instructions, and the processor 301 runs the applications stored in the memory 302 to realize various functions, as follows: Video streams are acquired from each video channel and compressed. Based on historical access data and scene tags corresponding to each video channel, a dynamic storage period is configured for each video channel. The compressed video streams are stored in the target storage area according to the dynamic storage period for each video channel. The remaining storage space in the target storage area is detected. When the remaining storage space is less than a preset warning storage threshold, the target video stream is deleted based on the access frequency of each video stream and the dynamic storage period for each video channel.

[0062] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0063] This application embodiment obtains video streams from each video channel, compresses the obtained video streams, configures the dynamic storage period for each video channel based on the historical access data and scene tags corresponding to each video channel, and then stores the compressed video streams into the target storage area according to the dynamic storage period for each video channel. Next, it detects the remaining storage space in the target storage area. When the remaining storage space is less than a preset warning storage threshold, the target video stream is deleted based on the access frequency of each video stream and the dynamic storage period corresponding to each video channel. In the video data management scheme provided in this application, adaptive compression reduces the amount of original video stream data, and dynamic storage periods are configured based on scene type and historical access data to achieve differentiated storage allocation. Combined with expiration status and access frequency, a tiered deletion strategy is executed, solving the problems of large space occupation, rigid storage strategies, and accidental deletion of critical videos in traditional video storage.

[0064] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a processor-readable storage medium and loaded and executed by a processor.

[0065] Therefore, embodiments of this application provide a storage medium storing a plurality of instructions that can be loaded by a processor to execute steps in any of the video data management methods provided in embodiments of this application. For example, the instructions can execute the following steps: Video streams are acquired from each video channel and compressed. Based on historical access data and scene tags corresponding to each video channel, a dynamic storage period is configured for each video channel. The compressed video streams are stored in the target storage area according to the dynamic storage period for each video channel. The remaining storage space in the target storage area is detected. When the remaining storage space is less than a preset warning storage threshold, the target video stream is deleted based on the access frequency of each video stream and the dynamic storage period for each video channel.

[0066] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0067] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0068] Since the instructions stored in the storage medium can execute the steps of any of the video data management methods provided in the embodiments of this application, the beneficial effects that any of the video data management methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.

[0069] The foregoing has provided a detailed description of a video data management method, apparatus, electronic device, and storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A video data management method, characterized in that, include: Obtain video streams from each video channel and compress the obtained video streams; Configure the dynamic storage period for each video channel based on the historical access data and scene tags corresponding to each video channel; Based on the dynamic storage period corresponding to each video channel, the compressed video stream is stored in the target storage area; Detect the remaining storage space of the target storage area; When the remaining storage space is less than the preset warning storage threshold, the target video stream is deleted based on the access frequency of each video stream and the dynamic storage period corresponding to each video channel.

2. The video data management method according to claim 1, characterized in that, The step of configuring the dynamic storage period for each video channel based on the historical access data and scene tags corresponding to each video channel includes: Determine the scene type corresponding to the scene label; Obtain the access frequency and number of accesses from the historical access data; Configure the dynamic storage period for each video channel based on the scenario type, access frequency, and access count.

3. The video data management method according to claim 2, characterized in that, The step of configuring the dynamic storage period corresponding to each video channel based on the scene type, access frequency, and access count includes: If the scene type corresponding to the video channel is the first type, then it is detected whether the access frequency is greater than the preset frequency and whether the number of accesses is greater than the preset number. If the access frequency is greater than the preset frequency and the access count is greater than the preset count, then the dynamic storage period corresponding to the video channel is configured as the first period; If the access frequency is less than or equal to the preset frequency, and / or the number of accesses is less than or equal to the preset number of accesses, then the dynamic storage period corresponding to the video channel is configured as the second period.

4. The video data management method according to claim 3, characterized in that, Also includes: If the scene type corresponding to the video channel is the second type, then it is detected whether the access frequency is greater than the preset frequency and whether the number of accesses is greater than the preset number. If the access frequency is greater than the preset frequency and the number of accesses is greater than the preset number of accesses, then the dynamic storage period corresponding to the video channel is configured as the third period. If the access frequency is less than or equal to the preset frequency, and / or the number of accesses is less than or equal to the preset number of accesses, then the dynamic storage period corresponding to the video channel is configured as the fourth period.

5. The video data management method according to claim 1, characterized in that, When the remaining storage space is less than a preset warning storage threshold, the target video stream is deleted based on the access frequency of each video stream and the dynamic storage period corresponding to each video channel, including: When the remaining storage space is less than the preset warning storage threshold, the compressed video stream is sorted based on the dynamic storage period corresponding to each video channel. Based on the access frequency and sorting results of each video stream, the target video stream is determined and deleted from the compressed video stream.

6. The video data management method according to claim 5, characterized in that, The step of determining and deleting target video streams from the compressed video streams based on the access frequency and sorting results of each video stream includes: Based on the sorting results, the video streams to be deleted in the compressed video stream; Based on the access frequency of each video stream, the target video stream to be deleted is determined and deleted.

7. The video data management method according to claim 6, characterized in that, The process of determining and deleting the target video stream based on the access frequency of each video stream includes: Based on the expiration time of the video streams to be deleted, the video streams to be deleted are classified into Category 1 streams and Category 2 streams; Delete the first type of bitstream, and; Delete the second type of bitstream whose access frequency is less than the preset value.

8. A video data management device, characterized in that, include: The compression module is used to acquire video streams from each video channel and compress the acquired video streams. The configuration module is used to configure the dynamic storage period for each video channel based on the historical access data and scene tags corresponding to each video channel. The storage module is used to store the compressed video stream into the target storage area according to the dynamic storage period corresponding to each video channel. The detection module is used to detect the remaining storage space of the target storage area; The deletion module is used to delete the target video stream based on the access frequency of each video stream and the dynamic storage period corresponding to each video channel when the remaining storage space is less than a preset warning storage threshold.

9. An electronic device, characterized in that, include: A memory, a processor, and a processor program stored in the memory and executable on the processor, wherein the processor executes the program as steps of the video data management method as described in any one of claims 1 to 7.

10. A storage medium, characterized in that, The computer processing program is stored and can be loaded by a processor to execute the video data management method as described in any one of claims 1 to 7.