Alarm method, device and equipment based on automobile data recorder and storage medium

By integrating sensors on the dash recorder to detect vehicle collisions and determining the alarm level based on the vehicle safety signal, the problem of alarms being limited to the cabin in the prior art is solved, and alarms are realized to diversified users, enhancing the diversity and effectiveness of alarms.

CN119992685APending Publication Date: 2025-05-13CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510037381.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-09
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

In the prior art, the driving recorder only alarms the personnel in the cabin, which cannot meet the user's needs for the diversity of alarms.

Method used

By integrating target sensors (such as acceleration sensors and gyroscopes) on the dash recorder, detect whether a vehicle has collided and determine the alarm level based on the detection results and vehicle safety signals. Then, the alarm information is processed into a communication message that conforms to the communication transmission, sent to the server, and the corresponding alarm operation is performed according to the alarm level.

Benefits of technology

Alarms are realized to diversified users such as external personnel of the vehicle and emergency contacts, which enhances the diversity and effectiveness of alarms and can better meet the needs of different users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119992685A_ABST
    Figure CN119992685A_ABST
Patent Text Reader

Abstract

The invention relates to an alarm method, device and equipment based on an automobile data recorder and a storage medium, and the method comprises the steps: detecting whether a current vehicle is collided or not according to data collected by a target sensor, and obtaining a detection result; according to the detection result and a vehicle safety signal, alarm information is determined, and the alarm information at least comprises an alarm level; processing the alarm information, and determining a communication message conforming to communication transmission; and sending the communication message to a server, so that the server analyzes the communication message to obtain the alarm information, and executing a corresponding alarm operation according to the alarm level in the alarm information. According to the method, the alarm diversity can be increased, and the requirements of different users are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an alarm method, device, equipment and storage medium based on a driving recorder. Background Art

[0002] Although traffic is well developed in modern society, traffic accidents also occur frequently. In order to record the entire process of a traffic accident, a driving recorder is often installed on the vehicle so that the driving recorder can record the process of the incident and facilitate the division of accident responsibility based on the process.

[0003] In the related art, an automatic alarm function is often added to the driving recorder, so that when an accident occurs, the occupants in the vehicle are alerted.

[0004] However, simply alerting people in the car cabin cannot meet current user needs. Therefore, an alarm method based on a driving recorder is urgently needed. Summary of the invention

[0005] The present application provides an alarm method, device, equipment and storage medium based on a driving recorder, which can increase the diversity of alarms and meet the needs of different users.

[0006] In a first aspect, the present application provides an alarm method based on a driving recorder, the method comprising:

[0007] According to the data collected by the target sensor, detect whether the current vehicle has collided and obtain the detection result;

[0008] Determine alarm information according to the detection result and the vehicle safety signal, wherein the alarm information at least includes an alarm level;

[0009] Processing the alarm information to determine a communication message that is suitable for communication transmission;

[0010] The communication message is sent to a server so that the server parses the communication message to obtain the alarm information, and performs a corresponding alarm operation according to the alarm level in the alarm information.

[0011] Optionally, the target sensor includes an acceleration sensor and a gyroscope, and the detecting whether the current vehicle collides based on data collected by the target sensor to obtain a detection result includes:

[0012] Detecting whether the data collected by the target sensor meets a first condition;

[0013] If the data collected by the target sensor meets the first condition, it is determined that the current vehicle has collided;

[0014] If the data collected by the target sensor does not meet the first condition, it is determined that the current vehicle has not collided;

[0015] The first condition is that at most one data among the multiple data collected by the acceleration sensor is smaller than a first preset value, and at least one data among the multiple data collected by the gyroscope is larger than a second preset value.

[0016] Optionally, determining the alarm information according to the detection result and the vehicle safety signal includes:

[0017] When the detection result is that the current vehicle has not collided and the vehicle safety signal is the first signal, determining the first alarm level as the alarm level;

[0018] When the detection result is that the current vehicle has collided, or the vehicle safety signal is a second signal, determining the second alarm level as the alarm level, wherein the first alarm level is lower than the second alarm level;

[0019] According to the alarm level, the alarm information is determined.

[0020] Optionally, determining the alarm information according to the alarm level includes:

[0021] According to the device ID of the driving recorder, determine the user ID corresponding to the device ID;

[0022] Determine the current vehicle location as the alarm location;

[0023] Determine the alarm video according to the current time point;

[0024] Alarm information is determined according to the alarm level, the device ID, the user ID, the alarm location, the current time point, and the alarm video.

[0025] Optionally, determining the alarm information according to the alarm level, the device ID, the user ID, the alarm location, the current time point, and the alarm video includes:

[0026] Using a preset encryption algorithm, encrypting the alarm position to obtain first data;

[0027] Concatenate the first data and the preset character to obtain second data;

[0028] Alarm information is determined according to the alarm level, the device ID, the user ID, the second data, the current time point and the alarm video.

[0029] Optionally, performing a corresponding alarm operation according to the alarm level in the alarm information includes:

[0030] When the alarm level is the first alarm level, obtaining the user ID, the alarm video, the alarm location and the device ID in the alarm information, determining the vehicle information corresponding to the device ID according to the device ID, and pushing the alarm video, the alarm location and the vehicle information to the account corresponding to the user ID;

[0031] When the alarm level is the second alarm level, the user ID, the alarm video, the alarm location and the device ID in the alarm information are obtained, and the emergency contact number corresponding to the user ID is searched according to the user ID. According to the device ID, the vehicle information corresponding to the device ID is determined, and an alarm text message is generated according to the alarm video, the alarm location and the vehicle information, and the alarm text message is sent to the emergency contact number.

[0032] Optionally, parsing the communication message to obtain the alarm information includes:

