Monitoring system and method
By using heartbeat data to monitor communication status between different systems, the problem that the prior art cannot effectively monitor communication between different systems is solved, monitoring efficiency and real-timeness are improved, and the stability and reliability of the system are ensured.
Patent Information
- Application Number
- CN202411978648.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-02
AI Technical Summary
Existing monitoring software cannot effectively monitor the communication status between different systems, resulting in low accuracy and reliability of monitoring systems.
By utilizing heartbeat data between the host system and the virtual system, the communication status between the system is monitored. The host system receives the first heartbeat data sent by the virtual system and restarts the virtual system when the timeout; the host system sends the second heartbeat data to the host control system and restarts the host system when the timeout.
It improves the efficiency and real-timeness of monitoring multiple systems, can promptly detect system exceptions and handle them, and improves the stability and reliability of the computing system.
Smart Images

Figure CN119917371A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of system monitoring, and in particular to a monitoring system and method. Background Art
[0002] In computing systems used in different scenarios (such as smart vehicles), monitoring the operating status of the system is very important for the stable operation of the system. Monitoring can handle various abnormal situations such as process deadlock, blocking, resource exhaustion, etc.
[0003] At present, usually set monitoring software is used to run in the system. The existing set monitoring software can usually only monitor the operation of the system itself, and there is a problem of low real-time monitoring; and the existing set monitoring software cannot monitor the communication status between different systems, resulting in low accuracy and reliability of the monitoring system. Summary of the invention
[0004] In view of this, the present invention provides a monitoring system, which can use a host system to receive first heartbeat data sent by a virtual system at a first time interval; when the sending time of the first heartbeat data times out, determine that the monitored virtual system is abnormal, and trigger the virtual system to restart; and use the host system to send second heartbeat data to a main control system at a second time interval; when the sending time of the second heartbeat data times out, use the main control system to determine that the monitored host system is abnormal, and trigger the host system to restart. The embodiment of the present invention improves the efficiency and real-time performance of monitoring multiple systems by using heartbeat data between different systems to monitor the communication status between systems.
[0005] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0006] In a first aspect, the present invention provides a monitoring system, including: a main control system, a host system and a virtual system; the host system monitors the virtual system, and is used to receive first heartbeat data sent by the virtual system at a first time interval; when the sending time of the first heartbeat data times out, it is determined that the virtual system it monitors is abnormal, and the virtual system is triggered to restart; the host system sends second heartbeat data to the main control system at a second time interval; the main control system monitors the host system, and when the sending time of the second heartbeat data times out, it is determined that the host system it monitors is abnormal, and the host system is triggered to restart.
[0007] Optionally, the host system and the virtual system communicate using multiple communication links; the host system is further used to determine each communication link type between the host system and the virtual system, and obtain a first timeout threshold corresponding to each communication link type; when the host system determines that the sending time of the first heartbeat data sent based on each communication link type exceeds the first timeout threshold corresponding to the communication link type, the host system determines that the sending time of the first heartbeat data has timed out.
[0008] Optionally, the host system and the main control system communicate with each other using multiple communication links; the main control system is further used to determine each type of communication link between the host system and the main control system, and obtain a second timeout threshold corresponding to each type of communication link; when the main control system determines that the sending time of the second heartbeat data sent based on each type of communication link exceeds the second timeout threshold corresponding to the communication link type, the main control system determines that the sending time of the second heartbeat data has timed out.
[0009] Optionally, the host system includes a host monitoring device; the host monitoring device is used to monitor the first system operation data of the host system in which it is located; when it is determined according to the first system operation data that there is a process with memory leakage in the host system, the process is terminated.
[0010] Optionally, the host monitoring device is further configured to receive first heartbeat data sent by the virtual system at a first time interval.
[0011] Optionally, the host monitoring device is further used to send second heartbeat data to the main control system at a second time interval.
[0012] Optionally, the host monitoring device is further used to collect the second system operation data of the virtual system; and send the second system operation data to the virtual system.
[0013] Optionally, the virtual system includes a virtual monitoring device; the virtual monitoring device is used to execute the step of sending first heartbeat data to the host system at a first time interval.
[0014] Optionally, the virtual monitoring device is also used to monitor the key processes of the virtual system in which it is located; when it is determined that one or more key processes have operating abnormalities, restart the key processes; when it is determined that restarting the key processes fails, send a restart request for the virtual system to the host monitoring device.
[0015] In a second aspect, the present invention provides a monitoring method: comprising: using a host system to monitor a virtual system, using the host system to receive first heartbeat data sent by the virtual system at a first time interval; using the host system to determine that the monitored virtual system is abnormal when determining that the sending time of the first heartbeat data has timed out, and using the host system to trigger a restart of the virtual system; using the host system to send second heartbeat data to a main control system at a second time interval; using the main control system to monitor the host system, using the main control system to determine that the monitored host system is abnormal when determining that the sending time of the second heartbeat data has timed out, and using the main control system to trigger a restart of the host system.
[0016] Optionally, the host system and the virtual system communicate with each other using multiple communication links; the host system is used to determine each type of communication link between the host system and the virtual system, and obtains a first timeout threshold corresponding to each type of communication link; when the host system determines that the sending time of the first heartbeat data sent based on each type of communication link exceeds the first timeout threshold corresponding to the type of communication link, the host system determines that the sending time of the first heartbeat data has timed out.
[0017] Optionally, the host system and the main control system communicate with each other using multiple communication links; the main control system is used to determine each type of communication link between the host system and the main control system, and obtain the second timeout threshold corresponding to each communication link type; when the main control system determines that the sending time of the second heartbeat data sent based on each communication link type exceeds the second timeout threshold corresponding to the communication link type, the main control system determines that the sending time of the second heartbeat data has timed out.
[0018] Optionally, the host system includes a host monitoring device; the host monitoring device is used to monitor the first system operation data of the host system; when it is determined according to the first system operation data that there is a process with memory leakage in the host system, the process is terminated.
[0019] Optionally, the host monitoring device is used to receive first heartbeat data sent by the virtual system at a first time interval.
[0020] Optionally, the host monitoring device is used to send second heartbeat data to the main control system at a second time interval.
[0021] Optionally, the host monitoring device is used to collect the second system operation data of the virtual system; and the second system operation data is sent to the virtual system.
[0022] Optionally, the virtual system includes a virtual monitoring device; and the virtual monitoring device is used to execute the step of sending the first heartbeat data to the host system at a first time interval.
[0023] Optionally, a virtual monitoring device is used to monitor key processes of the virtual system in which it is located; when it is determined that one or more key processes have operating abnormalities, the key processes are restarted; when it is determined that restarting the key processes fails, a restart request for the virtual system is sent to the host monitoring device.
[0024] The technical solution of the above invention has the following advantages or beneficial effects: the host system can be used to receive the first heartbeat data sent by the virtual system at a first time interval; when the sending time of the first heartbeat data times out, it is determined that the virtual system it monitors is abnormal, triggering the virtual system to restart; and the host system is used to send the second heartbeat data to the main control system at a second time interval; when the sending time of the second heartbeat data times out, it is determined that the host system it monitors is abnormal, triggering the host system to restart. The embodiment of the present invention improves the efficiency and real-time performance of monitoring multiple systems by using heartbeat data between different systems to monitor the communication status between systems. It overcomes the problem that the existing setting monitoring software cannot monitor the communication status between different systems when running in the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 is a main structural diagram of a monitoring system provided according to an embodiment of the present invention;
[0026] Figure 2 is a schematic diagram of a monitoring process of a host system provided according to an embodiment of the present invention;
[0027] Figure 3 It is a schematic diagram of a monitoring process between a main control system, a host system and a virtual system provided according to an embodiment of the present invention;
[0028] Figure 4 It is a flowchart of a monitoring method provided according to an embodiment of the present invention. DETAILED DESCRIPTION
[0029] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0030] It should be pointed out that the embodiments of the present invention and the technical features therein may be combined with each other without conflict.
[0031] In addition, the terms "first", "second", "third", etc. included in the embodiments of the present invention are used to distinguish similar objects, and are not necessarily used to describe a specific number or sequence. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances. This is just a way of distinguishing objects with the same attributes when describing them in the embodiments of the present invention.
[0032] Figure 1 The main structural diagram of the monitoring system provided by the embodiment of the present invention is shown as follows: Figure 1 As shown, the monitoring system provided by the embodiment of the present invention includes: a main control system 101, a host system 102 and a virtual system 103;
[0033] The host system 102 monitors the virtual system 103 and receives first heartbeat data sent by the virtual system 103 at a first time interval. When the sending time of the first heartbeat data times out, it determines that the monitored virtual system 103 is abnormal and triggers the restart of the virtual system 103.
[0034] The host system 102 sends second heartbeat data to the main control system 101 at a second time interval.
[0035] The main control system 101 monitors the host system 102 and is used to determine that the monitored host system 102 is abnormal when the sending time of the second heartbeat data times out, thereby triggering the host system 102 to restart.
[0036] In computing systems (such as intelligent cockpit computing systems for vehicles), it is crucial to ensure the normal operation of key processes and the stability of computing resources and communication links, including avoiding deadlock, blocking, central processing unit (CPU) usage, memory resource exhaustion, network channel or other physical channel disconnection, etc. Existing monitoring methods, such as using set monitoring software (such as using GPIO watchdog or software watchdog), can monitor the basic operation of the system, but cannot effectively monitor the data interaction between systems based on communication links. In addition, existing monitoring tools can usually only intervene after the problem has occurred, and there is a problem that the problem cannot be discovered in time and the normal operation of the system cannot be restored.
[0037] The monitoring system and monitoring method provided by the embodiment of the present invention can monitor and manage status anomalies in real time in a cross-platform system of multiple systems. The real-time performance of monitoring the operating status of each system and chip is improved, and when a system anomaly is detected, the anomaly can be processed in real time, thereby improving the stability and reliability of the computing system.
[0038] In one embodiment of the present invention, the host system and the virtual system can be deployed on the same chip, and the main control system (MCU) can be deployed on a separate chip.
[0039] like Figure 1 As shown, the host system 102 and the virtual system 103 communicate using multiple communication links, such as SOME / IP and VirtIO; the host system 102 and the main control system 101 communicate using multiple communication links, such as SOME / IP and SPI; wherein, different types of communication links have different communication protocols, so the timeout duration thresholds corresponding to the communication link types are different, and the timeout duration thresholds used to determine whether the timeout is detected by the heartbeat data are also different. The embodiment of the present invention can determine whether different types of communication links have timed out by sending heartbeat data via multiple communication links, and when both communication links have timed out, it is determined that the communication between the systems is abnormal, thereby achieving the beneficial effect of mutual authentication for the operation of different types of communication links, and improving the refinement of determining communication abnormalities. Among them, the SOME / IP (Scalable service-oriented MiddlewarE over IP) protocol adopted by the SOME / IP communication link refers to an in-vehicle Ethernet communication protocol based on IP service-oriented; the SPI (serial peripheral interface) protocol adopted by the SPI communication link is a data bus interface, which is suitable for communication between the main control (MCU, Microcontroller Unit; micro control unit) and the plug-in chip; the VirtIO protocol adopted by the VirtIO communication link is an IO semi-virtualization framework, which is widely used in various virtualization environments. That is, the host system and the virtual system communicate using multiple communication links; the host system is further used to determine each type of communication link between the host system and the virtual system, and obtain the first timeout duration threshold corresponding to each type of communication link; the host system determines that the sending time of the first heartbeat data sent based on each type of communication link exceeds the first timeout duration threshold corresponding to the communication link type, and determines that the sending time of the first heartbeat data is timed out (for example, the first heartbeat data is not received within the time range of the preset first timeout duration threshold). The host system and the main control system communicate using a variety of communication links; the main control system is further used to determine each type of communication link between the host system and the main control system, and obtain the second timeout duration threshold corresponding to each type of communication link; the main control system determines that the sending time of the second heartbeat data is timed out (for example, the second heartbeat data is not received within the time range of the preset second timeout duration threshold) when it is determined that the sending time of the second heartbeat data sent based on each type of communication link exceeds the second timeout duration threshold corresponding to the communication link type. Wherein, the specific duration of the first time interval and the second time interval can be set according to the actual scenario, and the present invention does not limit the specific values of the first time interval and the second time interval.
[0040] Figure 2 is a schematic diagram of a monitoring process for a host system provided according to an embodiment of the present invention; the host system includes a host monitoring device; Figure 2 The various steps are applied to a host monitoring device included in the host system.
[0041] Step S201: Send heartbeat data to the main control system (ie, the host system sends second heartbeat data to the main control system at a second time interval). That is, the host monitoring device is further configured to send second heartbeat data to the main control system at a second time interval.
[0042] Step S202: monitor the first system operation data of the host system itself; wherein the first system operation data includes: one or more of the utilization rate of the central processing unit, memory usage, process operation status, and storage usage status. wherein, the first system operation data may not be obtained when the system is just started (to avoid resource occupation caused by obtaining system data and the reference value of the data is not high at this time); after determining that the system enters the running state from the startup state, the operation of the first system operation data is performed.
[0043] Step S203: Determine whether there is a process with memory leak, if yes, execute step S204, otherwise execute step S205.
[0044] Step S204: Terminate the process.
[0045] The description of step S202 to step S204 is that the host monitoring device is used to monitor the first system operation data of the host system where it is located; when it is determined according to the first system operation data that there is a process with memory leakage in the host system, the process is terminated.
[0046] Step S205: receiving the first heartbeat data sent by the virtual system at the first time interval, determining whether the heartbeat data has timed out, and if so, executing step S206. That is, the host monitoring device is further configured to receive the first heartbeat data sent by the virtual system at the first time interval.
[0047] Step S206: triggering the restart of the virtual system.
[0048] The description of steps S205 to S206 is: the host system monitors the virtual system to receive first heartbeat data sent by the virtual system at a first time interval; when the sending time of the first heartbeat data times out, it determines that the monitored virtual system is abnormal, triggering a restart of the virtual system.
[0049] Figure 3 It is a schematic diagram of a monitoring process between a main control system, a host system and a virtual system provided according to an embodiment of the present invention;
[0050] like Figure 3 As shown, it includes a main control system including a main control monitoring device 300, a host system including a host monitoring device 200, and a virtual system including a virtual monitoring device 400. The description of steps S201 to S205 of the host monitoring device (Host OS Health Monitor) 200 is the same as that of the description of steps S202 to S203 of the host monitoring device (Host OS Health Monitor) 200. Figure 2 The description is consistent with that of , and will not be repeated here.
[0051] For the MCU Health Monitor 300:
[0052] Step S301: receiving the second heartbeat data sent by the host monitoring device in step S201, and when the sending time of the second heartbeat data times out, determining whether there is an abnormality in the host system being monitored, and if so, executing step S302.
[0053] Step S302: Triggering a host system restart.
[0054] Among them, when the host system restart is triggered, the main control monitoring device MCU Health Monitor can perform a power-off reset (i.e. restart the host system) on the chip to which the host monitoring device Host OS Health Monitor belongs according to the state of the power management module. That is, the host system sends the second heartbeat data to the main control system at a second time interval; the main control system monitors the host system, and is used to determine that the host system it monitors is abnormal when the sending time of the second heartbeat data times out, and trigger the host system to restart.
[0055] For the virtual monitoring device (Guest OS Health Monitor) 400:
[0056] Step S401: first heartbeat data is sent at a first time interval; that is, the virtual system includes a virtual monitoring device; the virtual monitoring device is used to execute the step of sending the first heartbeat data to the host system at a first time interval.
[0057] Step S402: Determine whether there is an abnormality in its own key process (process blocking, process stopping, etc.); if it is determined that there is an abnormality, execute step S403.
[0058] Preferably, in an embodiment of the present invention, the host monitoring device is further used to collect the second system operation data of the virtual system and send the second system operation data to the virtual system, so that the virtual monitoring device can determine whether its own system has an abnormality based on the second system operation data.
[0059] The host monitoring device Host OS Health Monitor can read the operating data of the virtual system (virtual machine) on the host system side, and send (transmit back) the collected data (i.e., the second system operating data) to the virtual monitoring device Guest OS Health Monitor through the VirtIO communication link, providing reference data for the virtual monitoring device Guest OS HealthMonitor to monitor the current system health status.
[0060] Step S403: Determine whether the critical process with the abnormality can be restored. If it is determined that it cannot be restored, send a request to restart the virtual system to the host system so that the host system triggers the operation of restarting the virtual system. That is, the virtual monitoring device is also used to monitor the critical processes of the virtual system in which it is located; when it is determined that one or more critical processes have operating abnormalities, restart the critical processes; when it is determined that restarting the critical processes fails, send a restart request for the virtual system to the host monitoring device. After the critical processes of the virtual monitoring device fail to restart themselves multiple times (that is, they cannot be restored), the virtual monitoring device Guest OS Health Monitor will request the host monitoring device Host OS HealthMonitor to reset (restart) the virtual system.
[0061] Furthermore, when it is determined that an abnormality exists in the virtual system or the host system, the embodiment of the present invention may record log information related to the abnormality (eg, including abnormal communication link information, abnormal data of system operation, etc.).
[0062] The embodiment of the present invention uses monitoring devices arranged in different systems and utilizes heartbeat data between different systems to monitor the communication status between the systems, thereby improving the efficiency and real-time performance of monitoring different systems.
[0063] Figure 4 A schematic diagram showing the main steps of a monitoring method provided according to an embodiment of the present invention is shown;
[0064] Step S501: using the host system to monitor the virtual system, and using the host system to receive first heartbeat data sent by the virtual system at a first time interval; using the host system to determine that the virtual system being monitored is abnormal when determining that the sending time of the first heartbeat data has timed out, and using the host system to trigger a restart of the virtual system;
[0065] Step S502: using the host system to send second heartbeat data to the main control system at a second time interval; using the main control system to monitor the host system, and when the main control system determines that the sending time of the second heartbeat data has timed out, determining that the monitored host system is abnormal, and using the main control system to trigger a restart of the host system.
[0066] Specifically, the monitoring method between the host system, the virtual system, and the main control system is consistent with the description of the monitoring method of the monitoring system for each system and between systems, and will not be repeated here.
[0067] It is understandable that there is no particular limitation on the execution order of step S501 and step S502.
[0068] The monitoring method of the embodiment of the present invention can use the host system to receive the first heartbeat data sent by the virtual system at a first time interval; when the sending time of the first heartbeat data times out, determine that the monitored virtual system is abnormal, and trigger the virtual system to restart; and use the host system to send the second heartbeat data to the main control system at a second time interval; when the sending time of the second heartbeat data times out, use the main control system to determine that the monitored host system is abnormal, and trigger the host system to restart. The embodiment of the present invention improves the efficiency and real-time performance of monitoring different systems by using heartbeat data between different systems to monitor the communication status between systems.
Claims
1. A monitoring system, characterized in that: include: Master control system, host system and virtual system; The host system monitors the virtual system and is configured to receive first heartbeat data sent by the virtual system at a first time interval; when the sending time of the first heartbeat data times out, determining that the monitored virtual system is abnormal, and triggering a restart of the virtual system; The host system sends second heartbeat data to the main control system at a second time interval; The main control system monitors the host system and is used to determine that the monitored host system is abnormal when the sending time of the second heartbeat data times out, thereby triggering the host system to restart.
2. The monitoring system according to claim 1, characterized in that: The host system and the virtual system communicate using a variety of communication links; The host system is further used to determine each type of communication link between the host system and the virtual system, and obtain a first timeout duration threshold corresponding to each type of the communication link; When the host system determines that the sending time of the first heartbeat data sent based on each communication link type exceeds the first timeout duration threshold corresponding to the communication link type, it determines that the sending time of the first heartbeat data has timed out.
3. The monitoring system according to claim 1, characterized in that: The host system and the main control system communicate with each other using a variety of communication links; The main control system is further used to determine each type of communication link between the host system and the main control system, and obtain a second timeout duration threshold corresponding to each type of the communication link; The main control system determines that the sending time of the second heartbeat data has timed out when it is determined that the sending time of the second heartbeat data sent based on each communication link type exceeds the second timeout duration threshold corresponding to the communication link type.
4. The monitoring system according to claim 1, characterized in that: The host system includes a host monitoring device; The host monitoring device is used to monitor the first system operation data of the host system in which it is located; when it is determined according to the first system operation data that there is a process with memory leakage in the host system, the process is terminated.
5. The monitoring system according to claim 4, characterized in that: The host monitoring device is further used to receive first heartbeat data sent by the virtual system at a first time interval.
6. The monitoring system according to claim 4, characterized in that: The host monitoring device is further used to send second heartbeat data to the main control system at a second time interval.
7. The monitoring system according to claim 4, characterized in that: The host monitoring device is further used to collect the second system operation data of the virtual system; and send the second system operation data to the virtual system.
8. The monitoring system according to claim 1, characterized in that: The virtual system includes a virtual monitoring device; The virtual monitoring device is used to execute the step of sending first heartbeat data to the host system at a first time interval.
9. The monitoring system according to claim 8, characterized in that: The virtual monitoring device is also used to monitor the key processes of the virtual system in which it is located; when it is determined that one or more of the key processes have operating abnormalities, restart the key processes; when it is determined that restarting the key processes fails, send a restart request for the virtual system to the host monitoring device.
10. A monitoring method, characterized in that: include: Using the host system to monitor the virtual system, and using the host system to receive first heartbeat data sent by the virtual system at a first time interval; When determining that the sending time of the first heartbeat data has timed out, the host system determines that the monitored virtual system is abnormal, and triggers the restart of the virtual system by the host system; The host system is used to send second heartbeat data to the main control system at a second time interval; the main control system is used to monitor the host system, and when the main control system determines that the sending time of the second heartbeat data has timed out, it is determined that the host system it monitors is abnormal, and the main control system is used to trigger the host system to restart.