Monitoring method and device, equipment, storage medium and product

By combining a state machine and an internal watchdog module, the core state variables of the basic software modules are obtained and the system is reset in case of abnormality. This solves the problem of excessively large monitoring granularity in the existing technology and realizes fine-grained monitoring and fault recovery of the internal functional modules of the processor.

CN121658307APending Publication Date: 2026-03-13SHANGHAI LIXIANG AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing system monitoring methods have too large a granularity, making it impossible to effectively monitor the status of specific functional modules running in the system, and also unable to identify abnormal states of functional modules.

Method used

The core state variables of the basic software modules are obtained through a state machine. The monitoring module determines the module status and feeds the internal watchdog module when it is in normal condition. The internal watchdog module triggers the system reset process when the monitoring module stops feeding the watchdog, thus realizing multi-level monitoring.

Benefits of technology

It provides finer-grained monitoring, effectively monitoring the operational status of various basic software modules within the processor, reducing the negative impact of system restarts, and improving monitoring capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121658307A_ABST
    Figure CN121658307A_ABST
Patent Text Reader

Abstract

The invention discloses a monitoring method and device, equipment, a storage medium and a product, and relates to the technical field of monitoring. The method comprises the following steps: acquiring a core state variable of a basic software module through a state machine; the state of the basic software module is determined through the monitoring module according to the core state variable, and dog feeding is conducted on the internal watchdog module when the basic software module is in the normal state; when the internal watchdog module detects that the monitoring module stops feeding a dog, triggering a reset process of the system; wherein the state machine, the monitoring module and the internal watchdog module are all located in a processor of the system. The invention provides a multi-level monitoring strategy with finer granularity, the running state of the basic software module in the processor is effectively monitored, and the monitoring capability of the basic software module in a real-time operating system is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of surveillance technology, and in particular to a surveillance method, apparatus, equipment, storage medium, and product. Background Technology

[0002] With the continuous development of information technology, the challenges to system security of various systems are becoming increasingly severe.

[0003] Common system monitoring methods include task monitors. Task monitors determine whether a task is still running normally by monitoring its "heartbeat" or periodically reset flags. This method is effective in detecting task suspensions or deadlocks, primarily focusing on whether a task can execute as expected. However, this method has relatively large monitoring granularity and cannot effectively monitor specific functional modules within a task. Furthermore, task monitors mainly monitor the activity status of tasks, and often fail to effectively identify abnormal states in running functional modules. Summary of the Invention

[0004] This invention provides a monitoring method, apparatus, device, storage medium, and product to solve the problem that existing system monitoring methods have too large a monitoring granularity and cannot monitor the status of specific functional modules running in the system.

[0005] In a first aspect, embodiments of the present invention provide a monitoring method, including:

[0006] The core state variables of the basic software modules are obtained through a state machine.

[0007] The monitoring module determines the status of the basic software module based on the core status variables, and feeds the internal watchdog module when the basic software module is in a normal state.

[0008] When the internal watchdog module detects that the monitoring module has stopped feeding the watchdog, it triggers the system reset process.

[0009] The state machine, monitoring module, and internal watchdog module are all located in the system's processor.

[0010] Secondly, embodiments of the present invention provide a monitoring device, including: a state machine, a monitoring module, and an internal watchdog module located in the processor of the system;

[0011] The state machine is used to obtain the core state variables of the basic software modules;

[0012] The monitoring module is used to determine the status of the basic software module based on the core status variable, and to feed the internal watchdog module when the basic software module is in a normal state.

[0013] The internal watchdog module is used to trigger the system reset process when it detects that the monitoring module has stopped feeding the watchdog.

[0014] Thirdly, embodiments of the present invention provide an electronic device, the electronic device comprising:

[0015] At least one processor; and

[0016] A memory communicatively connected to the at least one processor; wherein,

[0017] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the monitoring method described in any embodiment of the present invention.

[0018] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing computer instructions that are used to cause a processor to execute and implement the monitoring method described in any embodiment of the present invention.

[0019] Fifthly, embodiments of the present invention provide a computer program product including a computer program, which, when executed by a processor, implements the monitoring method described in any embodiment of the present invention.

