Vehicle driving data access method, device, electronic device and storage medium

By using the data verification mechanism in the automobile memory, only the storage area that passed the verification or the target driving data is determined based on the main data, the problem of reading vehicle driving data in the prior art is solved, and the instrument MCU is improved start-up efficiency.

CN114942725BActive Publication Date: 2025-01-07GUANGZHOU XIAOPENG MOTORS TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210520574.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-12
Publication Date
2025-01-07
Estimated Expiration
2042-05-12

AI Technical Summary

Technical Problem

When reading vehicle driving data, the existing automotive instrument microcontroller unit (MCU) needs to read all data at once, resulting in too long reading time and prolonging the startup time.

Method used

Data verification is performed using the first storage area and the second storage area in the vehicle memory. If one of the areas passes the verification, only the target driving data of the area is read; if neither area passes the verification, the The primary data of the first storage area determines the target travel data, reducing the need to not read all data.

Benefits of technology

It effectively shortens the time to read vehicle driving data and reduces the start time of the instrument MCU.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114942725B_ABST
    Figure CN114942725B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a method, device, electronic device and storage medium for accessing vehicle driving data, which are applied to a vehicle; the memory of the vehicle includes a first storage area and a second storage area; the method includes: performing data verification on the vehicle driving data stored in at least one storage area of ​​the first storage area and the second storage area; if one of the storage areas of the first storage area and the second storage area passes the data verification, the first target driving data is read from the storage area that passes the data verification; if both the first storage area and the second storage area fail the data verification, the first target driving data is determined according to the first driving master data stored in the first storage area. The implementation of the embodiment of the present application can effectively shorten the time for reading vehicle driving data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of automotive electronic technology, and in particular to a method, device, electronic device and storage medium for accessing vehicle driving data. Background Art

[0002] With the continuous upgrading of automobile electrification and integration, the automobile instrument microcontroller unit (MCU) needs to store more and more driving information, such as total mileage, short mileage, driving time and many other important driving information. These driving information involve trial production, manufacturing and after-sales service. When the vehicle needs to read driving information, the existing method often reads all the vehicle driving data in the memory at one time. For example, when the vehicle needs to read the total mileage, all the total mileage stored in the vehicle will be read at one time, and the maximum total mileage read will be used as the total mileage recorded by the vehicle at the end. However, this method causes the time to read the vehicle driving data to be too long, and also prolongs the startup time of the vehicle instrument MCU. Summary of the invention

[0003] The embodiments of the present application disclose a method, device, electronic device and storage medium for accessing vehicle driving data, which can effectively shorten the time for reading vehicle driving data, thereby shortening the startup time of the vehicle instrument MCU.

[0004] The embodiment of the present application discloses a method for accessing vehicle driving data, characterized in that the method is applied to a vehicle; the memory of the vehicle includes a first storage area and a second storage area; the method includes:

[0005] Performing data verification on vehicle driving data stored in at least one of the first storage area and the second storage area;

[0006] If one of the first storage area and the second storage area passes the data verification, reading the first target driving data from the storage area that passes the data verification;

[0007] If both the first storage area and the second storage area fail the data verification, the first target driving data is determined according to the first driving master data stored in the first storage area.

[0008] As an optional implementation manner, the performing data verification on the vehicle driving data stored in at least one of the first storage area and the second storage area includes:

[0009] Performing data verification on the first driving master data stored in the first storage area;

[0010] When the first storage area fails the data verification, the first driving backup data stored in the second storage area is subjected to data verification.

[0011] As an optional implementation manner, if one of the first storage area and the second storage area passes the data verification, reading the first target driving data from the storage area that passes the data verification includes:

[0012] If the first storage area passes the data verification, reading the first target driving data from the first storage area;

[0013] If the first storage area fails the data verification and the second storage area passes the data verification, the first target driving data is read from the second storage area.

[0014] As an optional implementation manner, the first storage area includes at least two first driving master data; if both the first storage area and the second storage area fail to pass the data verification, determining the first target driving data according to the first driving master data stored in the first storage area includes:

[0015] If both the first storage area and the second storage area fail the data verification, at least two first driving master data stored in the first storage area are compared in pairs to determine the first target driving data.

[0016] As an optional implementation manner, the first storage area includes at least two first storage sub-areas, and the at least two first driving master data are read from different first storage sub-areas; and comparing the at least two first driving master data stored in the first storage area in pairs to determine the first target driving data includes:

[0017] Compare the at least two first travel master data read from different first storage sub-areas in pairs to detect whether there is first travel master data with equal values ​​among the at least two first travel master data stored in the first storage area;

