Cold start self-recovery method and system of embedded device

By using a cold start self-recovery method combined with hardware watchdog and adaptive and self-learning software watchdog in embedded devices, the possible stuck and abnormal exit problems of business APPs that occur when the system is complex, efficient fault detection and recovery are achieved, and system availability and security are improved.

CN119576640APending Publication Date: 2025-03-07NANJING LINYANG POWER TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411479537.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-23
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

When the system design is complex, the technical solution combining software watchdog and hardware watchdog needs to be upgraded to solve the situations such as possible stuck during system startup, operation, and failure to continue to run after abnormal exit of the business APP.

Method used

The cold start self-recovery method of embedded devices is adopted. Through the hardware watchdog monitoring startup process, the system manager configures an independent software watchdog for each business application. The software watchdog dynamically adjusts the timeout parameters according to the importance of the business application and the system operation status, and intelligently adjusts the monitoring strategy and fault handling through self-learning and analyzing the system behavior.

Benefits of technology

It realizes more accurate and efficient fault detection and recovery, reduces maintenance costs, improves system availability and security, avoids cold start failures, and flexibly configures watchdog timeout strategies according to different business applications, improving resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119576640A_ABST
    Figure CN119576640A_ABST
Patent Text Reader

Abstract

The invention provides a cold start self-recovery method and system for embedded equipment, and the method comprises the steps: monitoring whether the starting process is normal or not through employing a hardware watchdog when the system is powered on and started; after the system is successfully started and the application program is pulled up, configuring an independent software watchdog for each service application program by adopting a system manager and continuously monitoring the running state of the service application program; the software watchdog adaptively and dynamically adjusts timeout parameters according to the importance of the service application program and the running condition and environmental condition of the system; and the software watchdog analyzes and learns the normal operation mode and abnormal conditions of the system, self-learns typical behaviors of the system, intelligently adjusts a monitoring strategy based on the learned behaviors and automatically processes faults. The hardware watchdog sends an overtime signal to the power management unit at any moment in the system operation process if overtime is caused by abnormity, and the power management unit executes preset ordered power-off operation to achieve system reset.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of electric power metering, and in particular relates to a safety technical means for self-resetting cold start of an embedded system fault. Background Art

[0002] With the widespread application of embedded systems in industries such as industry, automobiles, and aviation, system reliability has become increasingly important. Embedded systems often operate in harsh environments and face a variety of potential failures and errors. Therefore, ensuring that the system can recover quickly when a failure occurs is critical to improving system availability and safety.

[0003] Automatic cold start self-recovery technology can reduce the reliance on manual intervention, especially in remote or unattended environments, and can automatically repair system problems and reduce maintenance costs. Some faults may cause the system to freeze. At this time, the cold start self-recovery technology of software watchdog + hardware watchdog can clear the potential status problem by completely reinitializing the system.

[0004] Today's system designs are becoming more and more complex, and the technical solution that combines software watchdogs with hardware watchdogs must also be upgraded to ensure the system's continued safe, stable operation and recovery. Summary of the invention

[0005] The purpose of the present invention is to address the problem that the technical solution combining a software watchdog and a hardware watchdog needs to be upgraded when the system design is complex, and to propose a cold start self-recovery method and system for embedded devices to solve the problems that may occur during system startup and operation, and the business APP does not continue to run after abnormal exit.

[0006] The technical solution of the present invention is:

[0007] The present invention provides a cold start self-recovery method for an embedded device, comprising:

[0008] When the system is powered on, a hardware watchdog is used to monitor whether the startup process is normal;

[0009] After the system is successfully started and the application is launched, the system manager is used to configure an independent software watchdog for each business application and continuously monitor its operating status;

[0010] The software watchdog adaptively and dynamically adjusts the timeout parameters according to the importance of the business application, the operating conditions of the system and the environmental conditions; the software watchdog analyzes the normal operating mode and abnormal conditions of the learning system, self-learns the typical behavior of the system, and intelligently adjusts the monitoring strategy based on the learned behavior and automatically handles faults.

