System recovery method, device, equipment and medium

Through the execution management module in Autosar AP, the process status and health management module are monitored to evaluate the operation status and determine recovery operations. This solves the problem of system crash caused by module conflicts in traditional technology and achieves normal recovery of the system.

CN118295854BActive Publication Date: 2024-10-08IMOTION AUTOMOTIVE TECH (SUZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410725705.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-06
Publication Date
2024-10-08
Estimated Expiration
2044-06-06

AI Technical Summary

Technical Problem

In traditional technology, execution management and health management modules often conflict when formulating system recovery strategies, leading to system crashes.

Method used

Monitor the target process status through the execution management module in Autosar AP, and combine it with the health management module to evaluate the running status, determine appropriate recovery operations, implement a unified system recovery strategy, and avoid system crashes caused by recovery strategies specified by a single module.

Benefits of technology

The monitoring results of the two modules are coordinated to implement a unified recovery strategy, avoid system crashes, and ensure that the system returns to normal operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118295854B_ABST
    Figure CN118295854B_ABST
Patent Text Reader

Abstract

The present application discloses a system recovery method, device, equipment and medium, including: monitoring the process state of a target process through an execution management module in Autosar AP; when the first process state of the target process is monitored to be a startup state, starting a health assessment process to assess the operation of the target process through the health management module in Autosar AP to obtain an assessment result; determining a first recovery operation corresponding to the target process from a plurality of preset recovery operations according to the assessment result and the second process state of the target process; and performing system recovery using the first recovery operation so that the system can recover to a normal operating state. The present application implements a unified system recovery strategy to avoid the occurrence of a system crash caused by a recovery strategy specified by a single module.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a system recovery method, device, equipment and medium. Background Art

[0002] In traditional technology, after implementing execution management and health management, the monitoring results of the two modules are obtained, and corresponding system recovery strategies are formulated based on the monitoring results of the two modules. However, one of the modules often conflicts with the other module when formulating the recovery strategy, thereby bringing adverse effects to the other module and causing the system to crash.

[0003] Therefore, a system recovery method capable of solving the above-mentioned technical problems is urgently needed. Summary of the invention

[0004] In view of this, the purpose of the present invention is to provide a system recovery method, device, equipment and medium, which can implement a unified system recovery strategy and avoid the occurrence of system crashes caused by the recovery strategy specified by a single module. The specific scheme is as follows:

[0005] In a first aspect, the present application discloses a system recovery method, comprising:

[0006] Monitor the process status of the target process through the execution management module in Autosar AP;

[0007] When it is monitored that the first process state of the target process is in the startup state, a health assessment process is started to assess the operation of the target process through the health management module in the Autosar AP to obtain an assessment result;

[0008] Determine a first recovery operation corresponding to the target process from a plurality of preset recovery operations according to the evaluation result and the second process state of the target process;

[0009] The first recovery operation is used to perform system recovery so that the system can recover to a normal operating state.

[0010] Optionally, the system recovery method further includes:

[0011] Determining the priority level corresponding to each of the preset multiple recovery operations;

[0012] Determining at least one process to be processed, and determining the first recovery operation corresponding to the at least one process;

[0013] The processing order of the at least one process is determined according to the priority levels corresponding to the various recovery operations and the first recovery operation corresponding to the at least one process.

[0014] Optionally, after performing the system recovery by using the first recovery operation, the method further includes:

[0015] Determine whether the system has returned to normal operation;

[0016] If the system has not recovered to a normal operating state, the current execution count of the first recovery operation corresponding to the target process is determined, and a current recovery operation is determined based on the current execution count, so as to perform system recovery through the current recovery operation.

[0017] Optionally, determining a current recovery operation based on the current execution count so as to perform system recovery through the current recovery operation includes:

[0018] If the current execution times do not reach the preset times threshold, jump to the step of performing system recovery by using the first recovery operation;

[0019] If the current execution times reaches the preset times threshold, a second recovery operation is determined according to the priorities of the various recovery operations, and the system is recovered using the second recovery operation; wherein the priority of the second recovery operation is higher than the priority of the first recovery operation.

[0020] Optionally, determining a first recovery operation corresponding to the target process from a plurality of preset recovery operations according to the evaluation result and the second process state of the target process includes:

[0021] Determining, by a state management module in the Autosar AP and according to the evaluation result and the second process state of the target process, the first recovery operation corresponding to the target process from the preset multiple recovery operations;

[0022] Correspondingly, after the system is restored by using the first restoration operation, the method further includes:

[0023] Sending a corresponding recovery operation execution report to a state management module in the Autosar AP, so that the state management module adds one to the current execution count of the first recovery operation after receiving the recovery operation execution report.

[0024] Optionally, the system recovery method further includes:

[0025] When it is monitored that the first process state of the target process is out of control, a system recovery is performed based on a default recovery operation so that the system recovers to a normal operating state; wherein the default recovery operation includes a system restart operation or a hardware restart operation.

[0026] Optionally, the preset multiple recovery operations include a log recording operation, a process restart operation, and a system restart operation.

[0027] In a second aspect, the present application discloses a system recovery device, comprising:

[0028] The process status monitoring module is used to monitor the process status of the target process through the execution management module in Autosar AP;

[0029] A health assessment module, configured to start a health assessment process when it is detected that the first process state of the target process is in a startup state, so as to evaluate the operation of the target process through the health management module in the Autosar AP and obtain an evaluation result;

[0030] a recovery operation determination module, configured to determine a first recovery operation corresponding to the target process from a plurality of preset recovery operations according to the evaluation result and the second process state of the target process;

[0031] The system recovery module is used to perform system recovery by using the first recovery operation so that the system can recover to a normal operating state.

[0032] In a third aspect, the present application discloses an electronic device, comprising:

[0033] Memory, used to store computer programs;

[0034] The processor is used to execute the computer program to implement the system recovery method disclosed above.

[0035] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the system recovery method disclosed above is implemented.

[0036] It can be seen that the present application provides a system recovery method, including: monitoring the process state of a target process through an execution management module in an Autosar AP; when it is monitored that the first process state of the target process is a startup state, starting a health assessment process to evaluate the operation of the target process through the health management module in the Autosar AP to obtain an assessment result; determining a first recovery operation corresponding to the target process from a plurality of preset recovery operations according to the assessment result and the second process state of the target process; and performing system recovery using the first recovery operation so that the system recovers to a normal operating state. In summary, it can be seen that after the first process state of the target process is the startup state, the present application starts the health assessment process to obtain the assessment result of the running status of the target process. Furthermore, the present application determines the corresponding recovery operation in combination with the second process state of the target process and the assessment result, and uses the recovery operation to perform system recovery. That is to say, the present application introduces the execution management module in Autosar AP to monitor the process state of the target process, and introduces the health management module in AutosarAP to evaluate the running status of the target process, and then comprehensively determines the corresponding recovery operation based on the process state and the assessment result. In this way, the recovery operation in the present application coordinates the monitoring results of the two modules and realizes a unified recovery strategy, thereby avoiding the occurrence of system crashes due to the recovery strategy specified by a single module. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the embodiments of the present invention 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, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0038] Figure 1 A flow chart of a system recovery method disclosed in this application;