[0033] Parsing the communication message to obtain the alarm level, the device ID, the user ID, the second data, the current time point and the alarm video,

[0034] identifying a preset character in the second data, deleting the preset character, and obtaining the first data;

[0035] The first data is decoded using a decryption algorithm corresponding to the encryption algorithm to obtain an alarm location.

[0036] In a second aspect, the present application provides an alarm device based on a driving recorder, the device comprising:

[0037] A detection unit, used to detect whether the current vehicle has collided based on the data collected by the target sensor and obtain a detection result;

[0038] A first determining unit, configured to determine alarm information according to the detection result and the vehicle safety signal, wherein the alarm information at least includes an alarm level;

[0039] A second determining unit, configured to process the alarm information and determine a communication message that is suitable for communication transmission;

[0040] The sending unit is used to send the communication message to the server, so that the server parses the communication message to obtain the alarm information, and performs a corresponding alarm operation according to the alarm level in the alarm information.

[0041] Optionally, the target sensor includes an acceleration sensor and a gyroscope, and the detection unit is used to:

[0042] Detecting whether the data collected by the target sensor meets a first condition;

[0043] If the data collected by the target sensor meets the first condition, it is determined that the current vehicle has collided;

[0044] If the data collected by the target sensor does not meet the first condition, it is determined that the current vehicle has not collided;

[0045] The first condition is that at most one data among the multiple data collected by the acceleration sensor is smaller than a first preset value, and at least one data among the multiple data collected by the gyroscope is larger than a second preset value.

[0046] Optionally, the first determining unit is configured to:

[0047] When the detection result is that the current vehicle has not collided and the vehicle safety signal is the first signal, determining the first alarm level as the alarm level;

[0048] When the detection result is that the current vehicle has collided, or the vehicle safety signal is a second signal, determining the second alarm level as the alarm level, wherein the first alarm level is lower than the second alarm level;

[0049] According to the alarm level, the alarm information is determined.

[0050] Optionally, the first determining unit is configured to:

[0051] According to the device ID of the driving recorder, determine the user ID corresponding to the device ID;

[0052] Determine the current vehicle location as the alarm location;

[0053] Determine the alarm video according to the current time point;

[0054] Alarm information is determined according to the alarm level, the device ID, the user ID, the alarm location, the current time point, and the alarm video.

[0055] Optionally, the first determining unit is configured to:

[0056] Using a preset encryption algorithm, encrypting the alarm position to obtain first data;

[0057] Concatenate the first data and the preset character to obtain second data;

[0058] Alarm information is determined according to the alarm level, the device ID, the user ID, the second data, the current time point and the alarm video.

[0059] Optionally, the sending unit is used to:

[0060] When the alarm level is the first alarm level, obtaining the user ID, the alarm video, the alarm location and the device ID in the alarm information, determining the vehicle information corresponding to the device ID according to the device ID, and pushing the alarm video, the alarm location and the vehicle information to the account corresponding to the user ID;

[0061] When the alarm level is the second alarm level, the user ID, the alarm video, the alarm location and the device ID in the alarm information are obtained, and the emergency contact number corresponding to the user ID is searched according to the user ID. According to the device ID, the vehicle information corresponding to the device ID is determined, and an alarm text message is generated according to the alarm video, the alarm location and the vehicle information, and the alarm text message is sent to the emergency contact number.

[0062] Optionally, the sending unit is used to:

[0063] Parsing the communication message to obtain the alarm level, the device ID, the user ID, the second data, the current time point and the alarm video,

[0064] identifying a preset character in the second data, deleting the preset character, and obtaining the first data;

[0065] The first data is decoded using a decryption algorithm corresponding to the encryption algorithm to obtain an alarm location.

[0066] In a third aspect, the present application provides an alarm device based on a driving recorder, comprising: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor connected to the at least one bus; at least one memory connected to the at least one bus, wherein the processor is configured to:

[0067] According to the data collected by the target sensor, detect whether the current vehicle has collided and obtain the detection result;

[0068] Determine alarm information according to the detection result and the vehicle safety signal, wherein the alarm information at least includes an alarm level;

[0069] Processing the alarm information to determine a communication message that is suitable for communication transmission;

[0070] The communication message is sent to a server so that the server parses the communication message to obtain the alarm information, and performs a corresponding alarm operation according to the alarm level in the alarm information.

[0071] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the above-mentioned driving recorder-based alarm method is implemented.

[0072] The above technical solution provided by the embodiment of the present application has the following advantages over the prior art: In the embodiment of the present application, the driving recorder detects whether the current vehicle has collided based on the data collected by the target sensor, obtains the detection result, and determines the alarm information based on the detection result and the vehicle safety signal. The alarm information at least includes the alarm level. The communication module determines the communication message that complies with the communication transmission based on the processing of the alarm information. The server parses the communication message to obtain the alarm information and issues an alarm based on the alarm level in the alarm information. In the embodiment of the present application, when the driving recorder detects that an alarm is needed, the alarm information is sent to the server, and then the server performs the corresponding alarm operation based on the alarm level in the alarm information, which increases the diversity of the alarm, rather than just alarming the cabin occupants. Therefore, the present application can better meet the needs of different users. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0074] In order to more clearly illustrate the embodiments of the present invention 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.

[0075] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0076] Figure 1 A schematic diagram of a flow chart of an alarm method based on a driving recorder provided in an embodiment of the present application;

[0077] Figure 2 A schematic diagram of a flow chart of a collision detection method provided in an embodiment of the present application;

[0078] Figure 3A flowchart of a method for determining alarm information provided in an embodiment of the present application;

[0079] Figure 4 A flowchart of a method for determining alarm information provided in an embodiment of the present application;

[0080] Figure 5 A flowchart of another method for determining alarm information provided in an embodiment of the present application;

