Video data recording method, device and storage medium

By triggering the virtual write process in the video recording system, writing the interrupted video data into the virtual buffer, and restoring the video data storage when the voltage is restored to stable, the video recording blocking problem caused by voltage instability is solved, and the stability of video data recording is improved.

CN119788798APending Publication Date: 2025-04-08YEESTOR MICROELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411988756.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

The video recording system is blocked due to unstable voltage and cannot respond to other commands, resulting in blockage of video recording or data loss.

Method used

When the virtual write process is triggered, the target video data collected after the interrupted video data is stored is written to the virtual buffer, and the working voltage is detected based on the preset interval time. When the operating voltage meets the video data recording conditions, the storage of the video data is restored and the target video data of the virtual buffer is removed.

Benefits of technology

The writing of video data is simulated by virtual writing, and the video recording system is kept in the processing state of the target video data, avoiding system blockage and data loss caused by waiting for voltage recovery, and improving the stability of video data recording.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119788798A_ABST
    Figure CN119788798A_ABST
Patent Text Reader

Abstract

The present application discloses a method, device and storage medium for recording video data, and belongs to the field of data processing technology. The method includes: when a virtual write process is triggered, the target video data collected after the interruption of video data storage is continuously written into a virtual buffer, so that the video recording system remains in the processing state of the target video data, the working voltage is detected based on a preset interval time, and when the working voltage meets the video data recording conditions, the storage of the video data is restored, and the target video data in the virtual buffer is removed. In the case where the video data recording is interrupted due to voltage instability, the present application continuously simulates the writing of video data by virtual writing, so that the video recording program can still respond to other commands of the video recording system while waiting for the voltage to recover, thereby improving the stability of video data recording.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method, device and storage medium for recording video data. Background Art

[0002] During the relevant video recording process, after the voltage detection module (VDT) of the video recording system detects that the voltage of the video recording device is unstable and an interruption occurs, the video recording system will trigger an interrupt mechanism, suspend the writing operation of the video data, and continue to detect the voltage until the voltage returns to a stable state.

[0003] In this case, the video recording system will fall into a continuous waiting state based on the waiting process for voltage recovery, and stop related operations such as writing video data. However, when the waiting time is long, the weight ratio of the waiting process will increase over time, causing the video recording system to be unable to respond to other commands of the video recording system, resulting in video recording blocking.

[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0005] The main purpose of the present application is to provide a method, device and storage medium for recording video data, aiming to solve the technical problem that the video recording system is blocked due to unstable voltage during the video recording process.

[0006] To achieve the above object, the present application provides a method for recording video data, the method comprising the following steps:

[0007] When the virtual writing process is triggered, the target video data collected after the interruption of video data storage is continuously written into the virtual buffer, so that the video recording system remains in the processing state of the target video data;

[0008] Detecting the operating voltage based on a preset interval;

[0009] When the working voltage meets the video data recording condition, the storage of the video data is restored, and the target video data in the virtual buffer is removed.

[0010] In one embodiment, when the virtual write process is triggered, the step of continuously writing the target video data collected after the interruption of the video data storage into the virtual buffer so that the video recording system remains in the processing state of the target video data includes:

[0011] After triggering the virtual writing process, interrupting the storage of the video data, and using the collected video data as the target video data;

[0012] Cache the target video data into a memory buffer, and map the target video data into the virtual buffer;

[0013] The target video data is marked, and a memory address of the target video data in the memory buffer is associated with a virtual address of the target video data in the virtual buffer.

[0014] In one embodiment, when the operating voltage satisfies the video data recording condition, the step of restoring the storage of the video data and removing the target video data in the virtual buffer includes:

[0015] Based on the video data recording condition, verifying the operating voltage;

[0016] After the working voltage meets the video data recording condition, collecting the video data and storing the video data in a memory;

[0017] In the virtual buffer, the target video data with the mark is removed.

[0018] In one embodiment, before the step of continuously writing the target video data collected after interrupting the video data storage into the virtual buffer when the virtual write process is triggered so that the video recording system remains in the processing state of the target video data, the step further includes:

