Fault recovery method and device, equipment and storage medium
By receiving memory failure signals and calling the reverse initialization interface to execute the fault recovery strategy, the problem of failures that cannot be recovered in time due to instability of EMMC storage devices is solved, efficient self-recovery of memory is achieved, and driving safety is ensured.
Patent Information
- Application Number
- CN202411023251.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-11-22
Smart Images

Figure CN119003240A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle control technology, and in particular to a fault recovery method, device, equipment and storage medium. Background Art
[0002] Based on the application in the central domain control processor of the new energy system, a large-capacity fast storage device is required to meet the storage and system startup requirements. The domain control processor generally uses EMMC 5.1 storage device. The stability of EMMC will affect the stability of system operation. If EMMC cannot be restored in time when an abnormality occurs, it will affect the system startup sequence. At this time, the system display screen will show an abnormality and report a fault, thus affecting the user experience and causing the system to be unable to start normally during this power-on cycle, resulting in a hang, affecting driving safety.
[0003] Therefore, how to efficiently realize self-recovery of memory failures and ensure driving safety is a problem that needs to be solved urgently.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of this application is to provide a fault recovery method, device, equipment and storage medium, aiming to solve the technical problem of how to efficiently realize self-recovery of memory faults and ensure driving safety.
[0006] To achieve the above object, the present application proposes a fault recovery method, which includes:
[0007] receiving a storage fault signal sent by the storage, and determining a fault state of the storage according to the storage fault signal;
[0008] Calling a reverse initialization interface of the memory according to the fault state of the memory;
[0009] A fault recovery strategy is executed on the memory through the reverse initialization interface to achieve fault recovery of the memory, wherein the fault recovery strategy includes a power-on and power-off operation strategy and a power-on retention strategy.
[0010] In one embodiment, executing a fault recovery strategy on the memory through the reverse initialization interface includes:
[0011] When the fault recovery strategy is a power-on and power-off operation strategy, powering on and off the memory through the reverse initialization interface;
[0012] When the fault recovery strategy is a power-on hold operation strategy, a power-on hold operation is performed on the memory through the reverse initialization interface.
[0013] In one embodiment, when the fault recovery strategy is a power-on and power-off operation strategy, performing power-on and power-off operations on the memory through the reverse initialization interface includes:
[0014] When the fault recovery strategy is a power-on and power-off operation strategy, powering off the power supply of the memory through the reverse initialization interface, and detecting the power-off holding time of the power supply;
[0015] When the power-off holding time reaches a first time threshold, the power supply of the memory is powered on through the reverse initialization interface, and a first power-on holding time of the power supply is detected.
[0016] In one embodiment, when the power-off retention time reaches a first time threshold, after powering on the power supply of the memory through the reverse initialization interface and detecting the power-on retention time of the power supply, the method further includes:
[0017] When the first power-on holding time reaches a second time threshold, calculating the number of fault recovery operations to obtain a current number of fault recovery operations, wherein the second time threshold is greater than the first time threshold;
[0018] When the current fault recovery operation number reaches a number threshold, detecting and storing a fault signal to obtain a first detection result;
[0019] When the first detection result is that a storage fault signal exists, the fault recovery strategy is determined to be the power-on holding strategy.
[0020] In one embodiment, when the fault recovery strategy is a power-on hold operation strategy, performing a power-on hold operation on the memory through the reverse initialization interface includes:
[0021] When the fault recovery strategy is a power-on hold operation strategy, powering on the power supply of the memory through the reverse initialization interface, and detecting a second power-on hold time length of the power supply;
[0022] When the second power-on holding time reaches a third time threshold, the current number of fault recovery operations is reset and the power-on holding is exited, wherein the third time threshold is greater than the second time threshold.
[0023] In one embodiment, when the second power-on holding time reaches a third time threshold, after resetting the current fault recovery operation times and exiting the power-on holding, the method further includes:
[0024] Detecting and storing a fault signal to obtain a second detection result;
[0025] When the second detection result is that the storage fault signal exists, it is determined that the storage fault recovery fails and an abnormality warning is issued.
[0026] In one embodiment, the receiving a storage fault signal sent by the storage and determining a fault state of the storage according to the storage fault signal includes:
[0027] Receiving a storage fault signal sent by the storage, and determining whether the storage has a leakage current phenomenon according to the storage fault signal;
[0028] When there is no leakage current phenomenon in the memory, determining that the fault state of the memory is a recoverable state;
[0029] When a leakage current phenomenon exists in the memory, it is determined that the fault state of the memory is an unrecoverable state.
[0030] In addition, to achieve the above purpose, the present application also proposes a fault recovery device, the fault recovery device comprising:
[0031] A determination module, configured to receive a storage fault signal sent by the storage, and determine a fault state of the storage according to the storage fault signal;
[0032] A calling module, used for calling a reverse initialization interface of the memory according to the fault state of the memory;
[0033] An execution module is used to execute a fault recovery strategy on the memory through the reverse initialization interface to achieve fault recovery of the memory, wherein the fault recovery strategy includes a power-on and power-off operation strategy and a power-on retention strategy.
[0034] In addition, to achieve the above objectives, the present application also proposes a fault recovery device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the fault recovery method described above.
[0035] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the fault recovery method described above are implemented.
[0036] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the fault recovery method described above are implemented.
[0037] The present application provides a fault recovery method, which first receives a storage fault signal sent by a memory, and determines the fault state of the memory according to the storage fault signal; calls a reverse initialization interface of the memory according to the fault state of the memory; and executes a fault recovery strategy on the memory through the reverse initialization interface to achieve memory fault recovery, wherein the fault recovery strategy includes a power-on and power-off operation strategy and a power-on retention strategy, which can efficiently achieve self-recovery of memory faults and ensure driving safety.
[0038] In summary, the present application determines the fault state of the memory through the storage fault signal sent by the memory and calls the reverse initialization interface of the memory, thereby executing a fault recovery strategy on the memory to achieve memory fault recovery, overcoming the technical defect that the memory failure cannot be self-recovered in time, resulting in a hang caused by the inability to start normally, which affects driving safety, and can efficiently achieve self-recovery of memory failures to ensure driving safety. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0041] Figure 1 A flowchart of the first embodiment of the fault recovery method of the present application is provided;
[0042] Figure 2 A block diagram of the interaction principle between the controller and the eMMC memory provided in Example 1 of the fault recovery method of the present application;
[0043] Figure 3 A flowchart of the second embodiment of the fault recovery method of the present application is provided;
[0044] Figure 4 This is a schematic diagram of the module structure of the fault recovery device according to an embodiment of the present application;
[0045] Figure 5 A schematic diagram of the device structure of the hardware operating environment involved in the fault recovery method of the embodiment of the present application.
[0046] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0047] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0048] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0049] The main solution of the embodiment of the present application is: receiving a storage fault signal sent by a memory, and determining the fault state of the memory according to the storage fault signal; calling the reverse initialization interface of the memory according to the fault state of the memory; executing a fault recovery strategy on the memory through the reverse initialization interface to achieve memory fault recovery, wherein the fault recovery strategy includes a power-on and power-off operation strategy and a power-on retention strategy.
[0050] Based on the application in the central domain control processor of the new energy system, a large-capacity fast storage device is required to cope with the storage and system startup requirements. The domain control processor generally uses EMMC 5.1 storage device. The stability of EMMC will affect the stability of system operation. If EMMC cannot be restored in time when an abnormality occurs, it will affect the system startup timing. At this time, the system display screen will show an abnormality and report a fault, which will affect the user experience and cause the system to be unable to start normally during this power-on cycle, resulting in a hang, affecting driving safety. Therefore, how to efficiently realize the self-recovery of memory failures and ensure driving safety is a problem that needs to be solved urgently.
[0051] The present application determines the fault state of the memory through a storage fault signal sent by the memory and calls the reverse initialization interface of the memory. The fault recovery strategy is executed through the reverse initialization interface to achieve memory fault recovery. This overcomes the technical defect that the memory fault cannot be self-recovered in time, resulting in a hang caused by the inability to start normally, which affects driving safety. The application can efficiently achieve self-recovery of memory faults and ensure driving safety.
[0052] It should be noted that the execution subject of this embodiment may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a fault recovery device, etc. The following takes the fault recovery device as an example to illustrate this embodiment and the following embodiments.
[0053] Based on this, the present application embodiment provides a fault recovery method, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the fault recovery method of the present application.
[0054] In this embodiment, the fault recovery method includes steps S10 to S30:
[0055] Step S10, receiving a storage fault signal sent by the storage, and determining a fault state of the storage according to the storage fault signal.
[0056] It should be noted that the fault recovery device includes a controller and a memory, wherein the controller may be an S32G controller, which refers to a chip that integrates a high-performance processor, a communication interface, and a rich peripheral, and is widely used in the automotive and industrial control fields. In this embodiment, the S32G controller, as the core control unit of the fault recovery device, is responsible for receiving and processing various signals from the memory, including storing fault signals. The memory may be an eMMC memory, which is an embedded multimedia card widely used in mobile devices and embedded systems. With its high capacity, high-speed access, and low power consumption, it has become an indispensable storage solution in the central domain control processor of new energy vehicles. In this embodiment, the eMMC memory, as the main storage medium, is responsible for storing the data and programs required for the operation of the system, and may also face various failure risks.
[0057] It is understandable that the storage fault signal is a signal sent by the memory when a storage fault occurs, and the storage fault signal includes relevant parameters in the memory. The fault recovery device can quickly identify and respond to abnormal conditions of the memory by monitoring these signals.
[0058] It is worth noting that the controller is composed of two processors, namely the M core system and the A core system. The M core is the Arm Cortex-M series core, and the A core is the Arm Cortex-A series core. The M core specializes in processing tasks with high real-time requirements, such as interrupt processing and underlying hardware interaction, while the A core system focuses on executing operating systems, application layer software, and more complex algorithm processing. In this embodiment, for the fault recovery strategy of the memory, the M core system and the A core system work together to achieve an efficient and reliable fault recovery process. The eMMC memory includes an MMC controller and NAND Flash. The MMC controller is responsible for managing data transmission and command control between the NAND Flash to ensure that data can be safely written or read in a predetermined format and timing. NAND Flash is a non-volatile storage medium that performs data storage and erasure operations in blocks. Its high storage density and low cost make it the preferred storage solution in embedded systems. In this embodiment, when the eMMC memory fails, the MMC controller inside it may not be able to respond to the control command correctly, resulting in abnormal data transmission, which in turn causes system startup failure and driving safety hazards.
[0059] like Figure 2 As shown, Figure 2The figure is a block diagram of the interaction principle between the controller and the eMMC memory. The S32G controller includes an M core system and an A core system. The eMMC memory includes an MMC controller and NAND Flash. The M core controls the power-on of the eMMC memory and detects whether the eMMC return status is normal. During the power-on cycle, when the eMMC memory is powered on and initialized and reports an error fault, the A core cannot start, and the M core enables the eMMC power supply.
[0060] In a feasible implementation, step S10 may include: receiving a storage fault signal sent by the memory, and determining whether there is a leakage current phenomenon in the memory based on the storage fault signal; when there is no leakage current phenomenon in the memory, determining that the fault state of the memory is a recoverable state; when there is a leakage current phenomenon in the memory, determining that the fault state of the memory is an unrecoverable state.
[0061] It should be noted that leakage current is a more serious situation in memory failure, which usually means that there is physical damage or short circuit inside the storage medium, resulting in abnormal current flow. If there is voltage on the eMMC power supply circuit, and the voltage of the storage fault signal cannot drop to 0V, the eMMC memory has leakage current, then the memory failure at this time cannot be recovered by resetting and powering off, that is, the memory failure state is unrecoverable.
[0062] It is understandable that when it is determined that the memory is in a recoverable state, the fault recovery device will call the preset fault recovery strategy for fault recovery according to the instructions of the S32G controller. When it is determined that the memory is in an unrecoverable state, the A core system cannot start normally. When the M core detects that the A core startup is abnormal, it restarts the A core system. If the eMMC memory fault cannot be self-recovered, the A core system startup abnormality is reported (the A core system someip protocol stack and other applications cannot run, and the whole vehicle shows that the instrument fault light is on and cannot be recovered). At this time, the entire S32G system needs to be hibernated or powered off before the system can return to normal.
[0063] Step S20: calling a reverse initialization interface of the memory according to the fault state of the memory.
[0064] It should be noted that the reverse initialization interface is a special reset operation for the memory when the regular initialization process cannot be completed or the system detects an abnormality, in an attempt to restore the memory to a predictable or operable initial state for further troubleshooting or recovery measures. When it is determined that the eMMC memory is in a recoverable state, the M core system of the S32G controller will first try to reset the eMMC memory by calling the reverse initialization interface, sending a series of specific commands and sequences to the MMC controller to force it to perform operations opposite to or additional to the traditional initialization process, such as deep erase, reconfiguration of register settings, or resetting the internal state machine.
[0065] It is understandable that the implementation of the reverse initialization interface depends on the specific hardware specifications of the eMMC memory and the interface documentation provided by the manufacturer. When calling this interface, the M-core system needs to ensure control of the MMC controller to avoid possible parallel operation conflicts with the A-core system.
[0066] In the specific implementation, when an eMMC error cannot be recovered, in order to avoid leakage current caused by the eMMC error, the M core obtains the eMMC error status and adds a call to the eMMC reverse initialization interface to reset the eMMC driver and status.
[0067] Step S30, executing a fault recovery strategy on the memory through the reverse initialization interface to achieve fault recovery of the memory, wherein the fault recovery strategy includes a power-on and power-off operation strategy and a power-on retention strategy.
[0068] It should be noted that before executing the fault recovery strategy, it is necessary to verify the availability of the eMMC reverse initialization interface to ensure that it responds normally and can accurately receive and execute instructions. Once the interface is confirmed to be correct, the system will further execute the preset fault recovery strategy.
[0069] It can be understood that the power-on and power-off operation strategy refers to the operation of powering off and then powering on the eMMC memory, that is, trying to restore its normal function by controlling the power state of the memory. The power-on retention strategy refers to the strategy of powering on the eMMC memory and maintaining it for a preset period of time to stabilize its internal circuits and logic units, ensuring that it can be smoothly restored to an operational state after a long period of non-use or sudden failure.
[0070] The present embodiment provides a fault recovery method, which first receives a storage fault signal sent by a memory, and determines the fault state of the memory according to the storage fault signal; calls a reverse initialization interface of the memory according to the fault state of the memory; and executes a fault recovery strategy on the memory through the reverse initialization interface to achieve memory fault recovery, wherein the fault recovery strategy includes a power-on and power-off operation strategy and a power-on retention strategy, which can efficiently achieve self-recovery of memory faults and ensure driving safety.
[0071] In summary, this embodiment determines the fault state of the memory through the storage fault signal sent by the memory and calls the reverse initialization interface of the memory. The fault recovery strategy is executed through the reverse initialization interface to achieve memory fault recovery. This overcomes the technical defect that the memory fault cannot be self-recovered in time, resulting in a hang caused by the inability to start normally, which affects driving safety. This can efficiently achieve self-recovery of memory faults and ensure driving safety.
[0072] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can refer to the above introduction, and will not be repeated later. Figure 3 , the step S30 further includes steps S301-S302:
[0073] Step S301, when the fault recovery strategy is a power-on / power-off operation strategy, the memory is powered on / off through the reverse initialization interface.
[0074] It should be noted that power-on and power-off operations include power-on operation and power-off operation. Power-on operation refers to supplying power to the eMMC memory to put it into working state; while power-off operation refers to cutting off the power to put the memory into sleep or shutdown state. When executing the power-on and power-off operation strategies, the system will first send a power-off command to the eMMC memory through the reverse initialization interface to ensure that the memory safely shuts down all ongoing operations and saves necessary status information. Subsequently, the system will send a power-on command after a certain delay to restart the memory. In this process, the timing control of power-on and power-off is crucial. It is necessary to ensure that power-on is performed only after the power-off operation is completely completed to avoid hardware damage or data loss caused by too fast power state switching.
[0075] In a feasible implementation, step S301 may include: when the fault recovery strategy is a power-on and power-off operation strategy, powering off the power supply of the memory through the reverse initialization interface, and detecting the power-off retention time of the power supply; when the power-off retention time reaches a first time threshold, powering on the power supply of the memory through the reverse initialization interface, and detecting the first power-on retention time of the power supply.
[0076] It should be noted that the power-off holding time can be 1 second, that is, the first time threshold is 1 second, and the first power-on holding time can be 3 seconds. After calling the eMMC reverse initialization interface, the eMMC power supply is powered on and off, including powering off for 1 second for full discharge, and then powering on for 3 seconds to perform eMMC power-on internal exception processing.
[0077] In a specific implementation, in order to avoid blocking the system sleep process due to operating the eMMC, an eMMC memory wait timeout exit can be added, that is, when the eMMC memory waits for more than a preset time, the memory fault self-recovery function is exited. The preset time can be 50s, and this embodiment does not impose any specific restrictions on this.
[0078] In a feasible implementation, when the power-off retention time reaches a first time threshold, the power supply of the memory is powered on through the reverse initialization interface, and the power-on retention time of the power supply is detected, and it also includes: when the first power-on retention time reaches a second time threshold, calculating the number of fault recovery operations to obtain the current number of fault recovery operations, wherein the second time threshold is greater than the first time threshold; when the current number of fault recovery operations reaches the number threshold, detecting a storage fault signal to obtain a first detection result; when the first detection result is that a storage fault signal exists, determining that the fault recovery strategy is the power-on retention strategy.
[0079] It should be noted that the first power-on holding time may be 3 seconds, that is, the second time threshold is 3 seconds. When the power-on operation is completed, that is, when the power-on holding reaches 3 seconds, the power-on operation is counted, which is the number of fault recovery operations to the current time.
[0080] It is understandable that the number threshold can be 5 times, that is, a number limit is set for the above recovery operation. When the eMMC is powered on for more than 5 times and still reports an error fault, and the eMMC has a waiting timeout error, the fault log is recorded and the power-on retention strategy is executed.
[0081] Step S302: When the fault recovery strategy is a power-on hold operation strategy, a power-on hold operation is performed on the memory through the reverse initialization interface.
[0082] It should be noted that the key to the power-on retention strategy is to allow the eMMC memory to stabilize for a period of time in the power-on state so that its internal circuits and logic units can be fully preheated and stabilized. A continuous power-on signal is sent to the memory through the reverse initialization interface, and a timer is set to monitor the retention time. When the preset time is reached, the system will evaluate the state of the memory. If it is confirmed that it is stable and can work normally, the power-on retention strategy will be terminated; if there is still a problem, it may be necessary to repeat the power-on and power-off operation strategy or take other recovery measures.
[0083] In a feasible implementation, step S302 may include: when the fault recovery strategy is a power-on hold operation strategy, powering on the power supply of the memory through the reverse initialization interface, and detecting a second power-on hold time of the power supply; when the second power-on hold time reaches a third time threshold, resetting the current number of fault recovery operations and exiting power-on hold, wherein the third time threshold is greater than the second time threshold.
[0084] It should be noted that the third time threshold is the internal recovery time of the storage chip, which can be 3 minutes, and this embodiment does not impose specific restrictions on this. After detecting that the above eMMC error fault recovery operation times are 5 times, add 3 minutes of power-on hold to ensure that the eMMC completes internal processing and exits the abnormality, and at the same time clears the number of power-ons when the eMMC is abnormal, and launches this power-on cycle to wait for 3 minutes (when a single power-on cycle continues to be abnormal, only one 3-minute wait operation is performed to avoid the system entering an infinite loop).
[0085] It is understandable that when the eMMC error is abnormal, the system can generally recover to normal within 5 seconds after power-on. When the eMMC continues to be abnormal, the power-on times when the eMMC is abnormal are cleared after 3 minutes of power-on maintenance. At this time, the recovery time is about 205 seconds.
[0086] In a feasible implementation, when the second power-on hold time reaches a third time threshold, after resetting the current number of fault recovery operations and exiting power-on hold, it also includes: detecting a storage fault signal to obtain a second detection result; when the second detection result is that a storage fault signal exists, determining that the memory fault recovery has failed and issuing an abnormal warning.
[0087] It should be noted that after the power-on retention strategy is executed, the memory fault has not recovered, that is, the eMMC error has not been able to recover by itself, indicating that the memory fault recovery has failed and the fault cannot be self-recovered. The A core system starts an abnormal report (the A core system someip protocol stack and other applications cannot run, and the whole vehicle shows that the instrument panel lights up and cannot be recovered). At this time, the entire S32G system needs to be hibernated or powered off before the system can return to normal.
[0088] In this embodiment, the memory is powered on and off or powered on and kept, so as to realize timely recovery of memory failure, thereby ensuring driving safety.
[0089] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the fault recovery method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0090] This application also provides a fault recovery device, please refer to Figure 4 , the fault recovery device comprises:
[0091] The determination module 10 is used to receive a storage fault signal sent by the storage, and determine a fault state of the storage according to the storage fault signal.
[0092] The calling module 20 is used to call the reverse initialization interface of the memory according to the fault state of the memory.
[0093] The execution module 30 is used to execute a fault recovery strategy on the memory through the reverse initialization interface to achieve fault recovery of the memory, wherein the fault recovery strategy includes a power-on and power-off operation strategy and a power-on retention strategy.
[0094] The present embodiment provides a fault recovery device, which first receives a storage fault signal sent by a memory, and determines the fault state of the memory according to the storage fault signal; calls a reverse initialization interface of the memory according to the fault state of the memory; and executes a fault recovery strategy on the memory through the reverse initialization interface to achieve memory fault recovery, wherein the fault recovery strategy includes a power-on and power-off operation strategy and a power-on retention strategy, which can efficiently achieve self-recovery of memory faults and ensure driving safety.
[0095] In summary, this embodiment determines the fault state of the memory through the storage fault signal sent by the memory and calls the reverse initialization interface of the memory. The fault recovery strategy is executed through the reverse initialization interface to achieve memory fault recovery. This overcomes the technical defect that the memory fault cannot be self-recovered in time, resulting in a hang caused by the inability to start normally, which affects driving safety. This can efficiently achieve self-recovery of memory faults and ensure driving safety.
[0096] Optionally, the execution module 30 is also used to perform power on and off operations on the memory through the reverse initialization interface when the fault recovery strategy is a power on and off operation strategy; and to perform power on and hold operations on the memory through the reverse initialization interface when the fault recovery strategy is a power on and hold operation strategy.
[0097] Optionally, the execution module 30 is also used to, when the fault recovery strategy is a power-on and power-off operation strategy, power off the power supply of the memory through the reverse initialization interface and detect the power-off retention time of the power supply; when the power-off retention time reaches a first time threshold, power on the power supply of the memory through the reverse initialization interface and detect the first power-on retention time of the power supply.
[0098] Optionally, the execution module 30 is also used to calculate the number of fault recovery operations when the first power-on hold time reaches a second time threshold, and obtain the current number of fault recovery operations, wherein the second time threshold is greater than the first time threshold; when the current number of fault recovery operations reaches the number threshold, detect a stored fault signal to obtain a first detection result; when the first detection result is that a stored fault signal exists, determine that the fault recovery strategy is the power-on hold strategy.
[0099] Optionally, the execution module 30 is also used to, when the fault recovery strategy is a power-on hold operation strategy, power on the power supply of the memory through the reverse initialization interface, and detect a second power-on hold time of the power supply; when the second power-on hold time reaches a third time threshold, reset the current number of fault recovery operations and exit power-on hold, wherein the third time threshold is greater than the second time threshold.
[0100] Optionally, the execution module 30 is further configured to detect a storage fault signal to obtain a second detection result; when the second detection result is that the storage fault signal exists, it is determined that the memory fault recovery has failed and an abnormality warning is issued.
[0101] Optionally, the determination module 10 is also used to receive a storage fault signal sent by the memory, and determine whether there is a leakage current phenomenon in the memory based on the storage fault signal; when there is no leakage current phenomenon in the memory, determine that the fault state of the memory is a recoverable state; when there is a leakage current phenomenon in the memory, determine that the fault state of the memory is an unrecoverable state.
[0102] The fault recovery device provided by the present application adopts the fault recovery method in the above embodiment, which can solve the technical problem of how to efficiently realize the self-recovery of memory faults and ensure driving safety. Compared with the prior art, the beneficial effects of the fault recovery device provided by the present application are the same as the beneficial effects of the fault recovery method provided by the above embodiment, and the other technical features in the fault recovery device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0103] The present application provides a fault recovery device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the fault recovery method in the above-mentioned embodiment one.
[0104] Reference below Figure 5 , which shows a schematic diagram of the structure of a fault recovery device suitable for implementing the embodiment of the present application. The fault recovery device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The fault recovery device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0105] like Figure 5 As shown, the fault recovery device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the fault recovery device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the fault recovery device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a fault recovery device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0106] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0107] The fault recovery device provided by the present application adopts the fault recovery method in the above embodiment, which can solve the technical problem of how to efficiently realize the self-recovery of memory faults and ensure driving safety. Compared with the prior art, the beneficial effects of the fault recovery device provided by the present application are the same as the beneficial effects of the fault recovery method provided by the above embodiment, and the other technical features in the fault recovery device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0108] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0109] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0110] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the fault recovery method in the above-mentioned embodiment.
[0111] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0112] The computer-readable storage medium may be included in the fault recovery device; or may exist independently without being assembled into the fault recovery device.
[0113] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the fault recovery device, the fault recovery device: receives a storage fault signal sent by the memory, and determines the fault state of the memory according to the storage fault signal; calls the reverse initialization interface of the memory according to the fault state of the memory; executes a fault recovery strategy on the memory through the reverse initialization interface to realize the fault recovery of the memory, wherein the fault recovery strategy includes a power-on and power-off operation strategy and a power-on retention strategy.
[0114] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0115] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0116] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0117] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned fault recovery method, and can solve the technical problem of how to efficiently realize the self-recovery of memory faults and ensure driving safety. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the fault recovery method provided in the above-mentioned embodiment, and will not be repeated here.
[0118] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned fault recovery method when executed by a processor.
[0119] The computer program product provided by the present application can solve the technical problem of how to efficiently realize self-recovery of memory failure and ensure driving safety. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the fault recovery method provided by the above embodiment, which will not be repeated here.
[0120] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A fault recovery method, characterized in that: The method comprises: receiving a storage fault signal sent by the storage, and determining a fault state of the storage according to the storage fault signal; Calling a reverse initialization interface of the memory according to the fault state of the memory; A fault recovery strategy is executed on the memory through the reverse initialization interface to achieve fault recovery of the memory, wherein the fault recovery strategy includes a power-on and power-off operation strategy and a power-on retention strategy.
2. The method according to claim 1, characterized in that The executing a fault recovery strategy on the memory through the reverse initialization interface includes: When the fault recovery strategy is a power-on and power-off operation strategy, powering on and off the memory through the reverse initialization interface; When the fault recovery strategy is a power-on hold operation strategy, a power-on hold operation is performed on the memory through the reverse initialization interface.
3. The method according to claim 2, characterized in that When the fault recovery strategy is a power-on and power-off operation strategy, performing power-on and power-off operations on the memory through the reverse initialization interface includes: When the fault recovery strategy is a power-on and power-off operation strategy, powering off the power supply of the memory through the reverse initialization interface, and detecting the power-off holding time of the power supply; When the power-off holding time reaches a first time threshold, the power supply of the memory is powered on through the reverse initialization interface, and a first power-on holding time of the power supply is detected.
4. The method according to claim 3, characterized in that When the power-off holding time reaches a first time threshold, the power supply of the memory is powered on through the reverse initialization interface, and the power-on holding time of the power supply is detected, further comprising: When the first power-on holding time reaches a second time threshold, calculating the number of fault recovery operations to obtain a current number of fault recovery operations, wherein the second time threshold is greater than the first time threshold; When the current fault recovery operation number reaches a number threshold, detecting and storing a fault signal to obtain a first detection result; When the first detection result is that a storage fault signal exists, the fault recovery strategy is determined to be the power-on holding strategy.
5. The method according to claim 2, characterized in that When the fault recovery strategy is a power-on hold operation strategy, performing a power-on hold operation on the memory through the reverse initialization interface includes: When the fault recovery strategy is a power-on hold operation strategy, powering on the power supply of the memory through the reverse initialization interface, and detecting a second power-on hold time length of the power supply; When the second power-on holding time reaches a third time threshold, the current number of fault recovery operations is reset and the power-on holding is exited, wherein the third time threshold is greater than the second time threshold.
6. The method according to claim 5, characterized in that When the second power-on holding time reaches a third time threshold, after resetting the current fault recovery operation times and exiting the power-on holding, the method further includes: Detecting and storing a fault signal to obtain a second detection result; When the second detection result is that the storage fault signal exists, it is determined that the storage fault recovery fails and an abnormality warning is issued.
7. The method according to any one of claims 1 to 6, characterized in that The receiving a storage fault signal sent by the storage, and determining a fault state of the storage according to the storage fault signal, comprises: Receiving a storage fault signal sent by the storage, and determining whether the storage has a leakage current phenomenon according to the storage fault signal; When there is no leakage current phenomenon in the memory, determining that the fault state of the memory is a recoverable state; When a leakage current phenomenon exists in the memory, it is determined that the fault state of the memory is an unrecoverable state.
8. A fault recovery device, characterized in that: The fault recovery device comprises: A determination module, configured to receive a storage fault signal sent by the storage, and determine a fault state of the storage according to the storage fault signal; A calling module, used for calling a reverse initialization interface of the memory according to the fault state of the memory; An execution module is used to execute a fault recovery strategy on the memory through the reverse initialization interface to achieve fault recovery of the memory, wherein the fault recovery strategy includes a power-on and power-off operation strategy and a power-on retention strategy.
9. A fault recovery device, characterized in that: The fault recovery device comprises: a memory, a processor, and a fault recovery program stored in the memory and executable on the processor, wherein the fault recovery program is configured to implement the fault recovery method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium stores a fault recovery program, and when the fault recovery program is executed by the processor, the fault recovery method according to any one of claims 1 to 7 is implemented.