[0081] Figure 6 A flowchart of an alarm operation execution method provided in an embodiment of the present application;

[0082] Figure 7 A flowchart of another data decryption method provided in an embodiment of the present application;

[0083] Figure 8 A schematic diagram of a flow chart of an alarm device based on a driving recorder provided in an embodiment of the present application;

[0084] Fig. 9 A schematic diagram of an alarm device based on a driving recorder provided in an embodiment of the present application. DETAILED DESCRIPTION

[0085] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0086] The disclosure below provides many different embodiments or examples to implement different structures of the present invention. In order to simplify the disclosure of the present invention, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present invention. In addition, the present invention can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.

[0087] A driving recorder is a device installed on a vehicle for recording relevant information such as images and sounds during driving. The driving recorder in the embodiment of the present application is provided with a first interface, which is connected to the acceleration sensor and the gyroscope so that the acceleration sensor and the gyroscope send the collected data to the driving recorder through the interface. Afterwards, the driving recorder monitors the interface to obtain the data collected by the acceleration sensor and the gyroscope. At the same time, the driving recorder is also provided with a second interface, which is used to receive vehicle safety signals, such as ABS (Anti-lock Braking System) signals and AEB (Autonomous Emergency Braking) signals. Among them, the ABS signal is a signal sent by the anti-lock braking system, which is used to determine whether the vehicle has emergency braking. The AEB signal is a signal generated when the vehicle's automatic emergency braking system is working. When the system determines that there is a risk of collision, the system will send this signal. In this way, the driving recorder can obtain vehicle safety signals by monitoring the second interface.

[0088] Furthermore, the driving recorder can also be provided with other interfaces, for example, the recorded video is sent to the vehicle through a certain interface, and the recorded video is then stored by the vehicle. Data is exchanged with the user module in the vehicle through a certain interface to obtain user information stored in the user module. Data is exchanged with the communication module in the vehicle through a certain interface to send out the data in the driving recorder. Of course, the user module and the communication module can also be arranged in the driving recorder, so that the driving recorder directly obtains user data in the user module and sends the data out through the communication module.

[0089] Based on the above, the embodiment of the present application provides an alarm method based on a driving recorder, which can increase the diversity of alarms and meet the needs of different users, such as Figure 1 As shown, the specific steps include:

[0090] Step 101, based on the data collected by the target sensor, detect whether the current vehicle has collided and obtain a detection result.

[0091] In this step, the driving recorder monitors the first interface to obtain data collected by the target sensor, and then detects whether the current vehicle has collided based on the data to obtain a detection result.

[0092] Step 102, determining alarm information according to the detection result and the vehicle safety signal.

[0093] The alarm information includes at least an alarm level, which is used to determine the alarm operation to be performed. The alarm information includes information related to the alarm, such as user information, alarm video, alarm location, and other information.

[0094] Step 103: Process the alarm information to determine a communication message that is suitable for communication transmission.

[0095] In this step, the communication module can be set in the driving recorder or in the vehicle. The communication module can use the pre-set communication protocol to perform data encapsulation, add protocol headers or tails, perform data encoding conversion, encryption or signing, etc. on the alarm information to obtain a communication message that meets the communication transmission requirements.

[0096] For example, the communication protocol is SOMEIP (Scalable service-Oriented MiddlewarE over IP) protocol, or other communication protocols. When the communication protocol is SOMEIP protocol, the communication module may be SOMEIP middleware.

[0097] Furthermore, since the SOMEIP protocol is mainly used to generate and process communication messages in the vehicle network, the communication module can generate communication messages for transmission in the vehicle network based on the SOMEIP protocol, and then send the communication messages to TBOX Network through the vehicle network, so that TBOX Network can re-package, encrypt, compress, encode and convert, verify and calculate the communication messages, and send the processed data to the server.

[0098] Among them, TBOX networking refers to the connection and communication between the vehicle-mounted TBOX (Telematics BOX, vehicle-mounted remote information processor) and the external network, which can realize information interaction between the vehicle and cloud servers, mobile applications, etc., and realize vehicle data upload, remote control, software upgrades, information services and other functions.

[0099] Step 104, sending the communication message to the server, so that the server analyzes the communication message, obtains alarm information, and performs corresponding alarm operations according to the alarm level in the alarm information.

[0100] In this step, when the communication message is uploaded to the server, the server receives the communication message, extracts the alarm information from the communication message according to the preset communication protocol, and performs different operations according to the alarm level in the alarm message.

[0101] In an embodiment of the present application, the driving recorder detects whether the current vehicle has collided based on the data collected by the target sensor, obtains the detection result, and determines the alarm information based on the detection result and the vehicle safety signal. The alarm information includes at least the alarm level. The communication module processes the alarm information to determine the communication message that complies with the communication transmission. The server parses the communication message to obtain the alarm information and issues an alarm based on the alarm level in the alarm information. In an embodiment of the present application, when the driving recorder detects that an alarm is needed, the alarm information is sent to the server, and the server performs the corresponding alarm operation based on the alarm level in the alarm information, thereby increasing the diversity of the alarm, rather than just alarming the cabin occupants. Therefore, the present application can better meet the needs of different users.

[0102] In the embodiment of the present application, the target sensor includes an acceleration sensor and a gyroscope, and the driving recorder can detect whether the current vehicle has collided based on the acceleration sensor and the gyroscope. Therefore, the embodiment of the present application provides a collision detection method, which is a further limitation of step 101, such as Figure 2 As shown, the specific steps are:

[0103] Step 201: Detect whether the data collected by the target sensor meets a first condition.

[0104] The first condition is that at most one of the multiple data collected by the acceleration sensor is less than the first preset value, and at least one of the multiple data collected by the gyroscope is greater than the second preset value. The first preset value and the second preset value are set by technicians based on experience. Generally, the first preset value is set to 70 and the second preset value is set to 90.