[0019] Collecting the video data, and detecting the working voltage through a voltage detection module;

[0020] comparing the operating voltage with the video data recording condition;

[0021] When the operating voltage does not meet the video data recording condition, the virtual writing process is triggered.

[0022] In one embodiment, before the step of comparing the operating voltage with the video data recording condition, the method further includes:

[0023] After receiving the condition setting instruction, receiving the set voltage stability threshold;

[0024] Taking the voltage stability threshold as a boundary, and determining the voltage stability interval according to the boundary;

[0025] The video data recording condition is generated according to the voltage stabilization period.

[0026] In one embodiment, when the operating voltage does not meet the video data recording condition, the step of triggering the virtual writing process includes:

[0027] Comparing the operating voltage with the boundary to determine whether the operating voltage is within the voltage stability interval;

[0028] If not, the operating voltage is recorded as an unstable voltage;

[0029] Based on the unstable voltage, the virtual write process is triggered.

[0030] In one embodiment, the step of triggering the virtual write process based on the unstable voltage includes:

[0031] After recording the unstable voltage, determining a corresponding debouncing detection time according to a preset debouncing time and a recording time of the unstable voltage;

[0032] Detecting the debouncing detection voltage of the debouncing detection time by the voltage detection module;

[0033] When the debouncing detection voltage is not in the voltage stabilization interval, the virtual writing process is triggered.

[0034] In one embodiment, after the step of removing the target video data in the virtual buffer and restoring the storage of the video data when the operating voltage meets the video data recording condition, the method further includes:

[0035] Obtaining the interruption time and the recovery time of storing the video data;

[0036] Associating the operating voltage with a corresponding voltage detection time, and generating log information according to the interruption time, the recovery time and the operating voltage;

[0037] Based on the log information, a log file is generated and saved, and the log file is used to determine problems that occur in the video recording system.

[0038] In addition, to achieve the above-mentioned purpose, the present application also provides a video data recording device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the video data recording method as described above.

[0039] In addition, to achieve the above-mentioned purpose, the present application also provides a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the video data recording method as described above are implemented.

[0040] One or more technical solutions proposed in this application have at least the following technical effects:

[0041] When the virtual write process is triggered, the present application interrupts the storage of video data, writes the target video data collected after the interruption of storage into the virtual buffer through virtual writing, detects the voltage of the video recording system based on a preset interval time, and restores the storage of video data when the voltage meets the video data recording conditions, and removes the target video data in the virtual buffer. In this way, when the voltage is unstable and the video data recording is interrupted, the writing of video data is simulated through virtual writing, so that the video recording program can still respond to other commands of the video recording system while waiting for the voltage to recover, maintain the connection with the video recording system manager, avoid the blocking or disk dropping of the video data recording, and improve the stability of the video data recording. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0043] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0044] Figure 1 This is a flow chart of a first embodiment of a method for recording video data of the present application;

[0045] Figure 2 This is a flow chart of a second embodiment of the method for recording video data of the present application;

[0046] Figure 3 A schematic diagram of a flow chart of a third embodiment of a method for recording video data of the present application;

[0047] Figure 4 It is a structural diagram of a video data recording device in a hardware operating environment involved in an embodiment of the present application.

[0048] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0049] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0050] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0051] The main solution of the embodiment of the present application is: when the virtual write process is triggered, the target video data collected after the interruption of video data storage is continuously written into the virtual buffer, so that the video recording system remains in the processing state of the target video data; the working voltage is detected based on a preset interval time; when the working voltage meets the video data recording condition, the storage of the video data is restored, and the target video data in the virtual buffer is removed.

[0052] During the relevant video recording process, after the voltage detection module (VDT, VoltageDetector) of the video recording system detects that the voltage of the video recording device is unstable and an interruption occurs, the interrupt mechanism will be triggered to suspend the writing operation of the video data and continue to detect the voltage until the voltage returns to a stable state. In this case, the video recording system will fall into a continuous waiting state based on the waiting process for voltage recovery, and stop related operations such as writing video data. However, when the waiting time is long, the weight ratio of the waiting process will increase over time, causing the video recording system to be unable to respond to other commands of the video recording system, resulting in video recording being blocked or dropped.