[0018] If there are first main driving data with the same value, the first main driving data with the same value is determined as the first target driving data.

[0019] As an optional implementation manner, the first storage area includes at least two first storage sub-areas, and the at least two first driving master data are read from different first storage sub-areas; and comparing the at least two first driving master data stored in the first storage area in pairs to determine the first target driving data includes:

[0020] Compare the at least two first driving master data read from different first storage sub-areas in pairs, and if the at least two first driving master data stored in the first storage area are not equal, calculate the difference between the first driving master data in the first storage area;

[0021] If the difference between each of the first main driving data is less than a first threshold, an average value of each of the first main driving data in the first storage area is calculated, and the average value is determined as the first target driving data.

[0022] As an optional implementation manner, the first storage area includes at least two first storage sub-areas, and the at least two first driving master data are read from different first storage sub-areas; and comparing the at least two first driving master data stored in the first storage area in pairs to determine the first target driving data includes:

[0023] The at least two first driving main data read from different first storage sub-areas are compared pairwise. If the at least two first driving main data stored in the first storage area are not equal, and the difference between each of the first driving main data in the first storage area is greater than a first threshold, the first target driving data is determined to be 0.

[0024] As an optional implementation manner, after comparing the at least two first driving master data stored in the first storage area in pairs to determine the first target driving data, the method further includes:

[0025] The first target driving data is written into the first storage area and the second storage area to obtain second driving master data stored in the first storage area and second driving backup data stored in the second storage area.

[0026] As an optional implementation, the method further includes:

[0027] When the vehicle is traveling, obtaining real-time traveling data of the vehicle;

[0028] When the difference between the real-time driving data and the first target driving data is greater than a second threshold, the real-time driving data is determined as the second target driving data.

[0029] The embodiment of the present application discloses a device for accessing vehicle driving data, which is applied to a vehicle; the memory of the vehicle includes a first storage area and a second storage area; the device includes:

[0030] A verification module, used for performing data verification on the vehicle driving data stored in at least one of the first storage area and the second storage area;

[0031] A reading module, configured to read the first target driving data from the storage area that passes the data verification if one of the first storage area and the second storage area passes the data verification;

[0032] A determination module is used to determine the first target driving data according to the first driving master data stored in the first storage area if both the first storage area and the second storage area fail to pass the data verification.

[0033] An embodiment of the present application discloses an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor implements any one of the vehicle driving data access methods disclosed in the embodiment of the present application.

[0034] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute any one of the vehicle driving data access methods disclosed in the embodiment of the present application.

[0035] Compared with the related art, the embodiments of the present application have the following beneficial effects:

[0036] Performing data verification on vehicle driving data stored in at least one of a first storage area and a second storage area included in a memory of the vehicle; reading first target driving data from one of the first storage area and the second storage area that passes the data verification; when neither the first storage area nor the second storage area passes the data verification, determining the first target driving data based on the first driving master data in the first storage area, and reading the first target driving data.

[0037] The memory in the embodiment of the present application includes a first storage area and a second storage area for storing vehicle driving data, which is equivalent to a main data area and a backup data area. The vehicle driving data can be stored in the above two storage areas. Therefore, when reading the vehicle driving data, it is not unconditional and all vehicle driving data is read at one time, but when one of the storage areas in the first storage area and the second storage area passes the data verification, only one of the storage areas that passes the data verification is read; and when neither the first storage area nor the second storage area passes the data verification, only the first storage area is read, and the first target driving data is determined according to the first driving master data in the first storage area. Therefore, it is not necessary to read all vehicle driving data at one time, which shortens the time of reading vehicle driving data and also shortens the time of starting the vehicle instrument MCU. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0039] Figure 1 It is a flowchart of a method for accessing vehicle driving data disclosed in an embodiment of the present application;

[0040] Figure 2 It is a flowchart of another method for accessing vehicle driving data disclosed in an embodiment of the present application;

[0041] Figure 3 It is a flowchart of another method for accessing vehicle driving data disclosed in an embodiment of the present application;

[0042] Figure 4 It is a flowchart of another method for accessing vehicle driving data disclosed in an embodiment of the present application;

[0043] Figure 5 It is a structural schematic diagram of a device for storing and accessing vehicle driving data disclosed in an embodiment of the present application;

[0044] Figure 6 It is a structural schematic diagram of an electronic device disclosed in an embodiment of the present application. DETAILED DESCRIPTION

[0045] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only 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 creative work are within the scope of protection of this application.

[0046] It should be noted that the terms "including" and "having" and any variations thereof in the embodiments of the present application and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.

