Vehicle-based fault diagnosis method and vehicle

By reading and diagnosing the key information of the EEPROM chip when the vehicle is powered on, the problem of abnormal data of the EEPROM chip is solved, the need to replace parts on site is reduced, maintenance costs are reduced, and the vehicle is operated normally.

CN120508423APending Publication Date: 2025-08-19ROX MOTOR TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510588872.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-08
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

During the long-term use of the EEPROM chip, due to frequent data reading and writing operations, which may lead to abnormal stored data, such as loss or jump of SK keys, resulting in the failure of vehicle anti-theft authentication and remote control functions. The existing technology requires on-site replacement of chips to increase maintenance costs and time.

Method used

The microcontroller unit reads the key information of the security module and the nonvolatile memory chip when the whole vehicle is powered on, and performs corresponding diagnostic processing, including comparing the key information and writing the correct key information to avoid data abnormalities.

Benefits of technology

Effectively respond to abnormal EEPROM chip data, reduce the need to replace parts assembly on site, reduce maintenance costs, and ensure the normal use of the vehicle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120508423A_ABST
    Figure CN120508423A_ABST
Patent Text Reader

Abstract

The invention provides a fault diagnosis method based on a vehicle and the vehicle, the method is applied to a microcontroller unit of the vehicle, and the method comprises the following steps: in response to a whole vehicle power-on signal, reading first key information stored in a security module from the security module connected with the microcontroller unit; reading second key information stored in a non-volatile memory chip from the non-volatile memory chip connected to the microcontroller unit based on a reading result for the first key information; a diagnostic processing scheme corresponding to the read result of the second key information is executed on the nonvolatile memory chip. According to the application, the microcontroller unit reads the secret key information of the security module and the nonvolatile storage chip when the whole vehicle is powered on, and executes corresponding diagnosis processing, so that the problem of abnormal data of the nonvolatile storage chip is effectively solved, part assemblies replaced on site are reduced, the maintenance cost is reduced, and normal use of the vehicle is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of fault diagnosis, and in particular to a vehicle-based fault diagnosis method and a vehicle. Background Art

[0002] Currently, EEPROM (Electrically Erasable Programmable Read-Only Memory), as a non-volatile storage chip, is responsible for storing key data including vehicle VIN code, fingerprint information, and SK key. These data are crucial for the normal operation of the vehicle, safety authentication, and remote control functions.

[0003] However, EEPROM chips have limited lifespans and erase / write cycles. Over extended vehicle use, frequent read and write operations can cause EEPROM chip data anomalies, such as loss or alteration of the SK key. Such anomalies can lead to vehicle anti-theft authentication failures, further disrupting functions like remote control and Bluetooth control, severely impacting vehicle operation. Once such issues occur, on-site EEPROM chip replacement is often necessary, a time-consuming and labor-intensive process that increases maintenance costs. Summary of the Invention

[0004] In view of this, the purpose of the present application is to provide a vehicle-based fault diagnosis method and a vehicle to overcome at least one of the above-mentioned defects.

[0005] In a first aspect, an embodiment of the present application provides a vehicle-based fault diagnosis method, which is applied to a microcontroller unit of the vehicle, and the method includes: in response to a power-on signal of the entire vehicle, reading first key information stored in the security module from a security module connected to the microcontroller unit; based on the reading result of the first key information, reading second key information stored in the non-volatile storage chip from a non-volatile storage chip connected to the microcontroller unit; and executing a diagnostic processing method corresponding to the reading result of the second key information on the non-volatile storage chip.

[0006] In an optional embodiment of the present application, the reading result of the first key information includes a first reading result and a second reading result, wherein the reading result of the first key information is determined in the following manner: judging whether the first key information stored in the security module connected to the microcontroller unit is read from the security module; if the first key information stored in the security module is read from the security module connected to the microcontroller unit, determining that the reading result of the first key information is the first reading result, and continuing to execute the reading of the second key information stored in the non-volatile storage chip from the non-volatile storage chip connected to the microcontroller unit; if the first key information stored in the security module is not read from the security module connected to the microcontroller unit, determining that the reading result of the first key information is the second reading result, and the second reading result is used to represent that the first key information has not been written into the microcontroller unit.