[0039] Figure 2 A specific system recovery method flow chart disclosed in this application;

[0040] Figure 3 A schematic diagram of an interface design for realizing a system recovery method disclosed in this application;

[0041] Figure 4 A schematic diagram of the structure of a system recovery device disclosed in this application;

[0042] Figure 5 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION

[0043] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0044] In traditional technology, after implementing execution management and health management based on Autosar AP, the monitoring results of the execution management module and the health management module are obtained, and corresponding system recovery strategies are formulated based on the monitoring results of the two modules. However, one module often conflicts with the other module when formulating the recovery strategy, which has an adverse effect on the other module and causes the system to crash.

[0045] To this end, an embodiment of the present application proposes a system recovery solution that can implement a unified system recovery strategy and avoid the occurrence of system crashes caused by a recovery strategy specified by a single module.

[0046] The present application embodiment discloses a system recovery method, see Figure 1 As shown, the method includes:

[0047] Step S11: Monitor the process status of the target process through the execution management module in Autosar AP.

[0048] In this embodiment, the process state of the target process is monitored by the execution management module (EM) in Autosar AP (AUTOSAR Adaptive Platform). In some embodiments, the process state of the target process includes: start state, completion state, out of control state, abandon state, error state and stop state.

[0049] It should be noted that there may be one or more target processes, that is, this embodiment may monitor the process status of one target process by executing the management module, or may monitor the process status of multiple target processes by executing the management module.