[0047] The embodiments of the present application disclose a method, device, electronic device and storage medium for accessing vehicle driving data, which can reduce the number of memory partitions, thereby reducing the storage space required for vehicle driving data and shortening the time for reading vehicle driving data. Detailed descriptions are given below.

[0048] See also Figure 1 , Figure 1 : is a flow chart of a method for accessing vehicle driving data disclosed in an embodiment of the present application. Figure 1 The described method for accessing vehicle driving data is applied to a vehicle; a memory of the vehicle includes a first storage area and a second storage area.

[0049] like Figure 1 As shown, the method for accessing vehicle driving data may include the following steps:

[0050] 101. Perform data verification on vehicle driving data stored in at least one of a first storage area and a second storage area.

[0051] The memory of the vehicle may be a memory in the vehicle instrument MCU, which is used to store vehicle driving data. The vehicle driving data may include information such as total mileage, small mileage, driving time, etc. The first storage area and the second storage area may be memory space in the memory.

[0052] The vehicle driving data may include vehicle driving master data and vehicle driving backup data. The vehicle driving master data and the vehicle driving backup data may be two identical data and may be copies of each other. The first storage area may be a storage area for storing the vehicle driving master data, and the second storage area may be a storage area for storing the vehicle driving backup data. The first storage area may be a master data area, the second storage area may be a backup data area, and the vehicle driving backup data may be backup data of the vehicle driving master data.

[0053] Before reading the vehicle driving data, data verification can be performed on the vehicle driving data stored in at least one of the first storage area and the second storage area to determine whether the vehicle driving data in the first storage area and / or the second storage area is lost. Optionally, data verification can be performed on the vehicle driving data stored in the first storage area, or on the vehicle driving data stored in the second storage area, or on both the first storage area and the second storage area.

[0054] The data verification method may include parity check, CRC check, LRC check, Gray code check, etc., without specific limitation.

[0055] Optionally, when writing vehicle driving data into the first storage area and the second storage area, a corresponding first verification code can be generated for each vehicle driving data, and when reading the vehicle driving data, a corresponding new second verification code can be regenerated for each vehicle driving data. The data verification can be to compare the first verification code and the second verification code corresponding to the vehicle driving data. If the first verification code and the second verification code corresponding to one of the vehicle driving data are the same, it means that the vehicle driving data has passed the data verification; if the first verification code and the second verification code are different, it means that the vehicle driving data cannot pass the data verification.

[0056] 102. If one of the first storage area and the second storage area passes the data verification, read the first target driving data from the storage area that passes the data verification.

[0057] The fact that the storage area passes the data verification indicates that there is no data loss or loss of the vehicle driving data in the storage area. If the first storage area passes the data verification, the first target driving data can be read from the first storage area; if the second storage area passes the data verification, the first target driving data can be read from the second storage area.

[0058] The first target driving data is vehicle driving data read from a memory of the vehicle after the vehicle is started.

[0059] As an optional implementation, if each vehicle driving data in the storage area passes the data verification, it can be considered that the storage area passes the data verification, and it is only necessary to determine any vehicle driving data in the storage area as the first target driving data and read the first target form data;

[0060] Alternatively, if the number of vehicle driving data that pass the data verification in the storage area exceeds a quantity threshold, it is determined that the storage area passes the data verification, and the vehicle driving data that pass the data verification in the storage area is determined as the first target driving data; for example, if there is at least one vehicle driving data that passes the data verification in the storage area, the vehicle driving data that passes the data verification can be determined as the first target driving data.

[0061] As another optional implementation, the first storage area can be divided into at least two first storage sub-areas, and the second storage area can be divided into at least two second storage sub-areas, and each first storage sub-area and each second storage sub-area have their corresponding verification codes to verify whether the vehicle driving data stored in the storage sub-area is lost. For example, the first storage area can be divided into three first storage sub-areas, and the second storage area can be divided into three second storage sub-areas. Each storage sub-area can include one vehicle driving data, or can include multiple vehicle driving data. Each storage sub-area has a corresponding verification code, and when the storage area is verified, the data is verified for each storage sub-area in the storage area. For example, when the first storage area is verified, the data is verified for each first storage sub-area in the first storage area, and each first storage sub-area has its corresponding verification code.

[0062] Optionally, if each first storage sub-area in the first storage area passes the data verification, it means that the first storage area passes the data verification; or, if the number of first storage sub-areas in the first storage area that pass the data verification exceeds a quantity threshold, it means that the first storage area passes the data verification.

[0063] Optionally, if each second storage sub-area in the second storage area passes the data verification, it means that the second storage area passes the data verification; or, if the number of second storage sub-areas in the second storage area that pass the data verification exceeds a quantity threshold, it means that the second storage area passes the data verification.

