CN117496617A - Recording method and device for driving records and electronic equipment - Google Patents

Recording method and device for driving records and electronic equipment Download PDF

Info

Publication number
CN117496617A
CN117496617A CN202311313308.7A CN202311313308A CN117496617A CN 117496617 A CN117496617 A CN 117496617A CN 202311313308 A CN202311313308 A CN 202311313308A CN 117496617 A CN117496617 A CN 117496617A
Authority
CN
China
Prior art keywords
database
memory
target
recording
data recorder
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311313308.7A
Other languages
Chinese (zh)
Inventor
韩育龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Aixin Yuanzhi Semiconductor Ningbo Co ltd
Original Assignee
Aixin Yuanzhi Semiconductor Ningbo Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Aixin Yuanzhi Semiconductor Ningbo Co ltd filed Critical Aixin Yuanzhi Semiconductor Ningbo Co ltd
Priority to CN202311313308.7A priority Critical patent/CN117496617A/en
Publication of CN117496617A publication Critical patent/CN117496617A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/71Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2379Updates performed during online database operations; commit processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C5/00Registering or indicating the working of vehicles
    • G07C5/08Registering or indicating performance data other than driving, working, idle, or waiting time, with or without registering driving, working, idle or waiting time
    • G07C5/0841Registering performance data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • H04N5/91Television signal processing therefor
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Software Systems (AREA)
  • Signal Processing (AREA)
  • Time Recorders, Dirve Recorders, Access Control (AREA)

Abstract

The application provides a recording method and device of a driving record and electronic equipment, wherein the method comprises the following steps: in response to detecting a collision event of the vehicle, acquiring a preset identifier of the target memory; detecting an original memory when the automobile data recorder is turned off last time through a preset identification of a target memory; if the target memory is the same as the original memory, loading the stored recording information in the database and the on-site recording information for recording the collision of the vehicle, and storing the on-site recording information into the database; if the vehicle collision information is different, deleting the database, creating a target database with the same name in a target memory, recording on-site recording information of the vehicle collision, and writing the on-site recording information into the target database. According to the method, the stored recording information is loaded through the file database, so that the time from loading the stored recording information to starting video recording when the automobile data recorder is started can be effectively shortened, and the problems that the starting time of the automobile data recorder is slow and on-site recording information of vehicle collision cannot be recorded are solved.

Description