[0053] When the virtual write process is triggered, the present application interrupts the storage of video data, writes the target video data collected after the interruption of storage into the virtual buffer through virtual writing, detects the voltage of the video recording system based on a preset interval time, and restores the storage of video data when the voltage meets the video data recording conditions, and removes the target video data in the virtual buffer. In this way, when the voltage is unstable and the video data recording is interrupted, the writing of video data is simulated through virtual writing, so that the video recording program can still respond to other commands of the video recording system while waiting for the voltage to recover, maintain the connection with the video recording system manager, avoid the blocking or disk dropping of the video data recording, and improve the stability of the video data recording.

[0054] In order to better understand the above technical solution, exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.

[0055] It should be noted that the execution subject of this embodiment can be a video recording device, or a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a video data recording device, etc., which is not specifically limited in this embodiment. The video recording device is taken as an example to illustrate this embodiment and the following embodiments.

[0056] Based on this, the present application embodiment provides a method for recording video data, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the method for recording video data of the present application.

[0057] In this embodiment, the video data recording method includes steps S10 to S30:

[0058] Step S10: when the virtual writing process is triggered, the target video data collected after the interruption of the video data storage is continuously written into the virtual buffer, so that the video recording system remains in the processing state of the target video data;

[0059] In the present embodiment, the video recording device runs a video recording system and includes a voltage monitoring module (VDT, Voltage Detector) and a memory. Under normal working conditions, the video recording system will save the video data collected by the video recording device to the memory, and detect the working voltage in the video recording device through the voltage monitoring module. When the video recording device has unstable working voltage, which causes unstable video data recording, the video recording system will determine to trigger a virtual write process. At the same time, while maintaining the collection of video data, the process of saving the video data to the memory is interrupted. Among them, virtual reading and writing is a computer memory management technology, which enables the video recording system to perform data read and write operations in a simplified and unified manner through abstraction and optimization at the software level, without directly interacting with physical hardware.

[0060] Exemplarily, the video recording system can be applied to video recording devices such as driving recorders and monitoring equipment. Driving recorders and monitoring equipment usually need to collect video data for a long time, and are prone to unstable working voltage due to factors such as the working environment. While waiting for the working voltage to stabilize, the system resources occupied by the process waiting for the voltage to recover will gradually increase, that is, the weight ratio of the waiting process will increase over time, which will eventually lead to system blockage or disk loss, resulting in large sections of video data being lost.

[0061] In one embodiment, the video recording system can perform voltage detection through VDT to determine whether the video recording system is in an unstable working voltage. VDT is usually integrated in hardware and is used to detect the power supply voltage of the solid state drive (SSD) controller or the NAND Flash (NAND Flash) storage particles in the video recording system. When the supply voltage is lower than the set threshold, an interrupt operation is triggered. For example, SiliconGo SSD is designed with low-voltage monitoring of the controller and NAND Flash storage particles in mind to ensure that the device can still operate reliably under unstable voltage conditions. When the hardware detection circuit of VDT recognizes that the supply voltage of NAND Flash is lower than the set threshold, it will immediately notify the video recording system in the form of an interrupt. The video recording system avoids data storage errors through corresponding emergency processing.

[0062] Optionally, the VDT can also be used to monitor the voltage of the power line and output a detection signal when it is lower or higher than the set voltage. It can also be used to monitor the battery voltage and output a signal to subsequent components to determine an abnormal state or stop the system from operating.

[0063] In this embodiment, after triggering the virtual write process and interrupting the storage of video data, the video recording device switches to the virtual write mode. In the virtual write mode, the video recording device will still collect video data. At the same time, the video recording system can use the video data collected in the virtual write mode as the target video data, and through the virtual writing of the video data, in a simulated manner, write the target video data in a virtual environment, so that the video recording system is in the process of operating the target video data, and will not be blocked or fall into the situation of video recording being blocked or dropped due to long waiting time for the voltage state to recover and occupying too high system resources, and being unable to respond to other commands of the video recording device.