[0050] Step S12: When it is monitored that the first process state of the target process is the startup state, a health assessment process is started to assess the operation of the target process through the health management module in the Autosar AP to obtain an assessment result.

[0051] From the above analysis, it can be seen that the target process contains multiple process states. When the first process state of the target process is monitored to be in the startup state, the health assessment process is started to evaluate the operation of the target process through the health management module (platform health management, Phm) to obtain the evaluation result. In some embodiments, the evaluation results include: normal state, indicating that the supervision is active and there are no faults; disabled state, indicating that the supervision is inactive; fault state, indicating that a fault is detected but within the tolerance range; expired state, indicating that a fault is detected and exceeds the tolerance range. It should be pointed out that the above-mentioned supervision activity refers to the evaluation of the operation of the target process through the health management module. It should be further pointed out that the above-mentioned tolerance range can be set according to different situations, and this embodiment does not limit it here.

[0052] Step S13: determining a first recovery operation corresponding to the target process from a plurality of preset recovery operations according to the evaluation result and the second process state of the target process.

[0053] In this embodiment, after the health assessment process is started, the assessment result is obtained from the health management module in real time, and the second process state is obtained from the execution management module, and then the first recovery operation corresponding to the target process is determined from the preset multiple recovery operations according to the assessment result and the second process state. In some embodiments, the preset multiple recovery operations include a log recording operation, a process restart operation, and a system restart operation. That is, in this embodiment, different combinations of assessment results and the second process state correspond to different recovery operations, and this embodiment obtains the corresponding operation from the log recording operation, the process restart operation, and the system restart operation according to the combination of the obtained assessment result and the second process state.

[0054] Furthermore, the priority levels of various recovery operations in the preset multiple recovery operations are different. In some embodiments, the priority level of the system restart operation is greater than the priority level of the process restart operation, and the priority level of the process restart operation is greater than the priority level of the log recording operation. On this basis, when there are multiple target processes, since the first recovery operations corresponding to different target processes may be different, the processing order of multiple target processes is also different. That is, this embodiment first determines the priority levels corresponding to various recovery operations in the preset multiple recovery operations, and determines at least one process to be processed, and then determines the first recovery operation corresponding to the at least one process, and finally determines the processing order of the at least one process according to the priority levels corresponding to the various recovery operations and the first recovery operation corresponding to the at least one process. Exemplarily, if the first recovery operation of process 1 is a process restart operation, and the first recovery operation of process 2 is a system restart operation, process 2 is processed first.

[0055] Step S14: Perform system recovery using the first recovery operation so that the system returns to normal operation.

[0056] In this embodiment, after determining the first recovery operation corresponding to the target process, the system is restored using the first recovery operation. After the system is restored, it is determined whether the system has restored to a normal operating state. If the system has not restored to a normal operating state, the current number of executions of the first recovery operation corresponding to the target process is determined, and the current recovery operation is determined based on the current number of executions, so that the system is restored through the current recovery operation. Further, if the current number of executions does not reach a preset number threshold, the process jumps to the step of restoring the system using the first recovery operation. If the current number of executions reaches the preset number threshold, the second recovery operation is determined according to the priority levels corresponding to the various recovery operations, and the system is restored using the second recovery operation; wherein the priority level of the second recovery operation is higher than the priority level of the first recovery operation.

[0057] That is to say, in this embodiment, the upper limit of the number of executions of the first recovery operation is set to avoid the system being in an abnormal state due to repeated execution of the recovery operation. Specifically, when the number of executions of the first recovery operation does not meet the preset number threshold, the first recovery operation is continued to be used for system recovery. When the number of executions of the first recovery operation meets the preset number threshold, the second recovery operation is determined according to the priority levels corresponding to various recovery operations, and the second recovery operation is used to recover the system, wherein the priority level of the second recovery operation is higher than the priority level of the first recovery operation. Exemplarily, assuming that the first recovery operation is a process restart operation, when the system cannot be restored to a normal operating state after executing the process restart operation several times, and the number of times is greater than the preset number threshold, the second recovery operation is determined to be a system restart operation, so as to restart the system.