[0064] The embodiment of the present application adds a second storage area for storing vehicle driving backup data. When the vehicle driving main data in the first storage area is damaged or lost, the vehicle driving backup data stored in the second storage area can be used as the first target driving data, thereby providing a data backup function.

[0065] 103. If both the first storage area and the second storage area fail the data verification, determine the first target driving data according to the first driving master data stored in the first storage area.

[0066] The first travel master data is vehicle travel data stored in the first storage area.

[0067] The fact that both the first storage area and the second storage area fail to pass the data verification may mean that each vehicle driving data in the first storage area fails to pass the data verification and each vehicle driving data in the second storage area fails to pass the data verification.

[0068] The first target driving data can be determined based on the first driving master data stored in the first storage area. Optionally, the first driving master data with the largest value in the first storage area can be used as the first target driving data; the average, median or mode of each first driving master data in the first storage area can be used as the first target driving data, but it is not limited thereto.

[0069] In some embodiments, when the vehicle is traveling, real-time driving data of the vehicle is acquired; when the difference between the real-time driving data and the first target driving data is greater than a second threshold, the real-time driving data is determined as the second target driving data.

[0070] In some embodiments, after acquiring the second target driving data, the second target driving data may be written into the first storage area and the second storage area; or, the first storage area may include at least two first storage sub-areas, and the second storage area may include at least two second storage sub-areas, and the second target driving data may be written into each first storage sub-area and each second storage sub-area. While writing the second target driving data into the first storage area and the second storage area, the verification code of the second target driving data may be simultaneously written into the first storage area and the second storage area. Therefore, when acquiring the second target driving data, the embodiment of the present application does not need to write the second target driving data into the storage area in a loop, but only needs to write the second target driving data into the designated first storage area and the second storage area, or each first storage sub-area in the first storage area and each second storage sub-area in the second storage area, which simplifies the logic of storing vehicle driving data and reduces the storage space used for loop writing.

[0071] The second target driving data is the vehicle driving data updated during the vehicle driving process. For example, the second target driving data can be the updated total mileage, and the second threshold can be 1 kilometer. Exemplarily, after the vehicle is started, the vehicle's MCU will read the first target driving data from the memory, and the vehicle will obtain the real-time driving data in real time during the driving process; when it is detected that the difference between the real-time driving data and the first target driving data is greater than 1 kilometer, the real-time driving data can be determined as the second target driving data.

[0072] During the startup process of the vehicle, the step of determining the real-time driving data as the second target driving data when the difference between the real-time driving data and the first target driving data is greater than the second threshold value can be cyclically executed until the vehicle stops working.

[0073] Generally speaking, vehicle driving data may include information such as total mileage, small mileage and driving time. The total mileage is the data most frequently accessed by the vehicle instrument. The maximum total mileage required to be stored in the instrument is 999,999 kilometers. The total mileage is stored once every kilometer traveled by the car. Therefore, the memory is written very frequently, resulting in a reduced service life of the memory.

[0074] Based on the memory's write life of 100,000 times, in order for the memory's life to meet the requirement of 999,999 kilometers of access, the automotive industry generally divides the total mileage into no less than 10 areas for storage. Each time the total mileage is updated, the changed total mileage is stored in the divided memory areas in a cyclic manner, thereby reducing the number of writes to each area of ​​the memory. In addition, when the total mileage needs to be obtained, all areas storing the total mileage are read out, and the maximum valid total mileage read is used as the total mileage recorded last by the car.

[0075] The memory of the vehicle in the embodiment of the present application includes a first storage area and a second storage area for storing vehicle driving data, which are equivalent to a main data area and a backup data area. The vehicle driving data can be stored in the above two storage areas; therefore, when writing vehicle driving data, there is no need to cyclically write to each memory area, and multiple memory areas originally used for cyclic writing are removed, which can reduce the number of memory partitions and the storage space required for vehicle driving data; and when it is necessary to obtain vehicle driving data, there is no need to read all memory areas, which shortens the time for reading vehicle driving data.

[0076] See also Figure 2 , Figure 2 FIG. 1 is a flow chart of another method for accessing vehicle driving data disclosed in an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:

[0077] 201. Perform data verification on first driving master data stored in a first storage area.

[0078] The first driving master data is vehicle driving data stored in the first storage area. When reading the vehicle driving data, the first driving master data may be read first.

[0079] 202. When the data in the first storage area fails to pass the data verification, perform data verification on the first driving backup data stored in the second storage area.

[0080] The first driving backup data is vehicle driving data stored in the second storage area, and can be backup data of the first driving master data. The first driving backup data can be used as backup data when the first storage master data is damaged.