[0020] The technical solution of this invention obtains the core state variables of the basic software module through a state machine; the monitoring module determines the state of the basic software module based on the core state variables, and feeds the internal watchdog module when the basic software module is in a normal state; when the internal watchdog module detects that the monitoring module has stopped feeding the watchdog, it triggers the system reset process; wherein, the state machine, the monitoring module, and the internal watchdog module are all located in the system processor. By monitoring and restoring the state of the basic software module through the monitoring module, and triggering the system reset during interruption, a more granular multi-level monitoring strategy is provided, which effectively monitors the running state of each basic software module inside the processor. This solves the problem that the monitoring granularity of existing system monitoring methods is too large and cannot monitor the state of specific functional modules running in the system, thus achieving the beneficial effect of improving the monitoring capability of the basic software modules in the system.

[0021] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 A flowchart of a monitoring method provided in Embodiment 1 of the present invention;

[0024] Figure 2 A flowchart of a monitoring method provided in Embodiment 2 of the present invention;

[0025] Figure 3 This is a schematic diagram of the structure of a monitoring system provided in Embodiment 2 of the present invention;

[0026] Figure 4 This is a schematic diagram of the structure of a monitoring device provided in Embodiment 3 of the present invention;

[0027] Figure 5 A schematic diagram of the structure of an electronic device for implementing the monitoring method of this embodiment of the invention. Detailed Implementation

[0028] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0029] It should be noted that the terms "comprising" and "having" and any variations thereof in the specification, claims and accompanying drawings of this invention are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such process, method, product or device.

[0030] Example 1

[0031] Figure 1This is a flowchart of a monitoring method provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where the operating status of a system is monitored. The method can be executed by a monitoring device, which can be implemented in hardware and / or software. The monitoring device can be configured in an electronic device, such as a vehicle, terminal device, or other device. The processor of the electronic device includes a state machine, a monitoring module, and an internal watchdog module. Figure 1 As shown, the method includes:

[0032] S110. Obtain the core state variables of the basic software module through the state machine.

[0033] In this context, a state machine, also known as a finite-state machine or finite-state automaton (FSM), is a mathematical model representing a finite number of states and the transitions and actions between these states. In this embodiment, the state machine resides in the processor. The basic software module, also known as the basic software layer (BSW), is responsible for handling hardware-independent basic functions and providing services to upper-layer application software. Core state variables can be understood as parameters that reflect changes in the operating state of the basic software module. It is understood that core state variables can be selected based on the type of operating system, the actual business scenario, etc., and this embodiment of the invention does not impose any restrictions.

[0034] Specifically, the system running on the processor contains multiple basic software modules. In order to monitor the running status of the basic software modules, this embodiment uses a state machine to obtain the core state variables of the basic software modules after the system is powered on, so as to monitor the running status of the basic software modules and ensure that the basic software modules can run according to the preset working logic.

[0035] This step involves state machine-based status monitoring within the basic software module, which enables more accurate detection of module-level anomalies and timely responses, overcoming the limitation of only monitoring task activity.

[0036] S120. The monitoring module determines the status of the basic software module based on the core status variables, and feeds the internal watchdog module when the basic software module is in a normal state.

[0037] The monitoring module can be understood as a functional module that monitors the status of the basic software modules.

[0038] An internal watchdog module can be understood as a watchdog deployed within the processing unit. A watchdog is an electronic or software timer used to detect computer malfunctions and recover from them. During normal operation, the computer periodically resets the internal watchdog module's timer to prevent it from being lost or "fed." If the computer fails to reset the internal watchdog module due to a hardware failure or program error, the timer will be lost and a timeout signal will be generated. This timeout signal is used to initiate one or more corrective actions. Corrective actions typically involve placing the computer system in a safe state and restoring normal system operation.

[0039] Specifically, core state variables can reflect the operational status of each basic software module to some extent. However, there may be some correlation between abnormal states of different basic software modules. Therefore, it is necessary to analyze the core state variables of the basic software modules through the monitoring module to determine the status of the basic software modules. The status of a basic software module can include normal and abnormal states. When a basic software module is in a normal state, including after recovering to a normal state through a recovery operation, the monitoring module feeds the internal watchdog module.

[0040] S130. When the internal watchdog module detects that the monitoring module has stopped feeding the watchdog, the system reset process is triggered.

[0041] The system in which the processor resides can be an operating system. Optionally, the system in which the processor resides can be a real-time operating system. A real-time operating system (RTOS) is an operating system that can accept and process external events or data at a sufficiently fast speed when they occur, and whose processing results can control the production process or respond quickly to the processing system within a specified time, and control all real-time tasks to run in a coordinated manner.