[0011] Furthermore, if an exception occurs at any time during the operation of the system, resulting in a timeout, the hardware watchdog sends a timeout signal to the power management unit, and the power management unit executes a preset orderly power-off operation to achieve system reset.

[0012] Furthermore, the system manager is monitored by the hardware watchdog, and the system manager needs to continuously feed the watchdog to ensure the normal operation of itself and the entire system.

[0013] Furthermore, the system pre-sets a configuration file based on the criticality and task priority of the business application, and the software watchdog reads the configuration file during operation. For non-critical business applications, when the watchdog times out, the number of timeouts is recorded and the task status is saved. When the number of timeouts exceeds a specified threshold, the application is restarted and the previously saved status information is restored.

[0014] Furthermore, the software watchdog dynamically optimizes the timeout period and triggering logic of each business application watchdog according to the environmental factors of the system.

[0015] Furthermore, the environmental factors include CPU load and memory usage.

[0016] Furthermore, the self-learning watchdog learns typical behavior characteristics of the system by analyzing the normal operation mode and abnormal conditions of the system, dynamically adjusts the monitoring strategy based on the learned behavior model, and handles the fault.

[0017] Furthermore, the business application program includes software modules of different levels and types of operating system kernel, driver, middleware and application software, and the software watchdog adopts differentiated monitoring and recovery strategies according to the characteristics of different software modules.

[0018] A cold start self-recovery system for an embedded device, comprising: a configuration reading module, a system status updating module, an adaptive module, a self-learning module, a system manager and a PMU system restarting module;

[0019] The system manager configures an independent software watchdog for each business application, and continuously monitors its operating status through a configuration reading module; according to the importance of the business application and the operating status and environmental conditions of the system, an adaptive module is used to dynamically adjust the timeout parameters;

[0020] The software watchdog analyzes the normal operation mode and abnormal conditions of the learning system through the self-learning module, the typical behavior of the self-learning system status update module, and intelligently adjusts the monitoring strategy and automatically handles faults based on the learned behavior.

[0021] A computer-readable storage medium stores a computer program, which, when executed, implements the cold-start self-recovery method for an embedded device.

[0022] Beneficial effects of the present invention:

[0023] The present invention proposes a cold start self-recovery method and system for embedded devices, which adopts a hierarchical watchdog mechanism that combines adaptive and self-learning software and hardware, and can dynamically adjust the monitoring strategy according to the importance of different business applications and the system operation status, so as to achieve more accurate and efficient fault detection and recovery.

[0024] The present invention outputs a watchdog reset signal to a power management unit instead of directly cutting off the power, thereby avoiding cold start failure of some modules due to incomplete static electricity release through orderly power off; flexibly configures the watchdog timeout strategy for different business applications to improve resource utilization; the self-learning function can intelligently optimize the monitoring method according to the system behavior, more accurately identify potential problems or anomalies, and automatically adjust the monitoring priority and frequency according to changes in time and workload to achieve automatic fault handling.

[0025] Other features and advantages of the present invention will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The above and other objects, features and advantages of the present invention will become more apparent through a more detailed description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, wherein like reference numerals generally represent like components throughout the exemplary embodiments of the present invention.

[0027] Figure 1 A block diagram of a cold-start self-recovery system for an embedded device according to an embodiment of the present invention is shown.

[0028] Figure 2 The structure diagram of each processing unit of the software watchdog is shown. DETAILED DESCRIPTION

[0029] The preferred embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein.

[0030] Example 1

[0031] The present invention provides a cold start self-recovery method for an embedded device, comprising:

[0032] When the system is powered on, a hardware watchdog is used to monitor whether the startup process is normal;

[0033] After the system is successfully started and the application is launched, the system manager is used to configure an independent software watchdog for each business application and continuously monitor its operating status;

