Data file verification method and device, electronic equipment, vehicle and storage medium

By calculating the verification value of the data file before, after, and when the controller is powered on, it solves the problem that the existing technology cannot monitor the status of the application data file in the controller in real time, real-time monitoring of the data file is achieved and safety guarantees.

CN119065922APending Publication Date: 2024-12-03CHINA FAW CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411093837.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-09
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

The prior art cannot monitor the status of application data files in the controller in real time, especially after the application is updated, the integrity and security of the data files cannot be effectively monitored.

Method used

Calculate the verification value of the data file before, after, and when the controller is powered on, calculate the verification value, judge the file status changes by comparing the verification value, and trigger the corresponding response strategy, including recording abnormal verification value and disabling the application Or send a prompt message.

Benefits of technology

Real-time monitoring of data files in the controller is realized, ensuring file integrity and security, and improving the reliability and security of data files throughout the entire life cycle of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119065922A_ABST
    Figure CN119065922A_ABST
Patent Text Reader

Abstract

The invention discloses a data file verification method and device, electronic equipment, a vehicle and a storage medium, and relates to the technical field of file verification, and the method comprises the steps that before a controller is powered on, data files of all application programs in the controller are determined; calculating a first verification value of each data file; after the controller is powered on, calculating a second verification value of each data file; verifying the corresponding second verification values by using the first verification values, and recording the second verification values which do not pass the verification as abnormal verification values; after it is detected that the controller sends out a power-off signal, calculating a third verification value of each data file; verifying the corresponding third verification value by using each first verification value, and recording the third verification value which does not pass the verification as an abnormal verification value; and when the abnormal verification value is detected, triggering a coping strategy matched with the abnormal verification value. And each data file can be monitored in real time according to the check value of each data file before power-on, after power-on and in the power-off stage of the controller.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of file verification technology, and in particular to a data file verification method, device, electronic equipment, vehicle and storage medium. Background Art

[0002] Multiple applications can be installed in the controller, and each application will generate a large number of files. The system image of the controller will also contain multiple executable files and library files. The related technology updates the application in the controller through a diagnostic instrument, and only calculates the checksum of the data file after the application is updated, and cannot monitor the status of each data file in real time. Summary of the invention

[0003] The main purpose of the embodiments of the present application is to provide a data file verification method, device, electronic device, vehicle and storage medium to monitor the data files of each application in the controller in real time.

[0004] To achieve the above object, an embodiment of the present application provides a data file verification method, which includes the following steps:

[0005] Before the controller is powered on, determining the data files of each application program in the controller; calculating the check value of each data file as a first check value;

[0006] After the controller is powered on, the check value of each of the data files is calculated as a second check value; the corresponding second check value is checked using each of the first check values, and the second check value that fails the check is recorded as an abnormal check value;

[0007] After detecting that the controller sends a power-off signal, calculating the check value of each of the data files as a third check value; using each of the first check values ​​to check the corresponding third check value, and recording the third check value that fails the check as the abnormal check value;

[0008] When the abnormal check value is detected, a response strategy matching the abnormal check value is triggered.

[0009] In some embodiments, the step of calculating the checksum of each of the data files comprises the following steps:

[0010] The MD5 value corresponding to each of the data files is calculated according to the file path of each of the data files as the verification value.

[0011] In some embodiments, the calculating the checksum value of each of the data files as the second checksum value comprises the following steps:

[0012] The check value of each of the data files is calculated as a second check value according to a set period.

[0013] In some embodiments, when the abnormal check value is detected, triggering a response strategy matching the abnormal check value comprises the following steps:

[0014] When the abnormal check value is detected, the data file corresponding to the abnormal check value obtained by calculation is identified as an abnormal data file;

[0015] If the abnormal data file is a temporary file or a non-function-related configuration file, the abnormal data file is recorded in a warning system log;

[0016] If the abnormal data file is a configuration file related to a function and does not affect the safety of use, the abnormal data file is recorded in the fault system log, and the application corresponding to the abnormal data file is disabled;

[0017] If the abnormal data file has missing data or damaged data, a prompt message is issued to prompt that the application corresponding to the abnormal data file has expired.

[0018] In some embodiments, the method further comprises the following steps:

[0019] Writing each of the first verification values, each of the second verification values, and each of the third verification values ​​into a first verification file, and calculating the verification value of the first verification file as a fourth verification value;

