Video file management method and device, and vehicle
By updating the safety level coefficient after the dashcam is powered on and managing video files in conjunction with gravity sensor signals, the problems of insufficient storage space and uneven erasing and writing in dashcams are solved, thus achieving effective preservation of important video files and continuity of the recording process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 深圳今日芯科技有限公司
- Filing Date
- 2026-04-24
- Publication Date
- 2026-07-17
AI Technical Summary
The video file locking function of dashcams leads to insufficient storage space and uneven writing and erasing of memory cards. Existing technology relies on users to manually format or delete locked files, which increases the operational burden and cannot save important video files in a timely manner.
After the dashcam is powered on, the safety level coefficient is updated, and video files are managed by combining the weightlessness interruption signal of the gravity sensor. When the total capacity of the locked files reaches a preset threshold by filtering and deleting them, storage space is released to alleviate insufficient storage space and reduce the user's operating burden.
It effectively preserves important video files, alleviates insufficient storage space, reduces the burden on users, improves the uneven number of write cycles on the memory card, and ensures the continuity of the recording process.
Smart Images

Figure CN122416554A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of video file storage technology, and in particular to a video file management method, apparatus and vehicle. Background Technology
[0002] In recent years, with the development of in-vehicle electronic devices, dashcams have been widely used in passenger cars, commercial vehicles and other application scenarios because they have functions such as recording video of the vehicle driving process, storing abnormal events and assisting in the determination of accident liability.
[0003] However, taking dashcam video recording as an example, after enabling the video file locking function, with long-term vehicle driving, road bumps, emergency braking, and minor collisions can all trigger the gravity sensor to output a weightlessness interruption signal, resulting in a continuous increase in the number of locked files. Since locked files are usually not involved in loop overwriting, the remaining storage space on the memory card used for normal loop recording will gradually decrease, easily leading to insufficient storage space and inability to continue recording. At the same time, the limited unlocked storage space is repeatedly erased and rewritten, which can easily cause uneven write / erase cycles across different storage areas of the memory card, thus affecting the lifespan of the memory card. In addition, related technologies usually rely on users to manually format the memory card or delete locked files to restore the recording function, which not only increases the user's operational burden but also makes it difficult to balance the need to retain important video files with the need for dynamic storage space management. Summary of the Invention
[0004] The video file management method, apparatus, and vehicle provided in this application are intended to solve the problems in the related art, such as insufficient storage space, inability to continuously record video, and uneven writing of memory cards caused by the continuous accumulation of locked files.
[0005] In a first aspect, embodiments of this application provide a video file management method. This video file management method includes: in response to a dashcam being powered on, reading a security level coefficient and updating the security level coefficient; creating a video file corresponding to the current recording if the storage card space meets the recording requirements; writing audio and video data to the video file, and detecting whether a gravity sensor outputs a weightlessness interruption signal during the writing process; if the gravity sensor outputs the weightlessness interruption signal, determining the currently recorded video file as a locked file; and if the total capacity of the locked files meets a preset capacity threshold, selecting a target locked file from the locked files and deleting the target locked file.
[0006] In some embodiments, the step of reading the security level coefficient and updating the security level coefficient in response to the power-on of the dashcam includes: reading the security level coefficient currently stored in the dashcam in response to the power-on of the dashcam; updating the security level coefficient to obtain the updated security level coefficient.
[0007] In some embodiments, creating the video file corresponding to the current recording when the storage card space meets the recording requirements includes: detecting the remaining storage space of the current storage card; determining whether the remaining storage space meets the space requirements for creating a new video file; and creating the video file corresponding to the current recording when the remaining storage space meets the space requirements.
[0008] In some embodiments, the step of writing audio and video data to the video file and detecting whether the gravity sensor outputs a weightlessness interruption signal during the process of writing the audio and video data includes: acquiring audio and video data corresponding to the current recording; writing the audio and video data to the video file; and detecting whether the gravity sensor outputs a weightlessness interruption signal during the process of writing the audio and video data to the video file.
[0009] In some embodiments, determining the currently recorded video file as a locked file when the gravity sensor outputs the weightlessness interruption signal includes: setting a lock flag for the currently recorded video file when the gravity sensor outputs the weightlessness interruption signal; determining the video file with the lock flag as a locked file; and recording the weightlessness value and the updated security level coefficient corresponding to the locked file.
[0010] In some embodiments, the step of selecting a target locked file from the locked files and deleting the target locked file when the total capacity of the locked files meets a preset capacity threshold includes: calculating the total capacity of all locked files in the memory card; and when the total capacity of all locked files reaches the preset capacity threshold, selecting a target locked file with the lowest security level coefficient and the lowest weight loss value from the locked files and deleting the target locked file.
[0011] In some embodiments, the method further includes: deleting the earliest unlocked file when the storage card space does not meet the recording requirements; and if the deletion of the unlocked file fails, selecting a target locked file with the lowest security level coefficient and the lowest weightlessness value from the locked files, and deleting the target locked file.
[0012] In some embodiments, the method further includes: determining the currently recorded video file as an unlocked file if no weightlessness interruption signal is detected from the gravity sensor.
[0013] Secondly, embodiments of this application provide a video file management device. This video file management device includes: an update module, configured to read a security level coefficient and update the security level coefficient in response to the power-on of the dashcam; a creation module, configured to create a video file corresponding to the current recording if the storage card space meets the recording requirements; a detection module, configured to write audio and video data to the video file and detect whether a gravity sensor outputs a weightlessness interruption signal during the writing process; a first determination module, configured to determine the currently recorded video file as a locked file if the weightlessness interruption signal is detected by the gravity sensor; and a first deletion module, configured to filter out a target locked file from the locked files and delete the target locked file if the total capacity of the locked files meets a preset capacity threshold.
[0014] Thirdly, embodiments of this application provide a vehicle. The vehicle includes a processor, a memory, and a gravity sensor. The gravity sensor is used to detect the intensity of weightlessness and outputs a weightlessness interruption signal when the intensity of weightlessness exceeds a weightlessness threshold. The memory stores computer program instructions, which, when invoked by the processor, cause the processor to execute the video file management method described above.
[0015] The beneficial effects of the video file management method provided in this application are as follows: By updating the security level coefficient after the dashcam is powered on, and by combining the weightlessness interruption signal output by the gravity sensor during recording, the currently recorded video files are differentiated and managed, thereby ensuring that important video files can be effectively preserved in subsequent storage management. Simultaneously, by selecting target locked files and deleting them from the existing locked files when the total capacity of the locked files meets a preset capacity threshold, storage space can be released while retaining some important video files, alleviating the problem of insufficient storage space caused by the continuous accumulation of locked files. Furthermore, by combining video file locking management with a storage space release mechanism, the burden of frequent manual formatting of the memory card or manual deletion of locked files can be reduced, and the continuity of subsequent recording processes can be ensured. Further, after releasing some of the space occupied by locked files, the problem of repeated erasure and rewriting of unlocked storage areas can be alleviated, thereby improving the uneven distribution of memory card erasure and rewriting times and enhancing the rationality of video file management. Attached Figure Description
[0016] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.
[0017] Figure 1 A schematic diagram illustrating a video file management method provided in an embodiment of this application; Figure 2 A schematic diagram of a sub-process of step S110 of the video file management method provided in an embodiment of this application; Figure 3 A schematic diagram of a sub-process of step S120 of the video file management method provided in this application embodiment; Figure 4 A schematic diagram of a sub-process of step S130 of the video file management method provided in this application embodiment; Figure 5 A schematic diagram of a sub-process of step S140 of the video file management method provided in this application embodiment; Figure 6 A schematic diagram of a sub-process of step S150 of the video file management method provided in the embodiments of this application; Figure 7 A schematic diagram illustrating another video file management method provided in an embodiment of this application; Figure 8 This is a schematic diagram of the architecture of a video file management device provided in an embodiment of this application; Figure 9 This is a schematic diagram of the vehicle structure provided in an embodiment of this application. Detailed Implementation
[0018] To facilitate understanding of this application, a more detailed description of this application will be provided below in conjunction with the accompanying drawings and specific embodiments.
[0019] It should be noted that when a component is said to be "set on" another component, it can be directly on the other component or there may be an intervening component. When a component is considered to be "connected" to another component, it can be directly connected to the other component or there may be an intervening component, or it can refer to the two components being interconnected via signals. When a component is considered to be "coupled" to another component, it can be directly coupled to the other component or there may be an intervening component, or it can refer to the two components interacting via signals.
[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the specification of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application.
[0021] Furthermore, the technical features involved in the different embodiments of this application described below can be combined with each other as long as they do not conflict with each other.
[0022] In dashcam video recording scenarios, dashcams typically need to automatically start recording after power-on and store the recorded video files on a memory card to meet requirements such as continuous recording of the vehicle's driving process and preservation of important events. Typical video file management methods include: First, a cyclic overwrite mechanism is used to update historical video files on the memory card to achieve continuous recording. Then, events such as abnormal weightlessness, collisions, or emergency braking during vehicle operation are detected, and the currently recorded video file is locked when a corresponding weightlessness interruption signal is detected. Finally, the locked video file is saved on the memory card and is not included in subsequent cyclic overwrites, thereby preserving accident-related video evidence for subsequent investigation and liability determination.
[0023] However, during the actual research and implementation process, the applicant noticed that in the relevant technologies, after enabling the video file locking function, the gravity sensor may output a weightlessness interruption signal due to road bumps, emergency braking, and minor collisions during long-term vehicle operation, resulting in a continuous increase in the number of locked files. Since locked files are usually not involved in loop overwriting, the remaining storage space on the memory card for normal loop recording will gradually decrease, easily leading to insufficient storage space and inability to continue recording; at the same time, the limited unlocked storage space is repeatedly erased and rewritten, which can easily cause uneven write / erase cycles across different storage areas of the memory card, thereby affecting the lifespan of the memory card.
[0024] In addition, to restore the recording function, related technologies usually rely on users to manually format the memory card or manually delete locked files. However, such implementation increases the user's operational burden, reduces the product's user experience, and may also fail to save important video files in time due to insufficient storage space in the event of an emergency, affecting the dashcam's ability to retain key video evidence.
[0025] To overcome the aforementioned shortcomings, the applicant's research found that by updating the safety level coefficient after the dashcam is powered on and by differentiating and managing currently recorded video files based on the weightlessness interruption signal output by the gravity sensor during recording, important video files can be effectively preserved in subsequent storage management. Simultaneously, by selecting target locked files and deleting them from the existing locked files when the total size of the locked files meets a preset capacity threshold, storage space can be freed up while retaining some important video files, alleviating the storage space shortage problem caused by the continuous accumulation of locked files.
[0026] Based on the inventive concept provided in the embodiments of this application, it can be generally applied to dashcams, in-vehicle video recording devices, and other loop recording devices with event-triggered locking functions to improve the effectiveness of saving important video files and the rationality of dynamic management of storage space. For ease of description and understanding, the video file management method provided in the embodiments of this application will be described below in conjunction with specific examples.
[0027] Figure 1 This is a schematic diagram illustrating a video file management method provided in an embodiment of this application. Figure 1 As shown, the video file management method includes: S110. In response to the dashcam being powered on, read the security level coefficient and update the security level coefficient. Among them, "driving recorder" refers to an in-vehicle electronic device installed on a vehicle to collect audio and video data during vehicle operation and store the collected audio and video data in a storage medium.
[0028] "Security level coefficient" refers to the parameter information used to characterize the security level of video files corresponding to the current power-on cycle of the dashcam. The power-on cycle refers to the operating cycle of the dashcam from the start of a single power-on to the end of the corresponding power-off, and is used to characterize the time range of video files generated during the same power-on operation.
[0029] "Update" refers to the operation of changing the security level coefficient currently stored in the dashcam. The update method can be automatic increment, increment according to preset rules, or other methods.
[0030] In some embodiments, after the vehicle detects that the dashcam is powered on, it reads the currently stored security level coefficient and updates it based on the currently stored security level coefficient to obtain the updated security level coefficient.
[0031] Specifically, when the current stored security level coefficient is 5, after updating the security level coefficient, the updated security level coefficient can be obtained as 6, and the updated security level coefficient is used as the security level identifier corresponding to this power-on recording process.
[0032] S120. If the storage card has enough space to meet the recording requirements, create the video file corresponding to the current recording. "Memory card space meets recording requirements" means that the remaining storage space on the memory card is sufficient to create the current recording file and perform subsequent data writing. This space condition can be a preset file creation space threshold, a preset cache space threshold, or other space conditions that meet the recording writing requirements.
[0033] "The currently recorded video file" refers to the file created by the dashcam during the current recording period to store the currently captured audio and video data. The currently recorded video file can be a segmented recording file, a periodic recording file, or other types of video files.
[0034] In some embodiments, the vehicle detects the remaining storage space of the current memory card and determines whether the remaining storage space meets the requirements for creating the current video file; if the determination result is satisfactory, the video file corresponding to the current recording is created as the object to be written to the current video data.
[0035] S130: Write audio and video data to the video file, and detect whether the gravity sensor outputs a weightlessness interruption signal during the process of writing the audio and video data. "Audio and video data" refers to the video and audio data collected by the dashcam during the current recording process. Audio and video data can be a combination of image frame data collected by the camera module and audio data collected by the audio acquisition module.
[0036] A "weightlessness interruption signal" refers to an interruption signal output by a gravity sensor when it detects that the intensity of weightlessness caused by abnormal weightlessness, collision, rapid deceleration, emergency braking, or other abnormal motion states exceeds a preset weightlessness threshold. The weightlessness interruption signal can be used to characterize abnormal events triggered during vehicle operation.
[0037] It should be noted that the weightlessness threshold refers to the pre-set threshold value for the weightlessness intensity that triggers the gravity sensor to output a weightlessness interruption signal. The weightlessness threshold can be set according to vehicle type, product configuration, sensitivity settings, or application requirements.
[0038] In some embodiments, after the vehicle creates the video file corresponding to the current recording, it continuously collects audio and video data corresponding to the current recording and writes the collected audio and video data into the video file; simultaneously, during the writing of audio and video data, it detects in real time whether the gravity sensor outputs a weightlessness interruption signal. In this way, abnormal event triggering can be detected synchronously while performing regular recording.
[0039] S140. If the gravity sensor outputs the weightlessness interruption signal, the currently recorded video file is identified as a locked file. "Locked file" refers to a video file that is set to a protected state during recording due to the detection of abnormal events.
[0040] In some embodiments, after the vehicle detects that the gravity sensor outputs a weightlessness interruption signal, the currently recorded video file is identified as a locked file.
[0041] Specifically, the weightlessness threshold can be set to 1.0. When the weightlessness intensity detected by the gravity sensor is 1.3, since 1.3 is greater than 1.0, the gravity sensor outputs a weightlessness interruption signal and identifies the currently recorded video file as a locked file. When the weightlessness intensity detected by the gravity sensor is 0.7, since 0.7 does not exceed 1.0, the gravity sensor does not output a weightlessness interruption signal, and therefore does not identify the currently recorded video file as a locked file.
[0042] S150. If the total capacity of the locked files meets the preset capacity threshold, select the target locked file from the locked files and delete the target locked file.
[0043] The "total capacity of locked files" refers to the cumulative storage space occupied by all locked files on the memory card.
[0044] "Preset capacity threshold" refers to the capacity condition used to trigger locked file management operations. The preset capacity threshold can be a certain percentage of the total capacity of the memory card, a preset fixed capacity value, or other threshold conditions used to constrain the cumulative space occupied by locked files.
[0045] In some embodiments, the vehicle counts the total capacity of locked files in the memory card, and when the total capacity of locked files reaches a preset capacity threshold, it filters out target locked files from the current locked files and deletes them. This method can retain some important locked files while freeing up storage space for subsequent video recording, thereby reducing storage space shortages caused by the continuous accumulation of locked files and improving video file management capabilities in long-term use scenarios.
[0046] Specifically, the total capacity of the storage card can be 64GB, and the preset capacity threshold can be set to 32GB. When the vehicle calculates that the total capacity of the currently locked files is 35GB, since 35GB reaches the preset capacity threshold, the target locked file is selected from the currently locked files and deleted.
[0047] In this embodiment, the safety level coefficient is updated after the dashcam is powered on, and the recorded video files are differentiated and managed based on the weightlessness interruption signal output by the gravity sensor during recording. This ensures that important video files are effectively preserved in subsequent storage management. Simultaneously, when the total capacity of locked files meets a preset capacity threshold, target locked files are selected from the existing locked files and deleted. This frees up storage space while preserving some important video files, alleviating the storage space shortage problem caused by the continuous accumulation of locked files. Furthermore, by combining video file locking management with the storage space release mechanism, the burden of frequent manual formatting of the memory card or manual deletion of locked files can be reduced, and the continuity of subsequent recording is ensured. Further, after releasing the space occupied by some locked files, the problem of repeated erasure and rewriting of unlocked storage areas can be alleviated, thereby improving the uneven distribution of memory card write cycles and enhancing the rationality of video file management.
[0048] In some embodiments, such as Figure 2 As shown, S110 specifically includes: S111. In response to the dash cam being powered on, read the security level coefficient currently stored in the dash cam. "Reading" refers to the process of retrieving the currently stored security level coefficient from the dashcam's storage unit.
[0049] In some embodiments, after the vehicle detects that the dashcam is powered on, the vehicle obtains the security level coefficient currently stored in the dashcam's storage unit as the basis parameter for updating the security level coefficient during the current power-on cycle.
[0050] S112. Update the security level coefficient to obtain the updated security level coefficient.
[0051] Among them, "updated security level coefficient" refers to the parameter information obtained after updating the current security level coefficient, which is used to characterize the security level of the video file corresponding to the current power-on cycle.
[0052] In some embodiments, after obtaining the currently stored safety level coefficient, the vehicle updates the safety level coefficient to obtain an updated safety level coefficient, and uses the updated safety level coefficient as the safety level identifier corresponding to the current power-on cycle.
[0053] In this embodiment, by reading and updating the security level coefficient after the dashcam is powered on, video files corresponding to different power-on cycles can be distinguished, thereby providing parameter basis for subsequent classification management and deletion of video files.
[0054] In some embodiments, such as Figure 3 As shown, S120 specifically includes: S121. Check the remaining storage space of the current memory card; "Remaining storage space" refers to the storage space on the current memory card that has not yet been occupied by existing video files and can be used for subsequent data writing and file creation.
[0055] In some embodiments, after entering the current video recording process, the vehicle obtains the current available capacity information of the memory card to determine whether the current memory card has the basic storage conditions to create a new video file.
[0056] S122. Determine whether the remaining storage space meets the space requirements for creating a new video file; Among them, "space requirements" refers to the storage space required to create the video file corresponding to the current recording and to write subsequent audio and video data.
[0057] In some embodiments, the vehicle obtains the remaining storage space of the current memory card and determines whether the remaining storage space meets the space requirements for creating a new video file; if it determines that the remaining storage space meets the space requirements for creating a new video file, it performs the video file creation operation corresponding to the current recording.
[0058] S123. If the remaining storage space meets the space requirement, create the video file corresponding to the current recording.
[0059] In some embodiments, after determining that the remaining storage space of the current memory card meets the space requirements of the video file corresponding to the current recording, the vehicle control dashcam creates a video file in the memory card corresponding to the current recording process to store the audio and video data collected during the current recording process.
[0060] In this embodiment, by detecting the remaining storage space of the current storage card and creating the video file corresponding to the current recording when the remaining storage space meets the space requirements for creating a new video file, it can be ensured that the video recording process is carried out on the basis of meeting the storage conditions, thereby providing a foundation for subsequent audio and video data writing and video file management.
[0061] In some embodiments, such as Figure 4 As shown, S130 specifically includes: S131. Collect the audio and video data corresponding to the current recording; In some embodiments, during the current recording process, the vehicle-controlled dashcam acquires image frame data corresponding to the current scene through the camera module and obtains audio data corresponding to the current environment through the audio acquisition module to form audio and video data corresponding to the current recording.
[0062] S132. Write the audio and video data into the video file; In some embodiments, the vehicle control dashcam writes the continuously acquired audio and video data during the current recording process into the corresponding video file to achieve continuous storage of the current recording content.
[0063] S133. During the process of writing the audio and video data to the video file, detect whether the gravity sensor outputs a weightlessness interruption signal.
[0064] In some embodiments, while the vehicle controls the dashcam to write audio and video data to the video file, it also monitors the output status of the gravity sensor in real time to determine whether the gravity sensor outputs a weightlessness interruption signal.
[0065] In this embodiment, by detecting whether the gravity sensor outputs a weightlessness interruption signal while collecting and writing the audio and video data corresponding to the current recording, it is possible to simultaneously determine whether the currently recorded video file meets the locking conditions during the regular video recording process, thereby providing a basis for subsequently identifying the currently recorded video file as a locked file.
[0066] In some embodiments, such as Figure 5 As shown, S140 specifically includes: S141. When the gravity sensor outputs the weightlessness interruption signal, a lock flag is set for the currently recorded video file; The "lock flag" is an identifier used to indicate that a currently recorded video file has entered a protected state. The lock flag can be used to distinguish between ordinary video files and video files that require protection.
[0067] In some embodiments, when the vehicle detects a weightlessness interruption signal output by the gravity sensor, it sets a lock flag on the currently recorded video file to indicate that the currently recorded video file corresponds to the video content triggered by the abnormal event.
[0068] S142. The video file with the lock icon is identified as a locked file; In some embodiments, after a locked flag is set on a currently recorded video file, the vehicle identifies the video file with the locked flag as a locked file, so as to distinguish the video file from the ordinary video file formed by normal recording.
[0069] S143. Record the weightlessness value and the updated security level coefficient corresponding to the locked file.
[0070] Among them, "weightlessness value" refers to the intensity information corresponding to the current weightlessness interruption signal, which is used to characterize the triggering intensity of abnormal events.
[0071] In some embodiments, after the vehicle identifies the currently recorded video file as a locked file, it records the weightlessness value corresponding to the locked file and the updated safety level coefficient to provide a basis for the subsequent screening, management and deletion of locked files.
[0072] In this embodiment, by setting a lock flag on the currently recorded video file when the gravity sensor outputs a weightlessness interruption signal, and recording the weightlessness value and updated security level coefficient corresponding to the locked file, effective identification and classification management of video files corresponding to abnormal events can be achieved, thus providing a foundation for subsequent locked file management.
[0073] In some embodiments, such as Figure 6 As shown, S150 specifically includes: S151. Calculate the total capacity of all locked files in the memory card; In some embodiments, the vehicle reads and sums the file sizes corresponding to all locked files in the memory card to obtain the total size of all currently locked files, thereby providing a basis for subsequent determination of whether to perform locked file deletion processing.
[0074] S152. When the total capacity of all locked files reaches the preset capacity threshold, select the target locked file with the smallest security level coefficient and the smallest weight loss value from the locked files, and delete the target locked file.
[0075] Among them, "target locked file" refers to the locked file that has been selected as the object to be deleted from the current locked files.
[0076] In some embodiments, after determining that the total capacity of the locked files has reached a preset capacity threshold, the vehicle selects the target locked file with the lowest safety level coefficient and the lowest weightlessness value from the current locked files, and deletes the target locked file to release the storage space occupied by the target locked file.
[0077] Specifically, there are currently multiple locked files. The first locked file has a safety level coefficient of 1 and a weightlessness value of 0.8, the second locked file has a safety level coefficient of 1 and a weightlessness value of 1.2, and the third locked file has a safety level coefficient of 2 and a weightlessness value of 1.5. The vehicle can prioritize selecting the first locked file with the lowest safety level coefficient and the lowest weightlessness value as the target locked file and delete the first locked file to release the storage space it occupies.
[0078] In this embodiment, by statistically analyzing the total capacity of all locked files in the storage card, and when the total capacity of the locked files reaches a preset capacity threshold, the target locked file with the lowest security level coefficient and the lowest weight loss value is selected and deleted. This can release some storage space while retaining locked files with higher security levels or larger weight loss values, thereby improving the rationality of video file management.
[0079] In some embodiments, the video file management method further includes: first, deleting the earliest unlocked file when the storage card space does not meet the recording requirements; then, if the deletion of the unlocked file fails, selecting the target locked file with the lowest security level coefficient and the lowest weight loss value from the locked files, and deleting the target locked file.
[0080] "Unlocked file" refers to a video file that has not been locked and is capable of participating in the loop overwrite process.
[0081] "The earliest recorded unlocked file" refers to the video file that was created earliest among the multiple unlocked files on the current memory card.
[0082] In some embodiments, when the vehicle determines that the current storage card space does not meet the recording requirements, it searches for unlocked video files in the current storage card and selects the unlocked file with the earliest recording time for deletion, so as to release the storage space occupied by the target locked file.
[0083] "Deletion failed" means that the unlocked file does not exist or cannot be deleted.
[0084] In some embodiments, after the vehicle fails to delete an unlocked file, it selects the target locked file with the lowest safety level coefficient and the lowest weightlessness value from the currently locked files, and deletes the target locked file to release the storage space occupied by the target locked file.
[0085] In this embodiment, when the storage card space does not meet the recording requirements, the earliest unlocked file is deleted, and after the deletion of the unlocked file fails, the target locked file with the lowest security level coefficient and the smallest weight loss value is deleted. This can ensure the continuity of recording while realizing hierarchical management of unlocked and locked files, thereby improving the rationality of video file management.
[0086] In some embodiments, the video file management method further includes: determining the currently recorded video file as an unlocked file when no weightlessness interruption signal is detected from the gravity sensor.
[0087] In some embodiments, if the vehicle does not detect a weightlessness interruption signal from the gravity sensor during the current recording process, the currently recorded video file is determined to be an unlocked file, so that the currently recorded video file can be used as a normal video file for subsequent storage management.
[0088] In this embodiment, by determining the currently recorded video file as an unlocked file when no weightlessness interruption signal is detected from the gravity sensor, it is possible to distinguish and manage normal recording files from abnormal event recording files, thereby providing a foundation for subsequent video file storage and cyclic overwrite processing.
[0089] Figure 7 This is a schematic diagram illustrating another video file management method provided in an embodiment of this application. For example... Figure 7 As shown, the video file management method includes: S201. Power on the dashcam; S202. Read the security level coefficient and update it by incrementing it by 1. S203. Determine if the memory card has sufficient space? Here, if yes, the memory card has sufficient space, proceed to S204; if no, the memory card does not have sufficient space, proceed to S212. S204. Create a video file; S205. Write audio and video data to the video file; S206. Determine whether to lock the video file? Here, if yes, the video file is locked, proceed to S207; if no, the video file is not locked, proceed to S211. S207. Record the weightlessness value and the updated security level coefficient corresponding to the locked file; S208. Calculate the total capacity of all locked files in the memory card; S209. Determine whether the total capacity of all locked files in the memory card is greater than half the capacity of the memory card. Here, if yes, that is, the total capacity of all locked files in the memory card is greater than half the capacity of the memory card, proceed to S210; if no, that is, the total capacity of all locked files in the memory card is less than or equal to half the capacity of the memory card, proceed to S203. S210, Delete the locked file with the lowest security level coefficient and the lowest weightlessness value, and proceed to S203; S211. Save the currently recorded video file; S212. Delete the earliest recorded unlocked file; S213. Determine whether the unlocked file was successfully deleted? Here, if yes, the unlocked file was successfully deleted, proceed to S203; if no, the unlocked file was not successfully deleted, proceed to S214. S214. Delete the locked file with the lowest security level coefficient and the lowest weightlessness value; S215. Determine if the locked file was successfully deleted? Here, if yes, the locked file was successfully deleted, proceed to S203; if no, the locked file was not successfully deleted, proceed to S216. S216, Memory card is damaged, prompting "Format".
[0090] Figure 8 This is a schematic diagram of the architecture of a video file management device provided in an embodiment of this application. Figure 8 As shown, the video file management device 200 includes: an update module 210, a creation module 220, a detection module 230, a first determination module 240, and a first deletion module 250, wherein: The update module 210 is used to read the security level coefficient and update the security level coefficient in response to the power-on of the dashcam. Module 220 is used to create the video file corresponding to the current recording, provided that the storage card has enough space for recording. The detection module 230 is used to write audio and video data into the video file, and to detect whether the gravity sensor outputs a weightlessness interruption signal during the process of writing the audio and video data. The first determining module 240 is used to determine the currently recorded video file as a locked file when the gravity sensor outputs the weightlessness interruption signal. The first deletion module 250 is used to filter out target locked files from the locked files and delete the target locked files when the total capacity of the locked files meets a preset capacity threshold.
[0091] In some embodiments, the update module 210 is specifically used to: in response to the dash cam being powered on, read the security level coefficient currently stored in the dash cam; update the security level coefficient to obtain the updated security level coefficient.
[0092] In some embodiments, the creation module 220 is specifically used to: detect the remaining storage space of the current storage card; determine whether the remaining storage space meets the space requirements for creating a new video file; and create the video file corresponding to the current recording if the remaining storage space meets the space requirements.
[0093] In some embodiments, the detection module 230 is specifically used to: collect audio and video data corresponding to the current recording; write the audio and video data into the video file; and detect whether the gravity sensor outputs a weightlessness interruption signal during the process of writing the audio and video data into the video file.
[0094] In some embodiments, the first determining module 240 is specifically used to: when the gravity sensor outputs the weightlessness interruption signal, set a lock flag for the currently recorded video file; determine the video file with the lock flag as a locked file; and record the weightlessness value and the updated safety level coefficient corresponding to the locked file.
[0095] In some embodiments, the first deletion module 250 is specifically used to: count the total capacity of all locked files in the memory card; when the total capacity of all locked files reaches the preset capacity threshold, select the target locked file with the smallest security level coefficient and the smallest weight loss value from the locked files, and delete the target locked file.
[0096] In some embodiments, the video file management device 200 further includes a second deletion module and a third deletion module, wherein: the second deletion module is used to delete the earliest unlocked file when the storage card space does not meet the recording requirements; the third deletion module is used to select the target locked file with the smallest security level coefficient and the smallest weight loss value from the locked files and delete the target locked file when the deletion of the unlocked file fails.
[0097] In some embodiments, the video file management device 200 further includes a second determining module, wherein the second determining module is configured to determine the currently recorded video file as an unlocked file when no weightlessness interruption signal is detected from the gravity sensor.
[0098] Each functional module in the video file management device described in the foregoing one or more embodiments can be logically regarded as a virtual functional unit undertaking a specific processing task. Its function can be implemented by software program instructions, processor execution logic or dedicated hardware circuit. The specific implementation method can be flexibly selected according to actual deployment needs, and is not specifically limited here.
[0099] Figure 9 This is a schematic diagram of a vehicle provided in an embodiment of this application. The vehicle can implement the server described above and execute the steps of one or more of the video file management methods described in this embodiment.
[0100] It should be noted that, Figure 9 The components, their connections and relationships, and their functions shown are for illustrative purposes only and are not intended to impose limitations on the specific implementation of the vehicle. like Figure 9 As shown, the vehicle 30 may include a processor 301, a memory 302, and a gravity sensor ( Figure 9 (Not shown), storage device 303, high-speed interface 305 connected to memory 302 and multiple high-speed expansion ports 304, and low-speed interface 307 connected to low-speed expansion port 306 and storage device 303.
[0101] Each of the processor 301, memory 302, storage device 303, high-speed interface 305, high-speed expansion port 304, and low-speed interface 307 is interconnected using various buses and can be mounted on a common motherboard or other suitable methods.
[0102] Gravity sensors are used to detect the intensity of weightlessness and output a weightlessness interruption signal when the intensity of weightlessness exceeds the weightlessness threshold.
[0103] The processor 301 can process computer program instructions stored in the memory 302 or on the storage device 303 for displaying graphical information on an external input / output device (e.g., a display 308 coupled to a high-speed interface 305).
[0104] The memory 302 is used to store data information. It may be one or more volatile memory cells, non-volatile memory cells, or another form of computer-readable media, such as a magnetic disk or optical disk.
[0105] Storage device 303 can provide large-capacity storage for control terminals. It may contain computer-readable media, such as floppy disk devices, hard disk devices, optical disk devices or magnetic tape devices, flash memory or other similar solid-state storage devices, or device arrays, including devices or other configurations in a storage area network.
[0106] Computer program instructions may be stored in an information carrier. When invoked by one or more processors 301, these computer program instructions cause the processors 301 to execute the video file management method described in one or more of the above embodiments.
[0107] High-speed interface 305 manages higher bandwidth-intensive operations, while low-speed interface 307 manages lower bandwidth-intensive operations. In some embodiments, high-speed interface 305 is coupled to memory 302, display 308, and high-speed expansion port 304 which accepts various expansion cards. Low-speed interface 307 is coupled to storage device 303 and low-speed expansion port 306.
[0108] The low-speed expansion port 306 includes a communication port (e.g., USB, Ethernet, wireless Ethernet) and can be coupled to one or more input / output devices, such as a keyboard, pointing device, or scanner.
[0109] The video file management method described in one or more embodiments of this application can be implemented in digital electronic circuits, integrated circuits, specially designed ASICs (Application-Specific Integrated Circuits), computer hardware, firmware, software, and / or combinations thereof. It may include embodiments of one or more computer programs that can be executed and / or interpreted on a programmable system comprising at least one programmable processor, which may be dedicated or general-purpose, coupled to receive data and instructions from a storage system, at least one input device, and at least one output device, and to transmit data and instructions to the storage system, at least one input device, and at least one output device.
[0110] These computer programs (also referred to as programs, software, software applications, or code) include machine instructions for a programmable processor and can be implemented using high-level programming and / or goal-oriented programming languages and / or assembly / machine language. In this embodiment, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or apparatus (e.g., disk, optical disk, memory, programmable logic device) used to provide machine instructions and / or data to a programmable processor, including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" can refer to any signal used to provide machine instructions and / or data to a programmable processor.
[0111] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and not to limit them; under the concept of this application, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of this application as described above, which are not provided in detail for the sake of brevity; although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A video file management method, characterized in that, The method includes: In response to the dashcam being powered on, the safety level coefficient is read and updated. If the memory card has enough space to record, create the video file corresponding to the current recording. Write audio and video data to the video file, and detect whether the gravity sensor outputs a weightlessness interruption signal during the process of writing the audio and video data; If the gravity sensor outputs a weightlessness interruption signal, the currently recorded video file will be designated as a locked file. If the total capacity of the locked files meets a preset capacity threshold, a target locked file is selected from the locked files and then deleted.
2. The video file management method according to claim 1, characterized in that, The process of responding to the power-on of the dashcam, reading the security level coefficient, and updating the security level coefficient includes: In response to the dashcam being powered on, the system reads the security level coefficient currently stored in the dashcam. The security level coefficient is updated to obtain the updated security level coefficient.
3. The video file management method according to claim 1, characterized in that, The step of creating the video file corresponding to the current recording, provided that the storage card space meets the recording requirements, includes: Check the remaining storage space on the current memory card; Determine whether the remaining storage space meets the space requirements for creating a new video file; If the remaining storage space meets the space requirement, create the video file corresponding to the current recording.
4. The video file management method according to claim 1, characterized in that, The step of writing audio and video data to the video file, and detecting whether the gravity sensor outputs a weightlessness interruption signal during the writing process, includes: Collect the audio and video data corresponding to the current recording; Write the audio and video data into the video file; During the process of writing the audio and video data into the video file, it is detected whether the gravity sensor outputs a weightlessness interruption signal.
5. The video file management method according to claim 1, characterized in that, The step of identifying the currently recorded video file as a locked file upon detecting that the gravity sensor outputs a weightlessness interruption signal includes: If the gravity sensor outputs a weightlessness interruption signal, a lock flag is set on the currently recorded video file; Video files with the aforementioned lock flag are identified as locked files; Record the weightlessness value and the updated security level coefficient corresponding to the locked file.
6. The video file management method according to claim 5, characterized in that, The step of selecting a target locked file from the locked files and deleting the target locked file when the total size of the locked files meets a preset size threshold includes: Calculate the total capacity of all locked files in the memory card; If the total size of all locked files reaches the preset size threshold, select the target locked file with the lowest security level coefficient and the lowest weight loss value from the locked files, and delete the target locked file.
7. The video file management method according to any one of claims 1 to 6, characterized in that, The method further includes: If the memory card space is insufficient to meet the recording requirements, delete the oldest unlocked file. If the deletion of the unlocked file fails, select the target locked file with the lowest security level coefficient and the lowest weightlessness value from the locked files, and delete the target locked file.
8. The video file management method according to any one of claims 1 to 6, characterized in that, The method further includes: If no weightlessness interruption signal is detected from the gravity sensor, the currently recorded video file is determined to be an unlocked file.
9. A video file management device, characterized in that, include: The update module is used to read the security level coefficient and update the security level coefficient in response to the power-on of the dashcam; The creation module is used to create the video file corresponding to the current recording, provided that there is enough space on the storage card to meet the recording requirements. The detection module is used to write audio and video data into the video file and detect whether the gravity sensor outputs a weightlessness interruption signal during the process of writing the audio and video data. The first determining module is used to determine the currently recorded video file as a locked file when the gravity sensor outputs the weightlessness interruption signal; The first deletion module is used to filter out target locked files from the locked files and delete the target locked files when the total capacity of the locked files meets a preset capacity threshold.
10. A vehicle, characterized in that, include: The system includes a processor, a memory, and a gravity sensor, wherein the gravity sensor is used to detect the intensity of weightlessness and output a weightlessness interrupt signal when the intensity of weightlessness exceeds a weightlessness threshold; the memory stores computer program instructions, which, when invoked by the processor, cause the processor to execute the video file management method as described in any one of claims 1-8.