[0058] It should be pointed out that, in this embodiment, when determining the first recovery operation, the first recovery operation corresponding to the target process can be determined from the preset multiple recovery operations through the state management module in the Autosar AP according to the evaluation result and the second process state of the target process. Further, when determining the number of executions of the first recovery operation, a corresponding recovery operation execution report can be sent to the state management module after each execution of the above-mentioned first recovery operation, so that the state management module adds one to the current number of executions of the first recovery operation after receiving the recovery operation execution report.

[0059] In addition, if the target process enters an out-of-control state, the system will be unable to resume normal operation by restarting the process. Therefore, this embodiment sets a system default policy so that when the target process enters an out-of-control state, the system default policy is directly used to restore the system. The system default policy is also the default recovery operation in this application, and the default recovery operation includes a system restart operation or a hardware restart operation.

[0060] As can be seen from the background technology, the traditional technology formulates a recovery strategy based on the monitoring results of a single module, but conflicts often occur, leading to system crashes. In order to solve the above problem, the recovery operation in this application coordinates the monitoring results of the two modules and implements a unified recovery strategy, thereby avoiding the occurrence of system crashes caused by the recovery strategy specified by a single module.

[0061] The system recovery method described in this application is explained below through a specific embodiment:

[0062] See also Figure 2 , execution management monitoring corresponds to the execution management module, health management monitoring corresponds to the health management module, state management corresponds to the state management module, and also includes a recovery operation module and a supervision evaluation module.

[0063] In the execution management module, waiting means that the process is waiting to start; starting means the starting state, which means that the process has reported that the initialization is completed and is running the main loop; error means the error state, which means that the process exited with an error; completion means the completion state, which means that the process exited normally; out of control means the out of control state, which means that the process is unresponsive and cannot be terminated; abandon means the abandon state, which means that the process is commanded to stop; stop means the stop state, which means that the termination command has been received.

[0064] The following is an explanation of the conversion relationship between process states in execution management monitoring:

[0065] If Waiting is connected to Start, it means that the process's initialization handshake signal is received and the process enters the Started state; if Start is connected to Complete, it means that the process is executed and exits normally; if Complete is connected to Stop, it means that the process's termination handshake signal is received; if Start is connected to Stop, it means that a stop command is received; if Start is connected to Give up, it means that a termination handshake signal is received; if Start is connected to Out of Control, it means that the handshake signal is not received due to timeout; if Start is connected to Error, it means that an error occurs while waiting for waitpid; if Stop is connected to Waiting, it means that a start command is received.

[0066] The health management module includes a variety of evaluation results: normal means the normal state; disabled means the disabled state; failed means the fault state; expired means the expired state, which means a fault is detected and exceeds the tolerance range; whether it exceeds the tolerance range in the health management module means judging whether the fault exceeds the tolerance range.

[0067] The following is an explanation of the conversion relationship between process states in health management monitoring:

[0068] Not Started is connected to Normal, indicating that the process has been started; Not Started is connected to Disabled, indicating that the process has not been started; Normal is connected to Disabled, indicating that the process has been terminated; Disabled is connected to Normal, indicating that the process has been started; Normal is connected to Whether Out of Tolerance Range, indicating that at least one supervision failure has occurred; Whether Out of Tolerance Range is connected to Failed, indicating that the supervision failure is within the tolerance range; Failed is connected to Expired, indicating that the supervision failure exceeds the tolerance range; Whether Out of Tolerance Range is connected to Expired, indicating that the supervision failure exceeds the tolerance range; Failed is connected to Normal, indicating that there is no supervision failure; Expired is connected to Disabled, indicating that the process has been terminated; Failed is connected to Disabled, indicating that the process has been terminated.

[0069] Furthermore, the relationship between the modules is explained below:

[0070] The recovery operation is connected to the calculator, which means that the recovery operation execution action is fed back to the status management module; the execution management monitoring is connected to the calculator, which means that the process status is fed back to the calculator; the health management monitoring is connected to the calculator, which means that the evaluation results are reported to the calculator; the calculator is connected to the restart process, restart system and record logs, which means that the corresponding recovery operation is executed; the recovery operation is connected to the execution management monitoring, which means that the recovery operation is reported to the execution management monitoring module.