[0081] 203. If the first storage area passes the data verification, read the first target driving data from the first storage area.

[0082] The first target driving data may be the vehicle driving data last recorded during the vehicle's last driving process.

[0083] 204. If the first storage area fails the data verification and the second storage area passes the data verification, the first target driving data is read from the second storage area.

[0084] When reading vehicle driving data, the vehicle can first perform data verification on the first driving master data stored in the first storage area; if the first storage area passes the data verification, the first target driving data is read from the first storage area, and the first target driving data is used as the vehicle driving data read from the memory; wherein the first target driving data can be the first driving master data in the first storage area that passes the data verification.

[0085] If the first storage area fails the data verification, the first driving backup data stored in the second storage area is verified; if the second storage area passes the data verification, the first target driving data is read from the second storage area, and the first target driving data is used as the vehicle driving data read from the memory; wherein the first target driving data may be the first driving backup data in the second storage area that passes the data verification.

[0086] When the vehicle driving data needs to be read, the embodiment of the present application first performs data verification on the first storage area to determine whether to read the first target driving data from the first storage area, and then performs data verification on the second storage area to determine whether to read the first target driving data from the second storage area. The prior art is to read out all the storage areas in the memory storing the vehicle driving data, and use the largest and valid vehicle driving data read as the first target driving data. The embodiment of the present application does not need to read out all the storage areas in the memory storing the vehicle driving data at one time, which speeds up the speed of reading the vehicle driving data and speeds up the startup time of the instrument MCU.

[0087] 205. If both the first storage area and the second storage area fail the data verification, compare at least two first driving master data stored in the first storage area in pairs to determine the first target driving data.

[0088] The first storage area includes at least two first driving master data. If both the first storage area and the second storage area fail to pass the data verification, the at least two first driving master data stored in the first storage area can be compared with each other. Optionally, the differences between the first driving master data can be compared through variance analysis, or the first driving master data can be sorted by size.

[0089] The performance of existing memory is constantly improving, and the write life is also increased from 100,000 times to 2 million times. In order to make full use of the write life of the memory of 2 million times, the embodiment of the present application deletes the logic of writing the vehicle driving data into multiple memory areas in a loop, and directly writes the vehicle driving data into the specified first storage area and second storage area, so that the logic of storing the vehicle driving data becomes simple and efficient. At the same time, the multiple memory areas originally reserved for writing the vehicle driving data in a loop are removed, which reduces the storage space required for the vehicle driving data, and also shortens the time for reading the vehicle driving data, speeding up the startup speed of the instrument MCU. At the same time, the embodiment of the present application solves the problem of no backup of data when the storage area is damaged in the past by using the first driving backup data in the second storage area as the backup data of the first driving master data in the first storage area. When the vehicle driving master data in the first storage area is damaged or lost, the vehicle driving backup data stored in the second storage area can be used as the first target driving data, which increases the function of data backup.

[0090] See also Figure 3 , Figure 3 It is a flowchart of another method for accessing vehicle driving data disclosed in an embodiment of the present application.

[0091] 301. Perform data verification on vehicle driving data stored in at least one of a first storage area and a second storage area.

[0092] The first storage area is a primary data area, and the second storage area is a backup area.

[0093] 302. If one of the first storage area and the second storage area passes the data verification, read the first target driving data from the storage area that passes the data verification.

[0094] The first storage area includes at least two first driving master data. The first storage area includes at least two first storage sub-areas, and the at least two first driving master data are read out from different first storage sub-areas.

[0095] 303. If both the first storage area and the second storage area fail the data verification, at least two first travel master data read from different first storage sub-areas are compared in pairs to detect whether there are first travel master data with equal values ​​among the at least two first travel master data stored in the first storage area.

[0096] 304. If there are first driving master data with the same value, determine the first driving master data with the same value as the first target driving data.

[0097] When the first storage area fails the data verification, it means that each first driving master data in the first storage area is damaged or lost. If at least two first driving master data read from different first storage sub-areas have first driving master data with equal values, it means that the data loss of the first driving master data with equal values ​​is the smallest. Therefore, the first driving master data with equal values ​​is determined as the first target driving data.

[0098] Optionally, if there are multiple groups of first driving main data with equal values, the group of first driving main data with the largest value can be determined as the first target driving data; or the average value of each group of first driving main data with equal values ​​can be determined as the first target driving data.

[0099] 305 . Write the first target driving data into the first storage area and the second storage area to obtain second driving master data stored in the first storage area and second driving backup data stored in the second storage area.