[0020] Writing the fourth verification value into a second verification file;

[0021] After a set time has passed, calculating the verification value of the first verification file as a fifth verification value;

[0022] The fifth check value is checked by using the fourth check value in the second check file, and the fifth check value that fails the check is recorded as the abnormal check value.

[0023] To achieve the above object, another aspect of the embodiment of the present application provides a data file verification device, the device comprising:

[0024] A first verification unit is used to determine the data files of each application program in the controller before the controller is powered on; and calculate the verification value of each data file as a first verification value;

[0025] A second verification unit is used to calculate the verification value of each of the data files as a second verification value after the controller is powered on; use each of the first verification values ​​to verify the corresponding second verification value, and record the second verification value that fails the verification as an abnormal verification value;

[0026] A third verification unit is used to calculate the verification value of each of the data files as a third verification value after detecting that the controller sends a power-off signal; use each of the first verification values ​​to verify the corresponding third verification value, and record the third verification value that fails the verification as the abnormal verification value;

[0027] The abnormality response unit is used to trigger a response strategy matching the abnormality check value when the abnormality check value is detected.

[0028] In some embodiments, the first verification unit, the second verification unit and the third verification unit all include:

[0029] The first check value calculation unit is used to calculate the MD5 value corresponding to the data file according to the file path of each data file as the check value.

[0030] In some embodiments, the second verification unit includes:

[0031] The periodic verification unit is used to calculate the verification value of each of the data files as the second verification value according to a set period.

[0032] In some embodiments, the abnormality response unit includes:

[0033] an abnormality identification unit, configured to identify and calculate the data file corresponding to the abnormality check value as an abnormal data file when the abnormality check value is detected;

[0034] A first response unit, configured to record the abnormal data file into a warning system log if the abnormal data file is a temporary file or a non-function-related configuration file;

[0035] A second response unit is configured to record the abnormal data file into a fault system log and disable the application corresponding to the abnormal data file if the abnormal data file is a function-related configuration file and does not affect the use safety;

[0036] The third response unit is used to issue a prompt message if the abnormal data file has missing data or damaged data, so as to prompt that the application corresponding to the abnormal data file has expired.

[0037] In some embodiments, the apparatus further comprises a verification value processing unit, wherein the verification value processing unit comprises:

[0038] a check value storage and calculation unit, configured to write each of the first check values, each of the second check values, and each of the third check values ​​into a first check file, and calculate the check value of the first check file as a fourth check value;

[0039] A check value storage unit, used for writing the fourth check value into a second check file;

[0040] A second verification value calculation unit, configured to calculate the verification value of the first verification file as a fifth verification value after a set time has passed;

[0041] The fourth verification unit is used to verify the fifth verification value by using the fourth verification value in the second verification file, and record the fifth verification value that fails the verification as the abnormal verification value.

[0042] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-mentioned data file verification method when executing the computer program.

[0043] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application provides a vehicle, which includes a data file verification device as described above, or an electronic device as described above.

[0044] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned data file verification method is implemented.

[0045] The embodiments of the present application include at least the following beneficial effects:

[0046] The present application can determine the data files of each application program in the controller before the controller is powered on; calculate the check value of each data file as the first check value; after the controller is powered on, calculate the check value of each data file as the second check value; use each first check value to check the corresponding second check value, and record the second check value that fails the check as an abnormal check value; after detecting that the controller sends a power-off signal, calculate the check value of each data file as a third check value; use each first check value to check the corresponding third check value, and record the third check value that fails the check as an abnormal check value; when an abnormal check value is detected, trigger a response strategy that matches the abnormal check value. By calculating the check value of each data file before the controller is powered on, and then using the check value before power-on to check the check value of each data file after the controller is powered on and during the power-off stage, it can be determined whether the status of each data file in different stages has changed according to the check result, thereby achieving real-time monitoring of each data file. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0048] Figure 1 A flowchart of a data file verification method provided in an embodiment of the present application;

[0049] Figure 2 Provided for the embodiments of this application Figure 1 The step flow chart of S130;

[0050] Figure 3 A flowchart of the steps for processing each check value provided in an embodiment of the present application;

[0051] Figure 4 A framework diagram of a data file verification method provided in an embodiment of the present application;

[0052] Figure 5 An example diagram of the MD5 value of a data file provided in an embodiment of the present application;

[0053] Figure 6 A flow chart of the verification after the vehicle controller is powered on provided in an embodiment of the present application;