[0007] In an optional embodiment of the present application, the reading result of the second key information includes a third reading result and a fourth reading result, wherein the reading result of the second key information is determined in the following manner: judging whether the second key information stored in the non-volatile storage chip is read from the non-volatile storage chip connected to the microcontroller unit; if the second key information stored in the non-volatile storage chip is read from the non-volatile storage chip connected to the microcontroller unit, determining that the reading result of the second key information is the third reading result; if the second key information stored in the non-volatile storage chip is not read from the non-volatile storage chip connected to the microcontroller unit, determining that the reading result of the second key information is the fourth reading result.

[0008] In an optional embodiment of the present application, the diagnostic processing method includes a first diagnostic processing method and a second diagnostic processing method, and the diagnostic processing method corresponding to the reading result of the second key information is executed on the non-volatile memory chip, including: when it is detected that the reading result of the first key information is a first reading result and the reading result of the second key information is a third reading result, determining the comparison result of the first key information and the second key information, and determining to execute the first diagnostic processing method for the non-volatile memory chip according to the comparison result; when it is detected that the reading result of the first key information is a first reading result and the reading result of the second key information is a fourth reading result, determining to execute the second diagnostic processing method for the non-volatile memory chip.

[0009] In an optional embodiment of the present application, the first key information and the second key information are both binary number sequences, wherein the first diagnostic processing method is performed in the following manner: determining whether each bit of the first key information is consistent with each bit of the second key information; if the first key information is consistent with the second key information, determining that the non-volatile memory chip functions normally; if the first key information is inconsistent with the second key information, recording a fault code, writing the first key information into the non-volatile memory chip, returning to the write state, and determining the diagnostic processing method of the non-volatile memory chip based on the write state.

[0010] In an optional embodiment of the present application, the second diagnostic processing method is performed in the following manner: when the second key information stored in the non-volatile storage chip is not read from the non-volatile storage chip connected to the microcontroller unit, the first key information is written into the non-volatile storage chip.

[0011] In an optional embodiment of the present application, in response to a vehicle power-on signal, the first key information stored in the security module is read from the security module connected to the microcontroller unit; based on the reading result of the first key information, the second key information stored in the non-volatile storage chip is read from the non-volatile storage chip connected to the microcontroller unit; and a diagnostic processing method corresponding to the reading result of the second key information is executed on the non-volatile storage chip, including: after receiving the vehicle power-on signal, the first key information stored in the security module connected to the microcontroller unit is read according to a preset cycle; for each preset cycle, the second key information stored in the non-volatile storage chip is read according to the first reading result of the first key information read within the preset cycle; for each preset cycle, the diagnostic processing method corresponding to the non-volatile storage chip within the preset cycle is determined for the first key information and the second key information read within the preset cycle.

[0012] In the second aspect, an embodiment of the present application also provides an electronic control unit, comprising a microprocessor unit, a microcontroller unit and a non-volatile memory chip, wherein the microcontroller unit reads first key information stored in the security module from a security module connected to the microcontroller unit in response to a vehicle power-on signal, and the microprocessor unit includes a security module; when the microprocessor unit receives the first key information acquisition signal of the microcontroller unit, the first key information stored in the security module is sent to the microcontroller unit; based on the reading result of the first key information, the microcontroller unit reads the second key information stored in the non-volatile memory chip from the non-volatile memory chip connected to the microcontroller unit; when the non-volatile memory chip receives the second key information acquisition signal of the microcontroller unit, the second key information is sent to the microcontroller unit; the microcontroller unit performs a diagnostic processing method corresponding to the reading result of the second key information on the non-volatile memory chip.

[0013] In a third aspect, an embodiment of the present application further provides a vehicle, comprising the electronic control unit as described above.

[0014] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method described above are executed.

[0015] The vehicle-based fault diagnosis method and vehicle provided in an embodiment of the present application, in response to a vehicle power-on signal, reads first key information stored in a security module from a security module connected to a microcontroller unit; based on the result of reading the first key information, reads second key information stored in a non-volatile memory chip from a non-volatile memory chip connected to the microcontroller unit; and executes a diagnostic processing method corresponding to the result of reading the second key information on the non-volatile memory chip. By using the microcontroller unit to read key information from the security module and the non-volatile memory chip and execute corresponding diagnostic processing methods, the present application can effectively address issues related to abnormal data stored in the non-volatile memory chip, avoid vehicle function failures caused by data anomalies, and reduce the maintenance cost and time of on-site replacement of component assemblies.