[0064] As an optional implementation method of writing the target video data, the video recording system may use the virtual memory as a virtual buffer, and after acquiring the target video data, write the target video data into a corresponding position of the virtual memory.

[0065] It should be noted that virtual memory is a virtual read-write technology that makes applications think they have continuous available memory space, but in fact this memory space is divided into multiple physical memory fragments, and a part is temporarily stored on external disk storage. When an application needs to access a certain memory address, the system will first check whether the address is in the physical memory. If it is, it will directly access the physical memory. If not, the data will be loaded from the disk into the physical memory and then accessed. This is a virtual simulation of continuous memory space.

[0066] Furthermore, after the video recording system interrupts the storage of the video data and obtains the target video data collected by the video recording device, it will cache the target video data in the memory buffer of the physical memory and map the target video data to the virtual buffer. By associating the memory address of the target video data in the memory buffer with the virtual address of the target video data in the virtual buffer, the video recording system can realize the virtual writing of the target video data.

[0067] Specifically, the video recording system creates a logical area in a virtualized environment as a virtual buffer. The virtual buffer is used to temporarily store video data collected from the video recording device. By mapping the logical address of the virtual buffer to an area in the physical memory, the video recording system can access and operate the data in the virtual buffer through the virtual address. The video data collected from the video device is copied to the virtual buffer, or, through the memory mapping technology, the physical address of the device's memory is associated with the logical address of the virtual buffer, so that the access to the virtual buffer is actually the access to the memory. The video recording system can obtain the collected video data by accessing the virtual buffer, and further process the video data, such as format conversion, compression, storage, etc. When the video data collection and processing are completed, the video recording system can release the virtual buffer and related resources, or clear the video data in the virtual buffer.

[0068] Optionally, after the video data is written to the virtual buffer, the video recording system performs an integrity check to ensure that the data is not lost or corrupted.

[0069] As another optional implementation of writing the target video data, step S10 includes steps S11 to S13:

[0070] Step S11: after the virtual writing process is triggered, the storage of the video data is interrupted, and the collected video data is used as the target video data;

[0071] Step S12: caching the target video data into a memory buffer, and mapping the target video data to the virtual buffer;

[0072] Step S13: Mark the target video data, and associate the memory address of the target video data in the memory buffer with the virtual address of the target video data in the virtual buffer.

[0073] In this implementation, the video recording system may also mark the target video data after acquiring the target video data, and save the marked data to the local memory of the video recording device.

[0074] Specifically, when the VDT detects an abnormal situation such as voltage instability, it will immediately stop the actual data writing operation to avoid damage to the storage device or data loss. However, in order to maintain the normal operation of the device and the continuity of the video, the device will continue to collect video data. These data will be temporarily stored in the memory of the device in the virtual write mode and marked as pending. After the voltage returns to stability, the video recording system will exit the virtual write mode and resume normal data writing operations. At this time, the video recording system can selectively process or discard the video data collected during the voltage instability based on the previous marking or recording. Therefore, in the virtual write mode, the video recording device will still collect video data, but write this data to the storage device, thereby protecting the security of the storage device and data under abnormal circumstances, while maintaining the normal operation of the video recording device and the continuity of the video data.

[0075] Step S20: detecting the working voltage based on a preset interval time;

[0076] In this embodiment, the video recording system compares the working voltage detected regularly in the virtual writing mode with the video data recording conditions pre-set in the system, wherein the video data recording conditions are used to determine whether the working voltage of the current video recording device meets the stability and safety requirements of video recording.

[0077] In one example, a safety voltage threshold is set in the video recording system as a condition for recording video data. When the operating voltage detected by the video recording system is higher than the safety voltage threshold, the video recording system will determine that the operating voltage is a stable voltage and record it, and based on the operating voltage, determine that the voltage has returned to a stable state, and restore the video data collected by the video recording device to the storage device. For example, when the power supply voltage is lower than a preset threshold, the voltage detection module will output a low-level reset signal to trigger the reset mechanism of the system to protect the safety of the circuit and data. This reset signal can be a low-level, high-level or pulse signal, which is used to clear the storage state inside the system and restore each module to the initial working state.

