System operation state detection method and device, storage medium and electronic device

By dynamically adjusting the heartbeat packet frequency with cross-system touch events in a single screen and multi-system scenario, the problem of high resource occupancy of system operation status detection in the existing technology is solved, and more efficient system inactivation detection and resource conservation are achieved. Improves the stability and real-timeness of the on-board system.

CN119088644APending Publication Date: 2024-12-06CHINA AUTOMOTIVE INNOVATION CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411213632.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The existing system operating status detection method has the problem of high resource occupancy, especially in vehicle-mounted systems. The heartbeat mechanism can only monitor the system process stuck, cannot monitor the page to fake death, and may cause misjudgment, which will lead to additional calculations. Force and bandwidth consumption affect real-time.

Method used

In a single screen and multi-system scenario, the packet transmission frequency of the heartbeat packet is dynamically adjusted by cross-system touch events, and the first operating system receives the touch event and sends a notification message to the second operating system to adjust the time interval of the heartbeat packet so that the first operating system can be used to receive the touch event. Continuously receive heartbeat packets to confirm that the system is running properly.

Benefits of technology

Reduce resource consumption of the system maintenance mechanism, reduce misjudgment, improve system inactivation detection efficiency, save system resources, and improve user experience and system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119088644A_ABST
    Figure CN119088644A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a system running state detection method and device, a storage medium and an electronic device.The method comprises the steps that in a single-screen multi-system scene, a first touch event triggered in a display area corresponding to a second operation system is received through a first operation system, the single-screen multi-system is used for describing that a plurality of display areas of a single screen correspond to a plurality of operating systems; in response to the received first touch event, under the condition that the time interval of sending the heartbeat packet to the first operating system by the second operating system is not the first time interval, sending a first notification message to the second operating system through the first operating system, the first notification message is used for indicating the second operating system to adjust the time interval of sending the heartbeat packet to a first time interval; and under the condition that the heartbeat packets sent by the second operating system are continuously received according to the first time interval, determining that the second operating system runs normally.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of system keep-alive, and in particular, to a method and device for detecting the operating status of a system, a storage medium, and an electronic device. Background Art

[0002] System stability is an important indicator of software operation, and high stability is the eternal pursuit of operating systems. Especially in vehicle-mounted systems, higher requirements are placed on reliability and stability, so various keep-alive mechanisms and strategies have emerged. The most common one is achieved through the heartbeat mechanism, that is, by sending signals at a fixed period when the system is alive, such as a fixed interval of 10s or 20s, and then another system receives it. If the heartbeat signal is not received for a period of time, the first system is considered to be inactive, and the second system will restart the first system, thus achieving keep-alive. However, this keep-alive strategy also has obvious disadvantages, such as only being able to monitor the situation where the system process is stuck, and if the page is frozen, it cannot be monitored; or there may be misjudgments, such as the heartbeat packet occasionally being blocked and delayed but the system can be recovered; and the heartbeat mechanism will bring additional computing power and bandwidth consumption, affecting real-time performance, etc.

[0003] It can be seen that the detection method of the system operation status in the related art has the problem of high resource occupancy rate. Summary of the invention

[0004] The embodiments of the present invention provide a method and device for detecting the operating status of a system, a storage medium and an electronic device, so as to at least solve the problem of high resource occupancy rate in the method for detecting the operating status of a system in the related art.

[0005] According to an embodiment of the present invention, a method for detecting a system operating status is provided, comprising: in a single-screen multi-system scenario, receiving, by a first operating system, a first touch event triggered in a display area corresponding to a second operating system, wherein the single-screen multi-system is used to describe that multiple display areas of a single screen correspond to multiple operating systems, each of the multiple display areas corresponds to an operating system of the multiple operating systems, and the multiple operating systems include the first operating system and the second operating system; in response to the received first touch event, in a case where the time interval for the second operating system to send a heartbeat packet to the first operating system is not a first time interval, sending a first notification message to the second operating system through the first operating system, wherein the first notification message is used to instruct the second operating system to adjust the time interval for sending the heartbeat packet to the first time interval; in a case where the heartbeat packet sent by the second operating system is continuously received at the first time interval, determining that the second operating system is operating normally.

[0006] According to another embodiment of the present invention, a device for detecting a system operation status is provided, comprising: a first receiving unit, for receiving, in a single-screen multi-system scenario, a first touch event triggered in a display area corresponding to a second operating system through a first operating system, wherein the single-screen multi-system is used to describe that multiple display areas of a single screen correspond to multiple operating systems, each of the multiple display areas corresponds to an operating system of the multiple operating systems, and the multiple operating systems include the first operating system and the second operating system; a first sending unit, for responding to the received first touch event, and sending a first notification message to the second operating system through the first operating system when the time interval for the second operating system to send a heartbeat packet to the first operating system is not the first time interval, wherein the first notification message is used to instruct the second operating system to adjust the time interval for sending the heartbeat packet to the first time interval; and a determining unit, for determining that the second operating system is operating normally when the heartbeat packet sent by the second operating system is continuously received at the first time interval.

[0007] According to yet another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any one of the above method embodiments when run.

[0008] According to yet another embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0009] According to yet another embodiment of the present invention, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.