[0016] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.

[0018] Figure 1 This is one of the flow charts of the vehicle-based fault diagnosis method provided in an embodiment of the present application;

[0019] Figure 2 This is the second flow chart of the vehicle-based fault diagnosis method provided in an embodiment of the present application;

[0020] Figure 3 This is a schematic diagram of the structure of the electronic control unit provided in an embodiment of the present application. DETAILED DESCRIPTION

[0021] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions 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 a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application for which protection is claimed, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, each other embodiment obtained by those skilled in the art without making creative work falls within the scope of protection of the present application.

[0022] First, the application scenarios to which this application is applicable are introduced. This application can be applied in the field of fault diagnosis technology.

[0023] Research has found that EEPROM, as a non-volatile memory chip, stores critical data in vehicles, such as VIN numbers, fingerprint information, and SK keys, and is crucial for vehicle operation, security authentication, and remote control. However, its lifespan and erase / write cycles are limited. Frequent reading and writing during long-term use can lead to data anomalies, such as SK key loss or jumps, which can cause anti-theft authentication failures and remote and Bluetooth control failures. Such issues require on-site replacement of the EEPROM chip, increasing maintenance costs and time.

[0024] Based on this, embodiments of the present application provide a vehicle-based fault diagnosis method and vehicle. When the vehicle is powered on, a microcontroller unit reads the first key information of the security module and, based on this, reads the second key information of the non-volatile memory chip to perform corresponding diagnostic processing. This application effectively addresses EEPROM chip data anomalies, reduces the need for on-site component replacement, reduces maintenance costs, and ensures normal vehicle use.

[0025] The vehicle has three pairs of SK (Session Key) keys, one for remote anti-theft authentication between the CCU and TBOX, Bluetooth anti-theft authentication between the CCU and BTM, and power anti-theft authentication between the CCU and MDCU. These keys are the CCU (Central Computing Unit), the TBOX (Telematics Box), the BTM (Bluetooth Module), and the MDCU (Motor Domain Control Unit).

[0026] The execution subject of this application is the MCU (Micro Controller Unit) inside the ECU (Electronic Control Unit).

[0027] See also Figure 1 , Figure 1 This is one of the flow charts of the vehicle-based fault diagnosis method provided in the embodiment of the present application. Figure 1 As shown in , the vehicle-based fault diagnosis method provided by the embodiment of the present application includes:

[0028] Receive vehicle power-on signal;

[0029] When the vehicle key is inserted, the Passive Entry / Passive Start (PEPS) authentication is passed, or a remote start command is triggered, the vehicle power management system (BMS) sends a power-on signal to the electronic control unit ECU. Correspondingly, the microcontroller unit MCU receives the vehicle power-on signal.

[0030] For example, the CAN / CANFD PHY (physical layer transceiver) is mainly responsible for converting the digital signals sent by the CAN / CANFD controller into differential signals suitable for transmission on the physical bus, and converting the differential signals on the bus back to digital signals for processing by the controller.

[0031] When the power management chip senses that the vehicle is powered on, it will output a high or low signal through a specific pin. This signal can be directly connected to a general-purpose input and output (GPIO) pin of the MCU.

[0032] The MCU can determine whether the vehicle is powered on by reading the status of this GPIO pin. For example, when the vehicle is powered on, the power management chip outputs a high level. When the MCU reads the pin as a high level, it determines that the vehicle is powered on.

[0033] CAN / CANFD PHY can communicate vehicle power-on information to the MCU by working with other circuits (such as a power management chip). This information can be transmitted directly through GPIO pins or by sending specific frames via the CAN / CANFD bus. Based on the received signal or frame, the MCU determines whether the vehicle is powered on and performs the corresponding operation.

[0034] S101, in response to a vehicle power-on signal, reading first key information stored in a security module connected to a microcontroller unit;

[0035] The SK key is generated on the TSP cloud platform (Telematics Service Provider), encrypted using the AES128 algorithm, and sent to the Manufacturing Execution System (MES). The MES decrypts the key and sends it in plain text to the End of Line (EOL) device. When the vehicle leaves the line, the EOL device writes the SK key to the EEPROM chip and security module of the ECU (Electronic Control Unit). The security module includes a trusted, tamper-resistant secure firmware partition in the MPU and an independent security chip.