[0042] In existing status monitoring solutions, watchdog timers are mainly used for the restart and recovery of the entire processor CPU or board level. For electronic devices such as vehicles, the restart of the electronic control unit (ECU) can seriously affect the use of vehicle functions. Therefore, unless the system completely crashes, this level of protection is generally not easily triggered, and watchdog timers cannot directly monitor the operating status of the functional modules inside the processor.

[0043] Specifically, when the monitoring module and all basic software modules are in normal operating condition, including when the basic software modules have recovered to normal after a recovery operation, the monitoring module feeds its internal watchdog module. This internal watchdog module is periodically reset to ensure the normal operation of the monitoring module and all basic software modules. When the internal watchdog module detects that the monitoring module has stopped feeding its watchdog, it indicates that the monitoring module itself is in a faulty state, or that a basic software module is in a persistent and unrecoverable abnormal operating state. This triggers the system reset process, restarting the system and restoring it to normal operating condition.

[0044] In this embodiment, an internal watchdog module is deployed inside the processor. This internal watchdog module monitors the operating status of the monitoring module and various basic software modules in the real-time operating system, providing a more granular monitoring method that can effectively monitor specific functional modules inside the processor.

[0045] In this embodiment, a layered and modular design enables three levels of system status monitoring within the processor. Level 1 monitoring (L1) monitors the system status based on a state machine within the basic software BWS module. Level 2 monitoring monitors the system status through the interaction between the monitoring module and the BWS module. Level 3 monitoring monitors the system status through the interaction between the monitoring module and the internal watchdog module. This provides a more granular monitoring and fault diagnosis method, effectively monitoring specific functional modules within the processor. Furthermore, the interaction mechanism between the monitoring module and the internal watchdog module ensures that a system restart is only triggered in extreme cases where software recovery is impossible, reducing the negative impact of processor restarts on electronic devices—a crucial aspect, especially important in vehicle operating systems.

[0046] The technical solution of this invention obtains the core state variables of the basic software module through a state machine; the monitoring module determines the state of the basic software module based on the core state variables, and feeds the internal watchdog module when the basic software module is in a normal state; when the internal watchdog module detects that the monitoring module has stopped feeding the watchdog, it triggers the system reset process; wherein, the state machine, the monitoring module, and the internal watchdog module are all located in the system's processor, providing a more granular multi-level monitoring strategy to effectively monitor the operating state of the basic software module inside the processor, greatly improving the monitoring capability of the basic software module in the system.

[0047] Example 2

[0048] Figure 2 This is a flowchart of a monitoring method provided in Embodiment 2 of the present invention. Based on the above embodiments, this embodiment further refines the monitoring strategy of the multi-level monitoring mechanism, specifically as follows:

[0049] The steps for determining the state of the basic software module based on the core state variables by the monitoring module include: registering the monitoring function and recovery function of each basic software module through the monitoring module and generating a registry; calling the monitoring function in the registry to analyze the core state variables of each basic software module to obtain the core state information of each basic software module; the core state information is used to indicate whether the basic software module is in an abnormal state.

[0050] The method further includes: when the basic software module is in an abnormal state, evaluating the core state information of the abnormal state of each basic software module according to the coupling relationship of each basic software module, and obtaining an evaluation result; the evaluation result is used to indicate the basic software module that needs to perform a recovery operation; according to the indication of the evaluation result, calling the recovery function in the registry to perform a recovery operation on the basic software module.

[0051] like Figure 2 As shown, the method includes:

[0052] S210. Obtain the core state variables of the basic software module through the state machine.

[0053] Optionally, the steps of obtaining the core state variables of the basic software module through the state machine include: monitoring the target events of the basic software module under different operating states through the state machine to obtain the core state variables of the basic software module; the core state variables are stored using a two's complement redundant storage mechanism.

[0054] The two's complement redundant storage mechanism can be understood as a mechanism that redundantly stores the two's complement as backup data. In this embodiment, the source code of the core state variables is stored, and the two's complement of the core state variables is calculated and stored as backup data as well. The target event can be understood as an event that affects the core state variables.

[0055] Specifically, a state machine is used to monitor target events of the basic software modules under different operating states. Based on whether the target event occurs and / or the execution result of the target event, the core state variables of each basic software module are determined. The source code of the core state variables is stored, and the complement of the core state variables is stored as backup data based on a complement redundancy storage mechanism to ensure the integrity and security of the state data.