[0105] In this step, the acceleration sensor measures the acceleration of the object. When an object is acted upon by an external force, it will generate corresponding acceleration. The acceleration sensor can detect the change in this acceleration and then measure the acceleration values ​​in different directions, including positive and negative acceleration. Generally, it includes acceleration along the X-axis SensorEvent.values[0], acceleration along the Y-axis SensorEvent.values[1], and acceleration along the Z-axis SensorEvent.values[2].

[0106] SensorEvent.values[2]. Since these accelerations may be negative, we need to obtain their absolute values. Specifically, the absolute value of the acceleration along the X axis is

[0107] abs(sensorEvent.values[0]), the absolute value of acceleration along the Y axis is abs(sensorEvent.values[1]), and the absolute value of acceleration along the Z axis is abs(sensorEvent.values[2]). It is detected whether there are two data greater than or equal to the first preset value among these absolute values, that is, only one data is less than the first preset value or no data is less than the first preset value.

[0108] The unit of the gyroscope is radians per second, and it measures the angular velocity of an object rotating around the X, Y, and Z axes. Its coordinate system is the same as that of the accelerometer. If the device is rotating counterclockwise, a positive value will be received when viewing the device in its original position from the positive position of the x, y, and z axes; otherwise, a negative value will be received. This generally includes the rotation rate around the x-axis.

[0109] SensorEvent.values[0], the rotation rate around the y-axis SensorEvent.values[1], and the rotation rate around the z-axis SensorEvent.values[2].

[0110] In practice, the current time point corresponding to the data output by the gyroscope is obtained, and the time difference between the current time point and the previous time point is determined. For each axis, the angle change value is determined according to the time difference and the rotation rate corresponding to the axis. The angle change value is added to the historical angle value corresponding to the axis at the previous time point to determine the angle value corresponding to the current time point. Based on the above, the angle value corresponding to each axis is obtained. The specific code is as follows:

[0111] private fun handleGyroscope(sensorEvent:SensorEvent){

[0112] if (timestamp!==0f) {

[0113] val dT=(sensorEvent.timestamp-timestamp)*NS2S;

[0114] / / The difference between the current time point sensorEvent.timestamp and the previous time point timestamp corresponding to the gyroscope, and convert it to seconds

[0115] angle[0]+=sensorEvent.values[0]*dT; / / Determine the angle change value based on the time difference and the rotation rate corresponding to the axis, add the angle change value and the historical angle value corresponding to the axis at the previous time point to determine the angle value corresponding to the current time point.

[0116] angle[1]+=sensorEvent.values[1]*dT;

[0117] angle[2]+=sensorEvent.values[2]*dT;

[0118] }

[0119] / / Use the current time point as the next previous time point.

[0120] timestamp=sensorEvent.timestamp.toFloat();

[0121] }

[0122] Step 202: If the data collected by the target sensor meets the first condition, it is determined that the current vehicle has collided.

[0123] In this step, if at most one data among the multiple data collected by the acceleration sensor is smaller than the first preset value, and at least one data among the multiple data collected by the gyroscope is larger than the second preset value, it is determined that the current vehicle has collided.

[0124] Furthermore, if two or three of the data collected by the acceleration sensor are greater than or equal to a first preset value, and one or two or three of the data collected by the gyroscope are greater than a second preset value, it is determined that the current vehicle has collided.

[0125] Step 203: If the data collected by the target sensor does not satisfy the first condition, it is determined that the current vehicle has not collided.

[0126] In this step, if two or three of the data collected by the acceleration sensor are smaller than a first preset value, and none of the multiple data collected by the gyroscope is larger than a second preset value, it is determined that the current vehicle has collided.

[0127] Furthermore, if only one data or no data among the data collected by the acceleration sensor is greater than or equal to the first preset value, and all the data collected by the gyroscope are less than or equal to the second preset value, it is determined that the current vehicle has collided.

[0128] In the embodiment of the present application, after the detection result is determined, the alarm information can also be determined according to the detection result and the vehicle safety signal. Therefore, the embodiment of the present application provides a method for determining the alarm information. Figure 3 As shown, the specific steps include:

[0129] Step 301: when the detection result is that the current vehicle has not collided and the vehicle safety signal is the first signal, the first alarm level is determined as the alarm level.

[0130] Among them, the first signal is an ABS signal and an AEB signal for indicating emergency braking. In practice, whether the vehicle is at risk of collision is determined by whether the vehicle safety signal is the first signal. When the vehicle is at risk of collision, the vehicle automatic emergency braking system will automatically send an AEB signal, so that the driving recorder receives the AEB signal through the second interface. When the vehicle is at risk of collision, it is often accompanied by emergency braking. Therefore, when the vehicle is at risk of collision, the vehicle will send an ABS signal indicating emergency braking, so that the driving recorder receives the ABS signal through the second interface.

[0131] In this step, when obtaining the detection result, the driving recorder can also detect whether the second interface transmits a signal and whether the transmitted vehicle safety signal is the first signal to determine whether the vehicle has a collision risk. If the detection result is that the current vehicle has not collided and the vehicle safety signal is the first signal, the first alarm level is determined as the alarm level.

[0132] Step 302: when the detection result is that the current vehicle has collided, or the vehicle safety signal is the second signal, the second alarm level is determined as the alarm level.

[0133] The first alarm level is lower than the second alarm level. The second signal is a collision signal, which may be a signal sent by a collision sensor, a signal sent by an airbag system, or a signal sent by a pre-tensioned seat belt system.

[0134] In this step, when a vehicle collides, the second alarm level needs to be determined as the alarm level, and this step determines whether the current vehicle collides by determining whether the detection result is that the current vehicle collides, or whether the vehicle safety signal is the second signal.