[0054] Figure 7 A flow chart of the verification of the vehicle controller during the power-off phase provided in an embodiment of the present application;

[0055] Figure 8 A flowchart for processing abnormal data files provided in an embodiment of the present application;

[0056] Fig. 9 A schematic diagram of the structure of a data file verification device provided in an embodiment of the present application;

[0057] Fig.10 A schematic diagram of the structure of an abnormality response unit provided in an embodiment of the present application;

[0058] Fig.11 A schematic diagram of the structure of a check value processing unit provided in an embodiment of the present application;

[0059] Fig.12 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0060] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.

[0061] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".

[0062] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.

[0063] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0064] Before describing the embodiments of the present application in detail, some related technologies involved in the embodiments of the present application are first described as follows:

[0065] With the development of intelligent connected vehicle technology, vehicle controllers carry more functions. Vehicle controllers are often composed of multiple SOCs (System on Chip), and each SOC is installed with multiple applications. Each application will generate a large number of storage data files and configuration files. The system image of the vehicle controller will also store multiple executable files and library files. The related technology updates the application of the vehicle controller through a diagnostic instrument, and only calculates the checksum of the data file after the application is updated. It is impossible to monitor the changes and deletions of each data file during the entire life cycle of the application. As the complexity of the functions integrated in the application of the vehicle controller increases, the vehicle controller will establish communication links with the cloud and the outside world. It is necessary to monitor the changes of the file directory and data files in the vehicle controller in real time to confirm the integrity and security of each application in the vehicle controller.

[0066] Therefore, the embodiment of the present application provides a data file verification method, device, electronic device, vehicle and storage medium. The technical solution of the present application includes: before the controller is powered on, determine the data files of each application in the controller; calculate the verification value of each data file as the first verification value; after the controller is powered on, calculate the verification value of each data file as the second verification value; use each first verification value to verify the corresponding second verification value, and record the second verification value that fails the verification as an abnormal verification value; after detecting that the controller sends a power-off signal, calculate the verification value of each data file as a third verification value; use each first verification value to verify the corresponding third verification value, and record the third verification value that fails the verification as an abnormal verification value; when an abnormal verification value is detected, trigger a response strategy that matches the abnormal verification value. By calculating the verification value of each data file before the controller is powered on, and then using the verification value before power-on to verify the verification value of each data file after the controller is powered on and the power-off stage, it can be judged according to the verification result whether the status of each data file in different stages has changed, thereby realizing real-time monitoring of each data file.

[0067] The embodiment of the present application provides a data file verification method, which relates to the field of file verification technology. The data file verification method provided in the embodiment of the present application can be applied to a terminal, can also be applied to a server, and can also be software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and a car terminal, etc., but is not limited to this; the server side can be configured as an independent physical server, or it can be configured as a server cluster or distributed system composed of multiple physical servers, and can also be configured to provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms and other basic cloud computing services. The cloud server, the server can also be a node server in the blockchain network; the software can be an application that implements the data file verification method, etc., but is not limited to the above forms.

[0068] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0069] Reference Figure 1 The embodiment of the present application provides a data file verification method, which may include but is not limited to S100 to S130 (the step numbers in the embodiment of the present application are only used to distinguish the steps and do not limit the execution order of the steps), as follows:

[0070] S100: Before the controller is powered on, determine the data files of each application program in the controller; and calculate the check value of each data file as a first check value.

[0071] Specifically, before the controller is powered on and used, the system image of the controller can be written into the controller. Therefore, in this embodiment, the data files of each application program that needs to be monitored can be determined through the system image before the system image of the controller is written into the controller. As an optional implementation, in this embodiment, the data files under the critical path can be selected for monitoring (i.e., critical data files). Among them, the critical path can include the file path that affects the normal operation of the application program and the security of the system.

[0072] Further, calculating the checksum of each of the data files comprises the following steps:

[0073] The MD5 value corresponding to each of the data files is calculated according to the file path of each of the data files as the verification value.

[0074] It is understandable that, in this embodiment, the MD5 value of each data file can be calculated, and the MD5 value can be used as the verification value of each data file.

[0075] It should be noted that in the embodiments of the present application, whenever a check value is calculated, an MD5 value can be calculated as the check value.

[0076] S110: After the controller is powered on, calculate the check value of each of the data files as a second check value; use each of the first check values ​​to check the corresponding second check value, and record the second check value that fails the check as an abnormal check value.