[0036] TSP communicates with ECU via TCP / IP (Transmission Control Protocol / Internet Protocol, a basic communication protocol in network communication for transmitting data) for bidirectional transmission.

[0037] Here, the TSP cloud platform is responsible for data interaction with vehicles, users and third-party services (such as navigation and payment). The MES manufacturing system is responsible for monitoring and controlling the production process and coordinating data interaction between production equipment and upper-level systems (such as ERP and TSP). The EOL equipment is responsible for writing SK keys, configuring ECU parameters, performing functional testing, etc.

[0038] Specifically, the first key information (such as SK key or root key) is read from the security module. The key is usually protected by hardware encryption to prevent physical attacks. The first key information is a backup of the key information and is used to verify the legitimacy or integrity of the non-volatile storage chip.

[0039] Specifically, the reading result of the first key information includes a first reading result and a second reading result, and the reading result of the first key information is determined in the following manner:

[0040] determining whether first key information stored in the security module is read from the security module connected to the microcontroller unit;

[0041] If the first key information stored in the security module is read from the security module connected to the microcontroller unit, determining that the read result of the first key information is a first read result, and continuing to read the second key information stored in the non-volatile memory chip from the non-volatile memory chip connected to the microcontroller unit;

[0042] If the first key information is successfully read from the security module, the first reading result indicates that the key is read successfully, and the second key information in the non-volatile storage chip (EEPROM chip) is read continuously.

[0043] If the first key information stored in the security module is not read from the security module connected to the microcontroller unit, the reading result of the first key information is determined to be a second reading result, and the second reading result is used to indicate that the first key information is not written into the microcontroller unit.

[0044] If the first key information is not read from the security module, it is considered as the second reading result, indicating that the key reading failed or was not written. It is determined that the ECU is in the testing phase and has not been actually put into operation, and the acquisition of key information can be stopped.

[0045] Specifically, see Figure 2 , Figure 2 This is the second flowchart of the vehicle-based fault diagnosis method provided in an embodiment of the present application.

[0046] S201, after receiving a vehicle power-on signal, reading first key information stored in a security module connected to a microcontroller unit according to a preset period;

[0047] For example, the preset period may be 5 seconds, the first key information is read once every 5 seconds, and whether the non-volatile memory chip is faulty is determined based on the first key information.

[0048] S202: For each preset period, read the second key information stored in the non-volatile memory chip according to the first reading result of the first key information read in the preset period;

[0049] Here, the second key information is allowed to be read only when the first key information is read successfully. If the first key information fails to be read, the second key information is skipped and the fault diagnosis process is directly entered.

[0050] S203 : For each preset period, for the first key information and the second key information read in the preset period, determine a diagnostic processing method corresponding to the non-volatile memory chip in the preset period.

[0051] In an optional embodiment, the following situations are included:

[0052] Case 1: The first key information fails to be read, and the diagnostic processing method is "Security module does not enter key information, no fault, no processing";

[0053] Case 2: The first key information is read successfully, but the second key information fails to be read. The diagnostic processing method is "the second key information is not recorded in the non-volatile memory chip. Write the first key information to the non-volatile memory chip";

[0054] Case 3: Both the first and second key information are read successfully, but data verification fails. The diagnostic treatment is "data integrity failure within the non-volatile memory chip, writing the first key information to the non-volatile memory chip";

[0055] Case 4: All operations are successful, and the diagnostic processing mode is "Non-volatile memory chip functions normally, no processing is performed."

[0056] Preferably, when the key reading fails, a certain number of retries are allowed (such as 3 times), and the retry interval can be gradually increased (such as 10ms, 50ms, 100ms). A timeout for key reading is set to prevent the system from being stuck due to communication failure. An error code is returned after the timeout, and the timeout event is recorded. The diagnostic results of each cycle are recorded to form a fault log. The fault trend is analyzed through the fault log to provide early warning of potential problems.

[0057] S102, based on the reading result of the first key information, reading the second key information stored in the non-volatile memory chip from the non-volatile memory chip connected to the microcontroller unit;