[0010] Through the present invention, in the scenario of single-screen multi-system, the heartbeat keep-alive mechanism is improved by using cross-system touch events (i.e., the first touch events), and the touch events that the cross-system touch events themselves distribute to the first operating system are used to monitor the running status of the second operating system, thereby avoiding the generation of additional computing power and bandwidth consumption and reducing the performance consumption of the system keep-alive mechanism. Therefore, the problem of high resource occupancy rate in the detection method of the system running status in the related art can be solved, thereby achieving the effect of saving system resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 is a schematic diagram of an application scenario of a method for detecting a system operating status according to an embodiment of the present invention;

[0012] Figure 2 is a flow chart of a method for detecting a system operating state according to an embodiment of the present invention;

[0013] Figure 3 is a schematic diagram of a method for detecting a system operating state according to an embodiment of the present invention;

[0014] Figure 4 is a flow chart of another method for detecting a system operating state according to an embodiment of the present invention;

[0015] Figure 5 It is a structural block diagram of a device for detecting system operating status according to an embodiment of the present invention. DETAILED DESCRIPTION

[0016] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and in combination with the embodiments.

[0017] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0018] For ease of understanding, the technical terms involved in the present invention are explained as follows:

[0019] In-vehicle system: The operating system used in the car is a car software. Currently, in the IVI (In-Vehicle Infotainment, infotainment system for the intelligent cockpit) infotainment domain, the central control is generally an Android system, and the instrument panel is a Linux or QNX system.

[0020] SOC: System On Chip. In the electronics industry, SOC usually refers to system-level chip, also known as system on chip. This chip integrates microprocessor, analog IP core, digital IP core and memory (or off-chip memory control interface) on a single chip, and usually also includes peripheral interfaces such as USB, serial port, Ethernet interface, etc. SOC can be regarded as a microcomputer that contains many functional modules or the entire system. It usually has the advantages of low power consumption, high reliability, high integration and small size. With the development of technology, SOC heterogeneous chip technology has also emerged. A SOC can integrate CPU (Central Processing Unit), GPU (Graphics Processing Unit), NPU (Neural Processing Unit or Neural Network Processing Unit), etc. at the same time, and can run multiple different operating systems at the same time.

[0021] Single screen multiple systems: used to describe that multiple display areas of a single screen correspond to multiple operating systems, and each display area of ​​the multiple display areas corresponds to one operating system of the multiple operating systems. Here, one operating system can correspond to one or more display areas, and one display area can correspond to one operating system. That is, the same screen is divided into different areas, and multiple operating systems are displayed in the corresponding areas respectively, so that multiple systems can run on one screen.

[0022] Single screen dual system: the same screen is divided into different areas, and two operating systems are displayed in the corresponding areas respectively. The two systems can run on one screen, meeting the advantages of high integration and security.

[0023] Touch event: A Touch Event is a series of events generated by the system when a user operates on the touch screen, such as pressing, lifting, moving, etc.

[0024] System keep alive: System keep alive refers to a series of measures taken on a computer system or mobile device to ensure that the application or the system can continue to run. Usually there are two levels: application dimension and system dimension. This invention describes the system dimension, that is, the system can continue to run without freezing.

[0025] Heartbeat mechanism: The heartbeat mechanism is an important technology for monitoring and maintaining system stability. It ensures the validity of the connection and the normal operation of the system by sending custom structures (usually called "heartbeat packets" or "heartbeat frames") at regular intervals.

[0026] The method embodiments provided in the embodiments of the present invention can be executed in a vehicle. Taking a single screen multi-system as a single screen dual system as an example, Figure 1 As shown, Figure 1 is a schematic diagram of an application scenario of a method for detecting a system operating state according to an embodiment of the present invention, such as Figure 1 As shown, the basic structure of the entire single-screen dual-system is: including a first operating system, a second operating system, a synthesizer, and a screen. The first operating system outputs display screen 1, and the second operating system outputs display screen 2. The screen synthesizer synthesizes display screen 1 and display screen 2 together and displays them on a single screen, which is divided into screen area 1 and screen area 2.

[0027] It should be noted that a single-screen multi-system may include two or more operating systems, and the above-mentioned single-screen dual-system is only an example and does not constitute a limitation of the present invention.

[0028] Figure 2 FIG. 1 is a flow chart of a method for detecting a system operating state according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0029] Step S202, in a single-screen multi-system scenario, receiving, through the first operating system, a first touch event triggered in a display area corresponding to the second operating system, wherein the single-screen multi-system is used to describe that multiple display areas of a single screen correspond to multiple operating systems, each display area in the multiple display areas corresponds to an operating system of the multiple operating systems, and the multiple operating systems include the first operating system and the second operating system;

[0030] A method for detecting the system operating status in an embodiment of the present invention can be applied to keep the system alive in a single-screen multi-system scenario. Touch events of the single-screen multi-system are distributed to multiple operating systems at the same time, and based on this, a system keep-alive method for dynamically adjusting the responsiveness of the heartbeat mechanism (i.e., the frequency of heartbeat packet sending) is implemented.

[0031] The common keep-alive mechanism and strategy is to implement it through the heartbeat mechanism, that is, by sending out signals at a fixed period when the system is alive, such as a fixed time interval of 10s or 20s, and then receiving it by another system. If the heartbeat signal is not received after a period of time, the first system is considered to be inactive, and the second system will restart the first system, thus achieving keep-alive.