[0100] The second driving master data may be equal to the first target driving data, and the second driving backup data may be equal to the first target driving data. When both the first storage area and the second storage area are damaged or lost, writing the first target driving data into the designated first storage area and the second storage area is to perform data recovery on the first storage area and the second storage area.

[0101] The embodiment of the present application solves the problem that vehicle driving data cannot be restored and has no backup when it is lost. The first storage area is divided into at least two first storage sub-areas. When it is detected that both the first storage area and the second storage area are damaged and lost, data recovery is achieved by obtaining equal values ​​in at least two first driving master data read from different first storage sub-areas.

[0102] See also Figure 4 , Figure 4 It is a flowchart of another method for accessing vehicle driving data disclosed in an embodiment of the present application.

[0103] 401. Perform data verification on vehicle driving data stored in at least one of the first storage area and the second storage area.

[0104] The first storage area includes at least two first travel master data.

[0105] The first storage area includes at least two first storage sub-areas, and the at least two first travel master data are read out from different first storage sub-areas.

[0106] 402. If one of the first storage area and the second storage area passes the data verification, read the first target driving data from the storage area that passes the data verification.

[0107] 403. If both the first storage area and the second storage area fail the data verification, at least two first driving master data read from different first storage sub-areas are compared with each other. If the at least two first driving master data stored in the first storage area are not equal, the difference between each first driving master data in the first storage area is calculated.

[0108] 404. If the difference between each first driving master data is less than the first threshold, calculate the average value of each first driving master data in the first storage area, and determine the average value as the first target driving data.

[0109] The difference between each first driving master data is less than the first threshold, which means that although each first driving master data has data loss, the degree of loss is not high. Therefore, the average value of each first driving master data can be calculated and used to realize data recovery.

[0110] In some embodiments, at least two first driving master data read from different first storage sub-areas are compared pairwise. If at least two first driving master data stored in the first storage area are not equal, and the difference between each first driving master data in the first storage area is greater than a first threshold, the first target driving data is determined to be 0.

[0111] If at least two first driving master data stored in the first storage area are not equal, and the difference between each first driving master data in the first storage area is greater than the first threshold, it means that each first driving master data is seriously lost or completely lost. Therefore, the data can be restored and the first target driving data is determined to be 0.

[0112] 405 . Write the first target driving data into the first storage area and the second storage area to obtain second driving master data stored in the first storage area and second driving backup data stored in the second storage area.

[0113] An embodiment of the present application provides a method for data recovery, which divides a first storage area into at least two first storage sub-areas. When it is detected that both the first storage area and the second storage area are damaged or lost, data recovery is achieved by obtaining equal values ​​and an average value of at least two first driving master data read from different first storage sub-areas, thereby avoiding problems such as being unable to recover data when vehicle driving data is lost and having no backup data.

[0114] In some embodiments, the method for accessing vehicle driving data is as follows:

[0115] The memory of the vehicle includes a first storage area and a second storage area. The first storage area may include three first storage sub-areas, namely, main data area 1, main data area 2, and main data area 3; the second storage area may include three second storage sub-areas, namely, backup data area 1, backup data area 2, and backup data area 3. Each area has a corresponding verification code to verify whether the vehicle driving data stored in the area is lost. The vehicle driving data may include the first driving main data stored in each first storage sub-area and the first driving backup data stored in each second storage sub-area.

[0116] Step 1: When the vehicle is started, the instrument MCU reads the first target driving data from the memory: A. Read the vehicle driving data of the main data area 1, the main data area 2 and the main data area 3, and determine whether these three areas can pass the data verification. If they can all pass the data verification, the vehicle driving data of the main data area 1 is used as the first target driving data, and jump to step 2, otherwise jump to B; B. Read the vehicle driving data of the backup data area 1, the backup data area 2 and the backup data area 3, and determine whether these three areas can pass the data verification. If they can all pass the data verification, the vehicle driving data of the backup data area 1 is used as the first target driving data, and jump to step 2, otherwise jump to C; C. The main data area 1, the main data area 2 and the main data area 3 are read. The vehicle driving data stored in main data area 2 and main data area 3 are compared in pairs to see if there are equal values. If so, the equal values ​​and their check codes are written into the three first storage sub-areas and the three second storage sub-areas, and the equal values ​​are used as the first target driving data, and the process goes to step 2, otherwise, the process goes to D; D. The vehicle driving data stored in main data area 1, main data area 2 and main data area 3 are compared in pairs to see if the errors are all within the allowable range. If they are all within the allowable range, the average values ​​of the three vehicle driving data and their check codes are written into the three first storage sub-areas and the three second storage sub-areas, and the average values ​​are used as the first target driving data, and the process goes to step 2, otherwise, the process goes to E; E. The total mileage is 0.