[0135] Step 303: determine the alarm information according to the alarm level.

[0136] In this step, the alarm information is determined according to the alarm level determined based on the above steps.

[0137] In addition, the driving recorder can also be provided with an interface for interacting with the voice module, through which the driving recorder can send the alarm level to the voice module. When the voice module receives the alarm level, it broadcasts a voice message according to the alarm level to inform the owner to observe the surroundings carefully.

[0138] override fun setValue(key:String?,value:String?):String

[0139] { / / Interface sent to voice

[0140] send(DvrStateType.DRIVING_LOOK_OUT,1); / / Send the current state to the voice: DRIVING_LOOK_OUT value, which represents the alarm category; 1 represents a normal alarm, and 2 represents a serious alarm;

[0141] return ""

[0142] }

[0143] In the embodiment of the present application, the alarm information includes not only the alarm level, but also other data, such as the device ID of the driving recorder, the alarm location, the alarm video and other data. Therefore, the embodiment of the present application provides a method for determining the alarm information, such as Figure 4 As shown, the specific steps include:

[0144] Step 401, according to the device ID of the driving recorder, determine the user ID corresponding to the device ID.

[0145] The user ID is an identifier that uniquely indicates the user and is used to find data associated with the user ID.

[0146] In this step, the user module stores data related to the user, such as a user ID. If the user module is set in the driving recorder, the driving recorder can directly obtain the user ID corresponding to itself from the user module. If the user module is set outside the driving recorder, the driving recorder needs to interact with it to obtain the user ID corresponding to itself. For example, the driving recorder sends its own device ID to the user module, and the user module sends the user ID corresponding to the device ID to the driving recorder, so that it can obtain the user ID corresponding to the device.

[0147] Step 402, determining the current vehicle location as an alarm location.

[0148] In this step, the driving recorder may be provided with a GPS, and the current vehicle location is obtained through the GPS, and is determined as the alarm location. Alternatively, the driving recorder obtains data interaction with the GPS installed on the vehicle to obtain the current vehicle location, and is determined as the alarm location.

[0149] Step 403, determine the alarm video according to the current time point.

[0150] In this step, the driving recorder can determine the video corresponding to the preset time period before the current time point as the alarm video.

[0151] Generally, the length of a video is 30 seconds, but it can be other lengths, which is not limited here.

[0152] Step 404, determining the alarm information according to the alarm level, device ID, user ID, alarm location, current time point and alarm video.

[0153] In this step, the alarm level, device ID, user ID, alarm location, current time point and alarm video are used to generate alarm information. In this step, the types corresponding to various data and the names used in the device are also provided, as shown in Table 1.

[0154] Table 1

[0155] describe type name User ID String UserId Alarm video File Video Alarm location String Location Current time point String Time Alarm level String Level

[0156] In the embodiment of the present application, since the location information is relatively sensitive information, it is necessary to encrypt the alarm location first, and then generate the alarm information based on the encrypted alarm location. Therefore, the embodiment of the present application provides a method for determining the alarm information. Figure 5 As shown, the specific steps include:

[0157] Step 501: Use a preset encryption algorithm to encrypt the alarm position to obtain first data.

[0158] Among them, the encryption algorithm is the AES encryption algorithm, which has the advantages of high efficiency, fast speed and small calculation amount.

[0159] In this step, the driving recorder obtains a preset encryption algorithm, encrypts the alarm position, and obtains the encrypted alarm position, that is, obtains the first data.

[0160] Specifically, String encryptLocationStr = AESUtils.

[0161] Encrypt(locationString). This line of code indicates that the Encrypt method in the AESUtils class is used to encrypt the string locationString, and the encrypted result is stored in the encryptLocationStr variable. Among them, the locationString identifier represents the string corresponding to the alarm location. The encryptLocationStr variable corresponds to the first data.

[0162] Step 502: concatenate the first data and the preset character to obtain the second data.

[0163] In order to prevent the first data from being cracked, preset characters may be spliced ​​before or after the first data to obtain the second data.

[0164] For example, StringBuilder sb=newStringBuilder(encryptLocationStr);

[0165] sb.append("@@DVR");

[0166] String location=sb.toString().

[0167] Among them, the StringBuilder method is used to efficiently perform string concatenation and modification operations. The append method is usually used to add content to the end of a string or similar data structure. toString() is used to convert the current object into a string object.

[0168] The process involved in the above code is: create a StringBuilder object sb, and add the previously encrypted string encryptLocationStr (representing the first data) as the initial content. Then, add the custom password "@@DVR" to the sb object, and convert the sb object into a string object.

[0169] Step 503, determining the alarm information according to the alarm level, device ID, user ID, second data, current time point and alarm video.

[0170] In this step, the alarm information is determined according to the alarm level, device ID, user ID, second data, current time point and alarm video.

[0171] In the above process, since the alarm video is generally very large, the alarm video is generally compressed first to obtain a compressed alarm video, and then the alarm information is generated according to the compressed alarm video. The specific code for compressing the alarm video in the above process is:

[0172] val zos=ZipOutputStream(FileOutputStream(videoFile));

[0173] / / Creates a ZipOutputStream object zos and associates it with a FileOutputStream based on the file videoFile.

[0174] val entry=

[0175] ZipEntry(String(video.name.toByteArray(Charsets.ISO_8859_1),Charset.forName("GB2312"))); / / Creates a ZipEntry object entry to convert the character encoding of the video name from ISO_8859_1 to GB2312.

[0176] zos.putNextEntry(entry); / / Set the next entry entry to be written in the compressed output stream zos. The specified entry can be used to determine the relevant information of the next file or data to be compressed.