[0032] However, this keep-alive strategy also has obvious disadvantages. For example, it can only monitor the situation where the system process is stuck, but it cannot detect if the page is frozen. Or there may be misjudgments, such as the heartbeat packet occasionally being blocked and delayed but the system is recoverable. In addition, the heartbeat mechanism will bring additional computing power and bandwidth consumption, affecting real-time performance.

[0033] In order to at least partially solve the above problems, in this embodiment, the touch events of a single-screen multi-system are used to improve the efficiency of system keep-alive, and more efficiently detect system deactivation (i.e., system operation abnormalities). In the scenario based on a single-screen multi-system, the keep-alive method has fewer false alarms and consumes less resources, thereby improving the user experience.

[0034] Optionally, in this embodiment, when a target object interacting with a display terminal running a single-screen multi-system triggers a first touch event in a display area corresponding to a second operating system, the first touch event can be distributed to multiple operating systems including the second operating system. In this embodiment, taking the first operating system receiving the first touch event as an example, the first operating system can refer to any operating system among the multiple operating systems except the second operating system. Optionally, the display area corresponding to the first operating system can be the display area closest to the display area corresponding to the second operating system, or the first operating system can be the operating system that currently occupies the least resources, etc. This is not limited in this embodiment.

[0035] Step S204, in response to the received first touch event, when the time interval for the second operating system to send heartbeat packets to the first operating system is not the first time interval, sending a first notification message to the second operating system through the first operating system, wherein the first notification message is used to instruct the second operating system to adjust the time interval for sending heartbeat packets to the first time interval;

[0036] For the second operating system, when the system is alive, that is, when the second operating system runs normally, a heartbeat packet can be sent to the first operating system at a certain time interval.

[0037] For the first operating system, when the first operating system receives a first touch event and the time interval for the second operating system to send a heartbeat packet to the first operating system is not the first time interval, a first notification message is sent to the second operating system, wherein the first notification message is used to instruct the second operating system to adjust the time interval for sending the heartbeat packet to the first time interval.

[0038] For example, in this embodiment, taking the first operating system as the Android system, the second operating system as the Linux system, and the first time interval as 10s, if the time interval for the Linux system to send heartbeat packets to the Android system is 15s, the Android system can send a notification message to the Linux system to instruct the Linux system to adjust the time interval for sending heartbeat packets to 10s.

[0039] Optionally, the first operating system determines whether the time interval for the second operating system to send a heartbeat packet to the first operating system is the first time interval based on the difference between the heartbeat packet sending times carried in two adjacent heartbeat packets received by the first operating system, or based on the difference between the receiving times of two adjacent heartbeat packets received by the first operating system, or other determination methods, which are not limited to this in this embodiment.

[0040] Optionally, in this embodiment, when the second operating system receives the first touch event, if the second operating system determines that the time interval for sending heartbeat packets to the first operating system is not the first time interval, the second operating system may adjust the time interval for sending heartbeat packets to the first time interval. When the first operating system receives the first touch event, it may determine whether the second operating system is operating abnormally, that is, whether it is inactivated, based on whether the time interval for sending heartbeat packets from the second operating system to the first operating system is the first time interval.

[0041] Step S206: When the heartbeat packets sent by the second operating system are continuously received at the first time interval, it is determined that the second operating system is running normally.

[0042] Optionally, if the first operating system continuously receives the heartbeat packets sent by the second operating system at the first time interval, it is determined that the second operating system is running normally. The way in which the first operating system determines whether the time interval for the second operating system to send heartbeat packets to the first operating system is the first time interval can be similar to the above embodiment and will not be described in detail here.

[0043] Through the above steps, in a single-screen multi-system scenario, a first touch event triggered in a display area corresponding to a second operating system is received through the first operating system, wherein single-screen multi-system is used to describe that multiple display areas of a single screen correspond to multiple operating systems, each display area in the multiple display areas corresponds to an operating system of the multiple operating systems, and the multiple operating systems include a first operating system and a second operating system; in response to the received first touch event, when the time interval for the second operating system to send a heartbeat packet to the first operating system is not the first time interval, a first notification message is sent to the second operating system through the first operating system, wherein the first notification message is used to instruct the second operating system to adjust the time interval for sending heartbeat packets to the first time interval; when the heartbeat packets sent by the second operating system are continuously received at the first time interval, it is determined that the second operating system is operating normally, which solves the problem of high resource usage in the method for detecting the system operating status in the related art.

[0044] In an exemplary embodiment, after receiving, through the first operating system, a first touch event triggered in a display area corresponding to the second operating system, the method further includes:

[0045] S11, starting a touch end timeout detection, wherein the touch end timeout detection is used to detect a duration of time when no new touch event is received, starting from the moment of receiving the first touch event;

[0046] S12: When the detected duration reaches the first duration, a second notification message is sent to the second operating system through the first operating system, wherein the second notification message is used to indicate that the time interval for the second operating system to send heartbeat packets is adjusted to a second time interval, and the second time interval is greater than the first time interval.