[0077] It can be understood that, in this embodiment, after the controller is powered on, the check value of each data file can be calculated, and then the check value calculated before the controller is powered on can be used to check the check value calculated after the controller is powered on. For example, the two check values ​​can be compared to see whether they have changed, and then the check value can be considered to have failed the check if it has changed. Then, the check value that has failed the check can be recorded as an abnormal check value.

[0078] Further, calculating the checksum of each data file as the second checksum in S110 includes the following steps:

[0079] The check value of each of the data files is calculated as a second check value according to a set period.

[0080] It is understandable that in this embodiment, the check value of each data file can be calculated according to a set period during the power-on of the controller, and then the check can be performed periodically to achieve real-time monitoring of the status of each data file. Among them, the set period can be freely set according to actual conditions, and the computing resources occupied by the periodic check can not affect the load of the controller.

[0081] S120: after detecting that the controller sends a power-off signal, calculating the check value of each of the data files as a third check value; using each of the first check values ​​to check the corresponding third check value, and recording the third check value that fails the check as the abnormal check value.

[0082] It can be understood that this embodiment can calculate the verification value of each data file after the controller sends a power-off signal, that is, in the power-off stage of the controller, and then use the verification value calculated before the controller is powered on to verify the verification value calculated in the power-off stage of the controller. For example, compare whether the two verification values ​​have changed and then perform verification. If there is a change, it can be considered that the verification value calculated in the power-off stage of the controller has failed the verification, and then record the verification value that failed the verification as an abnormal verification value.

[0083] S130: When the abnormal check value is detected, triggering a response strategy matching the abnormal check value.

[0084] By way of example, the present embodiment can pre-set various response strategies, such as backing up data, setting prompt templates, or setting disabling strategies, etc. When detecting an abnormal check value, it determines the type of the abnormal check value, and determines the response strategy that matches the abnormal check value of this type, and then executes the corresponding response strategy to reduce the adverse effects of the data file abnormality.

[0085] Further, refer to Figure 2 , S130 may include S131 to S134:

[0086] S131: When the abnormal check value is detected, the data file corresponding to the abnormal check value obtained by calculation is identified as an abnormal data file.

[0087] Specifically, when detecting an abnormal check value, this embodiment can identify and classify the abnormal data files corresponding to the abnormal check value, and then execute different response strategies according to different types of abnormalities.

[0088] S132: If the abnormal data file is a temporary file or a non-function-related configuration file, the abnormal data file is recorded in a warning system log.

[0089] Specifically, if the abnormal data file is a temporary file or a non-function-related configuration file and does not affect the functions perceivable by the user, this embodiment may mark the abnormal file data as an alarm-type exception and record it in the system log.

[0090] S133: If the abnormal data file is a configuration file related to a function and does not affect the safety of use, the abnormal data file is recorded in a fault system log, and the application corresponding to the abnormal data file is disabled.

[0091] Specifically, if the abnormal data file is a function-related configuration file and is determined after evaluation to have no impact on safe use, this embodiment can mark the abnormal file data as a fault-type exception and record it in the system log; to reduce the adverse effects of the abnormal data file, this embodiment can also disable the application corresponding to the abnormal data file.

[0092] S134: If the abnormal data file has missing data or damaged data, a prompt message is issued to prompt that the application corresponding to the abnormal data file has expired.

[0093] Specifically, if the abnormal data file contains missing data or damaged data, the application corresponding to the abnormal data file may not be able to be used normally. In this case, this embodiment can send a prompt message to the terminal that interacts with the user (such as a mobile phone, vehicle display or instrument, etc.) to prompt that the application corresponding to the abnormal data file has expired.

[0094] Further, refer to Figure 3 The embodiment of the present application may further include the step of processing each check value, for details, refer to S141 to S144:

[0095] S141: writing each of the first verification values, each of the second verification values, and each of the third verification values ​​into a first verification file, and calculating the verification value of the first verification file as a fourth verification value;

[0096] S142: Writing the fourth verification value into a second verification file;

[0097] S143: after a set time has passed, calculating the verification value of the first verification file as a fifth verification value;

[0098] S144: Use the fourth check value in the second check file to check the fifth check value, and record the fifth check value that fails the check as the abnormal check value.