[0177] val buffer = ByteArray(1024); / / Creates a byte array buffer of size 1024 bytes. This byte array is usually used to temporarily store data in file reading and writing operations.

[0178] val fis = FileInputStream(src); / / Creates a FileInputStream object fis and associates it with the specified source file src. Through this input stream, data can be read from the file.

[0179] var len = fis.read(buffer); / / Read data from the input stream fis into buffer, and assign the length of the read data to the variable len.

[0180] while(len>0){

[0181] len = fis.read(buffer); / / Continue to read data from the input stream fis into buffer until the length of the read data len is 0. In each loop, the length of the read data is obtained through fis.read(buffer) and assigned to len to determine whether to continue reading.

[0182] }

[0183] }

[0184] zos.flush(); / / Refresh the zos object, which means forcing the accumulated data in the output stream to be output to the target location to ensure that the data is written in time to avoid data loss or delayed writing.

[0185] zos.closeEntry(); / / Used to close the current entry in zos. When performing compression operations, each compressed file or data block corresponds to an entry. By calling this method, you can end the processing of the current entry.

[0186] fis.close(); / / Close fis. Closing the stream can release related resources and ensure the correct processing of data and the stable operation of the system.

[0187] zos.close(); / / Close zos. Closing the output stream ensures that all data is written correctly and releases resources associated with the stream.

[0188] In the embodiment of the present application, when the alarm level is relatively high, the server sends the alarm location and alarm video to the emergency contact, so that the emergency contact can understand the relevant situation. When the alarm level is relatively low, the server can push the alarm video, alarm location and vehicle information to the relevant account, so that the emergency contact can learn more information through the relevant account. Therefore, the embodiment of the present application provides an alarm operation execution method, which is as follows: Figure 6 As shown, the specific steps include:

[0189] Step 601, when the alarm level is the first alarm level, obtain the user ID, alarm video, alarm location and device ID in the alarm information, determine the vehicle information corresponding to the device ID according to the device ID, and push the alarm video, alarm location and vehicle information to the account corresponding to the user ID.

[0190] The vehicle information is information related to the vehicle, which may be vehicle model, license plate number, vehicle identification code and other information.

[0191] In this step, when the alarm level is the first alarm level, since the first alarm level is relatively low, after obtaining the user ID, alarm video, alarm location and device ID in the alarm information, the vehicle information corresponding to the device ID can be determined according to the device ID, and the alarm video, alarm location and vehicle information can be pushed to the account corresponding to the user ID for relevant personnel to view.

[0192] It should be noted that if the alarm video is a compressed video, it is necessary to decompress the alarm video and push the decompressed video after the alarm video is pushed. Alternatively, after the alarm video is pushed to the corresponding account, the client of the account will decompress the alarm video and obtain the decompressed video so that the relevant users can view it at any time.

[0193] Step 602, when the alarm level is the second alarm level, obtain the user ID, alarm video, alarm location and device ID in the alarm information, search for the emergency contact number corresponding to the user ID according to the user ID, determine the vehicle information corresponding to the device ID according to the device ID, generate an alarm text message according to the alarm video, alarm location and vehicle information, and send the alarm text message to the emergency contact number.

[0194] In this step, when the alarm level is the second alarm level, since the second alarm level is relatively high, relevant information needs to be sent to relevant personnel so that relevant personnel are informed of the alarm event. Therefore, the user ID, alarm video, alarm location and device ID in the alarm information are obtained, and the emergency contact number corresponding to the user ID is searched according to the user ID. According to the device ID, the vehicle information corresponding to the device ID is determined. According to the alarm video, alarm location and vehicle information, an alarm text message is generated and sent to the emergency contact number.