Recording method and device for driving records and electronic equipment
Technical Field
The present disclosure relates to the field of communications control technologies, and in particular, to a recording method and apparatus for driving records, and an electronic device.
Background
The automobile data recorder is an instrument for recording information related to images, sounds, and the like during the running of the automobile, and can store the related information as recorded information and store the recorded information on a memory. After the automobile is provided with the automobile data recorder, images and sounds during running of the automobile can be recorded, and important data and information can be provided for accident analysis of traffic accidents through recorded information such as stored images and sounds.
The startup scene of the automobile data recorder can be divided into two types, one is startup in the running process of the automobile, for example, after the automobile is started, the automobile data recorder can be automatically or manually started so that the automobile data recorder records images and sounds in the running process of the automobile. The other is that the vehicle is started when a collision event occurs under the static state, namely, the collision is started. For example, when a flameout vehicle is parked in a garage or other temporary parking points and has a collision event, for example, when the flameout vehicle is collided and scratched by other vehicles, the automobile data recorder can be automatically started up, and the on-site recording information of the collision is recorded after the memory is scanned.
In order to record on-site recording information of a vehicle collision, the automobile data recorder scans recorded information stored in a memory after the automobile is started up, however, the time consumption for scanning the recorded information increases gradually along with the increase of the quantity of the recorded information, so that the starting time of the automobile data recorder is reduced, the on-site recording information of the vehicle collision cannot be recorded, and the automobile accident is not legal.
Disclosure of Invention
The application provides a recording method, a recording device and electronic equipment for driving records, which are used for solving the problems that the time consumption for scanning recorded information increases with the increase of the number of recorded information, so that the starting time of a driving recorder is slow, and on-site recorded information of vehicle collision cannot be recorded.
In a first aspect, some embodiments of the present application provide a recording method of a driving record, including:
in response to detecting a collision event of a vehicle, acquiring a preset identifier of a target memory in the automobile data recorder;
detecting an original memory when the automobile data recorder is turned off last time through the preset identification of the target memory;
if the target memory is the same as the original memory, loading stored recording information in a database and recording on-site recording information of vehicle collision, and storing the on-site recording information into the database;
if the target memory is different from the original memory, deleting the database, creating a target database with the same name as the deleted database in the target memory, recording on-site recording information of vehicle collision, and writing the on-site recording information into the target database.
In some possible embodiments, before the step of obtaining the preset identifier of the target memory in the automobile data recorder, the method further includes:
detecting a collision event of the vehicle by a gravitational acceleration sensor;
detecting the collision event, and generating an interrupt signal of a gravity acceleration sensor;
and responding to the interrupt signal, powering on the automobile data recorder, and triggering the automobile data recorder to start.
In some possible embodiments, the recording method of the driving record further includes:
in response to detecting a power-on signal for powering up the automobile data recorder, starting a monitoring module in the automobile data recorder;
initializing a camera of the automobile data recorder, and recording on-site recording information of the automobile through the monitoring module and the camera.
In some possible embodiments, the recording method of the driving record further includes:
acquiring an initial coordinate value of a target position of the gravity acceleration sensor;
acquiring a final coordinate value of the target position after the vehicle collides;
calculating a coordinate difference value according to the initial coordinate value and the final coordinate value;
if the coordinate difference value is greater than or equal to a preset threshold value, determining that a collision event exists in the vehicle;
and if the coordinate difference value is smaller than the preset threshold value, determining that the vehicle has no collision event.
In some possible embodiments, the step of detecting the original memory when the automobile data recorder is turned off last time through the preset identifier of the target memory includes:
acquiring an original storage identifier of an original storage before the last shutdown of the automobile data recorder;
acquiring a target storage identifier of a target storage when the automobile data recorder is started;
if the original storage identification is the same as the target storage identification, determining that the target storage is the same as the original storage;
and if the original storage identification is different from the target storage identification, determining that the target storage is different from the original storage.
In some possible embodiments, before the step of recording live recording information of a vehicle crash, further comprising:
detecting the storage state of a database; the storage state comprises an effective state and an ineffective state;
if the storage state is the effective state, generating a recording instruction so that the automobile data recorder records on-site recording information of the collision of the automobile according to the recording instruction;
if the storage state is the invalid state, acquiring a database name of the database, and creating a target database with the same name as the database name in the memory.
In some possible embodiments, the recording method of the driving record further includes:
monitoring the starting state of the automobile data recorder, wherein the starting state comprises a starting state and a closing state;
responding to the starting state as the starting state, and starting the database;
and closing the database in response to the starting state being the shutdown state.
In some possible embodiments, in the recording method of the driving record of any one of the foregoing embodiments, the database, the deleted database and the target database are all Sqlite file databases, and the Sqlite file databases adopt WAL mode, so that the Sqlite file databases support multi-thread reading and single-thread writing.
In a second aspect, some embodiments of the present application provide a recording apparatus for driving records, including: the device comprises a preset identification acquisition module, a detection module, a first judgment module and a second judgment module;
the preset identifier acquisition module is used for: in response to detecting a collision event of a vehicle, acquiring a preset identifier of a target memory in the automobile data recorder;
the detection module is used for: detecting an original memory when the automobile data recorder is turned off last time through the preset identification of the target memory;
the first judging module is used for: if the target memory is the same as the original memory, loading stored recording information in a database and recording on-site recording information of vehicle collision, and storing the on-site recording information into the database;
the second judging module is used for: deleting the database if the target memory is different from the original memory, creating a target database with the same name as the deleted database in the memory, recording on-site recording information of the collision of the vehicle, and writing the on-site recording information into the target database.
In a third aspect, some embodiments of the present application provide an electronic device, including:
a processor;
a memory communicatively coupled to the processor;
the memory stores instructions executable by the processor to cause the processor to perform the recording method of the driving record according to any one of the first aspect.
As can be seen from the above technical content, the present application provides a recording method and apparatus for driving records, and an electronic device, where the method includes: in response to detecting a collision event of a vehicle, acquiring a preset identifier of a target memory in the automobile data recorder; detecting an original memory when the automobile data recorder is turned off last time through a preset identification of a target memory; if the target memory is the same as the original memory, loading the stored recording information in the database and recording the on-site recording information of the vehicle collision, and storing the on-site recording information into the database; if the target memory is different from the original memory, deleting the database, creating a target database with the same name as the deleted database in the target memory, recording on-site recording information of the collision of the vehicle, and writing the on-site recording information into the target database. According to the method, the stored recording information is loaded through the file database, so that the time from loading the stored recording information to starting video recording when the automobile data recorder is started can be effectively shortened, and the problems that the starting time of the automobile data recorder is slow and on-site recording information of vehicle collision cannot be recorded are solved.
Drawings
In order to more clearly illustrate the technical solutions of the present application, the drawings that are needed in the embodiments will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
Fig. 1 is a schematic flow chart of a recording method of a driving record according to some embodiments of the present application;
fig. 2 is a schematic flow chart of powering on and triggering a power-on of a vehicle event data recorder according to some embodiments of the present application;
FIG. 3 is a flow chart of detecting a vehicle crash event provided in some embodiments of the present application;
fig. 4 is a flowchart of detecting an original memory of a vehicle recorder when the vehicle recorder is turned off last time through a preset identifier of a target memory according to some embodiments of the present application.
Detailed Description
Reference will now be made in detail to the embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The embodiments described in the examples below do not represent all embodiments consistent with the present application. Merely as examples of systems and methods consistent with some aspects of the present application as detailed in the claims.
In the driving process of the vehicle or when the vehicle is parked in a garage or other temporary parking points to generate a collision event, on-site recording information needs to be provided for providing basis for analysis and responsibility determination of the traffic accident, for example, the recording information can comprise information such as a path, a file size, recording duration, starting time, ending time and the like of a recording file recorded by a vehicle recorder. The automobile data recorder is an instrument for recording information related to images, sounds, and the like during the running of the automobile, and can store the related information as recorded information and store the recorded information on a memory. After the automobile is provided with the automobile data recorder, images and sounds during running of the automobile can be recorded, and important data and information can be provided for accident analysis of traffic accidents through recorded information such as stored images and sounds.
In some embodiments, the boot-up scenario of the automobile data recorder may be divided into two types, one is boot-up during the running process of the automobile. For example, after the vehicle is started, the automobile data recorder can be automatically or manually started, so that the automobile data recorder records images and sounds during running of the vehicle. The other is that the vehicle is started when a collision event occurs under the static state, namely, the collision is started. For example, when a flameout vehicle is parked in a garage or other temporary parking points and has a collision event, for example, when the flameout vehicle is collided and scratched by other vehicles, the automobile data recorder can be automatically started up, and the on-site recording information of the collision is recorded after the memory is scanned.
In some embodiments, in order to record the on-site recording information of the vehicle collision, the tachograph scans the recorded information stored in the memory after the collision is started, but the time consumption of scanning the recorded information increases with the increase of the amount of the recorded information, so that the starting time of the tachograph is slow, the on-site recording information of the vehicle collision cannot be recorded, and the vehicle accident is not legal.
In order to solve the problem that the time consumption of scanning recorded information increases with the increase of the number of recorded information, so that the startup time of a vehicle recorder is slow and the on-site recorded information of vehicle collision cannot be recorded, some embodiments of the present application provide a recording method of vehicle records.
In order to facilitate understanding of the technical solutions in some embodiments of the present application, the following details of each step are described with reference to some specific embodiments and the accompanying drawings. Fig. 1 is a schematic flow chart of a recording method of a driving record according to some embodiments of the present application, as shown in fig. 1, the method may include the following steps S1 to S4:
step S1: and responding to the detected collision event of the vehicle, and acquiring a preset identification of a target memory in the automobile data recorder.
Fig. 2 is a schematic flow chart of powering up and triggering powering on a vehicle event data recorder according to some embodiments of the present application, and as shown in fig. 2, in some embodiments, before the step of obtaining the preset identifier of the target memory in the vehicle event data recorder, the following flow may be further executed. Firstly, a collision event of a vehicle can be detected through a gravity acceleration sensor, an interrupt signal of the gravity acceleration sensor can be generated, and the vehicle recorder is powered on and triggered to start up in response to the interrupt signal.
The gravitational acceleration sensor may be, for example, a Gsensor gravitational acceleration sensor capable of sensing a change in acceleration force, i.e. a force acting on the object as it progresses. For example, various movement changes such as shaking, falling, rising, falling, collision, etc. can be converted into electrical signals by the gcnsor gravitational acceleration sensor. The gcnser gravitational acceleration sensor is in a normal power supply mode and has low power consumption, so that a collision event of the vehicle can be detected by the gcnser gravitational acceleration sensor. When a collision event of the vehicle is detected, an interrupt signal of the gravity acceleration sensor, namely, an interrupt condition of an electric signal is generated, and the vehicle recorder can be powered on by responding to the interrupt signal, and the vehicle recorder is automatically triggered to start.
In order to detect a collision event of a vehicle, referring to fig. 3, fig. 3 is a schematic flow chart of detecting a collision event of a vehicle provided in some embodiments of the present application, in some embodiments, an initial coordinate value of a target position of a gravitational acceleration sensor may be obtained, a final coordinate value of the target position after the vehicle collides may be obtained, then a coordinate difference value is calculated according to the initial coordinate value and the final coordinate value, and if the coordinate difference value is greater than or equal to a preset threshold value, it may be determined that the vehicle has a collision event, and if the coordinate difference value is less than the preset threshold value, it may be determined that the vehicle does not have a collision event. The target position of the gravitational acceleration sensor may be set according to the actual situation, for example, a physical center point of the gravitational acceleration sensor may be a physical center point of the gravitational acceleration sensor, or may be another designated point, which is not limited in this application.
For example, the gcensor gravitational acceleration sensor may collect initial coordinate values of the target position, such as initial coordinate values X1, Y1, and Z1 of X, Y, Z axes, and final coordinate values of the target position after the collision of the vehicle are X2, Y2, and Z2, and the coordinate difference may be calculated by using the two sets of coordinate values. If the change of the coordinate difference value is larger after the collision event occurs to the vehicle, an interrupt signal is generated, and the automobile data recorder is powered on and is automatically triggered to start. The threshold may be set according to actual situations, for example, may be set to one or more levels according to the device information of the gcnsor gravitational acceleration sensor, which is not limited in this application.
In order to realize the recording function of the automobile data recorder, in some embodiments, a monitoring module may be disposed in the automobile data recorder, and the monitoring module may be used for monitoring a power-on signal of the automobile data recorder, recording on-site recording information of the vehicle, and the like. In response to detecting a power-on signal of the automobile data recorder, a monitoring module in the automobile data recorder can be started, and a camera of the automobile data recorder is initialized so as to record on-site recording information of the automobile through the monitoring module and the camera.
After the collision event detection is completed, a preset identification of a target memory in the automobile data recorder can be obtained in response to the detection of the collision event of the automobile. The target memory is a memory placed in the automobile data recorder when the automobile data recorder is started, and the target memory has a unique identification code for identifying the uniqueness of the target memory. After the completion of the execution of step S1, the following step S2 may be executed.
Step S2: and detecting an original memory when the automobile data recorder is turned off last time through a preset identification of the target memory.
Because the automobile data recorder scans the internal memory after being started, whether the target memory is the original memory at the last shutdown or not needs to be detected, so that different scanning flows are executed according to different detection results.
In order to detect the consistency of the target memory and the original memory, in some embodiments, the original memory when the automobile data recorder is turned off last time may be detected by a preset identifier of the target memory. Fig. 4 is a schematic flow chart of detecting an original memory when a vehicle recorder is turned off last time through a preset identifier of a target memory according to some embodiments of the present application, as shown in fig. 4, in some embodiments, when consistency between the target memory and the original memory is detected, an original storage identifier of the original memory before the vehicle recorder is turned off last time may be obtained first, then a target storage identifier of the target memory when the vehicle recorder is turned on is obtained, and by comparison, if the original storage identifier is the same as the target storage identifier, it may be determined that the target memory is the same as the original memory, that is, the two memories are the same memory. If the original storage identity is not the same as the target storage identity, it may be determined that the target storage is different from the original storage, i.e., the two are different storages.
The identification code used to identify the memory may be, for example, a card identification number of the memory, which may be represented as a CID. The original storage identifier and the target storage identifier can be compared, if the card identifier CID of the original storage identifier is the same as the card identifier CID of the target memory, the target memory is the same as the original memory, and the memory may not be replaced before the automobile data recorder is started. If the two are different, the target memory is different from the original memory, and the memory may be replaced before the automobile data recorder is started. Thus, the consistency of the target memory and the original memory can be detected. After the completion of the execution of step S2, the following step S3 may be executed.
Step S3: if the target memory is the same as the original memory, the stored recording information in the database and the on-site recording information of the collision of the vehicle are loaded, and the on-site recording information is stored in the database.
And detecting the consistency of the target memory and the original memory, and executing different processes according to different results. If the target memory is the same as the original memory, the stored recording information in the database and the on-site recording information of the vehicle collision can be loaded, and the on-site recording information is stored in the database.
In some embodiments, the database may be a Sqlite file database that uses WAL mode such that the Sqlite file database supports multi-threaded reads and single-threaded writes. Compared with the stored recorded information in the scanning memory, when the automobile data recorder is started, if the memory is traversed by the way of scanning the stored recorded information in the memory, when 4000 stored recorded information exists, the traversing is completed for at least 20 seconds. If the stored record information is loaded by adopting a file database loading mode, 4000 stored record information are also available, and the loading can be completed within 1 second by adopting the file database mode, so that the loading speed is rapidly improved, and the loading time can be obviously shortened. Therefore, when the stored recording information is loaded through the file database, the time from loading the stored recording information to starting video recording when the automobile data recorder is started can be effectively shortened, and the problems that the starting time of the automobile data recorder is slow and on-site recording information of vehicle collision cannot be recorded are solved. Moreover, even when the number of stored recorded information increases, the file database is loaded in the same manner, and the capacity of the memory is not infinitely large, and therefore, the number of stored recorded information is not infinitely large, and the test data shows that when the number of stored recorded information increases by one, two or more times, the time for loading the file database does not change much, for example, only about 1 second is required.
Therefore, in the technical scheme, the loading time of the stored recording information cannot be increased along with the increment of the number of files, the stored recording information can be loaded in a very short time, the recording function of the automobile data recorder cannot be affected, the quick video recording function of the automobile data recorder after the automobile data recorder is started can be realized, and the data basis can be provided for collision events in time. After the completion of the execution of step S3, the following step S4 may be executed.
Step S4: if the target memory is different from the original memory, deleting the database, creating a target database with the same name as the deleted database in the memory, recording on-site recording information of the collision of the vehicle, and writing the on-site recording information into the target database.
When the target memory is different from the original memory, the database can be deleted, a target database with the same name as the deleted database is created in the target memory, the on-site recording information of the vehicle collision is recorded, and the on-site recording information is written into the target database. For example, when the target memory is different from the original memory, a new memory may be replaced, the database stored before the replacement may be deleted, the target database with the same name as the deleted database may be created in the new target memory, and then the recorded live recording information may be written into the target database.
It should be noted that in the embodiment of the present application, the database, the deleted database and the target database are all the Sqlite file databases, and the Sqlite file databases adopt the WAL mode, so that the Sqlite file databases can support multi-thread reading and single-thread writing, the loading time of the stored recording information is shortened, and the function of fast recording of the automobile data recorder is realized.
To ensure the validity of the on-site recording information entry, in some embodiments, the following steps may be performed prior to the step of recording on-site recording information of a vehicle crash. Firstly, the storage state of the database can be detected, the storage state comprises an effective state and an ineffective state, and if the storage state of the database is the effective state, a recording instruction is generated, so that the automobile data recorder records on-site recording information of the collision of the automobile according to the recording instruction. And if the storage state of the database is an invalid state, the database name of the database can be acquired, and a target database with the same name as the database name can be created in the memory. Therefore, by detecting the storage state of the database, the on-site recording information can be recorded when the database is in an effective state, and when the database is invalid, the invalid database can be deleted, a target database with the same name as the deleted database is established, and then the on-site recording information recorded by the automobile data recorder is rewritten into the target database, so that the validity of on-site recording information storage is ensured.
In order to save memory resources of the target memory, in some embodiments, a startup state of the tachograph may be monitored, which may include a startup state and a shutdown state. In response to the startup state being the startup state, the database can be started, and in response to the startup state being the shutdown state, the database can be closed, so that the memory resources of the target memory can be saved. It can be understood that when the vehicle recorder is started, the database is in a normally open state, and in the process of recording on-site recording information by the vehicle recorder, the on-site recording information can be written into the database in real time, and after the recording function is completed, all on-site recording information is stored into the database. When the automobile data recorder is shut down, the database is closed, namely the data of the on-site recording information in the database is dropped, so that the memory resource of the target storage can be saved.
Some embodiments of the present application further provide a recording device for driving records, including: the device comprises a preset identification acquisition module, a detection module, a first judgment module and a second judgment module;
the preset identifier acquisition module is used for: in response to detecting a collision event of a vehicle, acquiring a preset identifier of a target memory in the automobile data recorder;
the detection module is used for: detecting an original memory when the automobile data recorder is turned off last time through the preset identification of the target memory;
the first judging module is used for: if the target memory is the same as the original memory, loading stored recording information in a database and recording on-site recording information of vehicle collision, and storing the on-site recording information into the database;
the second judging module is used for: deleting the database if the target memory is different from the original memory, creating a target database with the same name as the deleted database in the memory, recording on-site recording information of the collision of the vehicle, and writing the on-site recording information into the target database.
Some embodiments of the present application further provide an electronic device, including:
a processor, and a memory communicatively coupled to the processor;
the memory stores instructions executable by the processor to enable the processor to execute the recording method of the driving record in the method embodiment.
As can be seen from the above technical solutions, the above embodiments provide a recording method and apparatus for driving records, and an electronic device, where the method includes: in response to detecting a collision event of a vehicle, acquiring a preset identifier of a target memory in the automobile data recorder; detecting an original memory when the automobile data recorder is turned off last time through a preset identification of a target memory; if the target memory is the same as the original memory, loading the stored recording information in the database and recording the on-site recording information of the vehicle collision, and storing the on-site recording information into the database; if the target memory is different from the original memory, deleting the database, creating a target database with the same name as the deleted database in the target memory, recording on-site recording information of the collision of the vehicle, and writing the on-site recording information into the target database. According to the method, the stored recording information is loaded through the file database, so that the starting time of the automobile data recorder cannot be increased along with the increment of the quantity of the recording information, the time from the loading of the stored recording information to the starting of the video recording when the automobile data recorder is started can be effectively shortened, and the problems that the starting time of the automobile data recorder is slow and the on-site recording information of the automobile collision cannot be recorded are solved.
The foregoing detailed description of the embodiments is merely illustrative of the general principles of the present application and should not be taken in any way as limiting the scope of the invention. Any other embodiments developed in accordance with the present application without inventive effort are within the scope of the present application for those skilled in the art.