[0099] It is understandable that the embodiment of the present application can also write the calculated verification values ​​into a file (the file is used as the first verification file) for storage, and calculate the verification value of the first verification file and write it into another file (the file is used as the second verification file) for storage. Then, when the set time passes or the preset condition is triggered, the verification value of the first verification file is calculated and then compared with the verification value stored in the second verification file to determine whether the verification values ​​have been sent and changed, and the verification values ​​that have not passed the verification are recorded as abnormal verification values.

[0100] Next, the solution of the embodiment of the present application will be introduced and explained in conjunction with specific application examples:

[0101] First, it should be noted that the controller of this embodiment is a vehicle controller, that is, this embodiment can verify and monitor the data files of the vehicle controller in real time.

[0102] Figure 4 A framework diagram of the data file verification method provided in this embodiment.

[0103] Specifically, in the system image of the vehicle controller (including all applications in the vehicle controller), the key data files in the vehicle controller are screened out according to the importance of the data files. Each data file can be called by the corresponding application, and the data file monitoring module (software module) can be used to calculate and verify the MD5 value of each data file in the power-on and power-off stages of the vehicle controller, and feed the verification result back to the abnormal data file processing module (software module). The abnormal data file processing module performs log recording, fault recording or reporting to the user according to the impact of the data file abnormality and reminds the user that the corresponding application has failed.

[0104] like Figure 5 As shown, after determining the key file path and the data file under the file path, the verification information (including MD5 value) of the data file is stored. The data file contains some numerical values ​​or configuration information of the vehicle controller related files. The data inside such files should not be rewritten during the operation of the vehicle controller. Before the vehicle controller is powered on and the system image is written into the vehicle controller, the MD5 value of the data file under each file path is calculated and written into the verification file (FILE_MD5.txt). The MD5 value of the verification file can also be calculated separately and stored in another verification file (MD5_1.txt).

[0105] like Figure 6 As shown, after the vehicle controller is powered on, this embodiment can use the preset file exception monitoring process to cyclically calculate the MD5 value of the data files under each file path. By traversing the data files under the file path, it is possible to accurately identify whether the total number of data files under the file path has changed, and it is also possible to identify data files with abnormal changes or missing data. During the operation of the vehicle controller after it is powered on, a fixed cycle (without affecting the load of the vehicle controller) can be set to calculate the MD5 value of each data file and file path. If an abnormality is found, the abnormal MD5 value is passed to the abnormal data file processing module.

[0106] like Figure 7 As shown, during the power-off phase of the vehicle controller, the MD5 values ​​of all data files can be compared again to see if they are correct, so as to determine whether the data files (data storage files, binary executable files, etc.) of each application of the vehicle controller have changed during this power-on and power-off cycle.

[0107] like Figure 8 As shown, the processing flow of abnormal data files may include: after the data file monitoring module detects the abnormal MD5 value, it identifies the data file where the abnormality occurs, and classifies and processes it according to the results of the monitoring process, which is divided into the following three situations: if the abnormal data file is a temporary file or a configuration file related to non-functional safety, and the abnormal data file does not affect the user-perceivable function, a warning system log is recorded; if the abnormal data file is a function-related data file or configuration file, and it is evaluated that it does not affect the safety of use, it is recorded as a fault system log, and the application related to the abnormal data file is disabled; if the abnormal data file contains missing data or damaged data, it is reported to the terminal that interacts with the user, such as a mobile phone or instrument, to prompt the user that the relevant application has expired.

[0108] The beneficial effects of this embodiment may include:

[0109] This embodiment provides a data file verification method for a vehicle controller, which can monitor the integrity of key file paths and data files under the file paths in the vehicle controller throughout the entire life cycle. Data files may include key files that do not change frequently, such as storage data files, configuration files, and execution files. This solves the problem of key file integrity verification when multiple SOC chips in a vehicle controller integrate multiple complex application software. Moreover, this embodiment can improve the security of system image burning, application program updates, and daily operating conditions, and improve the correctness of file paths and data files; the method of this embodiment does not rely on the hardware platform, and supports full life cycle monitoring of the integrity of applications in vehicle controllers in an embedded environment, preventing the vehicle from being tampered with or deleted by external interactive information, thereby improving the overall safety of the vehicle.

[0110] Reference Fig. 9 The embodiment of the present application also provides a data file verification device, which can implement the above-mentioned data file verification method, and the device includes:

