CN117241057A - Data storage method, video system, device, medium, product and storage system - Google Patents
Data storage method, video system, device, medium, product and storage system Download PDFInfo
- Publication number
- CN117241057A CN117241057A CN202311164878.4A CN202311164878A CN117241057A CN 117241057 A CN117241057 A CN 117241057A CN 202311164878 A CN202311164878 A CN 202311164878A CN 117241057 A CN117241057 A CN 117241057A
- Authority
- CN
- China
- Prior art keywords
- video
- video data
- transfer
- data
- storage
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 64
- 238000013500 data storage Methods 0.000 title claims abstract description 39
- 238000012546 transfer Methods 0.000 claims abstract description 178
- 238000012545 processing Methods 0.000 claims abstract description 55
- 230000008859 change Effects 0.000 claims description 18
- 230000000007 visual effect Effects 0.000 claims description 12
- 230000000593 degrading effect Effects 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 15
- 230000009467 reduction Effects 0.000 description 15
- 230000006835 compression Effects 0.000 description 12
- 238000007906 compression Methods 0.000 description 12
- 230000007774 longterm Effects 0.000 description 7
- 230000008901 benefit Effects 0.000 description 4
- 238000012217 deletion Methods 0.000 description 4
- 230000037430 deletion Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 238000013473 artificial intelligence Methods 0.000 description 3
- 230000007246 mechanism Effects 0.000 description 3
- 230000002035 prolonged effect Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000005856 abnormality Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 238000011946 reduction process Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the application provides a data storage method, a video system, equipment, a medium, a product and a storage system. The method comprises the following steps: determining first video data and a dump condition; when the first video data meets the transfer condition, determining a corresponding transfer rule according to the transfer times of the first video data; and storing second video data obtained after the first video data is processed according to the transfer rule into a designated transfer space. According to the scheme, according to the storage duration and/or the storage space occupation size of the video data, the first video data meeting certain transfer conditions are processed according to the transfer rules, the second video data obtained after the processing occupies smaller storage space, more storage space is released, and meanwhile the requirement for long-time storage of the historical video data is met.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data storage method, a video system, a device, a medium, a product, and a storage system.
Background
Existing video data is stored using overlay mechanisms. For example, when data is saved for 7 days, video data of day 1 is overwritten (or data of day 8 is written after deletion) by day 8, resulting in loss of video data of day 1. If the storage time is required to be prolonged, the storage space must be increased, resulting in increased storage costs.
Since video data has an important role in restoring facts, when data is covered because of a long time, the facts at that time cannot be restored; if the video storage time is prolonged, the storage space needs to be increased, resulting in increased storage cost. Making it difficult to have a reasonable balance between extending the duration of video data storage and the cost of data storage.
Disclosure of Invention
In order to solve or improve the problems in the prior art, embodiments of the present application provide a data storage method, a video system, an apparatus, a medium, a product, and a storage system.
In a first aspect, in one embodiment of the present application, a data storage method is provided. Applied to a storage device, the method comprises:
determining first video data and a dump condition;
when the first video data meets the transfer condition, determining a corresponding transfer rule according to the transfer times of the first video data;
And storing second video data obtained after the first video data is processed according to the transfer rule into a designated transfer space.
Optionally, the dump condition includes:
when the data size of the first video data exceeds a storage space threshold value; and/or the number of the groups of groups,
and when the time length of the first video data exceeds a time length threshold value.
Optionally, the dump rule includes:
reducing a frame rate for the first video data; and/or the number of the groups of groups,
reducing resolution of the first video data; and/or the number of the groups of groups,
intercepting a specific frame picture from the first video data; and/or the number of the groups of groups,
intercepting a specific frame picture for the first video data to reduce resolution; and/or the number of the groups of groups,
clipping a particular frame picture to the first video data or the first video data reduces a color range.
Optionally, the processing the first video data according to the transfer rule includes:
processing the first video data conforming to the specific time period or except the specific time period according to the transfer rule; and/or the number of the groups of groups,
and processing the first video data meeting the specific conditions or except the first video data meeting the specific conditions according to the dump rule.
Optionally, the processing according to the dump rule for the first video data meeting the specific condition or other than meeting the specific condition includes:
Selectively discarding or selectively reducing resolution for a plurality of video frames containing a target object if the target object is identified in the plurality of video frames; and/or the number of the groups of groups,
if a change in the content of the video frames is identified in the continuous video frames, selectively discarding or selectively reducing the resolution of the unchanged video frames.
Optionally, if a target object is identified in the plurality of video frames, selectively reducing resolution for the plurality of video frames containing the target object includes:
splitting the first video data into a plurality of video files if the target object is identified in the plurality of video frames;
and maintaining the original resolution of video files containing the clear characteristics of the target object in the plurality of video files, and reducing the resolution of the rest video files in the plurality of video files.
Optionally, if a change in the content of the video frame is identified in the continuous video frames, selectively reducing the resolution of the unchanged plurality of video frames includes:
splitting the first video data into a plurality of video files if a change in video content is identified in the continuous video frames;
and maintaining the original resolution of the video files with the content changed in the plurality of video files, and reducing the resolution of the rest video files in the plurality of video files.
Optionally, the storing the second video data obtained after processing the first video data according to the transfer rule in a designated transfer space includes:
if the first video data are stored in the original storage space, processing the first video data according to the transfer rule to obtain second video data;
storing the second video data to a designated dump space; the original storage space and the designated dump space are in a top-bottom relationship.
Optionally, the relationship between the original storage space and the specified dump space includes: at least one of a linear relationship, a tree relationship, and a pattern relationship.
In a second aspect, in one embodiment of the present application, there is provided a data storage method, the method comprising:
determining a plurality of first video data provided by a plurality of video acquisition devices, and storing the plurality of first video data by adopting different transfer rules according to the similarity of the plurality of first video data;
when the plurality of first video data meet the transfer condition, respectively determining corresponding transfer rules according to the transfer times of the plurality of first video data;
And respectively storing a plurality of second video data obtained after the plurality of first video data are processed according to the transfer rule into a designated transfer space.
In a third aspect, in one embodiment of the present application, there is provided a video system comprising:
the video acquisition device is used for continuously acquiring video data, wherein the video data comprises acquired first video data;
a data storage device for determining first video data and a dump condition; when the first video data meets the transfer condition, determining a corresponding transfer rule according to the transfer times of the first video data; and storing second video data obtained after the first video data is processed according to the transfer rule into a designated transfer space.
In a fourth aspect, in one embodiment of the application, an electronic device is provided that includes a memory and a processor; wherein,
the memory is used for storing programs;
the processor is coupled to the memory for executing the program stored in the memory for implementing the method according to the first aspect or for implementing the method according to the second aspect.
In a fifth aspect, in one embodiment of the application, a non-transitory machine-readable storage medium having stored thereon executable code, which when executed by a processor of an electronic device, causes the processor to perform the data storage method of the first aspect, or the data storage method of the second aspect.
In a sixth aspect, in one embodiment of the present application, there is provided a computer product for performing the data storage method of the first aspect, or the data storage method of the second aspect.
In a seventh aspect, in one embodiment of the present application, there is provided a storage system for performing the data storage method of the first aspect, or the data storage method of the second aspect.
According to the technical scheme provided by the embodiment of the application, the first video data and the transfer condition are determined; when the first video data meets the transfer condition, determining a corresponding transfer rule according to the transfer times of the first video data; and storing second video data obtained after the first video data is processed according to the transfer rule into a designated transfer space. According to the scheme, according to the storage duration and/or the storage space occupation size of the video data, the first video data meeting certain transfer conditions are processed according to the transfer rules, the second video data obtained after the processing occupies smaller storage space, more storage space is released, and meanwhile the requirement for long-time storage of the historical video data is met.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a data storage method according to an embodiment of the present application;
FIG. 2a is a schematic diagram of an exemplary memory space structure according to the present application;
FIG. 2b is a schematic diagram illustrating a video data storage mode according to an embodiment of the present application;
FIG. 3 is a schematic diagram of another video data store according to an embodiment of the present application;
FIG. 4 is a schematic diagram of yet another video data store according to an embodiment of the present application;
FIGS. 5a, 5b, and 5c are schematic diagrams illustrating a memory space relationship according to embodiments of the present application;
FIG. 6 is a flowchart illustrating another data storage method according to an embodiment of the present application;
FIG. 7a is a schematic diagram of a data storage device according to an embodiment of the present application;
FIG. 7b is a schematic diagram illustrating another data storage device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
In order to enable those skilled in the art to better understand the present application, the following description will make clear and complete descriptions of the technical solutions according to the embodiments of the present application with reference to the accompanying drawings.
Detailed Description
In the prior art, storage of video data employs an overlay mechanism. For example, when data is saved for 7 days, video data of day 1 is overwritten (or data of day 8 is written after deletion) by day 8, resulting in loss of video data of day 1. If the storage time is to be prolonged, the storage space must be increased, resulting in increased storage costs. It should be noted that the overlay storage mechanism includes local storage or remote storage. Local storage is the storage of data local to a video device, such as a DVR (Digital Video Recorder, i.e., digital video recorder, commonly referred to as a digital hard disk recorder); remote storage is to store data in a server-side manner, etc., such as NVR (Network Video Recorder, i.e., network video recorder, or network hard disk recorder), NVS, VCS, VCN, etc. If the storage area is set to store data only for 7 days, when the storage area is set to 8 days, the data on 1 day is deleted (or overwritten), the data on 8 days is written, the data on 9 days is deleted (or overwritten) the data on 2 days, and so on. This results in data stored only for approximately 7 days, and theoretically, data before 7 days cannot be stored. It should be noted that, the data that cannot be stored for more than 7 days belongs to theoretical reasoning, and in fact, some video data that is not overwritten may be recovered by means of data recovery.
In addition, existing video data storage techniques also suffer from long-term free storage space. That is, a part of the storage space is selected for circularly storing video data, and another part of the storage space is free space, which is not always used effectively, for example, space insufficient for storing a whole day (or hour), because the storage (coverage) period of some videos generally has a unit of a file size corresponding to a fixed time (for example, 1 day, 1 hour, etc.), and is specifically shown as 1 video file stored for 1 day, or 1 video file stored for 1 hour, etc., which is insufficient for storing space in the period as long-term free space.
Existing video data storage techniques primarily pursue the visual experience when storing video data. For example, the frame rate of video is typically 25FPS or 30FPS to achieve a smooth visual effect; resolution is typically 1080P, etc., to achieve a clear visual effect that enables display of details (e.g., to achieve display of texture details of skin, items, etc.). However, for video data for restoring facts, smooth or clear video is not required (or relied upon) and the goal of restoring facts can be achieved.
Therefore, there is a need for a scheme that can store more video data for a longer period of time without taking up more storage space.
The technical scheme of the application is explained below with reference to specific embodiments.
Fig. 1 is a flow chart of a data storage method according to an embodiment of the present application. The execution subject of the method may be a storage device in a video system, may be a local storage device, a cloud storage device, or the local storage device and the cloud storage device together store. From fig. 1, it can be seen that the method specifically comprises the following steps:
step 101: first video data and a dump condition are determined.
Step 102: when the first video data meets the transfer condition, determining a corresponding transfer rule according to the transfer times of the first video data.
Step 103: and storing second video data obtained after the first video data is processed according to the transfer rule into a designated transfer space.
It should be noted that, the first video data may be video data acquired by the video acquisition device, where the video data is original, up to date and not processed by the dump rule, for example, camera data is stored in the form of a video file; or video header data is stored in the device memory; or camera data stored in the server. The video data may be video data obtained after at least one transfer rule processing. The more times the video data is processed by the transfer rule, the smaller the video data is compressed, in other words, the smaller the storage space occupied by the video data after being processed by the transfer rule for a plurality of times. If the first video data is the original video data, the first video data is stored in the original storage space, and if the first video data is the video data subjected to at least one transfer processing, the first video data is stored in the corresponding storage space except the original storage space. In the following embodiments, the first video data is exemplified as the original video data.
Fig. 2a is a schematic diagram of a memory space structure according to an exemplary embodiment of the present application. As can be seen from fig. 2a, in the video storage system, the storage device may store multiple sets of video data at the same time, where the first video data (video data from the 8 th to 13 th days in fig. 2 a) is stored in the original storage space, and then is a hierarchical storage area, where the hierarchical storage area may be a part of the space divided from the original storage space, may be the remaining storage space in the storage device, or may be the storage space of another storage medium (for example, a cloud storage device). It can be seen directly from fig. 2a that the hierarchical storage area, in which the second video data after the compression processing of the transfer rule is stored (i.e., from 1 st to 7 th days in fig. 2a, whose original video has been deleted in the original storage space), occupies a significantly smaller storage space than the original storage space (corresponding to the size of the storage space of one of the days), ensures the integrity of the video data (the video data of 1 st to 13 th days can be continuously stored) while reducing the occupation of the storage space after the transfer processing. It should be noted that, in the storage device (including the local device, the cloud storage device, the server, etc.), when the storage space is allocated, the original storage space may be larger than the transfer storage space, or the original storage space may be smaller than the transfer storage space, and of course, the sizes of the two storage spaces may be dynamically adjusted according to the actual application requirements.
In practical applications, the number of the dump spaces may be large, and the number of video data stored in the storage device at the same time may be large. For example, the first video data, the second video data, the third video data … … nth video data may be stored simultaneously. The second video data is video data obtained by processing the first video data according to a corresponding transfer rule, and a first transfer space (namely a designated transfer space) occupied by the second video data is smaller than an original storage space occupied by the first video data. The third video data is the video data obtained by processing the second video data according to the corresponding transfer rule, and the second storage space occupied by the third video data is smaller than the first transfer space occupied by the second video data. Similarly, video data subjected to repeated transfer processing according to different transfer rules can be continuously stored.
The storage space corresponding to each video data is: original storage space, first spool space (i.e., designated spool space), third spool space … … nth spool space. As described above, the first video data is processed by different transfer rules and then stored in the first transfer space, the second transfer space, and the nth transfer space of the third transfer space … …. When the first video data is transferred (e.g., transferred to the first transfer space), the original storage space originally occupied by the first video data is released (e.g., the transferred original file is deleted), so as to store the video data newly collected by the video device. Similarly, at a certain moment, the video data in the original storage space, the first transfer space, the second transfer space, the third transfer space and the nth transfer space have time continuity.
For example, fig. 2b is a schematic diagram illustrating a video data storage manner according to an embodiment of the present application. As can be seen from fig. 2b, the storage spaces are grouped and classified, and each group of the original storage spaces is capable of storing video data of 7 days, wherein the data of the first 6 days are normally stored, and the first transfer space (i.e., the primary storage area) of the last day (i.e., the 7 th day) is used for storing video data of 6 days after the first transfer rule processing and the remaining second storage space (i.e., the secondary storage area) in which video data of 6 days after the second transfer rule processing is stored. If the memory space has N levels, the memory is stored in such a push line. The video data stored in the different levels of storage areas have time continuity, thereby better meeting the user's demand of retrieving video data over a larger time range.
By the method, in a limited storage space, video data are grouped according to time sequence (each group is a video file or picture within a period of time) and are subjected to compression processing according to a dumping rule, and video data or parameters related to pursuing visual effects, which do not influence the realization capability of restoring facts, are discarded or reduced, so that the video data after compression processing occupy smaller storage space. Video data or video frame pictures of more duration are stored in the limited storage space.
In one or more embodiments of the present application, when the first video data is data that is not processed by a dump rule, the dump condition includes: when the data size of the first video data exceeds a storage space threshold value; and/or when the time length of the first video data exceeds a time length threshold.
In practical application, different transfer conditions can be set according to the needs. For example, a storage space threshold (e.g., a 2G storage space threshold) may be set, and when the size of the occupied storage space of the collected first video data exceeds 2G, it indicates that compression processing is required according to the dump rule. If the single video file size is 2G, then specifically: before 2G video data is deleted (or before being covered), the video data content is read, the video data is compressed according to a specified transfer rule, and then the processed video data is stored in other smaller specified transfer spaces (the specified storage spaces can be part of the 2G storage space or other storage spaces different from the 2G storage space), so that the 2G storage space occupied at present is released for storing the latest acquired video data.
If a plurality of video files are stored in a space with 2G in the folder space, the deletion or the overlay task is not performed on the 2G space as a whole at one time when the video files are overlaid, but the video files are deleted or overlaid by taking the video files as a minimum management unit. Firstly, the earliest stored video file (single or multiple video files) is read, video data of the video file are compressed according to a specified transfer rule, then the processed video data are stored in other smaller specified transfer spaces (the specified storage spaces can be part of 2G storage middle or other storage spaces different from the 2G storage space), and the storage space occupied by the current video file is released for storing the latest acquired video data.
In the case of storing and managing video files, the video file(s) are usually used as the smallest unit (or video slice file), that is, the storing and transferring tasks are performed by using one video file as a whole. A video file is stored and compressed in the form of video data. In addition, a time period threshold may be set as needed. For example, when the duration threshold is set to 6 days, after the video device collects the video data on the 6 th day, because the previous data (such as the data on the 1 st day) is to be covered (or deleted), the occupied previous data storage space is released for storing the newly collected video data (such as the 7 th day). The video data needs to be compressed according to the dump rule, specifically: before deleting (or before being covered) the video data, firstly reading the content of the video data, compressing the video data according to a specified transfer rule, and then storing the processed video data into other specified transfer spaces, wherein the specified storage spaces can be a part of the 2G storage middle, can be other local storage spaces different from the 2G storage space, and can be storage spaces of other storage media (such as network storage). Of course, the dump condition may be adjusted as needed, or a mixture of multiple dump conditions may be applied, for example, during a significant period, the storage space threshold may be increased, or the duration threshold may be increased. The above threshold values are by way of example only and not by way of limitation.
It should be noted that: the compression action of the application is to transfer specific data of video (or picture) through the transfer rule.
In one or more embodiments of the present application, the principle followed when executing the dump rule is to demote the visual effect related data in the video data and preserve the restoration fact related data. The data related to improving visual effect can be understood as: video frame rate, video resolution, etc. The restoration fact-related data referred to herein may be understood as key video frames, some key content contained in video frames, and the like.
Specifically, the dump rule may include:
reducing a frame rate for the first video data; and/or the number of the groups of groups,
reducing resolution of the first video data; and/or the number of the groups of groups,
intercepting a specific frame picture from the first video data; and/or the number of the groups of groups,
intercepting a specific frame picture for the first video data to reduce resolution; and/or the number of the groups of groups,
clipping a particular frame picture to the first video data or the first video data reduces a color range.
It should be noted that, when the transfer rule is selected, the transfer rule may be selected according to the number of times that the transfer rule is transferred, or may be selected according to the storage space to be stored or to be released. For example, when the first time of the transfer or to be stored in the storage space A1 or to be released from the storage space B1, the corresponding transfer rule is determined as follows: the frame rate is reduced for the first video data. In the case where the first video data is not the original video, when the second transfer is to be stored in the storage space A1 or to be released from the storage space B2, the corresponding transfer rule is determined as: and reducing resolution of the first video data.
The selection order of the transfer rules can be adjusted as required. However, it should be noted that when the same video data is subjected to multiple copy-over, a copy-over rule that has not been used before is preferentially selected.
It should be noted that: when the same transcoding mode (e.g. reducing the frame rate, etc.) but the parameters are different (e.g. reducing to 100 frames and 200 frames, etc.), it may belong to 2 different transcoding rules.
The meaning of the transfer rule will be explained below.
Reducing frame rate processing: the video to be compressed (or clipped) is reduced in frame rate. For example, the FPS is reduced. Such as 25FPS (25 frames 1 second), 30FPS (30 frames 1 second), video (such as video files, or video slices, or video streams, etc.), reduced to 1FPS (1 frame 1 second) or less (such as 2 seconds 1 frame), etc. For another example, the decrease is performed in terms of the total number of frames. Such as a total of 30000 frames of video, only 300 frames are reserved at the same interval (or interval of a specific video time), etc. The storage space is effectively reduced after the video is reduced (for example, the storage space is reduced to 1FPS by 30FPS, the storage space may be reduced by 30 times theoretically, and some video formats may be reduced by 15 times in practice in the case of self-contained compression), although the video is not smooth, and the effect on the video restoration fact is less. For example, the primary storage area employs a video frame reduction strategy (i.e., a frame reduction transcoding rule) based on the original video data.
Resolution reduction processing: the video to be compressed (or clipped) is reduced in frame rate. For example, the resolution is reduced to 1/2 of the original video or 1/4 of the original video according to the resolution of the original video, that is, some data for pursuing visual effect is discarded. The reduced resolution video effectively reduces storage space, which, although it may result in video blurring, contributes to the video restoration facts. For example, the secondary storage area employs a video resolution reduction strategy (i.e., a resolution reduction transcoding rule) based on the primary storage area video data.
Intercepting specific frame picture processing: a specific frame (specific position or specific time) in the video file is saved as a picture format (e.g., JPG format) or a moving picture format (e.g., GIF) at specific intervals or positions, etc. For example, a total of 30000 frames of video, and the first frame, middle frame, and last frame are stored as 3 pictures (or 1 GIF picture). The video is extracted and stored as pictures, which can cause the video to be disconnected from each other, but the occupied space of the pictures is very small, which is helpful for long-term storage of data in a specific time period of the video, and is helpful for restoring the fact that the data is long-term, such as people, articles and the like appearing in the specific time period, for a long time. For example, the tertiary storage area uses a video specific frame to save as a picture policy based on the secondary storage area (or original video area) video data.
Reducing picture resolution processing: the picture (or the picture of a specific frame is cut off at the same time) is subjected to resolution reduction processing, and the resolution is reduced to 1/2 of the original picture (or video frame), or reduced to 1/4 of the original picture (or video frame), and the like. For example, the four-level storage area adopts a strategy for reducing the resolution of the picture based on the picture data of the three-level storage area; or for example, the tertiary storage region employs a strategy of storing video specific frames as pictures based on the secondary storage region (or original video region) video data, and simultaneously employs a strategy of reducing picture resolution.
Reducing color range processing: the video or picture to be compressed (or cut) is subjected to a reduction process for its color range. For example, binarization or deleting color channel processing is performed according to the original video or picture, so that the original video or picture is changed into a black-and-white (or gray) video frame or picture, which is helpful for further compressing the storage space of the video file or picture file in the storage mode (such as MP4, JPG file storage format, etc.). After the color range is reduced, the fact can be restored through the outline characteristics of the person or the object in the video or the picture. For example, the five-level memory region employs a reduced color range policy based on the four-level memory region picture data. Here, the reduced color range only affects the visual effect, and does not affect the restoration of the true phase. (and the yellow-colored portion above is a meaning, but this is somewhat too absolute, the color reduction may have an effect on the fact that the reality is present (e.g., the color of the article is not seen))
The video data is processed through the transfer rule, so that the video data is compressed, a large storage space occupied before transfer processing is released, and a smaller storage space is occupied after processing. That is, the more times the first video data is processed by the dump rule, the smaller the occupied storage space, and the longer the storage time.
It should be noted that, the concept of the present application is to degrade the related data of improving the visual effect in the video data and retain the related data of restoring the fact, and the above-mentioned frame rate reduction processing, video resolution reduction processing, picture resolution reduction processing, and color range reduction processing are examples of the present application, and do not constitute limitation of other corresponding processing modes according to the concept of the present application.
In one or more embodiments of the present application, the processing the first video data according to the transfer rule includes:
processing the first video data conforming to the specific time period or except the specific time period according to the transfer rule; and/or the number of the groups of groups,
and processing the first video data meeting the specific conditions or except the first video data meeting the specific conditions according to the dump rule.
The above transfer rules such as lowering the frame rate, lowering the resolution, cutting out the picture, and lowering the color range may be applied to video frames or video sections under specific conditions. For example, for a specific period, such as a period of a low peak of a stream of people in the early morning, a mode of reducing a frame rate and resolution is adopted to restore rules; for peak specific time, such as 12 m, taking the intercepted picture for transfer. For other specific conditions, for example, a video compression and transfer technology (original video data is only stored in a memory or other temporary areas) can be adopted at ordinary times, and when an abnormality is identified (such as that a specific person or object is identified by an AI, the sensor detects that the data is abnormal, etc.), the original video is stored. In addition, when the storage space is classified as described above, the storage space may be not only a primary storage area, or include a secondary storage area and a tertiary storage area, and may further include more N-level storage areas according to actual requirements, which is not strictly limited.
The video data transfer rule may be different according to the hierarchy of different storage areas, but the same transfer rule may also be used. With the level of each storage area, a combination of multiple transfer rules can be adopted, for example, in the case of only one storage level, video frame reduction and video resolution reduction are adopted for storage; or only the mode of capturing the video as a picture is adopted for storage. It should be noted that, the sequential execution of the dump rule, the simultaneous execution of the multiple dump rule combinations, and the selective execution according to the need are applicable to the embodiments of the present application and various application scenarios.
In one or more embodiments of the present application, the processing according to the dump rule for the first video data meeting a specific condition or other than meeting a specific condition includes:
selectively discarding or selectively reducing resolution for a plurality of video frames containing a target object if the target object is identified in the plurality of video frames; and/or the number of the groups of groups,
if a change in the content of the video frames is identified in the continuous video frames, selectively discarding or selectively reducing the resolution of the unchanged video frames.
The content of the video frame is changed, which means that the main target object or some required content in the video is changed, and the changed object and the standard for judging whether to change can be set according to the requirement. The AI (Artificial Intelligence) technique may be utilized, or a calculation manner may be used, for example, a determination manner of whether a change occurs may be, for example, comparing the similarity of two frames of images, if the similarity is greater than 90%, then no change is considered, otherwise, if the similarity is less than 90%, then a change is considered.
In practical applications, video data processed by the dump rule may be compressed, such as reduced resolution or reduced video frames. In order to enable the processed video data to better meet the requirements of subsequent video data retrieval and viewing, further processing can be performed on the image. Specifically:
The target objects contained in the video frames can be identified (different target objects in different scenes, for example, a vehicle and a license plate are required to be taken as target objects in a parking lot scene, a face and/or a person are required to be taken as target objects in a market scene, generally, any movable object can be taken as target object), and when the video frames are reduced for the video data, partial video frames which do not contain the target objects can be preferentially discarded (or cut down). Further, the video frames of unclear target object may be discarded, or only the individual video frames of key action frames, action change frames, etc. of the target object may be saved.
And whether the content of each video frame changes can be identified in the video frames, if not, the corresponding video frames can be directly discarded or the resolution is reduced, and the key frames with the changed frame content are stored as the key frames are stored. For example, in a parking lot scene, if no vehicles or people go in or out for 1 hour, the video data within 1 hour is not changed, the video within 1 hour is cut into a video file independently, and then the video frame within 1 hour is discarded or the resolution of the video frame within 1 hour is reduced; in the rest video files, key frames which are important to select (for example, license plates, drivers, driving direction changes and collision can be clearly shot) are stored as the key frames are kept.
Specifically, if a target object is identified in a plurality of video frames, selectively reducing resolution for the plurality of video frames including the target object includes:
splitting the first video data into a plurality of video files if the target object is identified in the plurality of video frames;
and maintaining the original resolution of video files containing the clear characteristics of the target object in the plurality of video files, and reducing the resolution of the rest video files in the plurality of video files.
Splitting the first video data into a plurality of video files if a change in video content is identified in the continuous video frames;
and maintaining the original resolution of the video files with the content changed in the plurality of video files, and reducing the resolution of the rest video files in the plurality of video files.
It should be noted that: the video data source (first video data) or the video data subjected to the transfer (or compression) of the present invention may be a video file, a video slice (data stream, file format, etc.), video data in a storage section of a storage medium, a data stream (such as a network video data stream), etc., which are not limited.
In practical application, if the resolution is reduced, the resolution can be reduced locally, so as to meet the compression requirement and ensure that important content in the video data is not affected as much as possible.
For example, in a complete video file (or video stream, video slice), when a target object is identified in some video frames (for example, a car and license plate are identified in a parking lot scene), the video file may be split (the basis of splitting may be that the target object is found, and the target object is disappeared as one video file, and the other two video files may be selectively split as required in practical application, which is only taken as an example and not limiting the scheme) into a plurality of video files (for example, split into a first sub-video file, a second sub-video file and a third sub-video file, wherein the second sub-video file contains the target object), and when the resolution is reduced, the resolution of the video file containing the target object (for example, the second sub-video file) is not changed, and only the resolution of the video file not containing the target object (for example, the first sub-video file and the third sub-video file) is reduced. Thereby ensuring that important content can still be clearly preserved while meeting the requirement of reducing the occupied storage space. The basis of splitting the video file can be disappeared from finding the target object to be used as one video file, and the rest is used as two other video files, so that the video file can be selectively split according to the needs in practical application, and the video file is only used as an illustration and does not limit the scheme.
Of course, if the video encoding or decoding algorithm supports different video frames in the same video file having different resolutions, the resolution may be reduced by comparing the content of the video frames. The resolution of the video frame can be directly reduced without changing the content of the video frame, while the original resolution is maintained for changing the content (the content change judging mode can be seen from the embodiment). Thereby ensuring that important content can still be clearly preserved while meeting the requirement of reducing the occupied storage space.
In one or more embodiments of the present application, the storing, in a designated dump space, second video data obtained by processing the first video data according to the dump rule includes:
if the first video data are stored in the original storage space, processing the first video data according to the transfer rule to obtain second video data;
storing the second video data to a designated dump space; the original storage space and the designated dump space are in a top-bottom relationship.
The context is understood to mean that the video source stored in the original storage space and the transcoded video stored in the transcoded space are context, in other words, the lower level transcoded video data is transcoded from the upper level video source, that is, the lower level video data depends on (or inherits) the upper level video source.
It should be noted that, the relationship between the original storage space and the designated dump space includes: at least one of a linear relationship, a tree relationship, and a pattern relationship.
In practical application, all videos can be stored in one complete storage space, and can be split into a plurality of storage spaces. In particular the number of the elements,
fig. 3 is a schematic diagram of another video data storage according to an embodiment of the present application. When all videos are stored in one complete storage space, as shown in fig. 3, for example, a video storage period of 7 days is taken as an example (a period of 30 days may also be taken as an example, and the method is not limited).
Storage and video transfer rules are set. For example: the original storage space (i.e., the video data area in fig. 3) is set, and the storage is stored for 6 days, and the transcoding rule is video frame dropping, so that the original video is reduced to 1 frame per second (1 FPS). Other transfer rules are referred to in the section "transfer rules" above.
And executing the dump rule. And when the prior video in the original video is about to be deleted (or is covered), the video content is read, and the video content is restored to the primary storage area according to the video frame dropping rule. If the primary storage area is full (e.g., more than 6 days preset), the previous data written to the primary storage area is overwritten.
It should be noted that: with respect to the original storage space. On the one hand, the video data may be pre-stored in space (e.g. the 7 th day (7 th) data storage space in fig. 2), so that in order to make room, the video data needs to be pre-set to reserve 6 days of data, which has the advantage that no additional storage space is required for this purpose. On the other hand, the remaining storage space (as shown in fig. 3) of the video device may be insufficient to store a whole day of data space, i.e. the video data need not be preset to reserve 6 days of data according to the content of the first aspect, but the spare remaining space is directly utilized. This has the advantage that the free memory space of the video device can be fully utilized, which space is often not reasonably utilized by the prior art. In the third aspect, the video data after the transfer may not be stored locally in the video device (does not occupy a local transfer storage space), and may be sent to the server through the network. This has the advantage that the compressed video also reduces the storage pressure at the server without taking up local storage space.
When split into multiple storage spaces, for example:
taking the video storage period of 7 days as an example (and also 30 days as a period, etc., without limitation), reference is made to fig. 2 and the section "about the original storage space" for the relevant contents, and only the differences will be described below.
And setting a dump rule. The transcoding rules for different storage tiers may be different. For example: the original storage space is set, the storage is carried out for 6 days, the transfer rule is video frame dropping, the original video is dropped into second video data of 1 frame per second (1 FPS), the compressed video source is the original video (namely, the first video data), and the second video data is stored in the first-level storage area shown in fig. 2. Setting a secondary storage area, storing for 6 days, wherein the transfer rule is that the resolution of the video is reduced, the resolution of the third video data is reduced to 1/2 or 1/4 of the resolution of the second video data, or the fixed resolution (lower than the original video resolution) and the like, the compressed video source is the second video data in the primary storage area, and the third video data is stored in the secondary storage area. The method comprises the steps of setting a three-level storage area, storing for 6 days, wherein a transfer rule is to intercept and store pictures, store specific frames of video as pictures (including a static picture JPG format or a dynamic picture GIF format and the like), and a compressed video source is third video data in the two-level storage area.
And executing the dump rule. Starting a timer (optional), for the original storage area, reading the content of the video file of the original video immediately before the previous video is deleted (or covered), and transferring the video file to the primary storage area according to a video frame dropping strategy. For the secondary storage area, the video file content of the video in the primary storage area is read immediately before the video is deleted (or before the video is covered), and the video file content is transferred to the secondary storage area according to a video resolution reduction strategy. For the tertiary storage area, the video file content of the video in the secondary storage area is read immediately before the video is deleted (or before the video is covered), and the video is saved (converted into a specific frame) into a picture strategy and is transferred to the tertiary storage area. Equivalently, if the previous storage area is full (e.g., more than 6 days preset), the previous data written into the next storage area is overwritten.
It should be noted that: over the storage space. The space length may be different, or the storage space may be calculated with a storage period (e.g., days), or may be the same. For example, if the same, the recent or long term durations may be balanced with reference to the above examples; if the video is different, the long-term video is stored preferentially, for example, the primary storage area is 6 days, the secondary storage area is 12 days, the tertiary storage area is 24 days and the like; or 24 days in the primary storage area, 12 days in the secondary storage area, 6 days in the tertiary storage area and the like, and preferably stores the recent video. In addition, each level of storage area can be divided according to the size, such as a primary storage area is 2G, a secondary storage area is 4G, a tertiary storage area is 8G, and the like, so that long-term video is stored preferentially; or a primary storage area 8G, a secondary storage area 4G, a tertiary storage area 2G and the like, and preferentially stores recent videos; in or evenly divided, primary storage area 6G, secondary storage area 6G, tertiary storage area 6G, etc. And the second storage position can be local to the device or can be a server (second device) and the like, for example, the data of the primary storage area and the secondary storage area are stored locally to the video device, and the data of the tertiary storage area are sent to the server (second device). Thirdly, the storage structure can be an upper and lower level containing structure (chain structure), as shown in fig. 2 and 3, the upper level video storage area reserves a position for the lower level video storage area; or may be an independent structure, as shown in fig. 4, that is, the storage areas between different levels of the storage area are independent of each other. It will be appreciated that: in the independent storage structure, the upper and lower level containing structures (chain structures) and the like may be further included, and the description thereof is omitted here.
It should be noted that: according to some overlaying rules, when overlaying, the video file content is read and is transferred to a next-stage storage area according to video transfer rules, wherein the video file content is not deleted directly but is read immediately before the prior video is deleted (or is overlaid). Then, new video data is gradually overlaid into the memory space of the previous video. When the video is covered, the video data in the time period from 0 point to 1 point on the sixth day is covered according to the time sequence, for example, the video data is firstly covered, the video data is collected in real time and covered, the video data is stored in the storage space in the time period from 1 point after the space from 0 point to 1 point is full, and the video data is sequentially covered in a step-by-step mode.
The first video data read is referred to. In one aspect, the reading timing may be synchronized with the original video (i.e., the first video data) just before deletion (or before being overlaid), or with the original video (e.g., the camera data source) being saved. On the other hand, the read content can be the data source of the camera, namely, the original data input by the camera is directly stored according to the transfer rule, namely, the original video is stored as the compressed video; or may be video file data, that is, stored video data (including original data or compressed data), where the data may be read directly from a video file or from video storage space address data, or read by calling an SDK, an API interface, or read through a network interface, or the like, at a local or service end of the video device. The video data read may be a video file, video data of a storage space, video slice, video stream, etc., without limitation herein. The following relationships for the storage space include: linear, tree and pattern relationships.
Fig. 5a, 5b, and 5c are schematic diagrams of a memory space relationship according to an embodiment of the present application.
As shown in fig. 2, 3 and 5a, the lower video is a result of compression by the upper video source (linear relationship). For example, the data in the primary storage area is a transfer rule a (e.g. frame dropping) for the original video (or the original video source), the data in the secondary storage area is a transfer rule B (e.g. resolution reducing) for the primary storage area, and the data in the tertiary storage area is a transfer rule C (e.g. picture saving) for the secondary storage area.
Tree-like relationships as shown in fig. 5 b. For example, the data source of the storage area B (the copy rule B, stored as a picture policy) is directly derived from the original video data (the secondary storage area is illustrated), and the data source of the storage area C is compressed by the copy rule C for the storage area B.
The pattern structure is shown in FIG. 5 c. For example, the data sources in the storage area D are from the storage area B and the storage area C, and the transfer rule D1 (capturing the picture in the specific position, the video source is the picture (capturing the picture through the transfer rule B)), and the transfer rule D2 (capturing the picture in the specific position, the video source is the video (performing the resolution reduction compression through the transfer rule a)) are adopted respectively.
In practical application, the number of storage levels is not limited, for example, as shown in fig. 3, a fourth-level storage area may be further provided, and a third-level storage area (stored as a picture policy) is used as a data source, so as to execute a policy of reducing the picture resolution for re-storage. It should be noted that a linear structure, a tree structure, a pattern structure, or the like is a representation of a relationship, and it is not necessary to satisfy a definition, feature, or condition of a data structure.
Based on the same thought, the embodiment of the application also provides another data storage method. Fig. 6 is a flowchart of another data storage method according to an embodiment of the present application. From fig. 6, it can be seen that the method specifically comprises the following steps:
step 601: and determining a plurality of first video data provided by a plurality of video acquisition devices, and storing the plurality of first video data by adopting different transfer rules according to the similarity of the plurality of first video data.
Step 602: when the plurality of first video data meet the transfer condition, respectively determining corresponding transfer rules according to the transfer times of the plurality of first video data.
Step 603: and respectively storing a plurality of second video data obtained after the plurality of first video data are processed according to the transfer rule into a designated transfer space.
For example, different levels of storage space may be different data sources (e.g., different cameras) and employ different compression strategies. For example, the camera A adopts a mode of storing an original video and stores the original video in a storage area A; the camera B adopts a mode of reducing the frame rate and stores the frame rate in a storage area B; the C camera adopts a mode of reducing resolution, and is stored in a C storage area and the like. This has the advantage that the fact can be restored by the cooperation of a plurality of cameras, but each camera is not required to store the same (or similar scene and same video experience), for example, the B, C camera does not need to occupy the same storage space as the A storage area, and can record or record longer video time. For the video camera restoration facts, the facts can be restored through the matching of the A, B, C cameras.
As an alternative, the video data (i.e., the original video) collected by the video device may be dumped. For example, because the original video is of little importance, or the current storage space is limited and more video data needs to be stored. Specifically, an original video (a video source acquired by a camera or received from other channels or a server side) is loaded into a memory as first video data, and then the original video is subjected to a transfer process in the memory according to a specified transfer rule, and then transferred into a transfer space of a storage device. In addition, the transfer data may be stored in another terminal (e.g., a server) by sending the transfer data to another terminal after the memory transfer.
Based on the same thought, the embodiment of the application also provides a video system. In the video system, comprising:
and the video acquisition device is used for continuously acquiring video data, wherein the video data comprises acquired first video data.
A data storage device for determining first video data and a dump condition; when the first video data meets the transfer condition, determining a corresponding transfer rule according to the transfer times of the first video data; and storing second video data obtained after the first video data is processed according to the transfer rule into a designated transfer space.
It should be noted that the data storage device may be a local device or a storage device in a cloud server.
Based on the same thought, the embodiment also provides a data storage device. Fig. 7a is a schematic structural diagram of a data storage device according to an embodiment of the present application. The apparatus is applied to a storage device, as can be seen from 7a, said apparatus comprising:
the first determining module 711 is configured to determine the first video data and the dump condition.
And a second determining module 712, configured to determine a corresponding transfer rule according to the transfer times of the first video data when the first video data meets the transfer condition.
A storage module 713, configured to store the second video data obtained after the first video data is processed according to the transfer rule into a designated transfer space.
Optionally, when the first video data is data not processed by the dump rule, the dump condition includes:
when the data size of the first video data exceeds a storage space threshold value; and/or the number of the groups of groups,
and when the time length of the first video data exceeds a time length threshold value.
Optionally, the dump rule includes: and degrading the related data of the visual effect promotion in the first video data, and retaining the related data of the restoration fact.
Optionally, after determining the dump rule, the method further includes:
reducing a frame rate for the first video data; and/or the number of the groups of groups,
reducing resolution of the first video data; and/or the number of the groups of groups,
intercepting a specific frame picture from the first video data; and/or the number of the groups of groups,
intercepting a specific frame picture for the first video data to reduce resolution; and/or the number of the groups of groups,
clipping a particular frame picture to the first video data or the first video data reduces a color range.
Optionally, the processing the first video data according to the transfer rule includes:
processing the first video data conforming to the specific time period or except the specific time period according to the transfer rule; and/or the number of the groups of groups,
and processing the first video data meeting the specific conditions or except the first video data meeting the specific conditions according to the dump rule.
Optionally, a dump module 714 is further included for selectively discarding or selectively reducing resolution of a plurality of video frames containing the target object if the target object is identified in the plurality of video frames; and/or the number of the groups of groups,
if a change in the content of the video frames is identified in the continuous video frames, selectively discarding or selectively reducing the resolution of the unchanged video frames.
A dump module 714 for splitting the first video data into a plurality of video files if the target object is identified in the plurality of video frames;
and maintaining the original resolution of video files containing the clear characteristics of the target object in the plurality of video files, and reducing the resolution of the rest video files in the plurality of video files.
A dump module 714 for splitting the first video data into a plurality of video files if a change in video content is identified in consecutive video frames;
and maintaining the original resolution of the video files with the content changed in the plurality of video files, and reducing the resolution of the rest video files in the plurality of video files.
A storage module 713, configured to, if the first video data is stored in the original storage space, process the first video data according to the dump rule to obtain second video data;
storing the second video data to a designated dump space; the original storage space and the designated dump space are in a top-bottom relationship.
Optionally, the relationship between the original storage space and the specified dump space includes: at least one of a linear relationship, a tree relationship, and a pattern relationship.
Based on the same idea, the own embodiment also provides another data storage device. Fig. 7b is a schematic structural diagram of another data storage device according to an embodiment of the present application. As can be seen in fig. 7b, the device comprises:
the first determining module 721 is configured to determine a plurality of first video data provided by a plurality of video capturing devices, and store the plurality of first video data respectively using different dump rules according to the similarity of the plurality of first video data.
And a second determining module 722, configured to determine, when the plurality of first video data meets the dump condition, a corresponding dump rule according to the number of times of dump of the plurality of first video data, respectively.
And a storage module 723, configured to store, in a designated dump space, a plurality of second video data obtained by processing the plurality of first video data according to the dump rule, respectively.
The embodiment of the application also provides electronic equipment. The electronic device is a master node electronic device in the computing unit. Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device comprises a memory 801, a processor 802 and a communication component 803; wherein,
The memory 801 is used for storing a program;
the processor 802, coupled to the memory, is configured to execute the program stored in the memory, for:
determining first video data and a dump condition;
when the first video data meets the transfer condition, determining a corresponding transfer rule according to the transfer times of the first video data;
and storing second video data obtained after the first video data is processed according to the transfer rule into a designated transfer space.
Optionally, when the first video data is data not processed by the dump rule, the dump condition includes:
when the data size of the first video data exceeds a storage space threshold value; and/or the number of the groups of groups,
and when the time length of the first video data exceeds a time length threshold value.
Optionally, the dump rule includes: and degrading the related data of the visual effect promotion in the first video data, and retaining the related data of the restoration fact.
Optionally, after determining the dump rule, the method further includes:
reducing a frame rate for the first video data; and/or the number of the groups of groups,
reducing resolution of the first video data; and/or the number of the groups of groups,
intercepting a specific frame picture from the first video data; and/or the number of the groups of groups,
Intercepting a specific frame picture for the first video data to reduce resolution; and/or the number of the groups of groups,
clipping a particular frame picture to the first video data or the first video data reduces a color range.
A processor 802, configured to process, according to the dump rule, the first video data that accords with the specific period or is other than the specific period; and/or the number of the groups of groups,
and processing the first video data meeting the specific conditions or except the first video data meeting the specific conditions according to the dump rule.
A processor 802 for selectively discarding or selectively reducing resolution for a plurality of video frames containing a target object if the target object is identified in the plurality of video frames; and/or the number of the groups of groups,
if a change in the content of the video frames is identified in the continuous video frames, selectively discarding or selectively reducing the resolution of the unchanged video frames.
A processor 802 configured to split the first video data into a plurality of video files if the target object is identified in the plurality of video frames;
and maintaining the original resolution of video files containing the clear characteristics of the target object in the plurality of video files, and reducing the resolution of the rest video files in the plurality of video files.
A processor 802 for splitting the first video data into a plurality of video files if a change in video content is identified in consecutive video frames;
and maintaining the original resolution of the video files with the content changed in the plurality of video files, and reducing the resolution of the rest video files in the plurality of video files.
A processor 802, configured to, if the first video data is stored in the original storage space, process the first video data according to the dump rule to obtain second video data;
storing the second video data to a designated dump space; the original storage space and the designated dump space are in a top-bottom relationship.
Optionally, the relationship between the original storage space and the specified dump space includes: at least one of a linear relationship, a tree relationship, and a pattern relationship.
Optionally, the processor 802 is configured to determine a plurality of first video data provided by a plurality of video capturing devices, and store the plurality of first video data respectively using different dump rules according to a similarity degree of the plurality of first video data;
when the plurality of first video data meet the transfer condition, respectively determining corresponding transfer rules according to the transfer times of the plurality of first video data;
And respectively storing a plurality of second video data obtained after the plurality of first video data are processed according to the transfer rule into a designated transfer space.
The memory 801 described above may be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on an electronic device. The memory may be implemented by any type of volatile or nonvolatile memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
Further, the processor 802 in this embodiment may specifically be: and the programmable exchange processing chip is provided with a data copying engine which can copy the received data.
The processor 802 may perform other functions in addition to the above functions when executing programs in memory, and specific reference may be made to the foregoing descriptions of embodiments. Further, as shown in fig. 8, the electronic device further includes: power supply assembly 804, and the like.
Embodiments of the present application also provide a non-transitory machine-readable storage medium having executable code stored thereon, which when executed by a processor of an electronic device, causes the processor to perform the methods described in the corresponding embodiments of fig. 1 and 6.
Embodiments of the present application also provide a computer product for performing the methods described in the corresponding embodiments of fig. 1 and 6.
The embodiment of the application also provides a storage system, which is used for executing the method described in the corresponding embodiment of fig. 1 and 6.
Based on the above embodiment, determining the first video data and the dump condition; when the first video data meets the transfer condition, determining a corresponding transfer rule according to the transfer times of the first video data; and storing second video data obtained after the first video data is processed according to the transfer rule into a designated transfer space. According to the scheme, according to the storage duration and/or the storage space occupation size of the video data, the first video data meeting certain transfer conditions are processed according to the transfer rules, the second video data obtained after the processing occupies smaller storage space, more storage space is released, and meanwhile the requirement for long-time storage of the historical video data is met.
The collection, use and processing of relevant data in accordance with the present application requires compliance with relevant national and regional laws and regulations. The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present application without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
In some of the flows described in the description of the application, the claims, and the figures described above, a number of operations occurring in a particular order are included, and the operations may be performed out of order or concurrently with respect to the order in which they occur. The sequence numbers of operations such as 101, 102, etc. are merely used to distinguish between the various operations, and the sequence numbers themselves do not represent any order of execution. In addition, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first" and "second" herein are used to distinguish different messages, devices, modules, etc., and do not represent a sequence, and are not limited to the "first" and the "second" being different types. The data, such as 30FPS, primary, secondary, tertiary storage, seven days, 30 days, 2G storage, etc. referred to in the embodiments are all used as examples, and are not absolute limits, nor are they to be construed as limitations on the technical solutions of the present application. Furthermore, the embodiments described below are only some, but not all, embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims (16)
1. A data storage method, applied to a storage device, the method comprising:
determining first video data and a dump condition;
when the first video data meets the transfer condition, determining a corresponding transfer rule according to the transfer times of the first video data;
and storing second video data obtained after the first video data is processed according to the transfer rule into a designated transfer space.
2. The method of claim 1, wherein when the first video data is data that has not been processed by a dump rule, the dump condition comprises:
when the data size of the first video data exceeds a storage space threshold value; and/or the number of the groups of groups,
And when the time length of the first video data exceeds a time length threshold value.
3. The method of claim 1, wherein the dump rule comprises: and degrading the relevant data of the visual effect promotion in the first video data, and reserving the relevant data for restoring the facts.
4. The method of claim 3, further comprising, after determining the dump rule:
reducing a frame rate for the first video data; and/or the number of the groups of groups,
reducing resolution of the first video data; and/or the number of the groups of groups,
intercepting a specific frame picture from the first video data; and/or the number of the groups of groups,
intercepting a specific frame picture for the first video data to reduce resolution; and/or the number of the groups of groups,
clipping a particular frame picture to the first video data or the first video data reduces a color range.
5. The method of claim 4, wherein said processing said first video data according to said transfer rules comprises:
processing the first video data conforming to the specific time period or except the specific time period according to the transfer rule; and/or the number of the groups of groups,
and processing the first video data meeting the specific conditions or except the first video data meeting the specific conditions according to the dump rule.
6. The method of claim 5, wherein the processing according to the transcoding rules for the first video data that meets the specific condition or that is other than meeting the specific condition comprises:
selectively discarding or selectively reducing resolution for a plurality of video frames containing a target object if the target object is identified in the plurality of video frames; and/or the number of the groups of groups,
if a change in the content of the video frames is identified in the continuous video frames, selectively discarding or selectively reducing the resolution of the unchanged video frames.
7. The method of claim 6, wherein selectively reducing resolution for a plurality of video frames containing a target object if the target object is identified in the plurality of video frames comprises:
splitting the first video data into a plurality of video files if the target object is identified in the plurality of video frames;
and maintaining the original resolution of video files containing the clear characteristics of the target object in the plurality of video files, and reducing the resolution of the rest video files in the plurality of video files.
8. The method of claim 6, wherein selectively reducing resolution of unchanged video frames if a change in video frame content is identified in successive video frames comprises:
Splitting the first video data into a plurality of video files if a change in video content is identified in the continuous video frames;
and maintaining the original resolution of the video files with the content changed in the plurality of video files, and reducing the resolution of the rest video files in the plurality of video files.
9. The method according to claim 1, wherein storing the second video data obtained by processing the first video data according to the transfer rule in a designated transfer space comprises:
if the first video data are stored in the original storage space, processing the first video data according to the transfer rule to obtain second video data;
storing the second video data to a designated dump space; the original storage space and the designated dump space are in a top-bottom relationship.
10. The method of claim 9, wherein the relationship between the original storage space and the designated spool space comprises: at least one of a linear relationship, a tree relationship, and a pattern relationship.
11. A method of data storage, the method comprising:
determining a plurality of first video data provided by a plurality of video acquisition devices, and storing the plurality of first video data by adopting different transfer rules according to the similarity of the plurality of first video data;
When the plurality of first video data meet the transfer condition, respectively determining corresponding transfer rules according to the transfer times of the plurality of first video data;
and respectively storing a plurality of second video data obtained after the plurality of first video data are processed according to the transfer rule into a designated transfer space.
12. A video system, the system comprising:
the video acquisition device is used for continuously acquiring video data, wherein the video data comprises acquired first video data;
a data storage device for determining first video data and a dump condition; when the first video data meets the transfer condition, determining a corresponding transfer rule according to the transfer times of the first video data; and storing second video data obtained after the first video data is processed according to the transfer rule into a designated transfer space.
13. An electronic device includes a memory and a processor; wherein,
the memory is used for storing programs;
the processor, coupled to the memory, for executing the program stored in the memory for implementing the method of any one of the preceding claims 1 to 10, or the method of claim 11.
14. A non-transitory machine-readable storage medium having stored thereon executable code, which when executed by a processor of an electronic device, causes the processor to perform the method of any of claims 1 to 9, or the method of claim 10.
15. A computer product for performing the method of any one of claims 1 to 10, or the method of claim 11.
16. A storage system for performing the method of any one of claims 1 to 10, or the method of claim 11.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311164878.4A CN117241057A (en) | 2023-09-08 | 2023-09-08 | Data storage method, video system, device, medium, product and storage system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311164878.4A CN117241057A (en) | 2023-09-08 | 2023-09-08 | Data storage method, video system, device, medium, product and storage system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117241057A true CN117241057A (en) | 2023-12-15 |
Family
ID=89090443
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311164878.4A Pending CN117241057A (en) | 2023-09-08 | 2023-09-08 | Data storage method, video system, device, medium, product and storage system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117241057A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102685436A (en) * | 2011-12-13 | 2012-09-19 | 上海天跃科技股份有限公司 | Storage method employing scalable video coding technical design |
CN104363403A (en) * | 2014-11-14 | 2015-02-18 | 浙江宇视科技有限公司 | Method and device for storing video data in video monitoring system |
CN105187782A (en) * | 2015-08-30 | 2015-12-23 | 周良勇 | Processing method for monitoring video file |
CN105430480A (en) * | 2015-11-13 | 2016-03-23 | Tcl集团股份有限公司 | Method and system for storing video data |
CN107734336A (en) * | 2016-08-10 | 2018-02-23 | 杭州海康威视数字技术股份有限公司 | A kind of compression method and device of video memory space |
CN112995558A (en) * | 2019-12-17 | 2021-06-18 | Tcl新技术(惠州)有限公司 | Video file storage method and device and storage medium |
CN115514929A (en) * | 2022-08-18 | 2022-12-23 | 四创电子股份有限公司 | Two-stage series storage system based on video compression data |
-
2023
- 2023-09-08 CN CN202311164878.4A patent/CN117241057A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102685436A (en) * | 2011-12-13 | 2012-09-19 | 上海天跃科技股份有限公司 | Storage method employing scalable video coding technical design |
CN104363403A (en) * | 2014-11-14 | 2015-02-18 | 浙江宇视科技有限公司 | Method and device for storing video data in video monitoring system |
CN105187782A (en) * | 2015-08-30 | 2015-12-23 | 周良勇 | Processing method for monitoring video file |
CN105430480A (en) * | 2015-11-13 | 2016-03-23 | Tcl集团股份有限公司 | Method and system for storing video data |
CN107734336A (en) * | 2016-08-10 | 2018-02-23 | 杭州海康威视数字技术股份有限公司 | A kind of compression method and device of video memory space |
CN112995558A (en) * | 2019-12-17 | 2021-06-18 | Tcl新技术(惠州)有限公司 | Video file storage method and device and storage medium |
CN115514929A (en) * | 2022-08-18 | 2022-12-23 | 四创电子股份有限公司 | Two-stage series storage system based on video compression data |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5642294A (en) | Method and apparatus for video cut detection | |
CN107734336B (en) | Compression method and device for video storage space | |
US10491937B2 (en) | Information processing system | |
CN107087184B (en) | Multimedia data recompression method | |
CN101860731A (en) | Video information processing method, system and server | |
CN101674444A (en) | Storage method of video data, system and encoder thereof | |
CN103826109A (en) | Video monitoring image data processing method and system | |
CN107948605A (en) | Method, apparatus, equipment and the storage medium of vehicle-mounted monitoring video data storage | |
CN112019788B (en) | Data storage method, device, system and storage medium | |
EP3093849A1 (en) | Systems, devices and methods for video storage | |
CN112995676A (en) | Audio and video compression method, device, equipment, system and storage medium | |
CN110708511A (en) | Monitoring video compression method based on image target detection | |
CN110717070A (en) | Video compression method and system for indoor monitoring scene | |
CN112584158B (en) | Video quality enhancement method and system | |
CN104408109A (en) | Alarm video recording method and device | |
US10847003B1 (en) | Method and apparatus for segmented video compression | |
CN108650481B (en) | Video stream data storage method and device | |
CN113905196A (en) | Video frame management method, video recorder and computer readable storage medium | |
US20160080743A1 (en) | Systems and methods for subject-oriented compression | |
CN117241057A (en) | Data storage method, video system, device, medium, product and storage system | |
CN110555890A (en) | Memory management method and system | |
CN107483890B (en) | Data updating and storing method and system for smart city video data | |
US20150085194A1 (en) | Still image provision device | |
US11398091B1 (en) | Repairing missing frames in recorded video with machine learning | |
US10063735B2 (en) | Image file management method, image capturing device, image storage device, and computer readable medium thereof |
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 | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 40102313 Country of ref document: HK |