[0078] Optionally, during a VDT interruption, the video recording system also needs to perform a debouncing process to determine whether the operating voltage is an instantaneous voltage fluctuation. The video recording system can set a short delay, such as 50ms, to detect the voltage again, and use the delay time as the debouncing duration. Through the debouncing process, the video recording system detects the operating voltage of the video recording device again after the preset debouncing duration. When the re-detected operating voltage is still higher than the safety voltage threshold, it is determined that the voltage has returned to a stable state, and the video data collected by the video recording device is restored to be stored in the storage device.

[0079] Step S30: after the working voltage meets the video data recording condition, remove the target video data in the virtual buffer and restore the storage of the video data.

[0080] In this embodiment, after determining that the working voltage meets the video data recording conditions and resuming the storage of the video data, the video recording system will also remove the target video data stored in the virtual buffer, and will not save the target video data to the storage device. In the case of removing only the target video data, the video data can still be played coherently, and the user is usually difficult to notice the removal of the video data, and the browsing of the video data is not affected.

[0081] Specifically, step S30 includes steps S31 to S33:

[0082] Step S31: verifying the operating voltage based on the video data recording condition;

[0083] Step S32: after the working voltage meets the video data recording condition, collecting the video data and storing the video data in a memory;

[0084] Step S33: In the virtual buffer, remove the target video data with the mark.

[0085] As an optional implementation for removing the target video data, the video recording system can remove the target video data in the virtual buffer by clearing the virtual buffer area. The video recording system can determine the corresponding target video data according to the physical address associated with the virtual address of the virtual buffer area, and remove the target video data.

[0086] As another optional implementation for removing the target video data, the video recording system may also determine the target video data with the mark in the virtual buffer or memory according to the mark of the target video data, and remove the target video data. The video recording system verifies the working voltage based on the video data recording condition, and after the working voltage meets the video data recording condition, stores the collected video data, and identifies and removes the target video data according to the target video mark.

[0087] The embodiment of the present application interrupts the storage of video data after triggering the virtual write process, uses virtual write to write the target video data collected after the interruption of storage into the virtual buffer, detects the voltage of the video recording system based on a preset interval time, and removes the target video data in the virtual buffer after the voltage meets the video data recording condition, and restores the storage of the video data. In the case where the video data recording is interrupted due to voltage instability, the writing of video data is simulated by virtual writing, so that the video recording program can still respond to other commands of the video recording system while waiting for the voltage to recover, maintain the connection with the video recording system manager, avoid the blocking or disk drop of the video data recording, and improve the stability of the video data recording.

[0088] Based on the same inventive concept, the present application also provides a second embodiment, referring to Figure 2 , Figure 2 This is a flow chart of a second embodiment of a method for recording video data of the present application.

[0089] In this embodiment, as described in step S10, when the virtual writing process is triggered, the target video data collected after the interruption of the video data storage is continuously written into the virtual buffer so that the video recording system remains in the processing state of the target video data, and steps S01 to S03 are also included:

[0090] Step S01: collecting the video data and detecting the working voltage through a voltage detection module;

[0091] In this embodiment, the video recording system monitors the working voltage in the video recording system through the voltage monitoring module while continuously collecting video data. The voltage detection module detects the working voltage based on a preset voltage detection time. The voltage detection time may be the same as or different from the preset interval time.

[0092] Step S02: comparing the working voltage with the video data recording condition;

[0093] Step S03: When the operating voltage does not meet the video data recording condition, triggering the virtual writing process.

[0094] In this embodiment, the video data recording condition is used to determine whether the working voltage in the video recording system meets the working voltage requirement of the video recording device for video recording.