[0034] The software watchdog adaptively and dynamically adjusts the timeout parameters according to the importance of the business application, the operating conditions of the system and the environmental conditions; the software watchdog analyzes the normal operating mode and abnormal conditions of the learning system, self-learns the typical behavior of the system, and intelligently adjusts the monitoring strategy based on the learned behavior and automatically handles faults.

[0035] In this embodiment, when the system is powered on, a hardware watchdog is used to monitor whether the startup process is normal; if the startup process is abnormal, the hardware watchdog timeout will trigger the PMU to perform a reset and power-off operation to ensure that the system can recover from the abnormal state; after the system is successfully started and the system management program is pulled up, the system management program configures an independent software watchdog for each business application to continuously monitor the running status of each application; the software watchdog dynamically and adaptively adjusts the timeout parameters according to the system operation status and environmental conditions; by obtaining the system's CPU load, memory usage and other indicators, the current resource status of the system is judged, and the watchdog timeout period and trigger logic are optimized accordingly. For non-critical business applications, if the watchdog times out, the system management program will first record the number of timeouts and save the task status instead of directly restarting the system; when the cumulative number of timeouts exceeds the preset threshold, the application is judged to be abnormal and the software watchdog restarts the application; when restarting the abnormal application, the software watchdog reads the application status information and passes it as a parameter to the application so that it can resume operation from the last state; the software watchdog self-learns the typical behavior of the system by analyzing the normal operating mode and abnormal conditions of the system; based on the learned behavior pattern, the software watchdog intelligently adjusts the monitoring strategy and integrates the fault handling mechanism.

[0036] In one example, at any time during the operation of the system, if an exception occurs and causes the hardware watchdog to time out, a timeout signal is sent to the power management unit, and the power management unit executes a preset orderly power-off operation to achieve a system reset.

[0037] In this embodiment, the system is powered on and the hardware watchdog starts to monitor the startup process. During the startup process, the hardware watchdog detects an abnormality and triggers a timeout signal. The timeout signal is sent to the power management unit (PMU) through the internal communication interface. After receiving the timeout signal, the power management unit reads the preset power-off operation configuration. According to the configuration, the power management unit performs an orderly power-off operation. After the power-off operation is completed, the power management unit activates the system reset signal. The system reset signal causes the system hardware to restart. After the system restarts, the hardware watchdog is reinitialized and starts a new monitoring cycle. The system manager APP pulls up the business APP again and configures the software watchdog to monitor the running status of the business APP.

[0038] In one example, the system manager is monitored by the hardware watchdog, and the system manager needs to continuously feed the watchdog to ensure the normal operation of itself and the entire system.

[0039] In this embodiment, the system is powered on and the hardware watchdog starts to monitor the startup process. During the startup process, the system manager APP is launched and the monitoring task of the hardware watchdog is transferred to the system manager APP. The system manager APP configures a software watchdog to continuously monitor each business APP separately.

[0040] In one example, the system pre-sets a configuration file based on the criticality and task priority of the business application. The configuration file is read during the operation of the software watchdog. For non-critical business applications, when the watchdog times out, the number of timeouts is recorded and the task status is saved. When the number of timeouts exceeds a specified threshold, the application is restarted and the previously saved status information is restored.

[0041] In this embodiment, during the system initialization phase, a configuration file is preloaded and set according to the criticality and task priority of the business application. The configuration file contains information such as the timeout threshold, restart strategy, and state saving path of each application. After the system manager APP is started, it reads the configuration file, obtains the monitoring parameters of each business application, and initializes the software watchdog module according to the parameters, and allocates a corresponding watchdog instance to each business application. The software watchdog module continuously monitors the running status of each business application, records the dog feeding timestamp of each application, and compares it with the timeout threshold in the configuration file. If the dog feeding timestamp of a non-critical business application exceeds the preset timeout threshold, the software watchdog module does not immediately trigger a system restart, but accumulates the timeout times of the application and records the current task status information. The system manager APP regularly checks the timeout times of each business application. If the timeout times of an application reaches the restart threshold set in the configuration file, the restart process of the application is triggered.