[0058] Here, the non-volatile memory chip is an EEPROM chip (Electrically Erasable Programmable Read-Only Memory), which is a non-volatile memory that can be erased and reprogrammed by electrical signals.

[0059] The microcontroller unit MCU is connected to an EEPROM (electrically erasable programmable read-only memory, non-volatile memory) and a security chip via an SPI (serial peripheral interface, Serial Peripheral Interface).

[0060] The encrypted data in the non-volatile memory chip is decrypted or verified using the first key information read from the security module.

[0061] If the verification is successful, the second key information (such as application layer key, user data key, etc.) is read from the EEPROM chip. The second key information is used for specific functions of the vehicle (such as Bluetooth connection, power control, etc.), and its security depends on the correctness of the first key information.

[0062] Specifically, the reading result of the second key information includes a third reading result and a fourth reading result, wherein the reading result of the second key information is determined in the following manner:

[0063] determining whether the second key information stored in the non-volatile memory chip is read from the non-volatile memory chip connected to the microcontroller unit;

[0064] If the second key information stored in the non-volatile memory chip is read from the non-volatile memory chip connected to the microcontroller unit, determining the reading result of the second key information as a third reading result;

[0065] Here, the third reading result is that the stored second key information is successfully read from the non-volatile storage chip.

[0066] The judgment conditions of the third reading result are as follows:

[0067] The data read matches the expected format (e.g., key length and checksum are correct);

[0068] The checksum (such as CRC32) or hash value (such as SHA-256) is verified;

[0069] Decrypt the read encrypted data using the first key information to obtain a plaintext key;

[0070] The decrypted key format is correct (for example, it complies with the AES-128 key specification).

[0071] If the second key information stored in the non-volatile memory chip is not read from the non-volatile memory chip connected to the microcontroller unit, the reading result of the second key information is determined to be a fourth reading result.

[0072] Here, the determination conditions of the fourth reading result are as follows:

[0073] Returns an error code (such as NVM_READ_FAIL, CHECKSUM_ERROR, etc.);

[0074] Record the error type, occurrence time, and read address.

[0075] S103: Execute a diagnostic processing method corresponding to the reading result of the second key information on the non-volatile memory chip.

[0076] The diagnosis processing method includes a first diagnosis processing method and a second diagnosis processing method.

[0077] When detecting that the read result of the first key information is the first read result and the read result of the second key information is the third read result, determining a comparison result between the first key information and the second key information, and determining to execute a first diagnostic processing mode for the non-volatile memory chip according to the comparison result;

[0078] Preferably, when the first key information is read successfully and the second key information is also read successfully, the key information of the two can be compared by bit flipping, and the first diagnostic processing method can be determined according to the comparison result.

[0079] Here, the first key information and the second key information are both binary number sequences.

[0080] The first diagnostic process is performed in the following manner:

[0081] Determining whether each bit of the first key information is consistent with each bit of the second key information;

[0082] If the first key information is consistent with the second key information, it is determined that the non-volatile memory chip functions normally;

[0083] If the first key information is inconsistent with the second key information, the fault code is recorded, the first key information is written into the non-volatile memory chip, the writing state is returned, and the diagnosis processing method of the non-volatile memory chip is determined according to the writing state.

[0084] The specific process is: compare the key information bit by bit; traverse each bit of the first key information and the second key information, determine whether each bit is consistent, and record the comparison result; if the comparison result is consistent: determine that the non-volatile storage chip (EEPROM chip) is functioning normally; if the comparison result is inconsistent: record the fault code and trigger the fault handling process.

[0085] The fault handling process is to write the first key information into the EEPROM chip, overwrite the original data, return to the write state, and determine the diagnostic processing method of the EEPROM chip according to the state.

[0086] If the write status is write successful, it is determined that the diagnostic processing mode of the EEPROM chip is functioning normally and there is no fault. If the write status is write failed, multiple attempts are made. If the key still fails to be written after multiple retries, the owner is notified to contact after-sales for part replacement. Here, the replaced part is the entire ECU, because the MPU, MCU and EEPROM chip are all integrated inside the ECU and are a component assembly.

[0087] When it is detected that the read result of the first key information is the first read result and the read result of the second key information is the fourth read result, it is determined to execute the second diagnostic processing mode for the non-volatile memory chip.