[0117] Step 2: Based on the first target driving data read in step 1, the real-time driving data of the vehicle is obtained in real time during the driving of the vehicle, and then jump to step 3.

[0118] Step 3: The vehicle stores the second target driving data: Determine whether the real-time driving data obtained in step 2 is not less than 1 kilometer compared with the first target driving data stored last time. If it is not less than 1 kilometer, write the second target driving data and its verification code into the 3 first storage sub-areas and 3 second storage sub-areas, and jump to step 4, otherwise jump to step 2.

[0119] Step 4: During vehicle startup, repeat steps 2 and 3 until the vehicle is turned off.

[0120] See also Figure 5 , Figure 5 1 is a schematic diagram of a vehicle driving data storage and access device disclosed in an embodiment of the present application. The device can be applied to vehicles. Figure 5 As shown, the vehicle driving data access device 500 may include: a verification module 510 , a reading module 520 , and a determination module 530 .

[0121] A verification module 510, configured to perform data verification on the vehicle driving data stored in at least one of the first storage area and the second storage area;

[0122] The reading module 520 is configured to read the first target driving data from the storage area that passes the data verification if one of the first storage area and the second storage area passes the data verification;

[0123] The determination module 530 is configured to determine the first target driving data according to the first driving master data stored in the first storage area if both the first storage area and the second storage area fail the data verification.

[0124] In one embodiment, the verification module 510 is further used to perform data verification on the first driving main data stored in the first storage area; when the first storage area fails the data verification, the first driving backup data stored in the second storage area is verified.

[0125] In one embodiment, the reading module 520 is also used to read the first target driving data from the first storage area if the first storage area passes the data verification; if the first storage area does not pass the data verification and the second storage area passes the data verification, read the first target driving data from the second storage area.

[0126] In one embodiment, the first storage area includes at least two first driving master data; the determination module 530 is also used to compare the at least two first driving master data stored in the first storage area in pairs to determine the first target driving data if both the first storage area and the second storage area fail the data verification.

[0127] In one embodiment, the first storage area includes at least two first storage sub-areas, and at least two first driving main data are read from different first storage sub-areas; the determination module 530 is also used to compare the at least two first driving main data read from different first storage sub-areas in pairs to detect whether there are first driving main data with equal values ​​among the at least two first driving main data stored in the first storage area; if there are first driving main data with equal values, the first driving main data with equal values ​​are determined as the first target driving data.

[0128] In one embodiment, the first storage area includes at least two first storage sub-areas, and at least two first driving main data are read from different first storage sub-areas; the determination module 530 is also used to compare the at least two first driving main data read from different first storage sub-areas in pairs, and if the at least two first driving main data stored in the first storage area are not equal, the difference between each first driving main data in the first storage area is calculated; if the difference between each first driving main data is less than the first threshold value, the average value of each first driving main data in the first storage area is calculated, and the average value is determined as the first target driving data.

[0129] In one embodiment, the first storage area includes at least two first storage sub-areas, and at least two first driving main data are read from different first storage sub-areas; the determination module 530 is also used to compare the at least two first driving main data read from different first storage sub-areas in pairs. If the at least two first driving main data stored in the first storage area are not equal, and the difference between each first driving main data in the first storage area is greater than the first threshold, the first target driving data is determined to be 0.

[0130] In one embodiment, the determination module 530 further includes a writing unit;

[0131] The writing unit is used to write the first target driving data into the first storage area and the second storage area to obtain the second driving main data stored in the first storage area and the second driving backup data stored in the second storage area.

[0132] In one embodiment, the vehicle driving data access device 500 is also used to obtain the real-time driving data of the vehicle when the vehicle is driving; when the difference between the real-time driving data and the first target driving data is greater than a second threshold, the real-time driving data is determined as the second target driving data.

[0133] See also Figure 6 , Figure 6 It is a structural schematic diagram of an electronic device disclosed in an embodiment of the present application.

[0134] like Figure 6 As shown, the electronic device 600 may include:

[0135] A memory 610 storing executable program codes;

[0136] a processor 620 coupled to the memory 610;

[0137] The processor 620 calls the executable program code stored in the memory 610 to execute any one of the vehicle driving data access methods disclosed in the embodiments of the present application.

[0138] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by the processor, the processor implements any one of the vehicle driving data access methods disclosed in the embodiment of the present application.

[0139] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. Those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.

[0140] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the above-mentioned processes does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0141] The units described above 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 units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0142] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0143] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-accessible memory. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a memory and includes several requests for a computer device (which can be a personal computer, a server or a network device, etc., specifically a processor in a computer device) to perform some or all of the steps of the above-mentioned methods of various embodiments of the present application.