[0111] A first verification unit is used to determine the data files of each application program in the controller before the controller is powered on; and calculate the verification value of each data file as a first verification value;

[0112] A second verification unit is used to calculate the verification value of each of the data files as a second verification value after the controller is powered on; use each of the first verification values ​​to verify the corresponding second verification value, and record the second verification value that fails the verification as an abnormal verification value;

[0113] A third verification unit is used to calculate the verification value of each of the data files as a third verification value after detecting that the controller sends a power-off signal; use each of the first verification values ​​to verify the corresponding third verification value, and record the third verification value that fails the verification as the abnormal verification value;

[0114] The abnormality response unit is used to trigger a response strategy matching the abnormality check value when the abnormality check value is detected.

[0115] In some embodiments, the first verification unit, the second verification unit and the third verification unit all include:

[0116] The first check value calculation unit is used to calculate the MD5 value corresponding to the data file according to the file path of each data file as the check value.

[0117] In some embodiments, the second verification unit includes:

[0118] The periodic verification unit is used to calculate the verification value of each of the data files as the second verification value according to a set period.

[0119] Reference Fig.10 In some embodiments, the abnormality handling unit includes:

[0120] an abnormality identification unit, configured to identify and calculate the data file corresponding to the abnormality check value as an abnormal data file when the abnormality check value is detected;

[0121] A first response unit, configured to record the abnormal data file into a warning system log if the abnormal data file is a temporary file or a non-function-related configuration file;

[0122] A second response unit is configured to record the abnormal data file into a fault system log and disable the application corresponding to the abnormal data file if the abnormal data file is a function-related configuration file and does not affect the use safety;

[0123] The third response unit is used to issue a prompt message if the abnormal data file has missing data or damaged data, so as to prompt that the application corresponding to the abnormal data file has expired.

[0124] Reference Fig.11 In some embodiments, the apparatus further comprises a check value processing unit, wherein the check value processing unit comprises:

[0125] a check value storage and calculation unit, configured to write each of the first check values, each of the second check values, and each of the third check values ​​into a first check file, and calculate the check value of the first check file as a fourth check value;

[0126] A check value storage unit, used for writing the fourth check value into a second check file;

[0127] A second verification value calculation unit, configured to calculate the verification value of the first verification file as a fifth verification value after a set time has passed;

[0128] The fourth verification unit is used to verify the fifth verification value by using the fourth verification value in the second verification file, and record the fifth verification value that fails the verification as the abnormal verification value.

[0129] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0130] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above data file verification method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0131] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0132] See also Fig.12 , Fig.12 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0133] The processor 1201 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0134] The memory 1202 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1202 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1202, and the processor 1201 calls and executes the data file verification method of the embodiment of this application;

[0135] Input / output interface 1203, used to implement information input and output;

[0136] The communication interface 1204 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);

[0137] A bus 1205 that transmits information between various components of the device (e.g., the processor 1201, the memory 1202, the input / output interface 1203, and the communication interface 1204);

[0138] The processor 1201 , the memory 1202 , the input / output interface 1203 and the communication interface 1204 are connected to each other in communication within the device via the bus 1205 .

[0139] The embodiment of the present application also provides a vehicle, which includes a data file verification device as described above, or an electronic device as described above. Specifically, the vehicle can be a private car, such as a sedan, SUV, MPV or pickup truck. The vehicle can also be an operating vehicle, such as a van, bus, small truck or large trailer. The vehicle can be a gasoline vehicle or a new energy vehicle. When the vehicle is a new energy vehicle, it can be a hybrid vehicle or a pure electric vehicle.

[0140] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned data file verification method is implemented.

[0141] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0142] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0143] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0144] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

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

[0146] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0147] The terms "first", "second", "third", "fourth", etc. (if any) in the specification 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.

[0148] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0149] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as 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 devices or units, which can be electrical, mechanical or other forms.

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

[0151] 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.

[0152] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-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, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0153] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A data file verification method, characterized in that: The method comprises the following steps: Before the controller is powered on, determining the data files of each application program in the controller; calculating the check value of each data file as a first check value; After the controller is powered on, the check value of each of the data files is calculated as a second check value; the corresponding second check value is checked using each of the first check values, and the second check value that fails the check is recorded as an abnormal check value; After detecting that the controller sends a power-off signal, calculating the check value of each of the data files as a third check value; using each of the first check values ​​to check the corresponding third check value, and recording the third check value that fails the check as the abnormal check value; When the abnormal check value is detected, a response strategy matching the abnormal check value is triggered.