Claims (10)

1. The recording method of the driving record is characterized by comprising the following steps of:
in response to detecting a collision event of a vehicle, acquiring a preset identifier of a target memory in the automobile data recorder;
detecting an original memory when the automobile data recorder is turned off last time through the preset identification of the target memory;
if the target memory is the same as the original memory, loading stored recording information in a database and recording on-site recording information of vehicle collision, and storing the on-site recording information into the database;
if the target memory is different from the original memory, deleting the database, creating a target database with the same name as the deleted database in the target memory, recording on-site recording information of vehicle collision, and writing the on-site recording information into the target database.
2. The recording method of a driving record according to claim 1, further comprising, before the step of obtaining the preset identifier of the target memory in the driving recorder:
detecting a collision event of the vehicle by a gravitational acceleration sensor;
detecting the collision event, and generating an interrupt signal of a gravity acceleration sensor;
and responding to the interrupt signal, powering on the automobile data recorder, and triggering the automobile data recorder to start.
3. The recording method of a driving record according to claim 2, further comprising:
in response to detecting a power-on signal for powering up the automobile data recorder, starting a monitoring module in the automobile data recorder;
initializing a camera of the automobile data recorder, and recording on-site recording information of the automobile through the monitoring module and the camera.
4. The recording method of a driving record according to claim 2, further comprising:
acquiring an initial coordinate value of a target position of the gravity acceleration sensor;
acquiring a final coordinate value of the target position after the vehicle collides;
calculating a coordinate difference value according to the initial coordinate value and the final coordinate value;
if the coordinate difference value is greater than or equal to a preset threshold value, determining that a collision event exists in the vehicle;
and if the coordinate difference value is smaller than the preset threshold value, determining that the vehicle has no collision event.
5. The method for recording a driving record according to claim 1, wherein the step of detecting the original memory of the driving record when the driving record is turned off last time by the preset identifier of the target memory comprises:
acquiring an original storage identifier of an original storage before the last shutdown of the automobile data recorder;
acquiring a target storage identifier of a target storage when the automobile data recorder is started;
if the original storage identification is the same as the target storage identification, determining that the target storage is the same as the original storage;
and if the original storage identification is different from the target storage identification, determining that the target storage is different from the original storage.
6. The method for recording a driving record according to claim 1, further comprising, before the step of recording the live recording information of the vehicle crash:
detecting the storage state of a database; the storage state comprises an effective state and an ineffective state;
if the storage state is the effective state, generating a recording instruction so that the automobile data recorder records on-site recording information of the collision of the automobile according to the recording instruction;
if the storage state is the invalid state, acquiring a database name of the database, and creating a target database with the same name as the database name in the memory.
7. The recording method of a driving record according to claim 1, further comprising:
monitoring the starting state of the automobile data recorder, wherein the starting state comprises a starting state and a closing state;
responding to the starting state as the starting state, and starting the database;
and closing the database in response to the starting state being the shutdown state.
8. The method for recording a driving record according to any one of claims 1 to 7, wherein the database, the deleted database and the target database are all Sqlite file databases, and the Sqlite file databases adopt WAL mode, so that the Sqlite file databases support multi-thread reading and single-thread writing.
9. A recording device for driving records, comprising: the device comprises a preset identification acquisition module, a detection module, a first judgment module and a second judgment module;
the preset identifier acquisition module is used for: in response to detecting a collision event of a vehicle, acquiring a preset identifier of a target memory in the automobile data recorder;
the detection module is used for: detecting an original memory when the automobile data recorder is turned off last time through the preset identification of the target memory;
the first judging module is used for: if the target memory is the same as the original memory, loading stored recording information in a database and recording on-site recording information of vehicle collision, and storing the on-site recording information into the database;
the second judging module is used for: deleting the database if the target memory is different from the original memory, creating a target database with the same name as the deleted database in the memory, recording on-site recording information of the collision of the vehicle, and writing the on-site recording information into the target database.
10. An electronic device, comprising:
a processor;
a memory communicatively coupled to the processor;
wherein the memory stores instructions executable by the processor to cause the processor to perform the method of recording a tachograph in accordance with any one of claims 1-8.
CN202311313308.7A 2023-10-10 2023-10-10 Recording method and device for driving records and electronic equipment Pending CN117496617A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311313308.7A CN117496617A (en) 2023-10-10 2023-10-10 Recording method and device for driving records and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311313308.7A CN117496617A (en) 2023-10-10 2023-10-10 Recording method and device for driving records and electronic equipment