[0195] Furthermore, the information of the current owner (including the owner's mobile phone number and emergency contact, etc.) is parsed and queried in the database according to the user ID. If the Level is 1, it is classified as the first alarm level, and a message is pushed to the owner's APP through the cloud, and the owner can view the information at that time through the app, etc. If it is 2, it is classified as the second alarm level. In addition to pushing messages to the owner's APP through the cloud, a text message will be pushed to the contact manual according to the contact's mobile phone number, and the contact can view it through a link, etc.

[0196] Among them, Level 1 means the first alarm level corresponds to ordinary notification, which only needs to be sent to the car owner's APP, and the car owner can check it according to the historical records later. Level 2 means the second alarm level corresponds to serious notification, which not only needs to be sent to the car owner's APP, but also needs to be pushed to the emergency contact via SMS. The emergency contact can view the video, location information and time through the SMS connection.

[0197] In the embodiment of the present application, after parsing the communication message and obtaining the alarm information, the server also needs to decrypt the second data to obtain the alarm location. Therefore, the embodiment of the present application provides a data decryption method, such as Figure 7 As shown, the specific steps include:

[0198] Step 701, parse the communication message to obtain the alarm level, device ID, user ID, second data, current time point and alarm video.

[0199] Step 702, identifying preset characters in the second data, deleting the preset characters, and obtaining the first data.

[0200] In this step, the server may compare the preset character with each character in the second data to identify the preset character in the second data, and then delete the preset character in the second data to obtain the first data.

[0201] Furthermore, the custom password "@@DVR" is first removed, and then AES decryption is performed. The specific code statement is: String locationString = AESUtils.decrypt (location).

[0202] Step 703: Use a decryption algorithm corresponding to the encryption algorithm to decode the first data to obtain an alarm location.

[0203] In this step, the server obtains a preset decryption algorithm, which corresponds to the decryption algorithm in step 501, and uses the decryption algorithm to decode the first data to obtain the alarm position.

[0204] Finally, the embodiment of the present application briefly introduces the system framework of the driving recorder. The system framework includes five layers. The first layer is an Android application. The Sensor module is set in the application and is used for sensor-related functional modules. It is responsible for managing and processing sensor operations, including obtaining sensor data, monitoring sensor events, etc. Different sensor types (such as acceleration sensors, gyroscopes, etc.) can interact and use through this module. The second layer is the Java Framework framework layer, which provides various API interfaces for applications. SensorManager encapsulates the relevant API interfaces of Sensor, through which the data of acceleration sensors and collision sensors can be obtained; SensorService implements the Sensor control flow and data flow logic, and performs corresponding processing on various data. The third layer Native Framework is the native c / c++ library of the Android system (including the underlying interface of acceleration and gravity sensors), which provides underlying services for applications and system services. SensorManager communicates with the server-side SensorService as a client to process various data, and provides interfaces and services to the Java Framework layer. The fourth layer, the kernel layer, is the driver of the sensor module, which reads and writes the registers of the sensor module through I2C for control and data reading. The fifth layer, the hardware layer, is mainly the G-sensor hardware sensor.

[0205] Specifically, the control flow and data flow logic of the Sensor module are as follows: 1. Start the SensorService service to start running. 2. Initialize sensors: create and prepare all available sensors. 3. Receive client requests: wait for sensor enable or disable requests from the outside (such as applications). 4. Enable specific sensors: enable the corresponding sensors according to the request and start data collection. 5. Disable specific sensors: stop the corresponding sensors according to the request. 6. Start data collection: After the sensor is enabled, start collecting data and send it to the Sensor module for processing. 7. Process sensor data: process the collected data. 8. Distribute data to subscribers: send the processed data to the required components or users. 9. Wait for requests: continue the loop and wait for new requests.

[0206] In addition, the process of signal transmission in the cockpit is that the signal generated by the vehicle is transmitted to the MCU (Microcontroller Unit) via the CAN bus, and then transmitted by the MCU to the QNX operating system, and then transmitted to the signal middleware, and finally transmitted to the driving recorder.

[0207] like Figure 8 As shown, the embodiment of the present application provides an alarm device based on a driving recorder, which corresponds to the method embodiment and specifically includes:

[0208] The detection unit 801 is used to detect whether the current vehicle has collided according to the data collected by the target sensor and obtain a detection result;

[0209] A first determining unit 802, configured to determine alarm information according to the detection result and the vehicle safety signal, wherein the alarm information at least includes an alarm level;

[0210] A second determining unit 803 is used to process the alarm information and determine a communication message that meets the communication transmission requirements;

[0211] The sending unit 804 is used to send the communication message to the server, so that the server parses the communication message to obtain the alarm information, and performs a corresponding alarm operation according to the alarm level in the alarm information.

[0212] Optionally, the target sensor includes an acceleration sensor and a gyroscope, and the detection unit 801 is used to:

[0213] Detecting whether the data collected by the target sensor meets a first condition;

[0214] If the data collected by the target sensor meets the first condition, it is determined that the current vehicle has collided;

[0215] If the data collected by the target sensor does not meet the first condition, it is determined that the current vehicle has not collided;

[0216] The first condition is that at most one data among the multiple data collected by the acceleration sensor is smaller than a first preset value, and at least one data among the multiple data collected by the gyroscope is larger than a second preset value.

[0217] Optionally, the first determining unit 802 is configured to:

[0218] When the detection result is that the current vehicle has not collided and the vehicle safety signal is the first signal, determining the first alarm level as the alarm level;

[0219] When the detection result is that the current vehicle has collided, or the vehicle safety signal is a second signal, determining the second alarm level as the alarm level, wherein the first alarm level is lower than the second alarm level;

[0220] According to the alarm level, the alarm information is determined.

[0221] Optionally, the first determining unit 802 is configured to:

[0222] According to the device ID of the driving recorder, determine the user ID corresponding to the device ID;

[0223] Determine the current vehicle location as the alarm location;

[0224] Determine the alarm video according to the current time point;

[0225] Alarm information is determined according to the alarm level, the device ID, the user ID, the alarm location, the current time point, and the alarm video.

[0226] Optionally, the first determining unit 802 is configured to:

[0227] Using a preset encryption algorithm, encrypting the alarm position to obtain first data;

[0228] Concatenate the first data and the preset character to obtain second data;

[0229] Alarm information is determined according to the alarm level, the device ID, the user ID, the second data, the current time point and the alarm video.

[0230] Optionally, the sending unit 804 is configured to:

[0231] When the alarm level is the first alarm level, obtaining the user ID, the alarm video, the alarm location and the device ID in the alarm information, determining the vehicle information corresponding to the device ID according to the device ID, and pushing the alarm video, the alarm location and the vehicle information to the account corresponding to the user ID;

[0232] When the alarm level is the second alarm level, the user ID, the alarm video, the alarm location and the device ID in the alarm information are obtained, and the emergency contact number corresponding to the user ID is searched according to the user ID. According to the device ID, the vehicle information corresponding to the device ID is determined, and an alarm text message is generated according to the alarm video, the alarm location and the vehicle information, and the alarm text message is sent to the emergency contact number.

[0233] Optionally, the sending unit 804 is configured to:

[0234] Parsing the communication message to obtain the alarm level, the device ID, the user ID, the second data, the current time point and the alarm video,

[0235] identifying a preset character in the second data, deleting the preset character, and obtaining the first data;

[0236] The first data is decoded using a decryption algorithm corresponding to the encryption algorithm to obtain an alarm location.

[0237] like Fig. 9 As shown, the embodiment of the present application provides an alarm device based on a driving recorder, including a processor 901, a communication interface 902, a memory 903 and a communication bus 904, wherein the processor 901, the communication interface 902, and the memory 903 communicate with each other through the communication bus 904.

[0238] Memory 903, used for storing computer programs;

[0239] In one embodiment of the present application, the processor 901 is used to execute the program stored in the memory 903 to implement the alarm method based on the driving recorder provided by any of the above method embodiments, including:

[0240] According to the data collected by the target sensor, detect whether the current vehicle has collided and obtain the detection result;

[0241] Determine alarm information according to the detection result and the vehicle safety signal, wherein the alarm information at least includes an alarm level;

[0242] Processing the alarm information to determine a communication message that is suitable for communication transmission;

[0243] The communication message is sent to a server so that the server parses the communication message to obtain the alarm information, and performs a corresponding alarm operation according to the alarm level in the alarm information.

[0244] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps performed by the alarm method based on a driving recorder as provided in any of the aforementioned method embodiments are implemented.

[0245] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0246] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0247] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.