[0042] Before restarting the application, the system manager app reads the application's saved state information path from the configuration file, obtains and parses the latest task state data. The system manager app passes the parsed task state data as a parameter to the application to be restarted, ensuring that the application can continue to execute from the previously saved state point after restarting.

[0043] In one example, the software watchdog dynamically optimizes the timeout period and trigger logic of each business application watchdog according to environmental factors such as the system's CPU load and memory usage to balance system performance and stability.

[0044] In this embodiment, an adaptive algorithm is used to calculate a reasonable watchdog timeout period and trigger condition threshold according to the real-time operating status of the system. By reading the system configuration file, the priority, criticality and other attribute information of each business APP are obtained. Combined with the business APP attributes and system environment factors, the dynamic optimization strategy of each APP watchdog is determined.

[0045] If it is a critical business APP, shorten the watchdog timeout period and lower the trigger threshold; if it is a non-critical business APP, appropriately extend the timeout period and increase the trigger threshold. Write the optimized watchdog timeout period and trigger logic parameters into the system configuration file for the software watchdog module to read and apply. The software watchdog performs differentiated monitoring and management of each business APP based on the updated configuration parameters. Continuously collect the system's CPU, memory and other operating indicator data to determine whether the watchdog dynamic optimization mechanism needs to be triggered again. When it is detected that the system performance has significantly decreased or is unstable, the watchdog dynamic optimization process is started again to achieve a dynamic balance between system performance and stability.

[0046] In one example, the self-learning watchdog learns typical behavior characteristics of the system by analyzing the normal operation mode and abnormal conditions of the system, dynamically adjusts the monitoring strategy based on the learned behavior model, and handles faults.

[0047] In this embodiment, the system operating status is continuously monitored through the system manager APP, system performance indicator data such as CPU load and memory usage are obtained, and a baseline model of the normal operating mode of the system is established based on the obtained data.

[0048] The machine learning algorithm is used to analyze the acquired system operation data, and the abnormal conditions in the system operation process are identified through clustering, anomaly detection and other methods to obtain the characteristic pattern of the system abnormal behavior. The learned system normal operation mode and abnormal behavior characteristic pattern are stored in the configuration file as the knowledge base of the self-learning watchdog for subsequent monitoring strategy adjustment and fault handling.

[0049] The self-learning watchdog monitors the system operation status in real time, and determines whether the system is abnormal by comparing the current system behavior with the normal operation mode in the knowledge base. If the system operation is detected to be abnormal, the self-learning watchdog retrieves the abnormal feature mode that is most similar to the current abnormal behavior from the knowledge base, and obtains the fault handling strategy corresponding to the abnormal mode. According to the acquired fault handling strategy, the self-learning watchdog dynamically adjusts the monitoring timeout period, trigger logic and other parameters, and optimizes the monitoring strategy to adapt to the current system status. The self-learning watchdog triggers the corresponding automatic fault handling mechanism, such as restarting the abnormal APP, releasing system resources, etc., to try to restore the normal operation of the system. After the fault handling is completed, the self-learning watchdog continuously monitors the system operation status, evaluates the effect of the fault handling by comparing the changes in system behavior before and after the processing, and feeds the evaluation results back to the knowledge base to optimize the fault handling strategy. The self-learning watchdog continuously iterates and optimizes the monitoring strategy and fault handling mechanism, and improves the accuracy of system anomaly detection and the effectiveness of automatic fault handling by continuously learning system behavior, so as to achieve the adaptability and robustness of the system.

[0050] In one example, the business application program includes software modules of different levels and types of an operating system kernel, a driver, middleware, and application software, and the software watchdog adopts differentiated monitoring and recovery strategies according to the characteristics of different software modules.

[0051] Example 2