[0047] Shortening the heartbeat packet sending time interval can detect system inactivation more quickly, thereby quickly resolving the system inactivation problem, for example, immediately restarting, or immediately re-establishing the connection, etc. For vehicle-mounted systems, a shorter heartbeat packet sending time interval can ensure system stability.

[0048] When the system is under low load, appropriately increasing the time interval for sending heartbeat packets can improve the overall operating efficiency of the system.

[0049] Optionally, in this embodiment, when the target object triggers a first touch event in the display area corresponding to the second operating system, the heartbeat mechanism of the second operating system can be controlled to enter a high-response mode, that is, the time interval for sending heartbeat packets is adjusted to a first time interval; when the target object does not trigger a new touch event in the display area corresponding to the second operating system for a certain period of time (for example, a first duration), the heartbeat mechanism of the second operating system can be controlled to enter a low-response mode, that is, the time interval for sending heartbeat packets by the second operating system is adjusted to a second time interval, and the second time interval is greater than the first time interval.

[0050] For example, in the present embodiment, the responsiveness of the heartbeat mechanism is divided into a high response mode and a low response mode. In the high response mode, the frequency of the heartbeat packet transmission will increase, so that the response speed of the entire keep-alive mechanism is accelerated, and the system can be restored in time in the event of a system crash. In the low response mode, the frequency of the heartbeat packet transmission will decrease, so that the response speed of the entire keep-alive mechanism becomes slower, and a greater tolerance can be provided for the system freeze when the user does not use the screen, so that the system can automatically return to normal as much as possible. In the high response mode, the consumption of resources will be greater, and in the low response mode, the consumption of resources will be smaller. By dynamically adjusting the responsiveness of the heartbeat mechanism, the system keep-alive mechanism can be made more efficient.

[0051] Optionally, for the first operating system, when a first touch event is received, a touch end timeout detection can be started. The touch end timeout detection is used to detect the duration of time without receiving a new touch event starting from the moment the first touch event is received. When the detected duration reaches the first duration, a notification message can be sent to the second operating system to instruct the second operating system to adjust the time interval for sending heartbeat packets to a second time interval, and the second time interval is greater than the first time interval.

[0052] Through this embodiment, the heartbeat mechanism of the system is dynamically adjusted based on the system load condition, so as to ensure that the system can effectively utilize resources and maintain the stability of system operation while meeting the real-time requirements.

[0053] In an exemplary embodiment, the touch end timeout detection records the detected duration by a first timer; after starting the touch end timeout detection, the method further includes:

[0054] S21, when the timing time of the first timer does not reach the first duration, receiving, through the first operating system, a second touch event triggered in the display area corresponding to the second operating system, wherein the second touch event is a touch event triggered in the display area corresponding to the second operating system after the first touch event;

[0055] S22, in response to the received second touch event, interrupting the first timer, and controlling the first timer to restart timing from the moment when the second touch event is received;

[0056] S23, when the timing time of the first timer reaches the first duration, sending a third notification message to the second operating system through the first operating system, wherein the third notification message is used to indicate that the time interval for sending heartbeat packets by the second operating system is adjusted to a third time interval, the third time interval is greater than the first time interval, and the first duration is greater than the first time interval.

[0057] When the target object triggers a first touch event in the display area corresponding to the second operating system, the heartbeat mechanism of the second operating system can be controlled to enter a high-response mode, and the first operating system can be controlled to start touch end timeout detection, that is, the time interval for sending heartbeat packets is adjusted to the first time interval, and based on the touch end timeout detection, it is determined whether it is necessary to control the heartbeat mechanism of the second operating system to enter a low-response mode, that is, the touch end timeout detection is used to trigger the increase of the heartbeat packet sending time interval when it is detected that the duration without receiving a new touch event reaches a first duration starting from the receiving time of the first touch event, and the time interval for sending heartbeat packets by the second operating system is adjusted to a third time interval, and the third time interval is greater than the first time interval.

[0058] When the target object triggers a new touch event in the display area corresponding to the second operating system, and the time interval between the new touch event and the first touch event is less than the first duration, the first operating system is controlled to interrupt the touch end timeout detection, and restart the touch end timeout detection when the new touch event is received, that is, to detect whether the duration of the latest touch event received reaches the first duration.

[0059] For the first operating system, taking the duration detected by recording the first timer during the touch end timeout detection as an example, if the timing time of the first timer does not reach the first duration, if a second touch event triggered in the display area corresponding to the second operating system is received through the first operating system, wherein the second touch event is a touch event triggered in the display area corresponding to the second operating system after the first touch event; in response to the received second touch event, the first timer is interrupted, and the first timer is controlled to restart timing from the moment the second touch event is received; if after the second touch event, the first operating system receives a new touch event, and the timing time of the first timer does not reach the first duration when the new touch event is received, then in response to the received new touch event, the first timer is interrupted, and the first timer is controlled to restart timing from the moment the new touch event is received, until the timing time of the first timer reaches the first duration, at this time, a third notification message can be sent to the second operating system, wherein the third notification message is used to indicate that the time interval for sending heartbeat packets by the second operating system is adjusted to a third time interval, and the third time interval is greater than the first time interval.

[0060] It should be noted that the first duration should be greater than the first time interval. Optionally, the first duration can be set based on the experience value of historical data of the system, or can be dynamically adjusted based on the event type of the touch event, which is not limited in this embodiment.