Publications (1)

Publication Number Publication Date
CN117496617A true CN117496617A (en) 2024-02-02

Family

ID=89673421

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311313308.7A Pending CN117496617A (en) 2023-10-10 2023-10-10 Recording method and device for driving records and electronic equipment

Country Status (1)

Country Link
CN (1) CN117496617A (en)

Similar Documents

Publication Publication Date Title
US20090024274A1 (en) Recording device and recording method
US20140058583A1 (en) Event Data Recording for Vehicles
FR2977694A1 (en) MICROPROCESSOR PROTECTS AGAINST A BATTERY OVERFLOW
JP4858913B2 (en) Data storage device, data storage method, and data storage program
CN110555006A (en) log recording method, battery management system, vehicle and electronic equipment
US7801652B2 (en) Method for storing data concerning an operating fault of a device
CN111986348A (en) Video and vehicle-mounted video cyclic caching method and device and computer equipment
CN117496617A (en) Recording method and device for driving records and electronic equipment
CN112133357B (en) eMMC test method and device
CN116886848A (en) Video code rate control method, device, computer equipment and medium
CN110324549B (en) Video recording method, device and equipment
JPH07249137A (en) Data recording device for vehicle
KR101604183B1 (en) Method and system for recording files in storage of event data recorder
CN114627576A (en) Parking monitoring video recording method, equipment and medium
CN114037547A (en) Vehicle insurance accident processing method, device, system and equipment
CN111813748B (en) File system mounting method and device, electronic equipment and storage medium
CN114397869A (en) Engine ECU (electronic control Unit) flashing method, flashing diagnosis method and device
CN114546717A (en) Method and device for starting android intelligent terminal, intelligent terminal and storage medium
CN106033220A (en) Method of detecting ECU Flash erasing and writing state and system thereof
CN114238119A (en) Automatic testing method and system for android application and storage medium
CN111385511B (en) Video data processing method and device and video recording equipment
EP2045779B1 (en) Vehicular control apparatus and program storage medium
CN112819994B (en) Automobile data recorder based on Internet of vehicles and control method thereof
CN113223598B (en) Disk testing method, device, equipment and medium based on IO hijacking
CN116597237B (en) Belt start detection method, system, storage medium and computer

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination