Controller power-on abnormality processing method, device and equipment
Patent Information
- Application Number
- CN202611088222.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-21
- Publication Date
- 2026-10-27
AI Technical Summary
[0007]本发明实施例提供了一种控制器上电异常处理方法、装置及设备,用以解决现有技术中由断电过程中电源不稳导致的DTC数据异常场景所引发的控制器启动异常的问题
[0018]在本发明实施例中,对新能源汽车控制器上电初始化流程中新增异常数据检测与修复环节。针对KL30电源断电恢复后因DTC数据异常导致的初始化失败、软件卡死及通讯丢失问题,本方案在标准初始化前增设DTC数据有效性校验步骤,若检测到异常则主动擦除修复,再执行初始化。该机制通过前置干预消除异常数据对初始化流程的干扰,从根本上解决了软件卡死问题,确保控制器可靠启动;进而保障控制器与CDU间的通讯链路稳定性,避免车辆功能失效。同时,该机制赋予控制器处理非预期断电数据异常的自愈能力,无需依赖外部工具或线下修复,显著提升系统鲁棒性与用户体验。此外,方案无需额外硬件成本,仅通过软件优化即可实现,有效降低售后维护成本;且具备良好的通用性,可适配不同型号的非易失性存储器与控制器,检测与修复流程可根据实际需求灵活配置,适用于各类新能源汽车的控制器系统。
Smart Images

Figure CN122985472A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of automotive controller software technology, and in particular to a method, apparatus and device for handling controller power-on abnormalities. Background Technology
[0002] In the electronic control system of new energy vehicles, the constant power supply of the KL30 controller is crucial for ensuring the data security of the non-volatile memory. In related technologies, the controller's power-on initialization process typically involves: after the controller wakes up and runs, it directly performs the initialization of the non-volatile memory, and then enters the normal software operation state. When the KL30 power supply is disconnected, the controller triggers an undervoltage fault and stores a Diagnostic Trouble Code (DTC). If the power supply is unstable during the power outage, it can lead to abnormal DTC data storage.
[0003] When the KL30 power is restored and the controller is powered on again, it will directly perform non-volatile memory initialization again. However, since the abnormal DTC data caused by the previous power failure has not been processed, the non-volatile memory initialization will fail, which will lead to software freeze, loss of communication messages between the controller and the Central Display Unit (CDU), and ultimately cause the vehicle-related functions to fail.
[0004] Therefore, all related technical solutions adopt a "direct initialization upon power-on" process, failing to consider DTC data anomalies caused by power instability during power outages. The shortcomings of this type of solution are specifically manifested in: Abnormal data detection step: The validity of DTC data stored in non-volatile memory was not verified before power-on initialization. Abnormal data will directly interfere with the initialization process.
[0005] No abnormal data repair mechanism: When abnormal data is detected, there is no active erase and repair step, which causes the abnormal data to persist and triggers initialization failure every time the power is turned on.
[0006] Poor process fault tolerance: Relying solely on a single initialization process, it cannot handle unexpected data errors caused by power outages, leading to irreversible failures such as software freezes and communication loss, affecting vehicle reliability and user experience. Summary of the Invention
[0007] This invention provides a method, apparatus, and device for handling controller power-on anomalies, which solves the problem of controller startup anomalies caused by DTC data anomalies due to power instability during power outages in the prior art.
[0008] In a first aspect, embodiments of the present invention provide a method for handling controller power-on anomalies, characterized in that the method includes: When the controller is powered on and initialized, data anomaly detection is performed on the non-volatile memory before initializing the non-volatile memory; When it is determined from the data anomaly detection that the non-volatile memory does not have any anomalies, an initialization process is performed on the non-volatile memory; When an anomaly is detected in the non-volatile memory based on the data anomaly detection, data repair is performed on the non-volatile memory, and an initialization process is executed on the non-volatile memory after the data repair is completed.
[0009] Optionally, the data anomaly detection of the non-volatile memory includes: Read the DTC fault data stored in the non-volatile memory; The DTC fault data is subjected to data validity verification, which includes one or more of the following: verification value comparison verification, data format verification, and data range verification. When the data validity verification result determines that the DTC fault data is abnormal, it is determined that the non-volatile memory has data anomalies. Specifically, when the detection time for data anomaly detection reaches a preset time threshold, it is determined that the non-volatile memory is abnormal.
[0010] Optionally, the data repair of the non-volatile memory includes: Identify a first storage region in the non-volatile memory where abnormal data exists; The first storage area is erased and restored to its initial state.
[0011] Optionally, the step of erasing the first storage area and restoring it to its initial state includes: The sector corresponding to the first storage area is completely erased, or the DTC fault data that is abnormal in the first storage area is erased. Write a default value or a preset blank identifier in the first storage area after the erase operation is completed.
[0012] Optionally, the method for erasing the first storage area and restoring it to its initial state further includes: The data in the non-volatile memory is backed up at preset intervals; When it is determined that the non-volatile memory is faulty, the DTC fault data in the first storage area that is faulty is overwritten by the backup data obtained from the backup.
[0013] Optionally, the method for erasing the first storage area further includes: When the number of erase operations reaches a preset erase count threshold, it is determined that the non-volatile memory has a hardware fault, and the vehicle self-diagnostic system reports the corresponding fault code.
[0014] Optionally, the method further includes: The power supply voltage is monitored in real time during changes in the power state of the controller. When an abnormal fluctuation in the power supply voltage is detected, the second storage area currently used to store DTC fault data is marked. In the subsequent power-on initialization of the controller, the data in the marked second storage area is directly repaired without the need for data anomaly detection.
[0015] Secondly, embodiments of the present invention provide a controller power-on anomaly handling device, the device comprising: The detection module performs data anomaly detection on the non-volatile memory before initializing the non-volatile memory during the power-on initialization of the controller. The initialization module performs an initialization process on the non-volatile memory when it is determined from the data anomaly detection that there is no anomaly in the non-volatile memory. The repair module, when determining that the non-volatile memory has an anomaly based on the data anomaly detection, performs data repair on the non-volatile memory and executes an initialization process on the non-volatile memory after the data repair is completed.
[0016] Thirdly, embodiments of the present invention provide an electronic device, including: At least one processor; and At least one memory communicatively connected to the processor, wherein: The memory stores program instructions that can be executed by the processor, which can invoke the program instructions to perform the method as described in any of the first aspects.
[0017] Fourthly, embodiments of the present invention provide a storage medium including a stored program, wherein, when the program is executed, it controls the device where the storage medium is located to perform the method described in any of the first aspects.
[0018] In this embodiment of the invention, an abnormal data detection and repair step is added to the power-on initialization process of the new energy vehicle controller. Addressing the issues of initialization failure, software freezes, and communication loss caused by abnormal DTC data after power failure and recovery of the KL30, this solution adds a DTC data validity verification step before standard initialization. If an anomaly is detected, it is actively erased and repaired before initialization is performed. This mechanism eliminates the interference of abnormal data on the initialization process through pre-emptive intervention, fundamentally solving the software freeze problem and ensuring reliable controller startup; it also ensures the stability of the communication link between the controller and the CDU, preventing vehicle function failure. Simultaneously, this mechanism gives the controller the self-healing capability to handle unexpected power failure data anomalies, eliminating the need for external tools or offline repairs, significantly improving system robustness and user experience. Furthermore, the solution requires no additional hardware costs, achieving its effect solely through software optimization, effectively reducing after-sales maintenance costs; it also possesses good versatility, adapting to different models of non-volatile memory and controllers, and the detection and repair process can be flexibly configured according to actual needs, making it suitable for controller systems of various new energy vehicles. Attached Figure Description
[0019] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 The diagram shown is a flowchart of a controller power-on anomaly handling method provided in an embodiment of this application; Figure 2 The diagram shown is a schematic diagram of a controller power-on abnormality handling device provided in an embodiment of this application; Figure 3 The diagram shown is a structural schematic of an electronic device provided in an embodiment of this application. Detailed Implementation
[0021] To better understand the technical solution of this application, the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0022] It should be understood that the described embodiments are merely some, not all, of the embodiments in this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.
[0023] like Figure 1 The diagram shown is a flowchart of a controller power-on anomaly handling method provided by an embodiment of the present invention. See also... Figure 1 The specific steps of this method include: S101, when the controller is powered on and initialized, data anomaly detection is performed on the non-volatile memory before initializing the non-volatile memory.
[0024] Specifically, the controller enters the wake-up running state after receiving the wake-up signal. The controller performs the routine power-on pre-preparation and then enters the initialization process of the non-volatile memory (EEPROM).
[0025] In this embodiment of the invention, before initializing the non-volatile memory, it is necessary to perform data anomaly detection on the non-volatile memory.
[0026] When performing data anomaly detection on non-volatile memory, it is necessary to read the DTC fault data stored in the non-volatile memory. The DTC fault data is then validated for data validity, and the result of the validation determines whether data anomalies exist in the non-volatile memory. Generally, if the validation result indicates that the DTC fault data is abnormal, then the non-volatile memory is determined to be abnormal.
[0027] In this embodiment of the invention, data validity verification includes one or more of the following: verification value comparison verification, data format verification, and data range verification.
[0028] To avoid indefinite waiting in the detection process due to hardware failure of the non-volatile memory, this application also includes a timeout mechanism for the data anomaly detection process. That is, when the detection time for data anomaly detection reaches a preset time threshold, it is determined directly that the non-volatile memory is faulty without waiting for the detection result.
[0029] S102, when it is determined from the data anomaly detection that there is no anomaly in the non-volatile memory, the initialization process is executed on the non-volatile memory.
[0030] Specifically, when it is determined that there are no abnormalities in the non-volatile memory, the controller executes the standard non-volatile memory initialization procedure, such as sequentially performing memory area configuration, data verification, and state synchronization operations. After the non-volatile memory initialization is completed, the controller software enters normal operation.
[0031] S103: When an anomaly is detected in the non-volatile memory based on the data anomaly detection, data repair is performed on the non-volatile memory, and an initialization process is executed on the non-volatile memory after the data repair is completed.
[0032] Specifically, when performing data repair on non-volatile memory, it is necessary to identify the first storage area in the non-volatile memory where abnormal data exists. An erase operation is then performed on the first storage area, restoring it to its initial state.
[0033] The initial state refers to the safe baseline state in which there is no abnormal data in the first region of the non-volatile memory.
[0034] Specifically, when performing an erase operation on the first storage area, the entire sector corresponding to the first storage area can be erased, or abnormal DTC fault data in the first storage area can be erased.
[0035] Write a default value, such as 0xFF, or a preset blank identifier into the first storage area after the erase operation is completed, thereby restoring it to its initial state.
[0036] After the data restoration of the non-volatile memory is completed, the controller executes the standard initialization procedure for the non-volatile memory. Once the non-volatile memory initialization is complete, the controller software enters normal operation.
[0037] When the power supply to KL30 is disconnected during normal operation, the controller triggers an undervoltage fault and stores a DTC fault. Even if the DTC storage is abnormal due to unstable power supply, the abnormality will be detected by the controller during the execution of S101-S103 when KL30 is powered on again, and it will be repaired to avoid initialization failure and software freeze caused by abnormal data.
[0038] Optionally, in this embodiment of the invention, the data anomaly detection and repair process can be set as a configurable item. The detection algorithm, erasure method and timeout parameters can be adjusted according to different vehicle models and different controller non-volatile memory models to improve the versatility of the solution.
[0039] In this embodiment of the invention, an abnormal data detection and repair step is added to the power-on initialization process of the new energy vehicle controller. Addressing the issues of initialization failure, software freezes, and communication loss caused by abnormal DTC data after power failure and recovery of the KL30, this solution adds a DTC data validity verification step before standard initialization. If an anomaly is detected, it is actively erased and repaired before initialization is performed. This mechanism eliminates the interference of abnormal data on the initialization process through pre-emptive intervention, fundamentally solving the software freeze problem and ensuring reliable controller startup; it also ensures the stability of the communication link between the controller and the CDU, preventing vehicle function failure. Simultaneously, this mechanism gives the controller the self-healing capability to handle unexpected power failure data anomalies, eliminating the need for external tools or offline repairs, significantly improving system robustness and user experience. Furthermore, the solution requires no additional hardware costs, achieving its effect solely through software optimization, effectively reducing after-sales maintenance costs; it also possesses good versatility, adapting to different models of non-volatile memory and controllers, and the detection and repair process can be flexibly configured according to actual needs, making it suitable for controller systems of various new energy vehicles.
[0040] Optionally, in this embodiment of the invention, when erasing the first storage area and restoring it to its initial state, the data in the non-volatile memory can be backed up at preset intervals. When it is determined through S103 that the non-volatile memory is faulty and data repair of the non-volatile memory is required, the backup data obtained from the backup can be used to directly overwrite the DTC fault data in the first storage area to achieve rapid repair.
[0041] Optionally, in this embodiment of the invention, when performing data repair on the non-volatile memory by executing S103, write protection needs to be set for the erase operation to avoid accidentally erasing normal data. Specifically, an erase count threshold can be preset to prevent hardware wear. When the number of erase operations reaches the preset erase count threshold, it is determined that the non-volatile memory has a hardware fault, and the corresponding fault code is reported to notify the maintenance personnel for handling.
[0042] When a fault code is reported, it is transmitted via the CAN bus to the vehicle's On-Board Diagnostics (OBD) system, allowing maintenance personnel to read and troubleshoot the hardware fault using diagnostic equipment. Simultaneously, the fault code can also be transmitted to the vehicle's instrument panel to illuminate the corresponding fault indicator light, providing a fault notification to the driver.
[0043] Optionally, in this embodiment of the invention, power status monitoring during the power outage process can also be added to the software layer of the controller. That is, the power supply voltage is monitored in real time during changes in the controller's power status. When abnormal fluctuations in the power supply voltage are detected, i.e., unstable voltage drops, the second storage area currently used to store DTC fault data is marked. Thus, when the controller is subsequently powered on and initialized, the marked second storage area can be directly repaired without having to perform data anomaly detection through complex verification algorithms.
[0044] Corresponding to the above-described controller power-on anomaly handling method, this application also provides a controller power-on anomaly handling device. See [link to relevant documentation]. Figure 2 This is a schematic diagram of a controller power-on abnormality handling device provided in an embodiment of this application. The controller power-on abnormality handling device may include: a detection module 201, an initialization module 202, and a repair module 203.
[0045] The detection module 201 performs data anomaly detection on the non-volatile memory before initializing the non-volatile memory during the power-on initialization of the controller.
[0046] The initialization module 202 performs an initialization process on the non-volatile memory when it is determined from the data anomaly detection that there is no anomaly in the non-volatile memory.
[0047] Repair module 203, when it is determined that the non-volatile memory has an anomaly based on the data anomaly detection, performs data repair on the non-volatile memory, and performs an initialization process on the non-volatile memory after the data repair is completed.
[0048] Figure 3 This is a schematic diagram illustrating the structure of one embodiment of the electronic device described in this specification. Specifically, the electronic device can be implemented as a device for executing the controller power-on fault handling method provided in this embodiment. Figure 3 As shown, the above-mentioned electronic device may include at least one processor; and at least one memory communicatively connected to the processing unit, wherein: the memory stores program instructions that can be executed by the processing unit, and the processor can execute the controller power-on abnormality handling method provided in this embodiment by calling the program instructions.
[0049] The aforementioned electronic device can be a device capable of intelligent dialogue with the user, such as a cloud server. This specification does not limit the specific form of the electronic device in the embodiments. It is understood that the electronic device here refers to the machine mentioned in the method embodiments.
[0050] Figure 3 A block diagram of an exemplary electronic device suitable for implementing embodiments of this specification is shown. Figure 3 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments described in this specification.
[0051] like Figure 3 As shown, the electronic device is represented in the form of a general-purpose computing device. The components of the electronic device may include, but are not limited to: one or more processors 310, communication interface 320, memory 330, and communication bus 340 connecting different system components (including memory 330, communication interface 320 and processor 310).
[0052] Communication bus 340 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, Industry Standard Architecture (ISA) buses, Micro Channel Architecture (MAC) buses, Enhanced ISA buses, Video Electronics Standards Association (VESA) local buses, and Peripheral Component Interconnect (PCI) buses.
[0053] Electronic devices typically include a variety of computer-readable media. These media can be any available media that can be accessed by the electronic device, including volatile and non-volatile media, and removable and non-removable media.
[0054] Memory 330 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory. The electronic device may further include other removable / non-removable, volatile / non-volatile computer system storage media. Memory 330 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments described herein.
[0055] A program / utility having a set (at least one) of program modules may be stored in memory 330. Such program modules include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. The program modules typically perform the functions and / or methods described in the embodiments of this specification.
[0056] The processor 310 executes various functional applications and data processing by running programs stored in the memory 330, such as implementing the controller power-on abnormality handling method provided in the embodiments shown in this specification.
[0057] This specification provides a non-transitory computer-readable storage medium that stores computer instructions that cause the computer to execute the controller power-on anomaly handling method provided in the embodiments shown in this specification.
[0058] The aforementioned non-transitory computer-readable storage medium may be any combination of one or more computer-readable media. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or flash memory, optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in connection with an instruction execution system, apparatus, or device.
[0059] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0060] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0061] Computer program code for performing the operations described herein can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0062] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0063] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this specification, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0064] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this specification includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which the embodiments of this specification pertain.
[0065] Depending on the context, the word "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection." Similarly, depending on the context, the phrase "if determination" or "if detection (of the stated condition or event)" can be interpreted as "when determination," "in response to determination," "when detection (of the stated condition or event)," or "in response to detection (of the stated condition or event)."
[0066] It should be noted that the terminals involved in the embodiments of this specification may include, but are not limited to, personal computers (PCs), personal digital assistants (PDAs), wireless handheld devices, tablet computers, mobile phones, MP3 players, MP4 players, etc.
[0067] In the embodiments provided in this specification, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0068] Furthermore, the functional units in the various embodiments of this specification can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units.
[0069] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of this specification.
[0070] The above description is merely a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of protection of this specification.
Claims
1. A method for handling controller power-on anomalies, characterized in that, The method includes: When the controller is powered on and initialized, data anomaly detection is performed on the non-volatile memory before initializing the non-volatile memory; When it is determined from the data anomaly detection that the non-volatile memory does not have any anomalies, an initialization process is performed on the non-volatile memory; When an anomaly is detected in the non-volatile memory based on the data anomaly detection, data repair is performed on the non-volatile memory, and an initialization process is executed on the non-volatile memory after the data repair is completed.
2. The method according to claim 1, characterized in that, The data anomaly detection of the non-volatile memory includes: Read the DTC fault data stored in the non-volatile memory; The DTC fault data is subjected to data validity verification, which includes one or more of the following: verification value comparison verification, data format verification, and data range verification. When the data validity verification result determines that the DTC fault data is abnormal, it is determined that the non-volatile memory has data anomalies. Specifically, when the detection time for data anomaly detection reaches a preset time threshold, it is determined that the non-volatile memory is abnormal.
3. The method according to claim 1, characterized in that, The data repair of the non-volatile memory includes: Identify a first storage region in the non-volatile memory where abnormal data exists; The first storage area is erased and restored to its initial state.
4. The method according to claim 3, characterized in that, The step of erasing the first storage area and restoring it to its initial state includes: The sector corresponding to the first storage area is completely erased, or the DTC fault data that is abnormal in the first storage area is erased. Write a default value or a preset blank identifier in the first storage area after the erase operation is completed.
5. The method according to claim 3, characterized in that, The method of erasing the first storage area and restoring it to its initial state further includes: The data in the non-volatile memory is backed up at preset intervals; When it is determined that the non-volatile memory is faulty, the DTC fault data in the first storage area that is faulty is overwritten by the backup data obtained from the backup.
6. The method according to claim 3, characterized in that, The method for erasing the first storage area further includes: When the number of erase operations reaches a preset erase count threshold, it is determined that the non-volatile memory has a hardware fault, and the corresponding fault code is reported to the vehicle self-diagnostic system.
7. The method according to claim 1, characterized in that, The method further includes: The power supply voltage is monitored in real time during changes in the power state of the controller. When an abnormal fluctuation in the power supply voltage is detected, the second storage area currently used to store DTC fault data is marked. In the subsequent power-on initialization of the controller, the data in the marked second storage area is directly repaired without the need for data anomaly detection.
8. A controller power-on abnormality handling device, characterized in that, The device includes: The detection module performs data anomaly detection on the non-volatile memory before initializing the non-volatile memory during the power-on initialization of the controller. The initialization module performs an initialization process on the non-volatile memory when it is determined from the data anomaly detection that there is no anomaly in the non-volatile memory. The repair module, when determining that the non-volatile memory has an anomaly based on the data anomaly detection, performs data repair on the non-volatile memory and executes an initialization process on the non-volatile memory after the data repair is completed.
9. An electronic device, characterized in that, include: At least one processor; as well as At least one memory communicatively connected to the processor, wherein: The memory stores program instructions that can be executed by the processor, and the processor can invoke the program instructions to perform the method as described in any one of claims 1 to 7.
10. A storage medium, characterized in that, The storage medium includes a stored program, wherein, when the program is executed, it controls the device on which the storage medium is located to perform the method according to any one of claims 1 to 7.