[0061] Through this embodiment, when the duration starting from the time of receiving the latest touch event reaches a preset duration, the control system increases the time interval for sending heartbeat packets, which can reduce the consumption of network bandwidth and system resources.

[0062] In an exemplary embodiment, a touch event triggered by a display area corresponding to the second operating system is sent by a screen touch driver to the first operating system and the second operating system respectively, and the second operating system receives the touch event sent by the screen touch driver earlier than the other operating systems among the multiple operating systems except the second operating system receive the touch event sent by the screen touch driver;

[0063] Receiving, by the first operating system, a first touch event triggered in a display area corresponding to the second operating system, includes:

[0064] S31, receiving, through a first operating system, a first touch event filtered by a filter, wherein the filter is used to limit a rate at which a screen touch driver sends touch events to the first operating system.

[0065] Taking a single screen with multiple systems including a first operating system and a second operating system as an example, Figure 3 The main process of cross-system touch events is: the target object operates the screen to generate a touch signal, the screen touch driver processes to generate a touch event, and the touch event is transmitted to the first operating system and the second operating system respectively by distributing the touch event.

[0066] Optionally, when the target object generates a first touch event triggered by a touch signal in the display area corresponding to the second operating system, a filter can be added when distributing it to the first operating system to limit the distribution frequency and avoid the additional performance overhead caused by too fast touch events. Correspondingly, due to the addition of the filter, the time when the second operating system receives the touch event sent by the screen touch driver should be earlier than the time when other operating systems other than the second operating system among the multiple operating systems receive the touch event sent by the screen touch driver.

[0067] Through this embodiment, the touch events generated based on the touch signals generated in the display areas corresponding to other operating systems can reduce the distribution rate of the touch events by filtering through filters when distributed to the current operating system, thereby avoiding excessive occupation of system resources.

[0068] In an exemplary embodiment, when the heartbeat packets sent by the second operating system are continuously received at the first time interval, determining that the second operating system is running normally includes:

[0069] S41, when a heartbeat packet sent by the second operating system is received through the first operating system, resetting a second timer, wherein the second timer is used to time the reception time interval between two adjacent heartbeat packets;

[0070] S42, when a new heartbeat packet is received before the timing time of the second timer reaches the specified timing time and the new heartbeat packet is verified, it is determined that the second operating system is running normally, wherein the specified timing time is greater than the first time interval.

[0071] In order to facilitate determining the time interval for receiving the heartbeat packet, the first operating system may configure a second timer, the second timer is used to time the time interval for receiving two adjacent heartbeat packets, and the second timer may be reset and cleared when a new heartbeat packet is received, and restart the timing. That is, when a heartbeat packet sent by the second operating system is received through the first operating system, the second timer is reset.

[0072] If the first operating system receives a new heartbeat packet sent by the second operating system before the timing time of the second timer reaches the specified timing time, and the new heartbeat packet is verified, it is determined that the second operating system is running normally.

[0073] It should be noted that, considering factors such as network delay, the specified timing time may be set to be greater than the first time interval.

[0074] Optionally, the heartbeat packet verification may include the following steps:

[0075] 1. Receiving a heartbeat packet: The first operating system receives a heartbeat packet sent by the second operating system.

[0076] 2. Verify the contents of the heartbeat packet: Integrity check: Check whether the heartbeat packet is complete and there is no data damage. Format check: Verify whether the format of the heartbeat packet conforms to the expected structure.

[0077] 3. Timestamp check: Freshness check: First, the operating system can check the timestamp in the heartbeat packet to ensure that it is sent within a reasonable time frame to prevent replay attacks.

[0078] In an exemplary embodiment, after sending the first notification message to the second operating system through the first operating system, the method further includes:

[0079] S51, when a duration of not receiving a heartbeat packet sent by the second operating system is greater than or equal to a second duration, determining that the second operating system is operating abnormally, and performing a restart operation on the second operating system, wherein the second duration is greater than the first time interval.

[0080] Similar to the above-mentioned embodiment, considering factors such as network delay, the time interval of receiving time of adjacent heartbeat packets whose sending time interval is less than or equal to the first time interval may be greater than the first time interval. In this embodiment, whether the heartbeat packet received by the first operating system has timed out is determined based on a second time duration slightly greater than the first time interval. Optionally, the second time duration can be determined based on factors that affect the transmission time of the heartbeat packet, such as network delay.

[0081] For the first operating system, when the duration of not receiving the heartbeat packet sent by the second operating system is greater than or equal to the second duration, it can be determined that the second operating system is operating abnormally, and a restart operation is performed on the second operating system.

[0082] Through this embodiment, the system inactivation is determined based on whether the time difference between the reception times of adjacent heartbeat packets is within a preset time range, which can reduce misjudgment. When the system inactivation is confirmed, the system can be restarted and restored in time to improve the system survival efficiency.

[0083] In an exemplary embodiment, after sending the first notification message to the second operating system through the first operating system, the method further includes:

[0084] S61, in response to the received first notification message, periodically sending a heartbeat packet according to a first time interval through the second operating system, wherein the first time interval is indicated by pre-configured time interval indication information; or,