[0056] S220. Register the monitoring and recovery functions of the basic software module through the monitoring module, and generate the registry.

[0057] The registry can be understood as a data table used to store registration information, which may include: each basic software module, and its corresponding monitoring and recovery functions. Monitoring functions are used to monitor the status of the basic software modules; specifically, they are used to comprehensively evaluate the core status variables of the basic software modules to determine whether the module's status is abnormal. Recovery functions are used to perform recovery operations on basic software modules in abnormal states.

[0058] Specifically, monitoring and recovery functions for the basic software modules are defined separately, and these functions are registered in the monitoring module to form a registry, thereby achieving modular management of functions.

[0059] S230. Call the monitoring function in the registry to analyze the core status variables of the basic software module and obtain the core status information of the basic software module; the core status information is used to indicate the status of the basic software module.

[0060] The core status information can be understood as information indicating the status of the basic software module, used to determine whether the basic software module is in a normal or abnormal state. It is understood that the core status information can be selected based on the type of operating system, the actual business scenario, etc., and this embodiment of the invention does not impose any restrictions.

[0061] Specifically, the monitoring module periodically calls the monitoring function in the registry to read the core status variables of the basic software module, and analyzes the core status variables based on the monitoring function to obtain the core status information of the basic software module.

[0062] In an optional embodiment, when the core state variables are stored using a two's complement redundant storage mechanism, a monitoring function in the registry is called to read the core state variables of the basic software module, and the source code of the core state variables is verified using the two's complement of the read core state variables to detect whether the core state variables have been tampered with, thereby ensuring the integrity and security of the state data.

[0063] S240. Feed the internal watchdog module when the basic software module is in a normal state.

[0064] Specifically, if the monitoring module determines that there is no abnormal core status information by calling the monitoring function, it will periodically reset the timer of the internal watchdog module to prevent it from being lost or "timing out," which is to say, "feeding" the internal watchdog module.

[0065] S250. When a basic software module is in an abnormal state, the core state information of the abnormal state of the basic software module is evaluated based on the coupling relationship between the basic software modules to obtain the evaluation result; the evaluation result is used to indicate the basic software modules that need to perform recovery operations.

[0066] The coupling relationship between basic software modules can be understood as the interaction and mutual influence between multiple basic software modules.

[0067] Specifically, the monitoring module determines the core status information of the abnormal state by calling the monitoring function. Then, based on the coupling relationship between the basic software modules, it evaluates the core status information of the abnormal state of the basic software module and determines the evaluation result of the basic software module that needs to activate the recovery function to perform the recovery operation.

[0068] S260. Based on the assessment results, call the recovery function in the registry to perform a recovery operation on the basic software module.

[0069] Specifically, based on the basic software modules that require recovery operations as indicated in the evaluation results, the recovery functions of the corresponding basic software modules in the registry are called to perform recovery operations on the basic software modules.

[0070] Understandably, the result of the recovery function performing the recovery operation can be that the status of each basic software module is restored to normal or the recovery fails. After each call to the recovery function in the registry to perform the recovery operation on the basic software module in an abnormal state, the process returns to execution S230. If it is determined that there is no core status information of an abnormal state, then execution continues to S240 to feed the internal watchdog module. If there is still core status information of an abnormal state, then execution continues to S250 and S260 to perform the recovery operation on the basic software module in an abnormal state again, until the preset execution threshold is reached. If the basic software module in an abnormal state still cannot be restored to normal, then feeding the internal watchdog module stops, thereby monitoring the status of the monitoring modules in the system through the internal watchdog module.

[0071] Optionally, after the step of calling the recovery function in the registry to perform a recovery operation on the basic software module according to the indication of the evaluation result, the method further includes: recording the core state variables of the basic software module and the recovery operation in a log file.

[0072] Specifically, the core state variables and recovery operations of the basic software modules are recorded in log files to provide detailed data support for subsequent fault diagnosis and analysis.

[0073] S270. When the internal watchdog module detects that the monitoring module has stopped feeding the watchdog, the system reset process is triggered.

[0074] Optionally, after the internal watchdog module triggers the system reset process, the current system state information, such as the stack and registers, is recorded for fault analysis.