2. A data file verification method according to claim 1, characterized in that: The step of calculating the checksum of each data file comprises the following steps: The MD5 value corresponding to each of the data files is calculated according to the file path of each of the data files as the verification value.

3. A data file verification method according to claim 1, characterized in that: The step of calculating the checksum of each of the data files as a second checksum comprises the following steps: The check value of each of the data files is calculated as a second check value according to a set period.

4. A data file verification method according to claim 1, characterized in that: When the abnormal check value is detected, triggering a response strategy matching the abnormal check value comprises the following steps: When the abnormal check value is detected, the data file corresponding to the abnormal check value obtained by calculation is identified as an abnormal data file; If the abnormal data file is a temporary file or a non-function-related configuration file, the abnormal data file is recorded in a warning system log; If the abnormal data file is a configuration file related to a function and does not affect the safety of use, the abnormal data file is recorded in the fault system log, and the application corresponding to the abnormal data file is disabled; If the abnormal data file has missing data or damaged data, a prompt message is issued to prompt that the application corresponding to the abnormal data file has expired.

5. A data file verification method according to any one of claims 1 to 4, characterized in that: The method further comprises the following steps: Writing each of the first verification values, each of the second verification values, and each of the third verification values ​​into a first verification file, and calculating the verification value of the first verification file as a fourth verification value; Writing the fourth verification value into a second verification file; After a set time has passed, calculating the verification value of the first verification file as a fifth verification value; The fifth check value is checked by using the fourth check value in the second check file, and the fifth check value that fails the check is recorded as the abnormal check value.

6. A data file verification device, characterized in that: The device comprises: A first verification unit is used to determine the data files of each application program in the controller before the controller is powered on; and calculate the verification value of each data file as a first verification value; A second verification unit is used to calculate the verification value of each of the data files as a second verification value after the controller is powered on; use each of the first verification values ​​to verify the corresponding second verification value, and record the second verification value that fails the verification as an abnormal verification value; A third verification unit is used to calculate the verification value of each of the data files as a third verification value after detecting that the controller sends a power-off signal; use each of the first verification values ​​to verify the corresponding third verification value, and record the third verification value that fails the verification as the abnormal verification value; The abnormality response unit is used to trigger a response strategy matching the abnormality check value when the abnormality check value is detected.

7. A data file verification device according to claim 6, characterized in that: The first verification unit, the second verification unit and the third verification unit all include: The first check value calculation unit is used to calculate the MD5 value corresponding to the data file according to the file path of each data file as the check value.

8. A data file verification device according to claim 6, characterized in that: The second verification unit includes: The periodic verification unit is used to calculate the verification value of each of the data files as the second verification value according to a set period.

9. A data file verification device according to claim 6, characterized in that: The abnormality response unit includes: an abnormality identification unit, configured to identify and calculate the data file corresponding to the abnormality check value as an abnormal data file when the abnormality check value is detected; A first response unit, configured to record the abnormal data file into a warning system log if the abnormal data file is a temporary file or a non-function-related configuration file; A second response unit is configured to record the abnormal data file into a fault system log and disable the application corresponding to the abnormal data file if the abnormal data file is a function-related configuration file and does not affect the use safety; The third response unit is used to issue a prompt message if the abnormal data file has missing data or damaged data, so as to prompt that the application corresponding to the abnormal data file has expired.

10. A data file verification device according to any one of claims 6 to 9, characterized in that: The device further includes a check value processing unit, and the check value processing unit includes: a check value storage and calculation unit, configured to write each of the first check values, each of the second check values, and each of the third check values ​​into a first check file, and calculate the check value of the first check file as a fourth check value; A check value storage unit, used for writing the fourth check value into a second check file; A second verification value calculation unit, configured to calculate the verification value of the first verification file as a fifth verification value after a set time has passed; The fourth verification unit is used to verify the fifth verification value by using the fourth verification value in the second verification file, and record the fifth verification value that fails the verification as the abnormal verification value.

11. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements a data file verification method as described in any one of claims 1 to 5 when executing the computer program.

12. A vehicle, characterized in that: The vehicle comprises a data file verification device as claimed in claim 6, or an electronic device as claimed in claim 11.

13. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, a data file verification method according to any one of claims 1 to 5 is implemented.