[0085] S62, in response to the received first notification message, extracting time interval indication information from the first notification message through the second operating system, wherein the time interval indication information is used to indicate that the time interval for sending the heartbeat packet is adjusted to the first time interval;

[0086] S63: Periodically send a heartbeat packet according to the first time interval indicated by the time interval indication information.

[0087] Optionally, in this embodiment, the first time interval may be pre-configured, that is, the first time interval may be pre-agreed upon by the first operating system and the second operating system; the first time interval may also be specified by the first operating system to the second operating system in real time based on indicators such as network delay, packet loss rate, and system resource usage; or other configuration methods may be used to enable the two operating systems to determine whether the system is inactive based on a unified time interval, which is not limited in this embodiment.

[0088] As an optional exemplary embodiment, a method for detecting the system operating status of the present invention is explained by taking a single-screen multi-system as a dual system as an example.

[0089] Single-screen dual-system is a common implementation method in the automotive field. The same screen is divided into different areas to display two or more operating systems, such as QNX system and Android system at the same time. In addition, the SOC heterogeneous chip technology currently used in the automotive cockpit domain can run two or more operating systems on a single SOC chip, which also facilitates the implementation of single-screen dual-system.

[0090] The essence of cross-system touch events is the cross-system flow of touch events. The main process is as follows: Figure 3 As shown, the target object operates the screen to generate a touch signal, which is processed by the screen touch driver to generate a touch event, and the touch event is transmitted to the first operating system and the second operating system respectively by distributing the touch event.

[0091] Assuming that the user performs an operation on the second screen area, optionally, a filter can be added when distributing to the first operating system to limit the distribution frequency and avoid the extra performance overhead caused by too fast touch events. The aforementioned touch event generated on the second screen area and distributed to the first operating system is a cross-system touch event, that is, the first touch event, the second touch event, etc. in the aforementioned embodiment are all cross-system touch events.

[0092] Combination Figure 4 In this embodiment, the second operating system receives the touch event and sends a heartbeat packet, and the first operating system receives the cross-system touch event and the heartbeat packet. The entire process is described as follows:

[0093] Step 1, the second operating system receives a cross-system touch event;

[0094] Step 2: The first operating system receives a cross-system touch event and starts touch end timeout detection at the same time;

[0095] Step 3, the first operating system replies an instruction to the second operating system, so that the heartbeat mechanism enters a high response mode, that is, controls the second operating system to execute step 7;

[0096] Step 4, generating a new cross-system touch event;

[0097] Step 5, the first operating system interrupts the touch control end timeout detection;

[0098] Step 6: The first operating system restarts the touch end timeout detection.

[0099] Step 7, the heartbeat mechanism of the second operating system enters or maintains a high response mode, which means that the sending time period of the heartbeat packet will be shortened (the time interval between heartbeat packet 1 and heartbeat packet 2, for example, the first time interval), and the corresponding timeout time set at one end of the receiving heartbeat packet will also be shortened.

[0100] Step 8: When the user does not operate the screen for a period of time, the touch end timeout detection is triggered;

[0101] Step 9, the first operating system replies an instruction to the second operating system, causing the heartbeat mechanism to enter a low response mode, that is, controlling the second operating system to execute step 10;

[0102] Step 10, the heartbeat mechanism of the second operating system enters a low response mode, which means that the sending time period of the heartbeat packet will be longer (the time interval between heartbeat packet 8 and heartbeat packet 9, for example, the second time interval), and the corresponding timeout time set at one end of the receiving heartbeat packet will also be longer.

[0103] In this embodiment, the resource consumption in the high response mode is greater, and the resource consumption in the low response mode is smaller. By dynamically adjusting the responsiveness of the heartbeat mechanism, the system keep-alive mechanism can be made more efficient.

[0104] In this embodiment, in a scenario based on a single screen and dual systems, the heartbeat keep-alive mechanism can be improved by using cross-system touch events, forming a method for dynamically adjusting the responsiveness of the heartbeat mechanism and improving the efficiency of the keep-alive mechanism. The cross-system touch events and the responsiveness of the heartbeat mechanism are creatively defined, and divided into a high response mode and a low response mode, as well as dynamic switching between the two modes, thereby more accurately improving the efficiency and performance consumption of the system keep-alive mechanism.

[0105] Through this embodiment, in a scenario based on a single screen and dual systems, the heartbeat keep-alive mechanism can be improved by utilizing cross-system touch events, thereby forming a method for dynamically adjusting the responsiveness of the heartbeat mechanism, thereby improving the efficiency of the keep-alive mechanism and avoiding the shortcomings of the related technology that the keep-alive mechanism has high performance overhead and the responsiveness of the heartbeat mechanism cannot be dynamically adjusted.

[0106] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of various embodiments of the present invention.

[0107] In this embodiment, a detection device for the system operating state is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0108] Figure 5 is a structural block diagram of a detection device for system operation status provided by an embodiment of the present invention, such as Figure 5 As shown, the device comprises:

[0109] A first receiving unit 502 is used to receive, through the first operating system, a first touch event triggered in a display area corresponding to the second operating system in a single-screen multi-system scenario, wherein the single-screen multi-system is used to describe that multiple display areas of a single screen correspond to multiple operating systems, each display area in the multiple display areas corresponds to an operating system of the multiple operating systems, and the multiple operating systems include the first operating system and the second operating system;

