Automobile data recorder file storage method based on dynamic allocation
By dynamically allocating storage space, dividing loop videos, snapped videos and public areas, and prioritizing files according to creation time, the problem of insufficient file type coverage and space utilization in traditional driving recorder storage methods is solved, and each type of video is realized Effective protection of files and full utilization of space.
Patent Information
- Application Number
- CN202411070143.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2024-11-19
AI Technical Summary
The storage method of traditional dash recorders results in the fact that small videos with different file types are easily overwritten when needed, and the storage space is insufficient, the car owner who likes to capture is insufficient space, and the car owner who doesn't like is wasted space.
The storage method based on dynamic allocation is adopted to divide the storage space into three categories: loop video, snapped video and public areas, and prioritize files storage and overwriting according to the creation time to ensure that each category of files has exclusive storage space and avoid rapid overwriting.
It realizes full utilization of storage space and minimizes protection of each type of video file, meeting the storage needs of different car owners, and avoids rapid overwriting of file types.
Smart Images

Figure CN118981284A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of recorders, and in particular relates to a driving recorder file storage method based on dynamic allocation. Background Art
[0002] Traditional driving recorders only have the function of recording video. When driving, the recorder will record video in a loop. When the memory card is full, the latest recorded video file will overwrite the oldest video file.
[0003] With the development of technology, in addition to the traditional recording function, current dashcams can also be voice-controlled to capture photos or short videos, as well as parking vibration monitoring videos. There are many types of files, and the existing storage methods are generally divided into two types. One is to loop over all file types in chronological order, which sometimes results in the video being overwritten when needed; the other is to divide the storage space by video type to classify and store various types of files and loop over them. Due to different personal habits, car owners who do not like to capture curious videos outside the car will cause the storage space for captured photos or videos to be idle, resulting in waste. Car owners who like to capture photos have a serious shortage of storage space for captured photos. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a driving recorder file storage method based on dynamic allocation in view of the above-mentioned deficiencies in the prior art, which can make full use of the storage card of the driving recorder while ensuring that each type of file will not be quickly overwritten and lost.
[0005] The technical solution adopted by the present invention is: a driving recorder file storage method based on dynamic allocation, comprising the following steps:
[0006] S1: Divide the storage space into three different storage areas: A, B, and C;
[0007] S2: dividing the video files to be stored into loop video files and snapshot video files;
[0008] S3: Storage area A is used to store loop video files first, and storage area C is used to store snapshot video files first;
[0009] When the A storage area is full of loop video files, the newly recorded loop video files continue to be stored in the A storage area, and the first created loop video files are stored in the B storage area in the order of creation time. When the B storage area is full of loop video files and the C storage area is not full of captured video files, the newly recorded loop video continues to be stored in the A storage area, and the first created loop video file is stored from the B storage area to the C storage area until the C storage area is full. At this time, the newly recorded loop video continues to be stored in the A storage area, and the first created loop video file in the C storage area will be overwritten. At this time, the newly recorded captured video file is stored in the C storage area, and the first created loop video file in the C storage area will be overwritten.
[0010] S4: When the loop video files have filled up the A storage area and the B storage area, and the captured video files have filled up the C storage area, the newly recorded loop video files continue to be stored in the A storage area, and the loop video files first created in the B storage area will be overwritten; the newly recorded captured video files continue to be stored in the C storage area, and the captured video files first created in the C storage area are stored in the B storage area, and the loop video files first created in the B storage area will be overwritten;
[0011] S5: When the loop video files fill up the A storage area, the captured video files fill up the C storage area, and part of the loop video files and part of the captured video files fill up the B storage area together, the newly recorded loop video files continue to be stored in the A storage area, and the first video files created in the B storage area will be overwritten, and the newly recorded captured video files continue to be stored in the C storage area, and the first video files created in the B storage area will be overwritten;
[0012] S6: When the captured video files fill up the C storage area, the newly recorded captured video files continue to be stored in the C storage area, and the first created captured video files are stored in the B storage area in chronological order of creation time. When the captured video files fill up the B storage area and the loop video files have not filled up the A storage area, the newly recorded captured video files continue to be stored in the C storage area, and the first created captured video files are stored from the B area to the A storage area until the A storage area is full. At this time, the newly recorded captured video files continue to be stored in the C storage area, and the first created loop video files in the A storage area will be overwritten. At this time, the newly recorded loop video files are stored in the A storage area, and the captured video files first created in the A storage area will be overwritten.
[0013] Preferably, the B area is a public area and can be divided or merged according to the video files stored according to preference.
[0014] The beneficial effects of the present invention are as follows: each storage area of the present invention has no reserved space, so that the storage space can be fully utilized. At the same time, each type of video file is provided with its own equity space, which can protect the corresponding type of files from being overwritten to a minimum extent. The public storage area set can be set according to one's own preferences, which can better meet the storage and usage needs of different groups of people. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 This is a schematic diagram of the storage area of the present invention;
[0016] Figure 2 , Figure 3 , Figure 4 , Figure 5 and Figure 6 This is a schematic diagram of the storage area usage of the present invention. DETAILED DESCRIPTION
[0017] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0018] Example
[0019] like Figure 1 As shown, the driving recorder file storage method based on dynamic allocation provided in this embodiment includes the following steps:
[0020] S1: Divide the storage space into three different storage areas: A, B, and C;
[0021] S2: Divide the video files to be stored into loop video files and snapshot video files; and set the A storage area as the equity storage area for loop video files, set the C storage area as the equity storage area for snapshot video files, and set the B storage area as a public storage area. The public storage area can be set according to its own preferences, for example, all public areas are set as loop video file equity areas, or all public areas are set as snapshot video file equity areas, or part of the public area is divided into loop video file equity areas or snapshot video file equity areas, and part is the public area;
[0022] S3: Storage area A is used to store loop video files first, and storage area C is used to store snapshot video files first;
[0023] S4: Figure 2As shown, when the A storage area is full of loop video files, the newly recorded loop video files continue to be stored in the A storage area, and the first created loop video files will be stored in the B storage area in the order of creation time, that is, when the A storage area is full, the newly recorded loop video files will continue to be stored in the A storage area, and at the same time, the first loop video files stored in the A storage area will be stored in the B storage area in the order of creation time;
[0024] When the loop video files fill up the A storage area and the B storage area, if the captured video files have not filled up the C storage area, the newly recorded loop video files will continue to be stored in the A storage area, and the first loop video file created in the A storage area will be stored in the B storage area, and the first loop video file created in the B storage area will be stored in the free storage space in the C storage area until the C storage area is full. At this time, the three storage areas A, B, and C are all full;
[0025] After that, the newly recorded loop video files continue to be stored in the A storage area. The first loop video file created in the A storage area will be stored in the B storage area. The first loop video file created in the B storage area will be stored in the C storage area. The first loop video file created in the C storage area will be overwritten, thereby realizing the storage of loop video files.
[0026] After that, the newly recorded captured video files continue to be stored in the C storage area, and the first created loop video file in the C storage area will be overwritten, thereby realizing the storage of the captured video files;
[0027] S5: Figure 3 As shown, when the loop video file has filled up the A storage area and the B storage area, and the captured video file has filled up the C storage area, the newly recorded loop video file will continue to be stored in the A storage area, and the loop video file first created in the A storage area will be stored in the B storage area, and the loop video file first created in the B storage area will be overwritten; the newly recorded captured video file will continue to be stored in the C storage area, and the captured video file first created in the C storage area will be stored in the B storage area, and the loop video file first created in the B storage area will be overwritten; that is, when the captured video file has filled up the C storage area, when the loop video file is stored again, it will not enter the C storage area of the equity area of the captured video file;
[0028] S6: Figure 4As shown, when the loop video files fill up the A storage area, the captured video files fill up the C storage area, and part of the loop video files and part of the captured video files together fill up the B storage area, then the newly recorded loop video files continue to be stored in the A storage area, the loop video file first created in the A storage area will be stored in the B storage area, the video file first created in the B storage area will be overwritten, and the newly recorded captured video files continue to be stored in the C storage area, the captured video file first created in the C storage area will be stored in the B storage area, and the video file first created in the B storage area will be overwritten; that is, the newly recorded video files are stored in their corresponding equity spaces according to their types, and at this time, the video files first created in the public area are overwritten in the order of creation time, that is, the video files first created by the loop video files and the captured video files in the B storage area are overwritten;
[0029] S7: Figure 5 As shown, when the C storage area is full of captured video files, the newly recorded captured video files continue to be stored in the C storage area, and the first created captured video files will be stored in the B storage area in the order of creation time, that is, when the C storage area is full, the newly recorded captured video files will continue to be stored in the C storage area, and the captured video files in the C storage area that were first stored will be stored in the B storage area in the order of creation time.
[0030] When the captured video files fill up the C storage area and the B storage area, if the loop video files have not filled up the A storage area, the newly recorded captured video files will continue to be stored in the C storage area, and the first captured video files created in the C storage area will be stored in the B storage area, and the first captured video files created in the B storage area will be stored in the free storage space in the A storage area until the A storage area is full. At this time, the A, B, and C storage areas are all full.
[0031] After that, the newly recorded captured video files will continue to be stored in the C storage area. The first captured video file created in the C storage area will be stored in the B storage area, and the first captured video file created in the B storage area will be stored in the A storage area. The first captured video file created in the A storage area will be overwritten, thereby realizing the storage of the captured video files;
[0032] After that, the newly recorded loop video file will continue to be stored in the A storage area, and the first created snapshot video file in the A storage area will be overwritten, thereby realizing the storage of the loop video file;
[0033] S8: Figure 6As shown, when the captured video files fill up the C storage area and the B storage area, and the loop video files fill up the A storage area, the newly recorded captured video files continue to be stored in the C storage area, the captured video files first created in the C storage area will be stored in the B storage area, and the captured video files first created in the B storage area will be overwritten; the newly recorded loop video files continue to be stored in the A storage area, the loop video files first created in the A storage area are stored in the B storage area, and the captured video files first created in the B storage area will be overwritten; that is, when the loop video files fill up the A storage area, when the captured video files are stored again, they will not enter the A storage area of the equity area of the loop video files.
[0034] The above description is only a preferred implementation manner of the present invention, but the protection scope of the present invention is not limited thereto, and any modification and replacement based on the technical solution and inventive concept provided by the present invention should be included in the protection scope of the present invention.
Claims
1. A method for storing driving recorder files based on dynamic allocation, characterized in that: The following steps are involved: S1: Divide the storage space into three different storage areas: A, B, and C; S2: dividing the video files to be stored into loop video files and snapshot video files; S3: Storage area A is used to store loop video files first, and storage area C is used to store snapshot video files first; When the A storage area is full of loop video files, the newly recorded loop video files continue to be stored in the A storage area, and the first created loop video files are stored in the B storage area in the order of creation time. When the B storage area is full of loop video files and the C storage area is not full of captured video files, the newly recorded loop video continues to be stored in the A storage area, and the first created loop video file is stored from the B storage area to the C storage area until the C storage area is full. At this time, the newly recorded loop video continues to be stored in the A storage area, and the first created loop video file in the C storage area will be overwritten. At this time, the newly recorded captured video file is stored in the C storage area, and the first created loop video file in the C storage area will be overwritten. S4: When the loop video files have filled up the A storage area and the B storage area, and the captured video files have filled up the C storage area, the newly recorded loop video files continue to be stored in the A storage area, and the loop video files first created in the B storage area will be overwritten; the newly recorded captured video files continue to be stored in the C storage area, and the captured video files first created in the C storage area are stored in the B storage area, and the loop video files first created in the B storage area will be overwritten; S5: When the loop video files fill up the A storage area, the captured video files fill up the C storage area, and part of the loop video files and part of the captured video files fill up the B storage area together, the newly recorded loop video files continue to be stored in the A storage area, and the first video files created in the B storage area will be overwritten, and the newly recorded captured video files continue to be stored in the C storage area, and the first video files created in the B storage area will be overwritten; S6: When the captured video files fill up the C storage area, the newly recorded captured video files continue to be stored in the C storage area, and the first created captured video files are stored in the B storage area in chronological order of creation time. When the captured video files fill up the B storage area and the loop video files have not filled up the A storage area, the newly recorded captured video files continue to be stored in the C storage area, and the first created captured video files are stored from the B area to the A storage area until the A storage area is full. At this time, the newly recorded captured video files continue to be stored in the C storage area, and the first created loop video files in the A storage area will be overwritten. At this time, the newly recorded loop video files are stored in the A storage area, and the captured video files first created in the A storage area will be overwritten.
2. The method for storing driving recorder files based on dynamic allocation according to claim 1, characterized in that: The B area is a public area and can be divided or merged according to the video files to be stored according to preference.