[0075] In an optional embodiment, the method further includes: feeding the external watchdog module when the processor is in a normal state, and stopping feeding the external watchdog module when the processor is in an abnormal state, so that the external watchdog module triggers the processor to restart.

[0076] The external watchdog module can be understood as a watchdog located inside the system but outside the processor.

[0077] Specifically, when the processor is operating normally, the external watchdog module is fed; when the processor is operating abnormally, the external watchdog module is stopped from feeding, so that the external watchdog module can trigger a processor restart when it detects that the processor has stopped feeding. In the event of an unrecoverable processor crash, the external watchdog mechanism ensures that the status monitoring system can resume normal operation through an external restart, thus guaranteeing the ultimate security of the status monitoring system.

[0078] For example, Figure 3 This is a schematic diagram of a monitoring system provided in Embodiment 2 of the present invention. Figure 3 As shown, three levels of state monitoring are performed inside the processor. These three levels of state monitoring include: state monitoring of the BWS module based on state machine 310 (L1), state monitoring based on the interaction between monitoring module 320 and the BWS module (L2), and state monitoring based on the interaction between monitoring module and internal watchdog module 330 (L3). Furthermore, a fourth level of state monitoring (L4) is performed on the processor through external watchdog module 340. The system features enhanced fine-grained monitoring, allowing monitoring from the low-level internal BWS module to the high-level external watchdog module, providing a comprehensive and detailed monitoring and fault recovery mechanism for the system, thereby improving the system's stability and reliability.

[0079] The technical solution of this invention obtains the core state variables of the basic software module through a state machine; registers the monitoring and recovery functions of the basic software module through a monitoring module and generates a registry; calls the monitoring functions in the registry to analyze the core state variables of the basic software module and obtain the core state information of the basic software module; the core state information is used to indicate the state of the basic software module; when the basic software module is in a normal state, the internal watchdog module is fed; when the basic software module is in an abnormal state, the core state information of the abnormal state of the basic software module is evaluated according to the coupling relationship between the basic software modules, and an evaluation result is obtained; the evaluation result is used to indicate the basic software module that needs to perform a recovery operation; according to the indication of the evaluation result, the recovery function in the registry is called to perform a recovery operation on the basic software module; when the internal watchdog module detects that the monitoring module has stopped feeding the watchdog, the system reset process is triggered; this provides a more granular multi-level monitoring strategy and fault recovery strategy, which effectively monitors and recovers the operating status of each basic software module inside the processor, greatly improving the monitoring and recovery capabilities of the basic software modules in the system.

[0080] Example 3

[0081] Figure 4 This is a schematic diagram of a monitoring device provided in Embodiment 3 of the present invention. Figure 4 As shown, the device includes: a state machine 310 located in the system's processor, a monitoring module 320, and an internal watchdog module 330; wherein,

[0082] The state machine 310 is used to obtain the core state variables of the basic software module;

[0083] The monitoring module 320 is used to determine the status of the basic software module based on the core status variable, and to feed the internal watchdog module when the basic software module is in a normal state.

[0084] The internal watchdog module 330 is used to trigger the system reset process when the monitoring module stops feeding the watchdog.

[0085] The technical solution of this invention obtains the core state variables of the basic software module through a state machine; the monitoring module determines the state of the basic software module based on the core state variables, and feeds the internal watchdog module when the basic software module is in a normal state; when the internal watchdog module detects that the monitoring module has stopped feeding the watchdog, it triggers the system reset process; wherein, the state machine, the monitoring module, and the internal watchdog module are all located in the system's processor, providing a more granular multi-level monitoring strategy to effectively monitor the operating state of the basic software module inside the processor, greatly improving the monitoring capability of the basic software module in the system.

[0086] Optionally, the monitoring module 320 is specifically used for:

[0087] Register the monitoring and recovery functions of the basic software modules and generate the registry;

[0088] The monitoring function in the registry is invoked to analyze the core status variables of the basic software module and obtain the core status information of the basic software module; the core status information is used to indicate the status of the basic software module.

[0089] Optionally, the monitoring module 320 further includes:

[0090] An evaluation unit is used to evaluate the core state information of the abnormal state of the basic software module based on the coupling relationship between the basic software modules when the basic software module is in an abnormal state, and obtain an evaluation result; the evaluation result is used to indicate the basic software module that needs to perform a recovery operation.

[0091] The recovery unit is used to call the recovery function in the registry to perform a recovery operation on the basic software module according to the indication of the evaluation result.