[0110] A first sending unit 504 is configured to, in response to the received first touch event, send a first notification message to the second operating system through the first operating system when the time interval for the second operating system to send the heartbeat packet to the first operating system is not the first time interval, wherein the first notification message is used to instruct the second operating system to adjust the time interval for sending the heartbeat packet to the first time interval;

[0111] The determining unit 506 is configured to determine that the second operating system is running normally when the heartbeat packets sent by the second operating system are continuously received at the first time interval.

[0112] It should be noted that the first receiving unit 502 in this embodiment can be used to execute the above step S202, the first sending unit 504 in this embodiment can be used to execute the above step S204, and the determining unit 506 in this embodiment can be used to execute the above step S206.

[0113] Through the embodiments of the present invention, in a single-screen multi-system scenario, a first touch event triggered in a display area corresponding to a second operating system is received by a first operating system, wherein single-screen multi-system is used to describe that multiple display areas of a single screen correspond to multiple operating systems, each display area in the multiple display areas corresponds to an operating system of the multiple operating systems, and the multiple operating systems include a first operating system and a second operating system; in response to the received first touch event, when the time interval for the second operating system to send a heartbeat packet to the first operating system is not the first time interval, a first notification message is sent to the second operating system through the first operating system, wherein the first notification message is used to instruct the second operating system to adjust the time interval for sending heartbeat packets to the first time interval; when the heartbeat packets sent by the second operating system are continuously received at the first time interval, it is determined that the second operating system is operating normally, thereby solving the problem of high resource usage in the method for detecting the system operating status in the related art.

[0114] In an exemplary embodiment, the above device further comprises:

[0115] a start unit, configured to start a touch end timeout detection after receiving, through the first operating system, a first touch event triggered in a display area corresponding to the second operating system, wherein the touch end timeout detection is configured to detect a duration of time when no new touch event is received, starting from the time when the first touch event is received;

[0116] The second sending unit is used to send a second notification message to the second operating system through the first operating system when the detected duration reaches the first duration, wherein the second notification message is used to indicate that the time interval for sending heartbeat packets by the second operating system is adjusted to a second time interval, and the second time interval is greater than the first time interval.

[0117] In an exemplary embodiment, the above device further comprises:

[0118] A second receiving unit is configured to record the duration detected by the first timer during touch end timeout detection; after starting the touch end timeout detection, if the timing time of the first timer does not reach the first duration, receive, through the first operating system, a second touch event triggered in the display area corresponding to the second operating system, wherein the second touch event is a touch event triggered in the display area corresponding to the second operating system after the first touch event;

[0119] A first execution unit, configured to interrupt the first timer in response to the received second touch event, and control the first timer to restart timing from the moment when the second touch event is received;

[0120] A third sending unit is used to send a third notification message to the second operating system through the first operating system when the timing time of the first timer reaches the first duration, wherein the third notification message is used to indicate that the time interval for sending heartbeat packets by the second operating system is adjusted to a third time interval, the third time interval is greater than the first time interval, and the first duration is greater than the first time interval.

[0121] In an exemplary embodiment, a touch event triggered by a display area corresponding to the second operating system is sent by a screen touch driver to the first operating system and the second operating system respectively, and the second operating system receives the touch event sent by the screen touch driver earlier than the other operating systems among the multiple operating systems except the second operating system receive the touch event sent by the screen touch driver;

[0122] The first receiving unit comprises:

[0123] The receiving module is used to receive, through the first operating system, a first touch event filtered by a filter, wherein the filter is used to limit a rate at which the screen touch driver sends touch events to the first operating system.

[0124] In an exemplary embodiment, the determining unit includes:

[0125] A reset module, configured to reset a second timer when a heartbeat packet sent by the second operating system is received through the first operating system, wherein the second timer is configured to time the reception time interval between two adjacent heartbeat packets;

[0126] The determination module is used to determine that the second operating system is running normally when a new heartbeat packet is received before the timing time of the second timer reaches the specified timing time and the new heartbeat packet is verified, wherein the specified timing time is greater than the first time interval.

[0127] In an exemplary embodiment, the above device further comprises:

[0128] The second execution unit is used to determine that the second operating system is operating abnormally and perform a restart operation on the second operating system after sending a first notification message to the second operating system through the first operating system if the duration of not receiving a heartbeat packet sent by the second operating system is greater than or equal to a second duration, wherein the second duration is greater than the first time interval.

[0129] In an exemplary embodiment, the above device further comprises:

[0130] a fourth sending unit, configured to, after sending the first notification message to the second operating system through the first operating system, periodically send a heartbeat packet through the second operating system at a first time interval in response to the received first notification message, wherein the first time interval is indicated by pre-configured time interval indication information; or

[0131] an extracting unit, configured to extract time interval indication information from the first notification message through the second operating system in response to the received first notification message, wherein the time interval indication information is used to indicate that the time interval for sending the heartbeat packet is adjusted to the first time interval;

[0132] The fifth sending unit periodically sends the heartbeat packet according to the first time interval indicated by the time interval indication information.

[0133] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0134] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0135] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0136] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0137] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0138] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0139] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.

