Vehicle data processing method and device, storage medium and electronic equipment
By obtaining vehicle data files from multiple on-board storage areas and determining the files to be recovered based on the numerical relationship, the problem of low reliability of vehicle data storage is solved, and the reliability of data recovery is improved.
Patent Information
- Application Number
- CN202411996270.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2044-12-31
AI Technical Summary
In the prior art, the reliability of vehicle data storage is low, especially when the database files and backup files are too corrupted, and the lack of effective recovery solutions leads to abnormal software functions.
By responding to the vehicle data verification instruction, multiple vehicle data files are obtained from multiple on-board storage areas, each file containing vehicle data and verification data. According to the numerical relationship between the number of target files and the total number of files, determine the file to be restored and perform the data recovery operation.
A solution to recover data based on multiple data backup files containing the same data is implemented, which enhances the reliability of data backup and avoids the problem of inaccessible recovery when there are too many backup files.
Smart Images

Figure CN119902714A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle driving, and in particular, to a vehicle data processing method, device, storage medium and electronic device. Background Art
[0002] With the development of technologies such as the Internet of Things and mobile information, cars are transforming from traditional mobile tools to super mobile terminals. In this case, software has become the key to determining car performance and functions. Defining the car ecosystem through software has become a trend of change in the automotive industry. Software is deeply involved in car definition, development, verification, sales, and service. Car software development is used for advanced driver assistance systems, infotainment systems, body control modules, etc. The above applications have extremely high requirements for the integrity and reliability of key data. Therefore, the reliability of vehicle data storage is crucial.
[0003] However, in the current vehicle data storage technology, data is directly stored in the corresponding files by using the file storage function and database storage function provided by the operating system. Therefore, for the prior art, the reliability of the data is guaranteed by the characteristics of the file itself, such as the database's copy-on-write, transaction log, data rollback, etc. However, if the database files and backup files are damaged too much, there is no reasonable and effective recovery plan, which will cause software function abnormalities and bring unpredictable problems. In other words, there is a technical problem of low reliability of vehicle data storage in the prior art.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present application provide a vehicle data processing method, device, storage medium and electronic device to at least solve the technical problem of low reliability of vehicle data storage in related technologies.
[0006] According to one aspect of an embodiment of the present application, a method for processing vehicle data is provided, which can be applied to an on-vehicle distributed storage device, the method comprising: in response to a vehicle data verification instruction, obtaining multiple vehicle data files from multiple on-vehicle storage areas respectively, wherein the vehicle data files include vehicle data and verification data, and the multiple vehicle data files correspond to the same vehicle data; when a numerical relationship between a first number of target files in the multiple vehicle data files and a second number of the multiple vehicle data files satisfies a first verification condition, determining a reference file in the multiple vehicle data files as a file to be recovered, wherein the respective verification data in the first number of target files match each other, and the verification data in the reference file does not match the verification data in the target file; when a numerical relationship between the first number of target files in the multiple vehicle data files and the second number of the multiple vehicle data files does not satisfy the first verification condition, determining the multiple vehicle data files as multiple files to be recovered respectively; and performing a data recovery operation on the file to be recovered.
[0007] According to another aspect of an embodiment of the present application, a vehicle data processing device is also provided, including: an acquisition unit, for respectively acquiring multiple vehicle data files from multiple vehicle-mounted storage areas in response to a vehicle data verification instruction, wherein the vehicle data file includes vehicle data and verification data, and the multiple vehicle data files correspond to the same vehicle data; a first determination unit, for determining a reference file in the multiple vehicle data files as a file to be restored when a numerical relationship between a first number of target files in the multiple vehicle data files and a second number of the multiple vehicle data files meets a first verification condition, wherein the respective verification data in the first number of target files match each other, and the verification data in the reference file does not match the verification data in the target file; a second determination unit, for respectively determining the multiple vehicle data files as multiple files to be restored when a numerical relationship between the first number of target files in the multiple vehicle data files and the second number of the multiple vehicle data files does not meet the first verification condition; and a recovery unit, for performing a data recovery operation on the file to be restored.
[0008] As an optional solution, the above-mentioned vehicle data processing device also includes: a verification unit, which is used to perform file verification operations on multiple vehicle data files respectively according to the verification data respectively included in the multiple vehicle data files; when the third number of first files that pass the file verification operation does not meet the second verification condition, the multiple vehicle data files are determined as multiple files to be restored; when the third number of first files that pass the file verification operation meets the second verification condition, the verification data of each of the multiple first files is obtained; and data matching verification is performed based on the verification data of each of the multiple first files.
[0009] As an optional scheme, the above-mentioned vehicle data processing device also includes: a third determination unit, used to determine that the numerical relationship between the first quantity and the second quantity meets the first verification condition when the ratio between the first quantity and the second quantity is greater than or equal to the first quantity threshold; when the first quantity is greater than or equal to the second quantity threshold, determine that the numerical relationship between the first quantity and the second quantity meets the first verification condition, wherein the second quantity threshold is determined based on the second quantity.
[0010] As an optional scheme, the above-mentioned vehicle data processing device also includes: a fourth determination unit, which is used to determine that the third quantity does not meet the second verification condition when the ratio between the third quantity and the second quantity is less than the third quantity threshold value; and determine that the third quantity does not meet the second verification condition when the first quantity is less than the fourth quantity threshold value.
[0011] As an optional scheme, the above-mentioned verification unit includes: a first verification module, which is used to determine reference cyclic redundancy check information according to the vehicle data included in the vehicle data file when the verification data in the current vehicle data file is the target cyclic redundancy check information; when the reference cyclic redundancy check information matches the target cyclic redundancy check information, it is determined that the current vehicle data file passes the file verification operation; a second verification module, which is used to determine reference hash verification information according to the vehicle data included in the vehicle data file when the verification data in the current vehicle data file is the target hash verification information; when the reference hash verification information matches the target hash verification information, it is determined that the current vehicle data file passes the file verification operation.
[0012] As an optional scheme, the above-mentioned recovery unit includes: a first recovery module, which is used to perform a data recovery operation on the file to be recovered according to the target file when the numerical relationship between the first quantity and the second quantity meets the first verification condition; and a second recovery module, which is used to perform a data recovery operation on the file to be recovered according to a historical version file that matches the file to be recovered when the numerical relationship between the first quantity and the second quantity does not meet the first verification condition.
[0013] As an optional solution, the above-mentioned second recovery module is also used to perform data recovery operations on the file to be recovered based on the previous historical version file when the previous historical version file that matches the file to be recovered is found; and to perform data recovery operations on the file to be recovered based on the initial version file that matches the file to be recovered when the previous historical version file that matches the file to be recovered is not found.
[0014] As an optional solution, the above-mentioned vehicle data processing device also includes a writing unit, which is used to determine the backup information of the vehicle data to be written based on the data type of the vehicle data to be written carried by the data writing request when a data writing request is received, wherein the backup information includes the backup quantity and verification conditions matching the data type; and write the vehicle data files matching the vehicle data to be written in multiple vehicle storage areas based on the backup information.
[0015] As an optional solution, the above-mentioned vehicle data processing device also includes a regional recovery unit, which is used to obtain multiple vehicle data files in the current vehicle storage area when the regional status of the current vehicle storage area among the multiple vehicle storage areas meets the regional verification condition; perform file verification operations on the multiple vehicle data files in the current vehicle storage area in sequence; when the fourth number of second files that pass the file verification operation in the current vehicle storage area does not meet the regional verification condition, determine the multiple vehicle data files in the current vehicle storage area as multiple files to be recovered; and perform data recovery operations on the multiple files to be recovered in the current vehicle storage area.
[0016] According to another aspect of the embodiment of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above vehicle data processing method.
[0017] According to another aspect of an embodiment of the present application, there is also provided an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the vehicle data processing method through the computer program.
[0018] In the above embodiment of the present application, by responding to the vehicle data verification instruction, multiple vehicle data files are obtained from multiple vehicle storage areas respectively, wherein the vehicle data files include vehicle data and verification data, and multiple vehicle data files correspond to the same vehicle data; and then, when the numerical relationship between the first number of target files in the multiple vehicle data files and the second number of the multiple vehicle data files meets the first verification condition, the reference file in the multiple vehicle data files is determined as the file to be restored, wherein the verification data of each of the first number of target files matches each other, and the verification data in the reference file does not match the verification data in the target file; further, when the numerical relationship between the first number of target files in the multiple vehicle data files and the second number of the multiple vehicle data files does not meet the first verification condition, the multiple vehicle data files are respectively determined as multiple files to be restored; and then the data recovery operation is performed on the files to be restored. Thus, a scheme of performing data recovery on the data to be restored according to multiple data backup files containing the same data is realized, the reliability of data backup is enhanced by relying on multiple data backup files containing the same data, and the problem of being unable to be restored when the backup files are damaged too much is avoided, and the reliability of the data backup files is further enhanced by introducing the first verification condition, thereby solving the problem of low reliability of vehicle data storage existing in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0020] Figure 1 is a schematic diagram of an application environment of an optional vehicle data processing method according to an embodiment of the present application;
[0021] Figure 2 is a flowchart of an optional vehicle data processing method according to an embodiment of the present application;
[0022] Figure 3 is a schematic diagram of an optional vehicle data processing method according to an embodiment of the present application;
[0023] Figure 4 is a schematic diagram of another optional vehicle data processing method according to an embodiment of the present application;
[0024] Figure 5 is a flowchart of another optional vehicle data processing method according to an embodiment of the present application;
[0025] Figure 6 is a flowchart of another optional vehicle data processing method according to an embodiment of the present application;
[0026] Figure 7 is a flowchart of another optional vehicle data processing method according to an embodiment of the present application;
[0027] Figure 8 is a schematic diagram of another optional vehicle data processing method according to an embodiment of the present application;
[0028] Fig. 9 is a schematic diagram of another optional vehicle data processing method according to an embodiment of the present application;
[0029] Fig.10 is a schematic diagram of a vehicle data processing device according to an embodiment of the present application;
[0030] Fig.11 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0031] In order to enable those skilled in the art to better understand the solution of the present application, 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 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 should fall within the scope of protection of the present application.
[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] According to one aspect of an embodiment of the present application, a method for processing vehicle data is provided. Optionally, the method for processing vehicle data can be applied to, but is not limited to, Figure 1 In the hardware environment shown. Optionally, the vehicle data processing method provided by the present application can be applied to a vehicle terminal. Figure 1A side view of a vehicle terminal 101 is shown, and the vehicle terminal 101 can travel on a travel surface 113. The vehicle terminal 101 includes an onboard navigation system 103, a memory 102 storing a digitized road map 104, a space monitoring system 117, a vehicle controller 109, a GPS (Global Positioning System) sensor 110, an HMI (Human / Machine Interface) device 111, and also includes an autonomous controller 112 and a telematics controller 114.
[0034] In one embodiment, the space monitoring system 117 includes one or more space sensors and systems, which are used to monitor the visible area 105 in front of the vehicle terminal 101. The space monitoring system 117 also includes a space monitoring controller 118; the space sensors used to monitor the visible area 105 include a laser radar sensor 106, a radar sensor 107, a camera 108, etc. The space monitoring controller 118 can be used to generate data related to the visible area 105 based on the data input from the space sensor. The space monitoring controller 118 can determine the linear range, relative speed and trajectory of the vehicle terminal 101 based on the input from the space sensor, for example, determine the current speed of the vehicle and the relative speed compared to the front vehicle. The space sensor of the vehicle terminal space monitoring system 117 may include an object positioning sensing device, and the object positioning sensing device may include a range sensor, which can be used to locate the front object such as the front vehicle object.
[0035] The camera 108 is advantageously mounted and positioned on the vehicle terminal 101 in a position that allows capturing an image of the visible area 105, wherein at least a portion of the visible area 105 includes a portion of the travel surface 113 in front of the vehicle terminal 101 and including the trajectory of the vehicle terminal 101. The visible area 105 may also include the surrounding environment. Other cameras may also be used, for example, including a second camera disposed on the rear or side portion of the vehicle terminal 101 to monitor the rear of the vehicle terminal 101 and one of the right or left sides of the vehicle terminal 101.
[0036] The autonomous controller 112 is configured to implement autonomous driving or advanced driver assistance system (ADAS) vehicle terminal functionality. Such functionality may include a vehicle terminal onboard control system capable of providing a certain level of driving automation. Driving automation may include a series of dynamic driving and vehicle terminal operations. Driving automation may include a certain level of automatic control or intervention involving a single vehicle terminal function (e.g., steering, acceleration, and / or braking). For example, the above-mentioned autonomous controller can be used to generate a vehicle driving scenario of a vehicle terminal by performing the following steps:
[0037] S102, in response to the vehicle data verification instruction, respectively obtaining a plurality of vehicle data files from a plurality of vehicle-mounted storage areas, wherein the vehicle data file includes vehicle data and verification data, and the plurality of vehicle data files correspond to the same vehicle data;
[0038] S104, when a numerical relationship between a first number of target files in the plurality of vehicle data files and a second number of the plurality of vehicle data files satisfies a first verification condition, determining a reference file in the plurality of vehicle data files as a file to be restored, wherein respective verification data in the first number of target files match each other, and verification data in the reference file does not match verification data in the target file;
[0039] S106, if a numerical relationship between a first number of target files in the plurality of vehicle data files and a second number of the plurality of vehicle data files does not satisfy a first verification condition, determining the plurality of vehicle data files as a plurality of files to be restored;
[0040] S108, performing a data recovery operation on the file to be recovered.
[0041] The HMI device 111 provides human-machine interaction for the purpose of guiding the operation of the infotainment system, GPS (Global Positioning System) sensor 110, onboard navigation system 103 and the like, and includes a controller. The HMI device 111 monitors operator requests and provides the operator with status, service and maintenance information of the vehicle terminal system. The HMI device 111 communicates with multiple operator interface devices and / or controls the operation of multiple operator interface devices. The HMI device 111 can also communicate with one or more devices that monitor biometric data associated with the vehicle terminal operator. For simplicity of description, the HMI device 111 is depicted as a single device, but in the embodiments of the system described herein, it can be configured as multiple controllers and associated sensing devices.
[0042] Operator controls may be included in the passenger compartment of the vehicle terminal 101, and may include, by way of non-limiting example, a steering wheel, an accelerator pedal, a brake pedal, and an operator input device, which is an element of the HMI device 111. The operator controls enable a vehicle terminal operator to interact with the operating vehicle terminal 101 and direct the operation of the vehicle terminal 101 to provide passenger transportation.
[0043] The onboard navigation system 103 uses the digitized road map 104 for the purpose of providing navigation support and information to the vehicle terminal operator. The autonomous controller 112 uses the digitized road map 104 for the purpose of controlling the autonomous vehicle terminal operation or ADAS vehicle terminal functions.
[0044] The vehicle terminal 101 may include a telematics controller 114, which includes a wireless telematics communication system capable of communicating outside the vehicle terminal (including communicating with a communication network 115 having wireless and wired communication capabilities). The wireless telematics communication system includes an off-board server 116 capable of short-range wireless communication with a mobile terminal.
[0045] As an optional implementation, Figure 2 As shown, the vehicle data processing method can be applied to a vehicle-mounted distributed storage device, and the specific steps include:
[0046] S202, in response to the vehicle data verification instruction, respectively obtaining a plurality of vehicle data files from a plurality of vehicle-mounted storage areas, wherein the vehicle data file includes vehicle data and verification data, and the plurality of vehicle data files correspond to the same vehicle data;
[0047] S204, determining a reference file in the plurality of vehicle data files as a file to be restored if a numerical relationship between a first number of target files in the plurality of vehicle data files and a second number of the plurality of vehicle data files satisfies a first verification condition, wherein respective verification data in the first number of target files match each other, and verification data in the reference file does not match verification data in the target file;
[0048] S206, if the numerical relationship between the first number of target files in the plurality of vehicle data files and the second number of the plurality of vehicle data files does not satisfy the first verification condition, respectively determining the plurality of vehicle data files as a plurality of files to be restored;
[0049] S208: Perform data recovery operations on the file to be recovered.
[0050] It can be understood that in S202 in the above embodiment, in response to the vehicle data verification instruction, multiple vehicle data files are respectively obtained from multiple vehicle storage areas, and the above-mentioned multiple vehicle storage areas each store multiple copies of the same vehicle data, and each copy (vehicle data file) not only contains the actual vehicle data, but also comes with a set of verification data for subsequent data verification and recovery.
[0051] It should be noted that the above-mentioned storage area can be a storage disk area corresponding to each of the multiple storage disks, or it can be multiple storage disk areas divided from a storage disk, or it can be multiple storage disk areas divided from a storage array composed of multiple storage disks, and no specific limitation is made here.
[0052] It should be noted that, after multiple vehicle data files are obtained through the above step S202, it is necessary to check whether the numerical relationship between the number of target files (first number) and the number of all files (second number) in the obtained multiple vehicle data files meets the preset first verification condition. It is worth noting that the above target files refer to files whose verification data match each other.
[0053] Furthermore, the multiple vehicle data files obtained themselves carry verification data, and it is checked whether the verification data of the multiple vehicle data files obtained are consistent with each other, and the vehicle data files with consistent verification data are used as the above-mentioned target files, and based on the numerical relationship between the number of target files (first number) and the multiple vehicle data files obtained (second number), when the numerical relationship satisfies the first verification condition, the reference file among the multiple vehicle data files is determined as the file to be restored.
[0054] Specifically, the above numerical relationship can be the ratio of the first quantity to the second quantity, or it can be the minimum value that the first quantity should have when the second quantity is within a certain value or a certain numerical range.
[0055] Further, in response to the vehicle data verification instruction, after obtaining a plurality of vehicle data files from a plurality of vehicle-mounted storage areas respectively, one of the following is included:
[0056] Method 1: when the ratio between the first quantity and the second quantity is greater than or equal to the first quantity threshold, determining that the numerical relationship between the first quantity and the second quantity satisfies the first verification condition;
[0057] Method 2: When the first quantity is greater than or equal to a second quantity threshold, determine whether a numerical relationship between the first quantity and the second quantity satisfies a first verification condition, wherein the second quantity threshold is determined based on the second quantity.
[0058] It can be understood that the above-mentioned method 1 is a determination of whether the numerical relationship satisfies the first verification condition when the above-mentioned numerical relationship is the ratio of the first quantity to the second quantity. For example, assuming that the preset first quantity threshold is 60% at this time, the total number of multiple vehicle data files obtained is 10, and among these 10 vehicle data files, the number of vehicle data files (target files) with the same verification data is 8. At this time, it can be determined that the ratio between the first quantity and the second quantity is 80%, which is greater than the preset first quantity threshold. At this time, it is determined that the numerical relationship between the first quantity and the second quantity satisfies the first verification condition.
[0059] In the second method, when the first quantity has the minimum value, whether the numerical relationship satisfies the first verification condition is determined. For example, assuming that the previously preset number of backups is 10, considering the requirement of backup stability, the second quantity threshold is preset to 8. Further, 10 vehicle data files can be obtained through the above step S202, and among these 10 vehicle data files, the number of vehicle data files (target files) with the same verification data is 8. At this time, it can be determined that the numerical value of the first quantity is 8, which is equal to the preset second quantity threshold. At this time, it is determined that the numerical relationship between the first quantity and the second quantity satisfies the first verification condition.
[0060] Optionally, the first quantity threshold and the second quantity threshold can be determined according to the importance of the data. When a certain vehicle data is important data, a more stringent threshold is required, that is, a higher first quantity threshold and a higher second quantity threshold are set. For example, the first quantity threshold is set to 80%, and when the number of backups is 10, the second quantity threshold is set to 9. When the vehicle data is ordinary data, the threshold can be lowered to increase the recovery efficiency. For example, the first quantity threshold is set to 60%, and when the number of backups is 10, the second quantity threshold is set to 6.
[0061] Further, when it is determined that the numerical relationship satisfies the first verification condition, the reference file among the multiple vehicle data files is determined as the file to be recovered. It can be understood that the verification data in the reference file does not match the verification data in the target file. Since the numerical relationship between the first number of the target file and the second number of the multiple vehicle data files satisfies the first verification condition at this time, the target file is considered to be a correct data file, and the data file that is inconsistent with the verification value of the target file is considered to be an erroneous file and needs to be recovered.
[0062] Optionally, if the numerical relationship between the first number of the above-mentioned target files and the second number of the multiple vehicle data files does not satisfy the first verification condition, it is considered that the data correctness of the target file itself is still in doubt, and data recovery of other files cannot be performed based on the target file. Instead, all the above-mentioned vehicle data files obtained including the target file should be recovered. That is, if the numerical relationship between the first number of target files in the multiple vehicle data files and the second number of the multiple vehicle data files in the above-mentioned step S206 does not satisfy the first verification condition, the multiple vehicle data files are respectively determined as multiple files to be recovered.
[0063] It can be understood that there is no necessary order of execution between the above steps S204 and S206. Instead, the execution is selected based on whether the numerical relationship between the first number of target files in the multiple vehicle data files and the second number of the multiple vehicle data files satisfies the first verification condition. When the above numerical relationship satisfies the first verification condition, the above step S204 is executed, and when the above numerical relationship does not satisfy the first verification condition, the above step S206 is executed. Through the above steps S204 and S206, the files to be restored can be determined when the above numerical relationship satisfies the first verification condition and when the above numerical relationship does not satisfy the first verification condition, respectively, and then the above step S208 is executed to perform data recovery operations on the files to be restored.
[0064] Optionally, the above step S208, performing a data recovery operation on the file to be recovered, includes:
[0065] S208-1, when the numerical relationship between the first number and the second number satisfies a first verification condition, performing a data recovery operation on the file to be recovered according to the target file;
[0066] S208-2: When the numerical relationship between the first number and the second number does not satisfy the first verification condition, perform a data recovery operation on the file to be recovered according to a historical version file that matches the file to be recovered.
[0067] It can be understood that after the data to be restored is determined by the aforementioned steps S204 and S206, data recovery is performed on the file to be restored. For example, if the file to be restored is determined to be the aforementioned reference file by step S204, step S208-1 is performed to restore the reference file according to the content in the aforementioned target file, so that the data content of the restored reference file is the same as the data content of the target file. If the file to be restored is determined to be multiple vehicle data files by the aforementioned step S206, step S208-2 is performed to perform data recovery on the file to be restored according to the historical version file that matches the file to be restored.
[0068] Through the above-mentioned implementation of the present application, by responding to the vehicle data verification instruction, multiple vehicle data files are obtained from multiple vehicle storage areas respectively, wherein the vehicle data files include vehicle data and verification data, and multiple vehicle data files correspond to the same vehicle data; and then, when the numerical relationship between the first number of target files in the multiple vehicle data files and the second number of multiple vehicle data files meets the first verification condition, the reference file in the multiple vehicle data files is determined as the file to be restored, wherein the verification data of each of the first number of target files matches each other, and the verification data in the reference file does not match the verification data in the target file; further, when the numerical relationship between the first number of target files in the multiple vehicle data files and the second number of multiple vehicle data files does not meet the first verification condition, the multiple vehicle data files are respectively determined as multiple files to be restored; and then the data recovery operation is performed on the files to be restored. Thus, a scheme of performing data recovery on the data to be restored according to multiple data backup files containing the same data is realized, the reliability of data backup is enhanced by relying on multiple data backup files containing the same data, and the problem of being unable to be restored when the backup files are damaged too much is avoided, and the reliability of the data backup files is further enhanced by introducing the first verification condition, thereby solving the problem of low reliability of vehicle data storage existing in the prior art.
[0069] As an optional implementation manner, in response to the vehicle data verification instruction, after obtaining multiple vehicle data files from multiple vehicle storage areas respectively, the method further includes:
[0070] S1, performing file verification operations on the multiple vehicle data files respectively according to the verification data respectively included in the multiple vehicle data files;
[0071] S2, determining the plurality of vehicle data files as a plurality of files to be restored when the third number of the first files that pass the file verification operation does not satisfy the second verification condition;
[0072] S3, obtaining verification data of each of the plurality of first files when a third number of the first files that pass the file verification operation meet the second verification condition;
[0073] S4, performing data matching verification based on respective verification data in the plurality of first files.
[0074] It can be understood that the above steps S1 to S4 are for performing file verification on the obtained multiple vehicle data files and performing subsequent operations based on the verification results. Specifically, the above step S1 is executed first. It should be noted that the file verification operation in the above step S1 can be verified by a cyclic redundancy check code (CRC code) or a hash code.
[0075] Specifically, according to the verification data respectively included in the multiple vehicle data files, the file verification operations are respectively performed on the multiple vehicle data files, including at least one of the following:
[0076] Method 1: When the verification data in the current vehicle data file is the target cyclic redundancy check information, the reference cyclic redundancy check information is determined based on the vehicle data included in the vehicle data file; when the reference cyclic redundancy check information matches the target cyclic redundancy check information, it is determined that the current vehicle data file passes the file verification operation; Method 2: When the verification data in the current vehicle data file is the target hash verification information, the reference hash verification information is determined based on the vehicle data included in the vehicle data file; when the reference hash verification information matches the target hash verification information, it is determined that the current vehicle data file passes the file verification operation.
[0077] It can be understood that the above-mentioned method 1 and method 2 are methods of performing data verification through cyclic redundancy check code and hash code respectively. In an optional method, according to the verification data included in each of the multiple vehicle data files, the file verification operation can be performed on the multiple vehicle data files respectively according to method 1. Specifically, when the vehicle data is stored, cyclic redundancy coding (CRC coding) is performed according to the stored vehicle data to generate the corresponding target cyclic redundancy information mentioned above, and the target cyclic redundancy information is stored. When the data needs to be verified, the data to be verified is read and the cyclic redundancy information (reference cyclic redundancy information) is recalculated. When the recalculated reference cyclic redundancy information is consistent with the previously stored target cyclic redundancy information, it is considered that the data has not changed, and it is determined that the current vehicle data file passes the file verification operation.
[0078] In another optional manner, it is also possible to implement in accordance with the second manner the file verification operation on the multiple vehicle data files respectively according to the verification data respectively included in the multiple vehicle data files. Specifically, when storing, hash encoding is performed according to the stored vehicle data to generate a corresponding hash code (target hash verification information). When the data needs to be verified, the data to be verified is read and the hash code is recalculated. When the recalculated hash code (reference hash verification information) is the same as the hash code generated during storage, it is considered that the data has not been modified, and thus it is determined at this time that the current vehicle data file has passed the file verification operation.
[0079] In another optional method, the above-mentioned method 1 and method 2 can also be used simultaneously to implement the verification data included in each of the multiple vehicle data files, and perform file verification operations on multiple vehicle data files respectively. That is, hash codes and CRC codes can be used simultaneously. For example, when storing, hash coding is first performed according to the stored vehicle data to generate a corresponding hash code (target hash verification information), and then the hash code is CRC-encoded to generate the corresponding target cyclic redundancy information mentioned above. When the data needs to be verified, the data to be verified is read and the hash code is first recalculated. When the recalculated hash code (reference hash verification information) is the same as the hash code generated when storing, the cyclic redundancy information (reference cyclic redundancy information) is further calculated and recalculated. If the recalculated reference cyclic redundancy information is consistent with the previously stored target cyclic redundancy information, it is considered that the data has not changed. It should be noted that the above process of performing hash coding first and then CRC coding is only for example, and CRC coding can also be performed first and then hash coding, which is not specifically limited here.
[0080] Further, when the third number of the first files that pass the file verification operation does not satisfy the second verification condition, the multiple vehicle data files are determined as multiple files to be restored, wherein the determination method of whether the third number satisfies the second verification condition may be the value of the third number itself, or may be the ratio between the third number and the second number, specifically including:
[0081] S2-1, when the ratio between the third quantity and the second quantity is less than the third quantity threshold, determining that the third quantity does not satisfy the second verification condition;
[0082] S2-2: When the first quantity is less than a fourth quantity threshold, determine that the third quantity does not satisfy a second verification condition.
[0083] It can be understood that the above step S2-1 is a step of determining whether the second verification condition is met by the ratio between the third number and the second number. When the ratio between the third number and the second number is less than the third number threshold, it is determined that the third number does not meet the second verification condition.
[0084] For example, the above-mentioned third quantity threshold is preset to 80%, the second quantity of multiple vehicle data files obtained is 10, and the third quantity of the first files that pass the file verification operation is 4. At this time, it is determined that the ratio between the third quantity and the second quantity is 40%, which is less than the preset third quantity threshold. At this time, it is determined that the third quantity does not meet the second verification condition.
[0085] It can be understood that the above step S2-2 is a step of determining whether the second verification condition is met by the value of the third quantity itself, and when the third quantity is less than the fourth quantity threshold, it is determined that the third quantity does not meet the second verification condition. For example, the fourth quantity threshold is preset to 8, and the third quantity of the first files through the file verification operation is 4, which is less than the preset fourth quantity threshold, and at this time, it is determined that the third quantity does not meet the second verification condition.
[0086] It should be noted that the above-mentioned second verification condition indicates the number of files that have passed the encoding verification. Passing the encoding verification represents that the data has not been changed during the storage stage, but the data may be accidentally changed before being stored, for example, when encoding before storage. Even if the subsequent data has not changed, since the stored data is already erroneous data, further verification is required, that is, executing the above-mentioned steps S202 to S208, and judging whether the data is correct data by comparing whether the verification data between the files that have passed the data verification are consistent. When the verification data of a file is inconsistent with that of other files, it means that although the file has not been changed during the storage stage, the data has changed before being stored, resulting in the stored data being erroneous data.
[0087] In the above step S2, when the third number of the first files that have passed the file verification operation does not satisfy the second verification condition, the multiple vehicle data files are determined as multiple files to be restored. It can be understood that the fact that the third number does not satisfy the second verification condition indicates that too few files have passed the data verification operation, and the stored files have undergone many changes during the storage stage. Therefore, it can be directly determined that the stored files (the above-mentioned multiple data vehicle files) need to be restored, that is, the multiple vehicle data files are determined as multiple files to be restored.
[0088] It can be understood that in the above step S3, the third number satisfies the second verification condition, which means that the number of files that pass the verification operation is relatively large, that is, the changes that occur to the multiple backup data files in the storage stage are relatively small. At this time, it is possible to further determine whether the data stored in the files that pass the verification operation is correct data, that is, to determine whether the data has changed in a stage other than storage (such as a writing stage). Specifically, first obtain the verification data of each of the multiple first files. Further, execute the above step S4 to perform data matching verification based on the verification data of each of the multiple first files. The first files with the same verification data are determined as files that pass the matching verification, and the first files with different verification data from other first files are determined as first files that do not pass the matching verification.
[0089] It is worth noting that although the determination of the second verification condition occurs before the determination of the first verification condition, the second verification condition can be set more strictly than the first verification condition. Specifically, in practical applications, a default first verification condition and a default second verification condition are set in consideration of the balance between efficiency and security. In daily non-emergency situations, data security can be further improved. At this time, the verification condition needs to be set more strictly. Since the determination of the second verification condition occurs before the determination of the first verification condition, it is only necessary to change the second verification condition to be stricter than the original first verification condition. This means that the tolerance for data that has changed during the storage stage is lowered, resulting in a small number of data verification failures. In the case, all vehicle data still needs to be restored as a whole, thereby improving data security.
[0090] Specifically, under default conditions, the number of data backups is 10, the first quantity threshold in the above-mentioned first verification condition is 60%, and the second quantity threshold is 6, while the third quantity threshold in the second verification condition is 50%, and the fourth quantity threshold is 5. It can be understood that at this time, the second verification condition is first determined to determine whether the above-mentioned third quantity meets the second verification condition, and if it is determined that the above-mentioned third quantity meets the second verification condition, it is further determined whether the above-mentioned numerical relationship meets the above-mentioned first verification condition. In the case of needing to improve data security, the third quantity threshold and the fourth quantity threshold in the second verification condition are respectively changed to values higher than the first quantity threshold and the second quantity threshold, for example, the third quantity threshold is set to 70%, and the fourth quantity threshold is set to 7.
[0091] It is worth noting that when the third quantity threshold and the fourth quantity threshold in the second verification condition are respectively changed to values higher than the first quantity threshold and the second quantity threshold, if it is first determined that the second verification condition is not met, it is no longer determined whether the first verification condition is met.
[0092] For example, assuming that the number of data backups is 10, the first number threshold in the above-mentioned first verification condition is 40%, and the second number threshold is 4, and at this time the third number threshold in the second verification condition is set to 70%, and the fourth number threshold is set to 7, that is, at this time the second verification condition is more stringent than the first verification condition. In this case, if the number of vehicle data files that pass the above-mentioned file verification operation is 5, then it can be determined that the above-mentioned second verification condition is not met at this time, although in fact, among the vehicle data files that pass the above-mentioned file verification operation, the number of vehicle data files with the same verification data may also be 5, that is, there is a possibility of meeting the first verification condition, but at this time, it is not determined whether the first verification condition is met, but a plurality of acquired vehicle data files are directly determined as files to be restored, and further subsequent data recovery operations are performed.
[0093] As an optional implementation, performing a data recovery operation on the file to be recovered according to a historical version file matching the file to be recovered includes:
[0094] S1, when a previous historical version file matching the file to be restored is found, a data recovery operation is performed on the file to be restored according to the previous historical version file;
[0095] S2: If the previous historical version file matching the file to be restored is not found, a data recovery operation is performed on the file to be restored according to the initial version file matching the file to be restored.
[0096] It can be understood that in the process of performing data recovery operations on the file to be recovered through a historical version file that matches the file to be recovered, it is necessary to first find the above-mentioned historical version file. When the previous historical version file that matches the file to be recovered is found, the previous historical version file is used to perform data recovery operations on the file to be recovered. If the previous historical version file that matches the file to be recovered is not found, the initial version file that matches the file to be recovered is used to perform data recovery operations on the file to be recovered.
[0097] Specifically, during each data backup process of a copy of data, the most recent historical version file and the initial version file will be retained. During the data recovery process, the historical version file will be searched for. If the historical version file is not found, the initial version file will be used to restore the file to be recovered. Optionally, if neither the above historical version file nor the above initial version file is found, a data clearing operation will be performed to delete the data to be recovered to avoid transmitting risky invalid data.
[0098] As an optional implementation manner, in response to the vehicle data verification instruction, before obtaining the plurality of vehicle data files from the plurality of vehicle-mounted storage areas respectively, the method further includes:
[0099] S1, upon receiving a data write request, determining backup information of the vehicle data to be written according to the data type of the vehicle data to be written carried in the data write request, wherein the backup information includes a backup quantity and a verification condition matching the data type;
[0100] S2, writing a vehicle data file matching the vehicle data to be written into a plurality of vehicle storage areas according to the backup information.
[0101] It can be understood that the above steps S1 and S2 are used to perform data backup according to the data type. For example, according to the importance of the data type, when the data type to be written is important, more backup quantities and stricter verification conditions are set. For example, the backup quantity of data belonging to the important data type is set to 10. When there is data of an important data type that needs to be backed up, 10 identical vehicle data files will be generated, and strict first verification conditions and second verification conditions will be set. For example, the first quantity threshold in the above first verification condition is 80%, the second quantity threshold is 8, and the third quantity threshold in the second verification condition is 70%, and the fourth quantity threshold is 7. It is worth noting that the above is only an example, and the backup quantity and the strictness of the verification conditions can be dynamically set according to the importance of the data, and are not specifically limited here.
[0102] As an optional implementation manner, after performing the data recovery operation on the file to be recovered, the method further includes:
[0103] S1, when the area status of the current vehicle storage area among the multiple vehicle storage areas meets the area verification condition, obtaining multiple vehicle data files in the current vehicle storage area;
[0104] S2, performing file verification operations on multiple vehicle data files in the current vehicle storage area in sequence;
[0105] S3, if the fourth number of the second files that pass the file verification operation in the current vehicle storage area does not meet the area verification condition, determine the multiple vehicle data files in the current vehicle storage area as the multiple files to be restored;
[0106] S4, performing a data recovery operation on a plurality of files to be recovered in the current vehicle-mounted storage area.
[0107] It should be noted that, in this embodiment, through the above steps S1 to S4, each storage backup partition is taken as an object, and the entire backup partition is checked and restored as a whole.
[0108] Specifically, firstly, the above step S1 is performed, and when the area status of the current vehicle storage area among the multiple vehicle storage areas meets the area verification condition, the multiple vehicle data files in the current vehicle storage area are obtained. It should be noted that the above area verification condition may be that KV (Key-Velue, key-value pair) storage is enabled. For example, when KV storage is enabled, it is considered that the area status of the current vehicle storage area among the multiple vehicle storage areas meets the area verification condition, and then the multiple vehicle data files in the current vehicle storage area are obtained.
[0109] Further, execute the above step S2, and perform file verification operations on multiple vehicle data files in the current vehicle storage area in sequence. It can be understood that this step is a traversal operation on the current vehicle storage area, traversing each vehicle data file in the current vehicle storage area, and performing a file verification operation on each vehicle data file. The verification process can refer to the aforementioned embodiment and will not be repeated here.
[0110] Furthermore, if the fourth number of second files that have passed the file verification operation in the current vehicle storage area does not meet the area verification condition, the multiple vehicle data files in the current vehicle storage area are determined as multiple files to be recovered; and the above step S4 is further executed to perform a data recovery operation on the multiple files to be recovered in the current vehicle storage area.
[0111] Figure 3 is a schematic diagram of an optional vehicle data processing method according to an embodiment of the present application, such as Figure 3 As shown, without redundant data backup, the backup architecture only includes primary storage and backup storage. The data in the primary storage is restored through the backup storage. If the backup file also has an abnormality, it may cause data reading abnormality.
[0112] Figure 4 is a schematic diagram of another optional vehicle data processing method according to an embodiment of the present application, such as Figure 4 As shown in the figure, the overall technical solution is divided into three parts: data storage backup, data verification, and data recovery. It should be noted that a redundant backup mechanism is used in the data storage link to ensure the reliability of the entire data. The data verification link can use CRC verification or hash verification, etc. The data is verified by the selected verification method to ensure the validity of the data. A hierarchical recovery solution is adopted in the data recovery link.
[0113] For the specific process of the above data backup link, please refer to Figure 5 ,like Figure 5 As shown, the specific process of the data backup link includes steps S50 to S5.
[0114] S501, enable KV storage. The storage system enables KV (Key-Value) storage.
[0115] S502, verifying data validity. Data verification is implemented by calling the data verification module 502.
[0116] S503 , obtaining valid backup data, specifically obtaining the last valid backup data, and mapping it to memory 504 .
[0117] S512 , write data. This step triggers a data write operation to write data to the memory 504 .
[0118] S522, synchronize data.
[0119] S523, triggering a synchronous data operation.
[0120] S524, synchronizing memory data to all database backups. It should be noted that the above database may be a vehicle-mounted storage area, the above database backup may be a backup file stored in the vehicle-mounted storage area, and multiple backup files constitute a database backup cluster 506.
[0121] For the specific process of the above data verification link, please refer to Figure 6 ,like Figure 6 As shown, the specific process of the data backup link includes step S61 to step S62.
[0122] S61, database validity verification step. Specifically includes steps S601 to S605. It should be noted that the above database may be a vehicle-mounted storage area, and the above database validity verification step is to verify the validity of the data files in the vehicle-mounted storage area.
[0123] S601, open KV storage.
[0124] S602, whether it can be opened, if yes, execute step S603, if not, execute step S606.
[0125] S603, verification. Obtain the data in the vehicle storage area and calculate the verification value A1, read the stored verification value A2 in the vehicle storage area, compare the values of A1 and A2 to see if they are consistent, and complete the verification. The calculation method of the verification can be CRC verification or Hash verification, which is not specifically limited here.
[0126] S606, confirming invalid data: When the KV storage cannot be opened, the stored data is directly identified as invalid data.
[0127] S604, whether it passes. If the data verification in step S603 passes, step S605 is executed to confirm the valid data. The data is confirmed as valid data. If it fails, step S606 is executed to confirm the data as invalid data.
[0128] S62, database consistency check. This includes steps S611 to S615. It should be noted that the database may be a vehicle-mounted storage area, and the database consistency check is used to filter out valid files with the same check value in the vehicle-mounted storage area.
[0129] S611, determining the number of valid database files K. According to step S61, K valid database files are screened out.
[0130] S612, is it greater than N. N is a preset threshold, if it is yes, then execute step S613, if it is no, then execute step S616. It should be noted that if the K valid database files screened out are greater than N, then the above second verification condition is met, otherwise, if K is not greater than N, then the above second verification condition is not met.
[0131] S613, determining the consistent database quantity G. Compare the check values of the data obtained in the above step S61, compare the consistency of the check values, and screen out the consistent database quantity G.
[0132] S614, is it greater than Z. Z is a preset threshold, if yes, execute step S615, if no, execute step S616. It should be noted that if the number of consistent databases G is greater than Z, the above first verification condition is met, otherwise, if G is not greater than Z, the above first verification condition is not met.
[0133] S615, restore the erroneous data. Restore the invalid database according to the valid database, specifically restore the invalid vehicle database file according to the valid vehicle database file in the storage area of the vehicle.
[0134] S616, overall recovery: triggering overall recovery of the database files stored in the vehicle-mounted storage area.
[0135] The overall process of the above data recovery link can be found in Figure 7 ,like Figure 7 As shown, step S71, restoring the damaged database according to the valid database, specifically includes steps S701 to S706, and the invalid database files are restored according to the valid database files in the vehicle storage area through the above steps S701 to S706.
[0136] S701, start the overall database recovery, triggering the initial step of recovering invalid database files based on valid database files in the vehicle storage area.
[0137] S702, whether there is a historical version, if yes, execute step S705, if no, execute step S703.
[0138] S705, restore to the historical version.
[0139] S703, whether there is an initial version, if yes, execute step S706, if no, execute step S704.
[0140] S706, restore to the initial version.
[0141] S704, restore to the clear state.
[0142] Figure 8is a schematic diagram of another optional vehicle data processing method according to an embodiment of the present application. Figure 8 Take the following as an example to illustrate a data reading and writing process.
[0143] Storage backup solution A is deployed for configurations such as diagnostic data, and storage backup solution B is deployed for fault data, camera calibration parameters, etc. When diagnostic data is written, it is synchronized to data backup cluster A. Diagnostic data is read from valid database files in data backup cluster A (which can be stored in the vehicle storage area).
[0144] When the fault data and camera calibration data are written, they will be synchronized to the data backup cluster B. The fault data and camera calibration data will be read from the valid database file of the data backup cluster B (which can be stored in the vehicle storage area).
[0145] Furthermore, when the A storage backup solution triggers the overall recovery solution, the initial database is directly used for recovery. It should be noted that the initial database is directly generated during configuration. When the B storage backup solution triggers the overall recovery solution, the historical version is prioritized, followed by the initial version.
[0146] Fig. 9 is a schematic diagram of another optional vehicle data processing method according to an embodiment of the present application. For the process of configuring and storing different backup schemes, see Fig. 9 First, configure different backup schemes. Fig. 9 Two backup plans, A0 and A1, are configured. Then, users select data according to the business and store it in the designated database file stored in the vehicle storage area. When the data generated by a certain business is ordinary data, data backup plan A1 is selected to generate two backup files. When the data generated by a certain business is important data, data backup plan A0 is selected to generate more backup files than ordinary data, for example, three backup files.
[0147] Furthermore, when KV storage is enabled, all data is read, and if a storage file cannot be opened, no subsequent check is performed and it is directly marked as an illegal storage file.
[0148] Furthermore, CRC calculations are performed on all the data read out in sequence and added up to obtain the CRC calculated in real time for the stored file. It should be noted that the special key-value pair CRC field is read, which is the CRC calculated when the KV storage was last closed and stored in the KV storage.
[0149] Then check whether the stored CRC is consistent with the CRC of the real-time read data. If they are inconsistent, it means that the data has been accidentally tampered with and the database file is invalid.
[0150] By performing the above steps on M database files, K valid database files stored in the vehicle storage area can be screened out, and their respective database CRCs can be obtained. If K is less than N, it means that N identical database files cannot be found, the entire KV storage is in an invalid state, and the overall recovery mechanism should be triggered.
[0151] If K is greater than N, CRC comparison is performed on K database files stored in the vehicle storage area. If Z identical database files can be found, it means that the KV storage is valid, and a single storage file can be restored to restore those invalid database files to a valid state. If Z valid and identical database files cannot be found, it means that the KV storage is invalid and the entire file is restored.
[0152] During the overall recovery process, first check whether there is a historical version of KV storage, such as the previous version. If so, restore to the previous version. If not, check whether there is an initial KV storage. If so, restore to the initial version. If not, restore the KV storage to the cleared state to ensure that no risky invalid data is transmitted.
[0153] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0154] According to another aspect of the embodiment of the present application, a vehicle data processing device for implementing the above vehicle data processing method is also provided. Fig.10 As shown, the device comprises:
[0155] An acquisition unit 1002 is used to respectively acquire a plurality of vehicle data files from a plurality of vehicle-mounted storage areas in response to a vehicle data verification instruction, wherein the vehicle data file includes vehicle data and verification data, and the plurality of vehicle data files correspond to the same vehicle data;
[0156] A first determining unit 1004 is configured to determine a reference file in the plurality of vehicle data files as a file to be restored if a numerical relationship between a first number of target files in the plurality of vehicle data files and a second number of the plurality of vehicle data files satisfies a first verification condition, wherein respective verification data in the first number of target files match each other, and verification data in the reference file does not match verification data in the target file;
[0157] A second determining unit 1006 is configured to determine the plurality of vehicle data files as a plurality of files to be restored respectively if a numerical relationship between a first number of target files in the plurality of vehicle data files and a second number of the plurality of vehicle data files does not satisfy a first verification condition;
[0158] The recovery unit 1008 is used to perform data recovery operations on the file to be recovered.
[0159] As an optional solution, the above-mentioned vehicle data processing device also includes: a verification unit, which is used to perform file verification operations on multiple vehicle data files respectively according to the verification data respectively included in the multiple vehicle data files; when the third number of first files that pass the file verification operation does not meet the second verification condition, the multiple vehicle data files are determined as multiple files to be restored; when the third number of first files that pass the file verification operation meets the second verification condition, the verification data of each of the multiple first files is obtained; and data matching verification is performed based on the verification data of each of the multiple first files.
[0160] As an optional scheme, the above-mentioned vehicle data processing device also includes: a third determination unit, used to determine that the numerical relationship between the first quantity and the second quantity meets the first verification condition when the ratio between the first quantity and the second quantity is greater than or equal to the first quantity threshold; when the first quantity is greater than or equal to the second quantity threshold, determine that the numerical relationship between the first quantity and the second quantity meets the first verification condition, wherein the second quantity threshold is determined based on the second quantity.
[0161] As an optional scheme, the above-mentioned vehicle data processing device also includes: a fourth determination unit, which is used to determine that the third quantity does not meet the second verification condition when the ratio between the third quantity and the second quantity is less than the third quantity threshold value; and determine that the third quantity does not meet the second verification condition when the first quantity is less than the fourth quantity threshold value.
[0162] As an optional scheme, the above-mentioned verification unit includes: a first verification module, which is used to determine reference cyclic redundancy check information according to the vehicle data included in the vehicle data file when the verification data in the current vehicle data file is the target cyclic redundancy check information; when the reference cyclic redundancy check information matches the target cyclic redundancy check information, it is determined that the current vehicle data file passes the file verification operation; a second verification module, which is used to determine reference hash verification information according to the vehicle data included in the vehicle data file when the verification data in the current vehicle data file is the target hash verification information; when the reference hash verification information matches the target hash verification information, it is determined that the current vehicle data file passes the file verification operation.
[0163] As an optional solution, the above-mentioned recovery unit includes 1008: a first recovery module, which is used to perform a data recovery operation on the file to be recovered according to the target file when the numerical relationship between the first quantity and the second quantity meets the first verification condition; and a second recovery module, which is used to perform a data recovery operation on the file to be recovered according to a historical version file that matches the file to be recovered when the numerical relationship between the first quantity and the second quantity does not meet the first verification condition.
[0164] As an optional solution, the above-mentioned second recovery module is also used to perform data recovery operations on the file to be recovered based on the previous historical version file when the previous historical version file that matches the file to be recovered is found; and to perform data recovery operations on the file to be recovered based on the initial version file that matches the file to be recovered when the previous historical version file that matches the file to be recovered is not found.
[0165] As an optional solution, the above-mentioned vehicle data processing device also includes a writing unit, which is used to determine the backup information of the vehicle data to be written based on the data type of the vehicle data to be written carried by the data writing request when a data writing request is received, wherein the backup information includes the backup quantity and verification conditions matching the data type; and write the vehicle data files matching the vehicle data to be written in multiple vehicle storage areas based on the backup information.
[0166] As an optional solution, the above-mentioned vehicle data processing device also includes a regional recovery unit, which is used to obtain multiple vehicle data files in the current vehicle storage area when the regional status of the current vehicle storage area among the multiple vehicle storage areas meets the regional verification condition; perform file verification operations on the multiple vehicle data files in the current vehicle storage area in sequence; when the fourth number of second files that pass the file verification operation in the current vehicle storage area does not meet the regional verification condition, determine the multiple vehicle data files in the current vehicle storage area as multiple files to be recovered; and perform data recovery operations on the multiple files to be recovered in the current vehicle storage area.
[0167] For a specific embodiment, reference may be made to the example shown in the above-mentioned method for processing vehicle data, which will not be described in detail in this example.
[0168] According to another aspect of the embodiments of the present invention, an electronic device for implementing the above data acquisition method is also provided. The electronic device may be Fig.11 The terminal device or server shown in the figure. This embodiment is described by taking the electronic device as a terminal device as an example. Fig.11As shown, the electronic device includes a memory 1102 and a processor 1104. The memory 1102 stores a computer program, and the processor 1104 is configured to execute the steps in any of the above method embodiments through the computer program.
[0169] Among them, the memory 1102 can be used to store software programs and modules, such as the program instructions / modules corresponding to the vehicle data processing method and device in the embodiment of the present invention. The processor 1104 executes various functional applications and data processing by running the software programs and modules stored in the memory 1102, that is, realizing the above-mentioned vehicle data processing method. The memory 1102 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1102 may further include a memory remotely located relative to the processor 1104, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 1102 can be specifically, but not limited to, used to store file information such as target files. As an example, such as Fig.11 As shown, the memory 1102 may include, but is not limited to, the acquisition unit 1002, the first determination unit 1004, the second determination unit 1006, and the recovery unit 1008 in the vehicle data processing device. In addition, other module units in the vehicle data processing device may also be included but are not limited to, which will not be repeated in this example.
[0170] Optionally, the transmission device 1106 is used to receive or send data via a network. Specific examples of the network may include a wired network and a wireless network. In one example, the transmission device 1106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 1106 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0171] In addition, the electronic device mentioned above further includes: a display 1108, and a connection bus 1110, which is used to connect various module components in the electronic device mentioned above.
[0172] According to one aspect of the present application, a computer program product is provided, the computer program product comprising a computer program / instruction, the computer program / instruction comprising a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part, and / or installed from a removable medium. When the computer program is executed by a central processing unit, various functions provided by the embodiments of the present application are executed.
[0173] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0174] It should be noted that the computer system of the electronic device is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0175] In particular, according to an embodiment of the present application, the process described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program contains a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part, and / or installed from a removable medium. When the computer program is executed by a central processing unit, various functions defined in the system of the present application are executed.
[0176] According to one aspect of the present application, a computer-readable storage medium is provided, and a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the above-mentioned various optional implementations.
[0177] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0178] S1, in response to a vehicle data verification instruction, obtaining a plurality of vehicle data files from a plurality of vehicle-mounted storage areas respectively, wherein the vehicle data file includes vehicle data and verification data, and the plurality of vehicle data files correspond to the same vehicle data;
[0179] S2, when a numerical relationship between a first number of target files in the plurality of vehicle data files and a second number of the plurality of vehicle data files satisfies a first verification condition, determining a reference file in the plurality of vehicle data files as a file to be restored, wherein respective verification data in the first number of target files match each other, and verification data in the reference file does not match verification data in the target file;
[0180] S3, if a numerical relationship between a first number of target files in the plurality of vehicle data files and a second number of the plurality of vehicle data files does not satisfy a first verification condition, determining the plurality of vehicle data files as a plurality of files to be restored;
[0181] S4, performing data recovery operations on the files to be recovered.
[0182] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the electronic device through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0183] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0184] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, 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 storage medium and includes several instructions for enabling one or more computer devices (which can be personal computers, servers or network devices, etc.) to execute all or part of the steps of the methods of each embodiment of the present application.
[0185] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0186] In the several embodiments provided in the present application, it should be understood that the disclosed user equipment can be implemented in other ways. Among them, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0187] 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 units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0188] 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.
[0189] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for processing vehicle data, characterized in that: include: In response to the vehicle data verification instruction, a plurality of vehicle data files are respectively obtained from a plurality of vehicle-mounted storage areas, wherein the vehicle data files include vehicle data and verification data, and the plurality of vehicle data files correspond to the same vehicle data; When a numerical relationship between a first number of target files in the plurality of vehicle data files and a second number of the plurality of vehicle data files satisfies a first verification condition, determining a reference file in the plurality of vehicle data files as a file to be restored, wherein the respective verification data in the first number of target files match each other, and the verification data in the reference file does not match the verification data in the target file; When a numerical relationship between the first number of the target files in the plurality of vehicle data files and the second number of the plurality of vehicle data files does not satisfy the first verification condition, determining the plurality of vehicle data files as a plurality of files to be restored; Perform a data recovery operation on the file to be recovered.
2. The method according to claim 1, characterized in that After the step of acquiring a plurality of vehicle data files from a plurality of vehicle-mounted storage areas in response to the vehicle data verification instruction, the method further comprises: According to the verification data respectively included in the plurality of vehicle data files, performing file verification operations on the plurality of vehicle data files respectively; In a case where a third number of the first files that pass the file verification operation do not satisfy a second verification condition, determining the plurality of vehicle data files as the plurality of files to be restored; When the third number of the first files that pass the file verification operation meets a second verification condition, obtaining the verification data of each of the plurality of first files; A data matching check is performed based on the respective check data in the plurality of first files.
3. The method according to claim 2, characterized in that After the multiple vehicle data files are acquired from the multiple vehicle storage areas respectively in response to the vehicle data verification instruction, the method includes one of the following: When the ratio between the first quantity and the second quantity is greater than or equal to a first quantity threshold, determining that the numerical relationship between the first quantity and the second quantity satisfies the first verification condition; In a case where the first quantity is greater than or equal to a second quantity threshold, it is determined that a numerical relationship between the first quantity and the second quantity satisfies the first verification condition, wherein the second quantity threshold is determined based on the second quantity.
4. The method according to claim 2, characterized in that: After the multiple vehicle data files are acquired from the multiple vehicle storage areas respectively in response to the vehicle data verification instruction, the method includes one of the following: When the ratio between the third number and the second number is less than a third number threshold, determining that the third number does not satisfy the second verification condition; When the third number is less than a fourth number threshold, it is determined that the third number does not satisfy the second verification condition.
5. The method according to claim 2, characterized in that: The performing file verification operations on the plurality of vehicle data files respectively according to the verification data respectively included in the plurality of vehicle data files comprises at least one of the following: In a case where the check data in the current vehicle data file is target cyclic redundancy check information, determining reference cyclic redundancy check information according to the vehicle data included in the vehicle data file; In a case where the reference cyclic redundancy check information matches the standard cyclic redundancy check information, determining that the current vehicle data file passes the file verification operation; In a case where the verification data in the current vehicle data file is target hash verification information, determining reference hash verification information according to the vehicle data included in the vehicle data file; In a case where the reference hash verification information matches the target hash verification information, it is determined that the current vehicle data file passes the file verification operation.
6. The method according to claim 1, characterized in that The performing of the data recovery operation on the to-be-recovered file includes: When the numerical relationship between the first number and the second number satisfies the first verification condition, performing the data recovery operation on the file to be recovered according to the target file; When the numerical relationship between the first number and the second number does not satisfy the first verification condition, a data recovery operation is performed on the file to be recovered according to a historical version file that matches the file to be recovered.
7. The method according to claim 6, characterized in that The performing a data recovery operation on the file to be recovered according to the historical version file matching the file to be recovered comprises: When a previous historical version file matching the file to be restored is found, performing a data restoration operation on the file to be restored according to the previous historical version file; When the previous historical version file matching the file to be restored is not found, a data restoration operation is performed on the file to be restored according to the initial version file matching the file to be restored.
8. The method according to claim 1, characterized in that Before the step of acquiring a plurality of vehicle data files from a plurality of vehicle-mounted storage areas respectively in response to the vehicle data verification instruction, the method further comprises: In the case of receiving a data write request, determining backup information of the vehicle data to be written according to the data type of the vehicle data to be written carried by the data write request, wherein the backup information includes a backup quantity and a verification condition matching the data type; The vehicle data files matching the vehicle data to be written are written into the plurality of vehicle-mounted storage areas according to the backup information.
9. The method according to claim 1, characterized in that: After performing the data recovery operation on the file to be recovered, the method further includes: When the area status of a current vehicle storage area among the multiple vehicle storage areas satisfies an area verification condition, acquiring the multiple vehicle data files in the current vehicle storage area; Performing file verification operations on the plurality of vehicle data files in the current vehicle storage area in sequence; If the fourth number of the second files in the current vehicle storage area that pass the file verification operation does not satisfy the area verification condition, determining the plurality of vehicle data files in the current vehicle storage area as the plurality of files to be restored; A data recovery operation is performed on the plurality of files to be recovered in the current vehicle-mounted storage area.
10. A vehicle data processing device, characterized in that: include: an acquisition unit, configured to acquire a plurality of vehicle data files from a plurality of vehicle-mounted storage areas respectively in response to a vehicle data verification instruction, wherein the vehicle data files include vehicle data and verification data, and the plurality of vehicle data files correspond to the same vehicle data; a first determining unit, for determining a reference file among the plurality of vehicle data files as a file to be restored if a numerical relationship between a first number of target files among the plurality of vehicle data files and a second number of the plurality of vehicle data files satisfies a first verification condition, wherein the respective verification data in the first number of target files match each other, and the verification data in the reference file does not match the verification data in the target file; a second determining unit, configured to respectively determine the plurality of vehicle data files as a plurality of files to be restored if a numerical relationship between the first number of the target files in the plurality of vehicle data files and the second number of the plurality of vehicle data files does not satisfy the first verification condition; The recovery unit is used to perform a data recovery operation on the file to be recovered.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 9 when executed by an electronic device.
12. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 9 through the computer program.
13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Vehicle-mounted system data verification method and device, electronic equipment and storage medium
CN117421780A
Intelligent verification method and device for data integrity
CN117992408A
Vehicle system starting control method, device and equipment and storage medium
CN118708249A
Vehicle data collection system and method of using
US20230104010A1
KR20240136085A