[0071] It should be pointed out that in order to implement the above strategies, this application uses a combination of state mode and observer mode. The state mode is used to implement the transition diagram of process status and evaluation results, and the observer is notified to calculate the recovery action through the observer mode. It is easy to maintain and flexible. The recovery strategy can be customized to implement different strategies without code changes.

[0072] It should be pointed out that each recovery operation is notified and recorded in the state management module. When the predefined conditions are met, the recovery is upgraded or downgraded to avoid the system being unable to operate normally due to the repetition of a recovery strategy when it is always ineffective. At the same time, the state management module is used to monitor the recovery action module. Before the last recovery operation is completed, different operations such as queuing and termination are implemented according to the priority of the recovery operation.

[0073] See also Figure 3As shown, this embodiment can implement the execution of recovery operations through an interface. Specifically, the methods of processing execution management and health management are defined through an interface; the processing process and evaluation methods are implemented through a specific class; the method of calculating recovery operations is defined through an observer interface; the context class of the recovery operation includes an observer list, the last recovery operation, and the current system status, and provides methods such as adding and deleting observers, notifying observers, and calculating recovery operations. Each process status and evaluation result that needs to participate in the calculation is an entry in the observer list; the state management class is responsible for updating the recovery operation; the abstract class of the recovery operation includes a level attribute and a method for obtaining the level, and the level is also the priority of each recovery operation; restarting the process, restarting the system, and recording the log are specific recovery operation classes.

[0074] The system recovery method is explained below through a specific implementation method:

[0075] Users build system recovery strategies through configuration files:

[0076] "error_reactions": {

[0077] "actions": {

[0078] "log_actions": [

[0079] {

[0080] "action_id": 0

[0081] }

[0082] ],

[0083] "restart_process_actions": [

[0084] {

[0085] "action_id": 1,

[0086] "with_dependency": "yes",

[0087] "process_id": "process1"

[0088] },

[0089] {

[0090] "action_id": 2,

[0091] "with_dependency": "no",

[0092] "process_id": "process2"

[0093] } ]

[0095] },

[0096] "conditions": {

[0097] "supervision_conditions": [

[0098] {

[0099] "condition_id": 0,

[0100] "expected_result": "failed",

[0101] "local_supervision_id": "fusion_core_supervision"

[0102] }

[0103] ],

[0104] "process_conditions": [

[0105] {

[0106] "condition_id": 1,

[0107] "expected_result": "errored",

[0108] "process_id": "process1"

[0109] } ]

[0111] },

[0112] "rules": [

[0113] {

[0114] "rule_id": 0,

[0115] "logical_expressions": {

[0116] "operator": "none",

[0117] "condition_ids": [ 1 ]

[0120] },

[0121] "action_list": [ 0 ]

[0124] },

[0125] {

[0126] "rule_id": 1,

[0127] "logical_expressions": {

[0128] "operator": "and",

[0129] "condition_ids": [

[0130] 0, 1 ]

[0133] },

[0134] "action_list": [

[0135] 0, 1 ]

[0138] } ]

[0140] }

[0141] In the system recovery strategy, the rule defines a combination of multiple conditions. For example, if condition 0 and 1 are satisfied at the same time, or only one of condition 0 or 1 is satisfied, the rule is considered to be established. After the rule is established, the corresponding action (recovery operation) needs to be executed, and the calculator is responsible for executing the corresponding recovery operation according to the system recovery strategy. For example, the rule_id: 1 specific condition defines that when the relationship between condition 0 and 1 is and, that is, when they are satisfied at the same time, action 0 and 1 are adopted, where the relationship between condition 0 and 1 is and, which means that the process status is an error state and the evaluation result is a failure are both satisfied at the same time. At this time, action 0 and 1, that is, the process restart operation, are adopted. That is, when the execution management module detects that the process status of the target process is an error state, the health assessment process is started to evaluate the operation of the target process through the health management module, obtain the assessment result, and report the assessment result to the calculator. When the assessment result is a failure, it is determined that the process status is an error and the assessment result is a failure at the same time, which meets the preset rule_id: 1, and the corresponding recovery operation, that is, the process restart operation, is executed.