[0095] In one embodiment, the video data recording condition includes a voltage stability interval. The video recording system compares the operating voltage with the boundary to determine whether the operating voltage is within the voltage stability interval. If not, the operating voltage is recorded as an unstable voltage, and based on the unstable voltage, a virtual write process is triggered.

[0096] Optionally, after recording the unstable voltage, the video recording system needs to perform debouncing processing to prevent the unstable voltage from being caused by instantaneous voltage fluctuations. The video recording system determines the corresponding debouncing detection time based on the preset debouncing duration and the recording time of the unstable voltage, and detects the debouncing detection voltage through the voltage detection module when the system time is the debouncing detection time. When the debouncing detection voltage is not in the voltage stability range, the video recording system triggers the virtual writing process and switches to the virtual writing mode.

[0097] Optionally, the user can set the video data recording conditions according to the actual working scene of the video recording device. After receiving the condition setting instruction, the video recording system receives the voltage stability threshold set by the user, determines the voltage stability interval with the voltage stability threshold as the boundary, and generates the video data recording conditions according to the voltage stability interval.

[0098] In this embodiment, the video recording system detects the working voltage of the video recording device through VDT timing, and determines whether the working voltage meets the requirements of the video recording device to safely and stably record video data, and determines to trigger the virtual write process when the working voltage does not meet the requirements.

[0099] Since the system introduced in the second embodiment of the present application is a system used to implement the method of the first embodiment of the present application, based on the method introduced in the first embodiment of the present application, the person skilled in the art can understand the specific structure and deformation of the system, so it is not repeated here. All systems used in the method of the first embodiment of the present application belong to the scope of protection of this application.

[0100] Based on the same inventive concept, the present application also provides a third embodiment, referring to Figure 3 , Figure 3 This is a flow chart of a third embodiment of the method for recording video data of the present application.

[0101] In this embodiment, the video data recording method further includes steps S41 to S43:

[0102] Step S41: Obtaining the interruption time and the recovery time of storing the video data;

[0103] Step S42: Associating the working voltage with the corresponding voltage detection time, and generating log information according to the interruption time, the recovery time and the working voltage;

[0104] Step S43: Based on the log information, a log file is generated and saved, where the log file is used to determine problems that occur in the video recording system.

[0105] In this embodiment, after the video recording system is interrupted due to unstable working voltage, it is necessary to record log information based on the information of the interruption so that users or staff can find and avoid problems in the video recording system.

[0106] Exemplarily, a log template is provided in the video recording system. After obtaining the interruption time of the video data storage interruption and the recovery time of the video data storage recovery, the interruption time and the recovery time can be filled into the corresponding position of the log template. At the same time, the video recording system will associate the working voltage that caused the interruption with the corresponding voltage detection time, and fill them into the log template together to generate log information. The video recording system generates and saves a log file based on the log information.

[0107] In an embodiment of the present application, the video recording system records log information and summarizes the log information that causes the interruption of video recording, so that users or staff can discover and avoid problems that occur in the video recording system.

[0108] Since the system introduced in the third embodiment of the present application is a system used to implement the method of the first embodiment of the present application, based on the method introduced in the first embodiment of the present application, the person skilled in the art can understand the specific structure and deformation of the system, so it is not repeated here. All systems used in the method of the first embodiment of the present application belong to the scope of protection of the present application.

[0109] The present application provides a video data recording device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the video data recording method in the above-mentioned embodiment 1.

[0110] Reference below Figure 4, which shows a schematic diagram of the structure of a video data recording device suitable for implementing the embodiment of the present application. The video data recording device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The video data recording device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0111] like Figure 4 As shown, the video data recording device may include a processing device 1001 (e.g., a core processor, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the video data recording device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the recording device of video data to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a recording device of video data with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0112] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0113] The video data recording device provided by the present application adopts the video data recording method in the above embodiment, which can solve the technical problem that the video recording system is blocked due to unstable voltage during video recording. Compared with the prior art, the beneficial effects of the video data recording device provided by the present application are the same as the beneficial effects of the video data recording method provided by the above embodiment, and other technical features in the video data recording device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0114] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0115] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0116] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the video data recording method in the above-mentioned embodiment.