[0088] Preferably, when the first key information is read successfully and the second key information is read unsuccessfully, the second diagnostic processing method is adopted.

[0089] The second diagnostic processing mode is performed by writing the first key information into the nonvolatile memory chip when the second key information stored in the nonvolatile memory chip is not read from the nonvolatile memory chip connected to the microcontroller unit.

[0090] Specifically, the above processes are all recorded in the security log of the ECU, and the method of the present application is also applicable to fault diagnosis of other key data stored in the ECU.

[0091] The embodiments of the present application provide a vehicle-based fault diagnosis method and vehicle, wherein the method is applied to a microcontroller unit of the vehicle, and includes: in response to a vehicle power-on signal, reading first key information stored in a security module from a security module connected to the microcontroller unit; based on the read result of the first key information, reading second key information stored in a non-volatile memory chip from a non-volatile memory chip connected to the microcontroller unit; and executing a diagnostic processing method corresponding to the read result of the second key information on the non-volatile memory chip. Through the present application, the microcontroller unit reads the key information of the security module and the non-volatile memory chip when the vehicle is powered on, and executes the corresponding diagnostic processing, effectively addressing EEPROM chip data anomalies, reducing on-site replacement of component assemblies, lowering maintenance costs, and ensuring normal use of the vehicle.

[0092] This application solves the problem of user complaints about SK key anomalies in the current market, and after-sales personnel must rewrite the SK key through an external diagnostic instrument every time they visit the vehicle. This application maintains the vehicle's key data information by deploying a diagnostic module (MCU) inside the ECU, avoiding unnecessary after-sales maintenance hours and greatly reducing after-sales operating costs. After-sales replacement processing is only required when the EEPROM is severely damaged.

[0093] See also Figure 3 , Figure 3 This is a schematic diagram of the structure of the electronic control unit provided in the embodiment of the present application. Figure 3 As shown in , the electronic control unit 300 includes a microprocessor unit 301 , a microcontroller unit 302 , a non-volatile memory chip 303 , a security firmware 3011 and a security chip 304 .

[0094] The embodiment of the present application further provides an electronic control unit 300, comprising: a microcontroller unit 302, in response to a vehicle power-on signal, reading first key information stored in a security module connected to the microcontroller unit 302 from the security module; the microprocessor unit 301 comprising security firmware 3011; and the security module comprising the security firmware 3011 and a security chip 304;

[0095] When the microprocessor unit 301 receives the first key information acquisition signal from the microcontroller unit 302, the microprocessor unit 301 sends the first key information stored in the security module to the microcontroller unit 302;

[0096] The microcontroller unit 302 reads the second key information stored in the non-volatile storage chip 303 from the non-volatile storage chip 303 connected to the microcontroller unit 302 based on the reading result of the first key information;

[0097] When the non-volatile storage chip 303 receives the second key information acquisition signal from the microcontroller unit 302, the non-volatile storage chip 303 sends the second key information to the microcontroller unit 302;

[0098] The microcontroller unit 302 performs a diagnostic processing method corresponding to the reading result of the second key information on the non-volatile storage chip 303.

[0099] An embodiment of the present application also provides a vehicle, which includes the electronic control unit as described above.

[0100] The embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the computer program can execute the above-mentioned Figure 1 The specific implementation of the steps of the vehicle-based fault diagnosis method in the method embodiment shown can be found in the method embodiment and will not be repeated here.

[0101] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0102] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. There may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be through some communication interface, indirect coupling or communication connection of devices or units, which may be electrical, mechanical or other forms.

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

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

[0105] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0106] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The scope of protection of the present application is not limited thereto. Although the present application has been described in detail with reference to the above-mentioned embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-mentioned embodiments within the technical scope disclosed in the present application, or perform equivalent replacements for some of the technical features thereof. These modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A vehicle-based fault diagnosis method, characterized in that: A microcontroller unit applied to the vehicle comprises: In response to a vehicle power-on signal, reading first key information stored in a security module connected to the microcontroller unit from the security module; Based on the result of reading the first key information, read the second key information stored in the non-volatile memory chip from the non-volatile memory chip connected to the microcontroller unit; A diagnostic processing method corresponding to the reading result of the second key information is performed on the non-volatile memory chip.