[0144] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0145] The above is a detailed introduction to a method, device, electronic device and storage medium for accessing vehicle driving data disclosed in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. At the same time, for those of ordinary skill in the art, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for accessing vehicle driving data, characterized in that: Applied to vehicles; The memory of the vehicle includes a first storage area and a second storage area; the method includes: Performing data verification on the vehicle driving data stored in at least one of the first storage area and the second storage area; If one of the first storage area and the second storage area passes the data verification, reading the first target driving data from the storage area that passes the data verification; If both the first storage area and the second storage area fail to pass the data verification, determining the first target driving data according to the first driving master data stored in the first storage area; The first storage area includes at least two first driving master data; if both the first storage area and the second storage area fail to pass the data verification, determining the first target driving data according to the first driving master data stored in the first storage area includes: If both the first storage area and the second storage area fail the data verification, at least two first driving master data stored in the first storage area are compared in pairs to determine the first target driving data.

2. The method according to claim 1, characterized in that The performing data verification on the vehicle driving data stored in at least one of the first storage area and the second storage area includes: Performing data verification on the first driving master data stored in the first storage area; When the first storage area fails the data verification, the first driving backup data stored in the second storage area is subjected to data verification.

3. The method according to claim 1, characterized in that: If one of the first storage area and the second storage area passes the data verification, reading the first target driving data from the storage area that passes the data verification includes: If the first storage area passes the data verification, reading the first target driving data from the first storage area; If the first storage area fails the data verification and the second storage area passes the data verification, the first target driving data is read from the second storage area.

4. The method according to claim 1, characterized in that: The first storage area includes at least two first storage sub-areas, and the at least two first driving master data are read from different first storage sub-areas; and comparing the at least two first driving master data stored in the first storage area in pairs to determine the first target driving data, comprises: Compare the at least two first travel master data read from different first storage sub-areas in pairs to detect whether there is first travel master data with equal values ​​among the at least two first travel master data stored in the first storage area; If there are first main driving data with the same value, the first main driving data with the same value is determined as the first target driving data.

5. The method according to claim 1, characterized in that The first storage area includes at least two first storage sub-areas, and the at least two first driving master data are read from different first storage sub-areas; and comparing the at least two first driving master data stored in the first storage area in pairs to determine the first target driving data, comprises: Compare the at least two first driving master data read from different first storage sub-areas in pairs, and if the at least two first driving master data stored in the first storage area are not equal, calculate the difference between the first driving master data in the first storage area; If the difference between each of the first main driving data is less than a first threshold, an average value of each of the first main driving data in the first storage area is calculated, and the average value is determined as the first target driving data.

6. The method according to claim 1, characterized in that The first storage area includes at least two first storage sub-areas, and the at least two first driving master data are read from different first storage sub-areas; and comparing the at least two first driving master data stored in the first storage area in pairs to determine the first target driving data, comprises: The at least two first driving main data read from different first storage sub-areas are compared pairwise. If the at least two first driving main data stored in the first storage area are not equal, and the difference between each of the first driving main data in the first storage area is greater than a first threshold, the first target driving data is determined to be 0.

7. The method according to any one of claims 1 to 6, characterized in that: After comparing the at least two first driving master data stored in the first storage area in pairs to determine the first target driving data, the method further includes: The first target driving data is written into the first storage area and the second storage area to obtain second driving master data stored in the first storage area and second driving backup data stored in the second storage area.

8. The method according to claim 1, characterized in that The method further comprises: When the vehicle is traveling, obtaining real-time traveling data of the vehicle; When the difference between the real-time driving data and the first target driving data is greater than a second threshold, the real-time driving data is determined as second target driving data.

9. A device for storing and accessing vehicle driving data, characterized in that: Applied to vehicles; The memory of the vehicle includes a first storage area and a second storage area; the device includes: A verification module, used for performing data verification on the vehicle driving data stored in at least one of the first storage area and the second storage area; A reading module, configured to read the first target driving data from the storage area that passes the data verification if one of the first storage area and the second storage area passes the data verification; a determination module, configured to determine the first target driving data according to the first driving master data stored in the first storage area if both the first storage area and the second storage area fail to pass the data verification; The first storage area includes at least two first driving master data; the determination module is also used to compare the at least two first driving master data stored in the first storage area in pairs to determine the first target driving data if both the first storage area and the second storage area fail to pass the data verification.

10. An electronic device, characterized in that: The method comprises a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor implements the method according to any one of claims 1 to 8.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Train automatic control system data read-write method and device

    CN110941394A