[0142] It can be seen that the present application provides a system recovery method, including: monitoring the process state of a target process through an execution management module in an Autosar AP; when it is monitored that the first process state of the target process is a startup state, starting a health assessment process to evaluate the operation of the target process through the health management module in the Autosar AP to obtain an assessment result; determining a first recovery operation corresponding to the target process from a plurality of preset recovery operations according to the assessment result and the second process state of the target process; and performing system recovery using the first recovery operation so that the system recovers to a normal operating state. In summary, it can be seen that after the first process state of the target process is the startup state, the present application starts the health assessment process to obtain the assessment result of the running status of the target process. Furthermore, the present application determines the corresponding recovery operation in combination with the second process state of the target process and the assessment result, and uses the recovery operation to perform system recovery. That is to say, the present application introduces the execution management module in Autosar AP to monitor the process state of the target process, and introduces the health management module in AutosarAP to evaluate the running status of the target process, and then comprehensively determines the corresponding recovery operation based on the process state and the assessment result. In this way, the recovery operation in the present application coordinates the monitoring results of the two modules and realizes a unified recovery strategy, thereby avoiding the occurrence of system crashes due to the recovery strategy specified by a single module.

[0143] Correspondingly, the present application embodiment also discloses a system recovery device, see Figure 4As shown, the device comprises:

[0144] The process status monitoring module 11 is used to monitor the process status of the target process through the execution management module in the Autosar AP;

[0145] A health assessment module 12 is used to start a health assessment process when it is detected that the first process state of the target process is in the startup state, so as to evaluate the operation of the target process through the health management module in the Autosar AP and obtain an evaluation result;

[0146] A recovery operation determination module 13, configured to determine a first recovery operation corresponding to the target process from a plurality of preset recovery operations according to the evaluation result and the second process state of the target process;

[0147] The system recovery module 14 is used to perform system recovery by using the first recovery operation so that the system can recover to a normal operating state.

[0148] Among them, for more specific working processes of the above-mentioned modules, please refer to the corresponding contents disclosed in the aforementioned embodiments, which will not be repeated here.

[0149] It can be seen that the present application provides a system recovery method, including: monitoring the process state of a target process through an execution management module in an Autosar AP; when it is monitored that the first process state of the target process is a startup state, starting a health assessment process to evaluate the operation of the target process through the health management module in the Autosar AP to obtain an assessment result; determining a first recovery operation corresponding to the target process from a plurality of preset recovery operations according to the assessment result and the second process state of the target process; and performing system recovery using the first recovery operation so that the system recovers to a normal operating state. In summary, it can be seen that after the first process state of the target process is the startup state, the present application starts the health assessment process to obtain the assessment result of the running status of the target process. Furthermore, the present application determines the corresponding recovery operation in combination with the second process state of the target process and the assessment result, and uses the recovery operation to perform system recovery. That is to say, the present application introduces the execution management module in Autosar AP to monitor the process state of the target process, and introduces the health management module in AutosarAP to evaluate the running status of the target process, and then comprehensively determines the corresponding recovery operation based on the process state and the assessment result. In this way, the recovery operation in the present application coordinates the monitoring results of the two modules and realizes a unified recovery strategy, thereby avoiding the occurrence of system crashes due to the recovery strategy specified by a single module.

[0150] Furthermore, an embodiment of the present application also provides an electronic device. Figure 5This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.

[0151] Figure 5 The present invention provides a schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a display screen 23, an input / output interface 24, a communication interface 25, a power supply 26, and a communication bus 27. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the system recovery method disclosed in any of the above embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0152] In this embodiment, the power supply 26 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 25 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 24 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0153] In addition, the memory 22, as a carrier for storing resources, may be a read-only memory, a random access memory, a disk or an optical disk, etc., and the resources stored thereon may include a computer program 221, and the storage method may be temporary storage or permanent storage. In addition to including a computer program that can be used to complete the system recovery method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 221 may further include a computer program that can be used to complete other specific tasks.

[0154] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the system recovery method disclosed above is implemented.

[0155] For the specific steps of the method, reference may be made to the corresponding contents disclosed in the aforementioned embodiments, which will not be described in detail here.