2. The method according to claim 1, characterized in that The reading result of the first key information includes a first reading result and a second reading result. The reading result of the first key information is determined in the following manner: determining whether first key information stored in a security module connected to the microcontroller unit is read from the security module; If first key information stored in the security module is read from the security module connected to the microcontroller unit, determining that a result of reading the first key information is a first reading result, and continuing to read second key information stored in the non-volatile memory chip connected to the microcontroller unit from the non-volatile memory chip; If the first key information stored in the security module connected to the microcontroller unit is not read, the reading result of the first key information is determined to be a second reading result, and the second reading result is used to indicate that the first key information is not written into the microcontroller unit.

3. The method according to claim 2, characterized in that The reading result of the second key information includes a third reading result and a fourth reading result, The reading result of the second key information is determined in the following manner: determining whether second key information stored in the nonvolatile memory chip connected to the microcontroller unit is read from the nonvolatile memory chip; If second key information stored in the non-volatile memory chip is read from the non-volatile memory chip connected to the microcontroller unit, determining a reading result of the second key information as a third reading result; If the second key information stored in the nonvolatile memory chip is not read from the nonvolatile memory chip connected to the microcontroller unit, the reading result of the second key information is determined to be a fourth reading result.

4. The method according to claim 3, characterized in that The diagnostic processing method includes a first diagnostic processing method and a second diagnostic processing method. The performing of a diagnostic processing method corresponding to a reading result of the second key information on the non-volatile memory chip includes: When detecting that the read result of the first key information is a first read result and the read result of the second key information is a third read result, determining a comparison result between the first key information and the second key information, and determining to perform a first diagnostic processing mode on the non-volatile memory chip according to the comparison result; When it is detected that the read result of the first key information is a first read result and the read result of the second key information is a fourth read result, it is determined to execute a second diagnostic processing mode for the non-volatile memory chip.

5. The method according to claim 4, characterized in that The first key information and the second key information are both binary number sequences, The first diagnostic processing method is performed in the following manner: Determining whether each bit of the first key information is consistent with each bit of the second key information; If the first key information is consistent with the second key information, it is determined that the non-volatile memory chip functions normally; If the first key information is inconsistent with the second key information, a fault code is recorded, the first key information is written into the non-volatile memory chip, a write status is returned, and a diagnostic processing method of the non-volatile memory chip is determined according to the write status.

6. The method according to claim 4, characterized in that The second diagnostic processing method is performed in the following manner: If the second key information stored in the nonvolatile memory chip is not read from the nonvolatile memory chip connected to the microcontroller unit, the first key information is written into the nonvolatile memory chip.

7. The method according to claim 1, characterized in that In response to a vehicle power-on signal, the first key information stored in the security module is read from the security module connected to the microcontroller unit; based on the reading result of the first key information, the second key information stored in the non-volatile memory chip is read from the non-volatile memory chip connected to the microcontroller unit; Performing a diagnostic processing method corresponding to a reading result of the second key information on the non-volatile memory chip includes: After receiving a vehicle power-on signal, reading the first key information stored in the security module connected to the microcontroller unit according to a preset period; For each preset period, reading the second key information stored in the non-volatile storage chip according to a first reading result of the first key information read in the preset period; For each preset period, for the first key information and the second key information read in the preset period, a diagnostic processing mode corresponding to the non-volatile storage chip in the preset period is determined.

8. An electronic control unit, characterized in that: Including a microprocessor unit, a microcontroller unit and a non-volatile memory chip, wherein the microcontroller unit reads first key information stored in the security module from a security module connected to the microcontroller unit in response to a vehicle power-on signal, and the microprocessor unit includes a security module; When the microprocessor unit receives the first key information acquisition signal from the microcontroller unit, the microprocessor unit sends the first key information stored in the security module to the microcontroller unit; The microcontroller unit reads second key information stored in a nonvolatile memory chip connected to the microcontroller unit based on a result of reading the first key information; When the non-volatile memory chip receives the second key information acquisition signal from the microcontroller unit, the non-volatile memory chip sends the second key information to the microcontroller unit; The microcontroller unit executes a diagnostic processing method corresponding to the reading result of the second key information on the non-volatile memory chip.

9. A vehicle, characterized in that: The vehicle comprises the electronic control unit according to claim 8 .

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are executed.