[0248] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.

Claims

1. An alarm method based on a driving recorder, characterized in that: The method is applied to a driving recorder, comprising: According to the data collected by the target sensor, detect whether the current vehicle has collided and obtain the detection result; Determine alarm information according to the detection result and the vehicle safety signal, wherein the alarm information at least includes an alarm level; Processing the alarm information to determine a communication message that is suitable for communication transmission; The communication message is sent to a server so that the server parses the communication message to obtain the alarm information, and performs a corresponding alarm operation according to the alarm level in the alarm information.

2. The method according to claim 1, characterized in that: The target sensor includes an acceleration sensor and a gyroscope. The method detects whether the current vehicle collides based on the data collected by the target sensor and obtains the detection result, including: Detecting whether the data collected by the target sensor meets a first condition; If the data collected by the target sensor meets the first condition, it is determined that the current vehicle has collided; If the data collected by the target sensor does not meet the first condition, it is determined that the current vehicle has not collided; The first condition is that at most one data among the multiple data collected by the acceleration sensor is smaller than a first preset value, and at least one data among the multiple data collected by the gyroscope is larger than a second preset value.

3. The method according to claim 1, characterized in that: Determining the alarm information according to the detection result and the vehicle safety signal includes: When the detection result is that the current vehicle has not collided and the vehicle safety signal is the first signal, determining the first alarm level as the alarm level; When the detection result is that the current vehicle has collided, or the vehicle safety signal is a second signal, determining the second alarm level as the alarm level, wherein the first alarm level is lower than the second alarm level; According to the alarm level, the alarm information is determined.

4. The method according to claim 3, characterized in that: Determining the alarm information according to the alarm level includes: According to the device ID of the driving recorder, determine the user ID corresponding to the device ID; Determine the current vehicle location as the alarm location; Determine the alarm video according to the current time point; Alarm information is determined according to the alarm level, the device ID, the user ID, the alarm location, the current time point, and the alarm video.

5. The method according to claim 4, characterized in that: The determining of alarm information according to the alarm level, the device ID, the user ID, the alarm location, the current time point and the alarm video includes: Using a preset encryption algorithm, encrypting the alarm position to obtain first data; Concatenate the first data and the preset character to obtain second data; Alarm information is determined according to the alarm level, the device ID, the user ID, the second data, the current time point and the alarm video.

6. The method according to claim 4, characterized in that: The performing a corresponding alarm operation according to the alarm level in the alarm information includes: When the alarm level is the first alarm level, obtaining the user ID, the alarm video, the alarm location and the device ID in the alarm information, determining the vehicle information corresponding to the device ID according to the device ID, and pushing the alarm video, the alarm location and the vehicle information to the account corresponding to the user ID; When the alarm level is the second alarm level, the user ID, the alarm video, the alarm location and the device ID in the alarm information are obtained, and the emergency contact number corresponding to the user ID is searched according to the user ID. According to the device ID, the vehicle information corresponding to the device ID is determined, and an alarm text message is generated according to the alarm video, the alarm location and the vehicle information, and the alarm text message is sent to the emergency contact number.

7. The method according to claim 5, characterized in that: The parsing of the communication message to obtain the alarm information includes: Parsing the communication message to obtain the alarm level, the device ID, the user ID, the second data, the current time point and the alarm video, identifying a preset character in the second data, deleting the preset character, and obtaining the first data; The first data is decoded using a decryption algorithm corresponding to the encryption algorithm to obtain an alarm location.

8. An alarm device based on a driving recorder, characterized in that: The device comprises: A detection unit, used to detect whether the current vehicle has collided based on the data collected by the target sensor and obtain a detection result; A first determining unit, configured to determine alarm information according to the detection result and the vehicle safety signal, wherein the alarm information at least includes an alarm level; A second determining unit, configured to process the alarm information and determine a communication message that is suitable for communication transmission; The sending unit is used to send the communication message to the server, so that the server parses the communication message to obtain the alarm information, and performs a corresponding alarm operation according to the alarm level in the alarm information.

9. An alarm device based on a driving recorder, characterized in that: include: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor connected to the at least one bus; at least one memory connected to the at least one bus, wherein the processor is configured to: According to the data collected by the target sensor, detect whether the current vehicle has collided and obtain the detection result; Determine alarm information according to the detection result and the vehicle safety signal, wherein the alarm information at least includes an alarm level; Processing the alarm information to determine a communication message that is suitable for communication transmission; The communication message is sent to a server so that the server parses the communication message to obtain the alarm information, and performs a corresponding alarm operation according to the alarm level in the alarm information.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the alarm method based on a driving recorder according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Drive recorder

    CN102236920A

  • Vehicle Collision Detection System

    CN109050527A

  • Abnormal power-off playable video method of a traffic recorder based on an Android structure

    CN109167951A

  • Automobile data recorder control method and device and automobile data recorder

    CN110769423A

  • Vehicle accident alarm method and device, storage medium and automobile data recorder

    CN111275848A