[0156] The various embodiments in this application are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0157] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0158] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0159] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0160] The above is a detailed introduction to a system recovery method, device, equipment, and storage medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A system recovery method, characterized in that: include: Monitor the process status of the target process through the execution management module in Autosar AP; When it is monitored that the first process state of the target process is in the startup state, a health assessment process is started to assess the operation of the target process through the health management module in the Autosar AP to obtain an assessment result; Determine a first recovery operation corresponding to the target process from a plurality of preset recovery operations according to the evaluation result and the second process state of the target process; Performing system recovery using the first recovery operation so that the system returns to a normal operating state; The process status of the target process includes: start status, completion status, out-of-control status, abandonment status, error status and stop status; The step of determining a first recovery operation corresponding to the target process from a plurality of preset recovery operations according to the evaluation result and the second process state of the target process includes: The first recovery operation corresponding to the target process is determined from the preset multiple recovery operations through the state management module in the Autosar AP and according to the evaluation result and the second process state of the target process.

2. The system recovery method according to claim 1, characterized in that: Also includes: Determining the priority level corresponding to each of the preset multiple recovery operations; Determining at least one process to be processed, and determining the first recovery operation corresponding to the at least one process; The processing order of the at least one process is determined according to the priority levels corresponding to the various recovery operations and the first recovery operation corresponding to the at least one process.

3. The system recovery method according to claim 2, characterized in that: After the system is restored by using the first restoration operation, the method further includes: Determine whether the system has returned to normal operation; If the system has not recovered to a normal operating state, the current execution count of the first recovery operation corresponding to the target process is determined, and a current recovery operation is determined based on the current execution count, so as to perform system recovery through the current recovery operation.

4. The system recovery method according to claim 3, characterized in that: The determining of the current recovery operation based on the current execution count so as to perform system recovery through the current recovery operation includes: If the current execution times do not reach the preset times threshold, jump to the step of performing system recovery by using the first recovery operation; If the current execution times reaches the preset times threshold, a second recovery operation is determined according to the priorities of the various recovery operations, and the system is recovered using the second recovery operation; wherein the priority of the second recovery operation is higher than the priority of the first recovery operation.

5. The system recovery method according to claim 3, characterized in that: The determining, according to the evaluation result and the second process state of the target process, a first recovery operation corresponding to the target process from a plurality of preset recovery operations comprises: Determining, by a state management module in the Autosar AP and according to the evaluation result and the second process state of the target process, the first recovery operation corresponding to the target process from the preset multiple recovery operations; Correspondingly, after the system is restored by using the first restoration operation, the method further includes: Sending a corresponding recovery operation execution report to a state management module in the Autosar AP, so that the state management module adds one to the current execution count of the first recovery operation after receiving the recovery operation execution report.

6. The system recovery method according to claim 1, characterized in that: Also includes: When it is monitored that the first process state of the target process is out of control, a system recovery is performed based on a default recovery operation so that the system recovers to a normal operating state; wherein the default recovery operation includes a system restart operation or a hardware restart operation.

7. The system recovery method according to any one of claims 1 to 6, characterized in that: The preset multiple recovery operations include a log recording operation, a process restart operation, and a system restart operation.

8. A system recovery device, characterized in that: include: The process status monitoring module is used to monitor the process status of the target process through the execution management module in Autosar AP; A health assessment module, configured to start a health assessment process when it is detected that the first process state of the target process is in a startup state, so as to evaluate the operation of the target process through the health management module in the Autosar AP and obtain an evaluation result; a recovery operation determination module, configured to determine a first recovery operation corresponding to the target process from a plurality of preset recovery operations according to the evaluation result and the second process state of the target process; A system recovery module, used for performing system recovery by using the first recovery operation so that the system can recover to a normal operating state; The process status of the target process includes: start status, completion status, out-of-control status, abandonment status, error status and stop status; Wherein, the recovery operation determination module is specifically used for: The first recovery operation corresponding to the target process is determined from the preset multiple recovery operations through the state management module in the Autosar AP and according to the evaluation result and the second process state of the target process.

9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the system recovery method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Used to store a computer program; wherein, when the computer program is executed by a processor, the system recovery method according to any one of claims 1 to 7 is implemented.