[0140] An embodiment of the present invention further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0141] An embodiment of the present invention also provides a computer program, which includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in any one of the above-mentioned method embodiments.

[0142] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0143] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for detecting the operating status of a system, It is characterized in that include: In a single-screen multi-system scenario, a first touch event triggered in a display area corresponding to a second operating system is received by a first operating system, wherein the single-screen multi-system is used to describe that multiple display areas of a single screen correspond to multiple operating systems, each of the multiple display areas corresponds to one operating system of the multiple operating systems, and the multiple operating systems include the first operating system and the second operating system; In response to the received first touch event, when the time interval for the second operating system to send heartbeat packets to the first operating system is not the first time interval, sending a first notification message to the second operating system through the first operating system, wherein the first notification message is used to instruct the second operating system to adjust the time interval for sending the heartbeat packets to the first time interval; In a case where the heartbeat packets sent by the second operating system are continuously received at the first time interval, it is determined that the second operating system is running normally.

2. The method according to claim 1, It is characterized in that After receiving, by the first operating system, a first touch event triggered by a display area corresponding to the second operating system, the method further includes: Initiate touch end timeout detection, wherein the touch end timeout detection is used to detect a duration of time during which no new touch event is received, starting from the moment of receiving the first touch event; When the detected duration reaches a first duration, a second notification message is sent to the second operating system through the first operating system, wherein the second notification message is used to indicate that the time interval for sending the heartbeat packet by the second operating system is adjusted to a second time interval, and the second time interval is greater than the first time interval.

3. The method according to claim 2, It is characterized in that During the touch end timeout detection, a first timer is used to record the detected duration; After the touch control end timeout detection is started, the method further includes: When the timing time of the first timer does not reach the first duration, receiving, through the first operating system, a second touch event triggered in the display area corresponding to the second operating system, wherein the second touch event is a touch event triggered in the display area corresponding to the second operating system after the first touch event; In response to the received second touch event, interrupting the first timer, and controlling the first timer to restart timing from the moment when the second touch event is received; When the timing time of the first timer reaches the first duration, a third notification message is sent to the second operating system through the first operating system, wherein the third notification message is used to indicate that the time interval for sending heartbeat packets by the second operating system is adjusted to a third time interval, the third time interval is greater than the first time interval, and the first duration is greater than the first time interval.

4. The method according to claim 1, It is characterized in that A touch event triggered in the display area corresponding to the second operating system is sent by the screen touch driver to the first operating system and the second operating system respectively, and the second operating system receives the touch event sent by the screen touch driver earlier than the other operating systems among the multiple operating systems except the second operating system receive the touch event sent by the screen touch driver; The receiving, by the first operating system, a first touch event triggered in a display area corresponding to the second operating system includes: The first touch event filtered by a filter is received through the first operating system, wherein the filter is used to limit a rate at which the screen touch driver sends touch events to the first operating system.

5. The method according to claim 1, It is characterized in that The step of determining that the second operating system is running normally when the heartbeat packets sent by the second operating system are continuously received at the first time interval includes: When a heartbeat packet sent by the second operating system is received through the first operating system, a second timer is reset, wherein the second timer is used to time the reception time interval of two adjacent heartbeat packets; When a new heartbeat packet is received before the timing time of the second timer reaches the specified timing time and the new heartbeat packet is verified, it is determined that the second operating system is running normally, wherein the specified timing time is greater than the first time interval.

6. The method according to claim 1, It is characterized in that After sending the first notification message to the second operating system through the first operating system, the method further includes: When the duration of not receiving the heartbeat packet sent by the second operating system is greater than or equal to a second duration, it is determined that the second operating system is operating abnormally, and a restart operation is performed on the second operating system, wherein the second duration is greater than the first time interval.

7. The method according to any one of claims 1 to 6, It is characterized in that After sending the first notification message to the second operating system through the first operating system, the method further includes: In response to the received first notification message, periodically sending the heartbeat packet according to the first time interval by the second operating system, wherein the first time interval is indicated by pre-configured time interval indication information; or, In response to the first notification message received, the second operating system extracts time interval indication information from the first notification message, wherein the time interval indication information is used to indicate that the time interval for sending the heartbeat packet is adjusted to the first time interval; and the heartbeat packet is periodically sent according to the first time interval indicated by the time interval indication information.

8. A device for detecting the operating status of a system, It is characterized in that include: A first receiving unit is used to receive, through a first operating system, a first touch event triggered in a display area corresponding to a second operating system in a single-screen multi-system scenario, wherein the single-screen multi-system is used to describe that multiple display areas of a single screen correspond to multiple operating systems, each of the multiple display areas corresponds to one operating system of the multiple operating systems, and the multiple operating systems include the first operating system and the second operating system; a first sending unit, configured to, in response to the received first touch event, send a first notification message to the second operating system through the first operating system when the time interval for the second operating system to send the heartbeat packet to the first operating system is not the first time interval, wherein the first notification message is used to instruct the second operating system to adjust the time interval for sending the heartbeat packet to the first time interval; A determining unit is configured to determine that the second operating system is running normally when the heartbeat packets sent by the second operating system are continuously received at the first time interval.

9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 7 when executed by a processor.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the steps of the method described in any one of claims 1 to 7 are implemented.