[0117] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0118] The computer-readable storage medium may be included in the video data recording device, or may exist independently without being installed in the video data recording device.

[0119] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by a video data recording device, the video data recording device: when a virtual write process is triggered, the target video data collected after the interruption of video data storage is continuously written into a virtual buffer, so that the video recording system remains in the processing state of the target video data; detects the operating voltage based on a preset interval time; when the operating voltage meets the video data recording condition, resumes the storage of the video data and removes the target video data in the virtual buffer.

[0120] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0121] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0122] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0123] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned video data recording method, and can solve the technical problem that the video recording system is blocked due to unstable voltage during video recording. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the video data recording method provided by the above-mentioned embodiment, and will not be repeated here.

[0124] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A method for recording video data, characterized in that: The method comprises the following steps: When the virtual writing process is triggered, the target video data collected after the interruption of video data storage is continuously written into the virtual buffer, so that the video recording system remains in the processing state of the target video data; Detecting the operating voltage based on a preset interval; When the working voltage meets the video data recording condition, the storage of the video data is restored, and the target video data in the virtual buffer is removed.

2. The method according to claim 1, characterized in that The step of continuously writing the target video data collected after interrupting the video data storage into the virtual buffer when the virtual writing process is triggered so that the video recording system remains in the processing state of the target video data comprises: After triggering the virtual write process, interrupting the storage of the video data, and using the collected video data as the target video data; Cache the target video data into a memory buffer, and map the target video data into the virtual buffer; The target video data is marked, and a memory address of the target video data in the memory buffer is associated with a virtual address of the target video data in the virtual buffer.

3. The method according to claim 1, characterized in that When the working voltage meets the video data recording condition, the step of restoring the storage of the video data and removing the target video data in the virtual buffer comprises: Based on the video data recording condition, verifying the operating voltage; After the working voltage meets the video data recording condition, collecting the video data and storing the video data in a memory; In the virtual buffer, the target video data with the mark is removed.

4. The method according to claim 1, characterized in that Before the step of continuously writing the target video data collected after interrupting the video data storage into the virtual buffer when the virtual writing process is triggered so that the video recording system remains in the processing state of the target video data, the method further includes: Collecting the video data, and detecting the working voltage through a voltage detection module; comparing the operating voltage with the video data recording condition; When the operating voltage does not meet the video data recording condition, the virtual writing process is triggered.

5. The method according to claim 4, characterized in that Before the step of comparing the operating voltage with the video data recording condition, the method further includes: After receiving the condition setting instruction, receiving the set voltage stability threshold; Taking the voltage stability threshold as a boundary, and determining the voltage stability interval according to the boundary; The video data recording condition is generated according to the voltage stabilization period.

6. The method according to claim 5, characterized in that When the working voltage does not meet the video data recording condition, the step of triggering the virtual writing process includes: Comparing the operating voltage with the boundary to determine whether the operating voltage is within the voltage stability interval; If not, the operating voltage is recorded as an unstable voltage; Based on the unstable voltage, the virtual write process is triggered.

7. The method according to claim 6, characterized in that The step of triggering the virtual write process based on the unstable voltage includes: After recording the unstable voltage, determining a corresponding debouncing detection time according to a preset debouncing time and a recording time of the unstable voltage; Detecting the debouncing detection voltage of the debouncing detection time by the voltage detection module; When the debouncing detection voltage is not in the voltage stabilization interval, the virtual writing process is triggered.

8. The method according to claim 1, characterized in that After the step of removing the target video data in the virtual buffer and restoring the storage of the video data when the operating voltage meets the video data recording condition, the method further includes: Obtaining the interruption time and the recovery time of storing the video data; Associating the operating voltage with a corresponding voltage detection time, and generating log information according to the interruption time, the recovery time and the operating voltage; Based on the log information, a log file is generated and saved, and the log file is used to determine problems that occur in the video recording system.

9. A video data recording device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the video data recording method according to any one of claims 1 to 8.

10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the method for recording video data according to any one of claims 1 to 8 are implemented.