[0052] The present invention provides a cold start self-recovery system for embedded devices, comprising: a configuration reading module, a system status updating module, an adaptive module, a self-learning module, a system manager and a PMU system restarting module;

[0053] The system manager configures an independent software watchdog for each business application, and continuously monitors its operating status through a configuration reading module; according to the importance of the business application and the operating status and environmental conditions of the system, an adaptive module is used to dynamically adjust the timeout parameters;

[0054] The software watchdog analyzes the normal operation mode and abnormal conditions of the learning system through the self-learning module, the typical behavior of the self-learning system status update module, and intelligently adjusts the monitoring strategy and automatically handles faults based on the learned behavior.

[0055] Example 3

[0056] The present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed, the cold start self-recovery method of the embedded device is implemented.

[0057] The embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments.

Claims

1. A cold start self-recovery method for an embedded device, characterized in that: include: When the system is powered on, a hardware watchdog is used to monitor whether the startup process is normal; After the system is successfully started and the application is launched, the system manager is used to configure an independent software watchdog for each business application and continuously monitor its operating status; The software watchdog dynamically and adaptively adjusts the timeout parameter according to the importance of the business application and the operation and environmental conditions of the system; The software watchdog analyzes the normal operating mode and abnormal conditions of the learning system, self-learns the typical behavior of the system, and intelligently adjusts the monitoring strategy and automatically handles faults based on the learned behavior.

2. The cold start self-recovery method of an embedded device as claimed in claim 1, characterized in that: If an exception occurs at any time during the operation of the system, resulting in a timeout, the hardware watchdog sends a timeout signal to the power management unit, which then performs a preset orderly power-off operation to reset the system.

3. The cold start self-recovery method of an embedded device as claimed in claim 1, characterized in that: The system manager is monitored by the hardware watchdog, and the system manager needs to continuously feed the watchdog to ensure the normal operation of itself and the entire system.

4. The cold start self-recovery method of an embedded device as claimed in claim 1, characterized in that: The system pre-sets a configuration file based on the criticality and task priority of the business application. The software watchdog reads the configuration file during operation. For non-critical business applications, when the watchdog times out, the number of timeouts is recorded and the task status is saved. When the number of timeouts exceeds the specified threshold, the application is restarted and the previously saved status information is restored.

5. The cold start self-recovery method of an embedded device as claimed in claim 1, characterized in that: The software watchdog dynamically optimizes the timeout period and triggering logic of each business application watchdog according to the environmental factors of the system.

6. The cold start self-recovery method of an embedded device as claimed in claim 5, characterized in that: The environmental factors include CPU load and memory usage.

7. The cold start self-recovery method of an embedded device as claimed in claim 1, characterized in that: The self-learning watchdog learns the typical behavior characteristics of the system by analyzing the normal operation mode and abnormal conditions of the system, dynamically adjusts the monitoring strategy based on the learned behavior model, and handles the fault.

8. The cold start self-recovery method for an embedded device as described in claims 1-7, characterized in that: The business application program includes an operating system kernel, a driver, middleware, and software modules of different levels and types of application software. The software watchdog adopts differentiated monitoring and recovery strategies according to the characteristics of different software modules.

9. A cold start self-recovery system for an embedded device, characterized in that: include: Configuration reading module, system status update module, adaptive module, self-learning module, system manager and PMU system restart module; The system manager configures an independent software watchdog for each business application, and continuously monitors its operating status through a configuration reading module; according to the importance of the business application and the operating status and environmental conditions of the system, an adaptive module is used to dynamically adjust the timeout parameters; The software watchdog analyzes the normal operation mode and abnormal conditions of the learning system through the self-learning module, the typical behavior of the self-learning system status update module, and intelligently adjusts the monitoring strategy and automatically handles faults based on the learned behavior.

10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed, the cold start self-recovery method of the embedded device as described in any one of claims 1 to 8 is implemented.