[0092] Optionally, the monitoring module 320 further includes:

[0093] The recording unit is used to record the core state variables and recovery operations of each basic software module in a log file after the step of calling the recovery function in the registry to perform a recovery operation on the basic software module according to the indication of the evaluation result.

[0094] Optional, state machine 310, specifically used for:

[0095] Monitor target events of the basic software module under different operating states to obtain the core state variables of the basic software module; the core state variables are stored using a two's complement redundant storage mechanism, which is used to verify the source code of the core state variables based on the two's complement of the core state variables.

[0096] Optionally, the device further includes: an external watchdog module;

[0097] The processor is specifically used to: feed the external watchdog module in a normal state, and stop feeding the external watchdog module in an abnormal state, so that the external watchdog module triggers the processor to restart; wherein the external watchdog module is located inside the system and outside the processor.

[0098] The monitoring device provided in the embodiments of the present invention can execute the status monitoring method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0099] Example 4

[0100] Figure 5 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches), in-vehicle devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0101] like Figure 5 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0102] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0103] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as monitoring methods.

[0104] In some embodiments, the monitoring method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the monitoring method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the monitoring method by any other suitable means (e.g., by means of firmware).

[0105] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0106] In some embodiments, the monitoring method may be implemented as a computer program, which is implicitly included in a computer program product. When executed by a processor, the computer program implements the monitoring method of the present invention. The computer program product can be understood as a software product that primarily implements its solution through a computer program. The computer program used to implement the method of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer program causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer program may be executed entirely on a machine, partially on a machine, partially on a remote machine as a standalone software package, or entirely on a remote machine or server.

[0107] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0108] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0109] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0110] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0111] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0112] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A monitoring method, characterized in that, include: The core state variables of the basic software modules are obtained through a state machine. The monitoring module determines the status of the basic software module based on the core status variables, and feeds the internal watchdog module when the basic software module is in a normal state. When the internal watchdog module detects that the monitoring module has stopped feeding the watchdog, it triggers the system reset process. The state machine, monitoring module, and internal watchdog module are all located in the system's processor.

2. The monitoring method according to claim 1, characterized in that, The step of determining the state of the basic software module based on the core state variables by the monitoring module includes: The monitoring module registers the monitoring and recovery functions of the basic software modules and generates a registry entry. The monitoring function in the registry is invoked to analyze the core status variables of the basic software module and obtain the core status information of the basic software module; the core status information is used to indicate the status of the basic software module.

3. The monitoring method according to claim 2, characterized in that, The method further includes: When the basic software module is in an abnormal state, the core state information of the abnormal state of the basic software module is evaluated based on the coupling relationship between the basic software modules to obtain an evaluation result; the evaluation result is used to indicate the basic software module that needs to perform a recovery operation. Based on the assessment results, the recovery function in the registry is invoked to perform a recovery operation on the underlying software module.

4. The monitoring method according to claim 3, characterized in that, After the step of invoking the recovery function in the registry to perform a recovery operation on the basic software module according to the indication of the evaluation result, the method further includes: The core state variables and recovery operations of the basic software module are recorded in a log file.

5. The monitoring method according to claim 1, characterized in that, The steps for obtaining the core state variables of the basic software module through a state machine include: By monitoring target events of the basic software module under different operating states through a state machine, the core state variables of the basic software module can be obtained. The core state variables are stored using a two's complement redundant storage mechanism, which is used to verify the source code of the core state variables based on their two's complement.

6. The monitoring method according to any one of claims 1-5, characterized in that, The method further includes: The external watchdog module is fed when the processor is in a normal state, and stopped when the processor is in an abnormal state, so that the external watchdog module triggers the processor to restart; wherein, the external watchdog module is located inside the system and outside the processor.

7. A monitoring device, characterized in that, This includes the state machine, monitoring module, and internal watchdog module located in the system's processor; The state machine is used to obtain the core state variables of the basic software modules; The monitoring module is used to determine the status of the basic software module based on the core status variable, and to feed the internal watchdog module when the basic software module is in a normal state. The internal watchdog module is used to trigger the system reset process when it detects that the monitoring module has stopped feeding the watchdog.

8. An electronic device, characterized in that, The electronic device includes: At least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the monitoring method according to any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the monitoring method according to any one of claims 1-6.

10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the monitoring method according to any one of claims 1-6.