Application program management apparatus, method, vehicle, and storage medium

CN115408230BActive Publication Date: 2026-10-23BEIJING CHJ AUTOMOTIVE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210701618.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-20
Publication Date
2026-10-23
Estimated Expiration
2042-06-20

AI Technical Summary

Technical Problem

因此,Linux系统中的应用程序的可靠性较低

Benefits of technology

[0010]本公开实施例提供一种应用程序管理装置、方法、车辆及存储介质,所述应用程序包括多个子功能模块,所述装置包括:子功能监测模块和系统监测模块;子功能监测模块,用于实时监测各个子功能模块的运行状态,并当任意一个子功能模块处于故障状态时,基于所述故障状态执行相应的故障处理操作;系统监测模块,用于接收所述应用程序的心跳消息,并基于所述心跳消息对所述应用程序进行管理。本公开提供的技术方案中,子功能监测模块对应用程序中的子功能模块进行故障处理,系统监测模块对整个应用程序进行管理,通过两个模块的监测和管理,来保证应用服务的稳定性,可靠性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115408230B_ABST
    Figure CN115408230B_ABST
Patent Text Reader

Abstract

The application discloses an application program management device, method, vehicle and storage medium, the application program comprises a plurality of sub-function modules, the device comprises: a sub-function monitoring module and a system monitoring module; the sub-function monitoring module is used for monitoring the running state of each sub-function module in real time, and when any one sub-function module is in a fault state, corresponding fault handling operation is executed based on the fault state; the system monitoring module is used for receiving heartbeat messages of the application program, and managing the application program based on the heartbeat messages.In the technical scheme provided by the application, the sub-function monitoring module monitors and handles faults of the sub-function modules in the application program, the system monitoring module manages the whole application program, and through the monitoring and management of the two modules, the stability and reliability of the application program are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of vehicle intelligence technology, and in particular to an application management device, method, vehicle, and storage medium. Background Technology

[0002] With the development of vehicle intelligence and connectivity, intelligent vehicles have increasingly higher demands for software systems, and industrial-grade embedded Linux systems have begun to be introduced into the field of intelligent vehicles.

[0003] The Linux system consists of multiple subsystems. Applications running on it need to go through the kernel layer to interact with external hardware. Data interaction requires processing through multiple kernel subsystems, such as process and thread management, memory management, I / O management, file system, and protocol stack. Therefore, applications in Linux systems have relatively low reliability.

[0004] However, as automobiles rapidly evolve towards intelligence, encompassing vehicle control, smart cockpits, voice recognition, and autonomous driving, the increasing number of vehicle functions and the growing volume of data processing place ever higher demands on the reliability and stability of applications within software systems. Therefore, improving the reliability and stability of these applications is a pressing issue that needs to be addressed. Summary of the Invention

[0005] This disclosure provides an application management device, method, vehicle, and storage medium. A sub-function monitoring module handles faults in sub-function modules of the application, while a system monitoring module manages the entire application. Through the monitoring and management of these two modules, the stability and reliability of the application are ensured.

[0006] In a first aspect, embodiments of this disclosure provide an application management device, wherein the application includes multiple sub-functional modules, and the device includes: a sub-functional monitoring module and a system monitoring module; The sub-function monitoring module is used to monitor the operating status of each sub-function module in real time, and when any sub-function module is in a fault state, it performs corresponding fault handling operations based on the fault state. The system monitoring module is used to receive heartbeat messages from the application and manage the application based on the heartbeat messages.

[0007] Secondly, embodiments of this disclosure provide an application management method, wherein the application includes multiple sub-functional modules, the method is applied to the application management device, the device including: a sub-functional monitoring module and a system monitoring module; the method includes: The sub-function monitoring module monitors the operating status of each sub-function module in real time, and when any sub-function module is in a fault state, it performs corresponding fault handling operations based on the fault state. The system monitoring module receives heartbeat messages from the application and manages the application based on these heartbeat messages.

[0008] Thirdly, embodiments of this disclosure provide a vehicle comprising any of the methods described in the first aspect.

[0009] Thirdly, embodiments of this disclosure provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the second aspect above.

[0010] This disclosure provides an application management device, method, vehicle, and storage medium. The application includes multiple sub-functional modules. The device includes a sub-functional monitoring module and a system monitoring module. The sub-functional monitoring module monitors the operating status of each sub-functional module in real time and performs corresponding fault handling operations based on the fault status when any sub-functional module is in a fault state. The system monitoring module receives heartbeat messages from the application and manages the application based on the heartbeat messages. In the technical solution provided by this disclosure, the sub-functional monitoring module handles faults in the sub-functional modules of the application, and the system monitoring module manages the entire application. Through the monitoring and management of these two modules, the stability and reliability of the application service are ensured. Attached Figure Description

[0011] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0012] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 This is a schematic diagram of the structure of an application management device provided in an embodiment of the present disclosure; Figure 2 This is a schematic diagram of the structure of a sub-function monitoring module provided in an embodiment of this disclosure; Figure 3 This is a schematic diagram of the structure of a system monitoring module provided in an embodiment of this disclosure; Figure 4This is a schematic diagram of the structure of a resource management submodule provided in an embodiment of this disclosure; Figure 5 A flowchart illustrating an application management method provided in this embodiment of the disclosure; Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0014] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.

[0015] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0016] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0017] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.

[0018] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0019] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0020] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0021] Figure 1 This is a schematic diagram of an application management device provided in an embodiment of this disclosure. The application management device provided in this embodiment is applicable to situations involving application management and can be implemented using software and / or hardware. The application management device can be configured in an electronic device. The electronic device is a device running a Linux system, including: smartphones, laptops, tablets, digital cameras / camcorders, gaming devices, central control systems in automobiles, etc.

[0022] like Figure 1 As shown, the application management device 10 provided in this embodiment mainly includes: a sub-function monitoring module 11 and a system monitoring module 12, and the application 20 includes multiple sub-function modules 21.

[0023] The sub-function monitoring module 11 is connected to each of the sub-function modules 21 and is used to monitor the operating status of each sub-function module 21 in real time. When any sub-function module 21 is in a fault state, it performs corresponding fault handling operations based on the fault state. The system monitoring module 12 is connected to the application 20 and is used to receive the heartbeat message of the application 20 and manage the application based on the heartbeat message.

[0024] The application can be an APP program installed on a Linux system, such as map applications, audio and video applications, instant messaging applications, shopping applications, etc.

[0025] In one embodiment of this disclosure, the various functions in the application are modularized according to specific business logic. Each sub-function is independently designed as a sub-module, i.e., a sub-functional module, based on the functional logic. Furthermore, coupling between the sub-functional modules is minimized, and data interaction is achieved using a message communication mechanism. All sub-functional modules are implemented using asynchronous I / O of the Linux system.

[0026] Specifically, such as Figure 1 As shown, sub-functional modules 21 are business logic modules in the application. Each sub-functional module 21 completes a sub-functional logic, and multiple sub-functional logics are combined to form the functionality of the entire application. For example, in a map application, it includes: a sub-functional module for implementing location functionality, a sub-functional module for implementing navigation functionality, a sub-functional module for implementing route planning, a sub-functional module for implementing message notifications, and so on.

[0027] In one embodiment of this disclosure, such as Figure 1As shown, the sub-function monitoring module 11 is connected to each of the sub-function modules 21 respectively, and monitors the operating status of each sub-function module 21 in real time. When any sub-function module 21 is detected to be in a fault state, the corresponding fault handling operation is performed based on the fault state.

[0028] Specifically, performing the corresponding fault handling operations may include: restarting the sub-functional module that is in a faulty state, shutting down the sub-functional module that is in a faulty state, and shutting down and restarting the entire application.

[0029] In this embodiment, when the sub-function monitoring module detects that a sub-function module is in a fault state, it can only process the sub-function module in the fault state. Since each sub-function module is independent of the others, this can ensure the normal operation of other sub-function modules in the application, thereby ensuring the continuous availability of the application's functional services.

[0030] Heartbeat messages are periodic or repetitive messages sent continuously from application startup until application shutdown. If the system monitoring module does not receive a heartbeat message within a certain heartbeat message reception period, the system monitoring module may assume that the application has malfunctioned or is currently unavailable.

[0031] In this embodiment, the system monitoring module manages the application based on the heartbeat message, which mainly includes: when the system monitoring module does not receive a heartbeat message within a certain heartbeat message receiving period, it indicates that the application has malfunctioned. At this time, the system monitoring module controls the application to restart in order to ensure the reliability of the application.

[0032] This disclosure provides an application management device, including: a sub-function monitoring module and a system monitoring module; the sub-function monitoring module is used to monitor the operating status of each sub-function module in real time, and when any sub-function module is in a fault state, it performs corresponding fault handling operations based on the fault state; the system monitoring module is used to receive heartbeat messages from the application and manage the application based on the heartbeat messages. In the technical solution provided by this disclosure, the sub-function monitoring module monitors and handles faults in the sub-function modules of the application, while the system monitoring module manages the entire application. Through the monitoring and management of these two modules, the stability and reliability of the application service are ensured.

[0033] Based on the above embodiments, the present disclosure further optimizes the sub-function monitoring module. Figure 2 This is a schematic diagram of the structure of a sub-function monitoring module provided in an embodiment of this disclosure, such as... Figure 2 As shown, the sub-function monitoring module 11 includes: a sentinel sub-module 13 and a fault handling sub-module 14.

[0034] The sentinel submodule 13 is used to determine the fault level corresponding to the fault state based on the fault state and a pre-set correspondence between fault states and fault levels; the fault processing submodule 14 is used to determine the fault processing operation corresponding to the fault state based on the fault level and execute the fault processing operation.

[0035] In one embodiment of this disclosure, the sentinel submodule 13 is primarily responsible for fault tolerance processing of the application, monitoring the fault status of all sub-functional modules in the application, and determining the fault level corresponding to the fault status if a fault occurs. Specifically, the sentinel submodule 13 pre-stores the correspondence between fault statuses and fault levels. When a fault status is detected in a sub-functional module, it queries the aforementioned correspondence and determines the fault level corresponding to the fault status.

[0036] Furthermore, the fault handling submodule 14 is connected to the sentinel submodule 13, receives the fault level sent by the sentinel submodule 13, and determines whether to restart the sub-function module, shut down the sub-function module, or report the fault status to the next higher level based on the processing logic corresponding to the fault level.

[0037] Based on the above embodiments, the sub-function monitoring module further includes a runtime management sub-module 15. During the runtime of the entire application, the runtime management sub-module 15 is responsible for the core functions of the entire application, such as resource management, sub-function module management, and error management.

[0038] In this embodiment, by setting corresponding fault levels for all fault states, different fault handling operations are performed based on the fault levels corresponding to the fault states, so as to further ensure the continuous availability of the application.

[0039] In one embodiment of this disclosure, the fault handling submodule 14 includes: a subfunction restart unit, a subfunction shutdown unit, and a heartbeat stop unit; wherein, the subfunction restart unit is used to control the subfunction module to restart when the fault level is a first-level fault; the subfunction shutdown unit is used to control the subfunction module to shut down when the fault level is a second-level fault; and the heartbeat stop unit is used to control the application corresponding to the subfunction module to stop its heartbeat when the fault level is a third-level fault, wherein the severity of the third-level fault is greater than the severity of the second-level fault, and the severity of the second-level fault is greater than the severity of the first-level fault.

[0040] In this embodiment, the fault handling of each submodule requires the implementation of a standard fault handling interface. That is, the subfunction restart unit, the subfunction shutdown unit, and the heartbeat stop unit can be implemented through the standard fault handling interface.

[0041] In this embodiment, a Level 1 fault can be understood as a fault that can be resolved by restarting the sub-functional module. When the fault level is Level 1, it indicates that a restart anomaly has occurred within the corresponding sub-functional module. The sub-functional module is restarted by the sub-functional restart unit to quickly restore it to an available state. This monitoring and restart operation can be performed in real time and is very fast.

[0042] Specifically, the sub-function restart unit can be implemented through the OnRstart function callback interface.

[0043] In this embodiment, a Level 2 fault can be understood as a fault where a sub-functional module still cannot be used normally after restarting, and may even affect the normal use of other sub-functional modules. In this case, it is necessary to shut down the sub-functional module and stop the use of its corresponding functions to ensure the normal use of other sub-functional modules in the application. When the fault level is Level 2, it indicates that an anomaly has occurred within the corresponding sub-functional module, requiring the module to be shut down. The sub-functional module is shut down by the sub-functional shutdown unit, i.e., the sub-functional module is removed from the task queue and no longer scheduled for execution.

[0044] Specifically, the sub-function restart unit can be implemented through the OnStop function callback interface.

[0045] In this embodiment, a Level 3 fault can be understood as a very serious fault occurring within the sub-functional module, requiring a restart of the application corresponding to the sub-functional module to resolve the fault. When the fault level is Level 3, the heartbeat stop unit controls the heartbeat of the application corresponding to the sub-functional module to stop. That is, the heartbeat of the application is immediately stopped, and the entire application exits. The application is then restarted and restored through the application restart sub-module in the system monitoring module.

[0046] In this embodiment, three different handling measures are implemented for different levels of faults: restarting the sub-function module, stopping the sub-function module, and stopping the application. Fault handling is implemented through an interface, which can achieve the advantages of fast monitoring speed and fast restart and recovery after program error.

[0047] Based on the above embodiments, the present disclosure further optimizes the system monitoring module. Figure 3 This is a schematic diagram of the structure of a system monitoring module provided in an embodiment of this disclosure, as shown below. Figure 3As shown, the system monitoring module 12 includes: a communication submodule 16, a heartbeat message listening submodule 17, and an application restart submodule 18.

[0048] The communication submodule 16 is used to receive heartbeat messages from the application and periodically send them to the heartbeat message listening submodule 17. The heartbeat message listening submodule 17 is used to listen to the heartbeat messages periodically sent by the communication submodule. If no heartbeat message is detected within a set period, it is determined that the heartbeat message is lost and a heartbeat loss message is generated. The application restart submodule 18 is used to receive the heartbeat loss message and control the restart of the application corresponding to the heartbeat loss message.

[0049] In this embodiment, the communication submodule 16 is responsible for communication between the entire system monitoring module 12 and external systems, and is implemented based on the Data Distribution Service (DDS) communication protocol. The application 20 periodically sends heartbeat messages to the communication submodule 16, and the communication submodule 16 forwards the periodically received heartbeat messages to the heartbeat message listening submodule 17.

[0050] In this embodiment, the heartbeat message listening submodule 17 is responsible for listening to the heartbeat messages periodically sent by the application through the communication submodule 16. If no heartbeat message is received within the set period, the heartbeat message listening submodule 17 assumes that the corresponding application may have encountered an anomaly such as freezing or crashing and needs to be restarted. At this time, a heartbeat loss message is generated. The heartbeat loss message is sent to the application restart submodule 18. After receiving the heartbeat loss message, the application restart submodule 18 determines the application corresponding to the heartbeat loss message and controls the application to restart.

[0051] The heartbeat message monitoring submodule 17 generates a heartbeat loss message and adds the application corresponding to the heartbeat loss message to it. After receiving the heartbeat loss message, the application restart submodule 18 parses the heartbeat loss message to obtain the application corresponding to the heartbeat loss message. The application corresponding to the heartbeat loss message refers to the application that failed to send a heartbeat message within the specified period.

[0052] Specifically, the application restart submodule 18 is responsible for the startup management of the application. The process of the application restart submodule 18 controlling the restart of the application mainly includes: reading the system configuration file through the configuration file submodule 110, parsing the configuration information of the application through the configuration parsing submodule 111, and determining the startup mode and startup parameters of the application through the configuration information parsed by the configuration parsing submodule 111.

[0053] In this embodiment, the system monitoring module 12 enables application crash restart to ensure application reliability.

[0054] Based on the above embodiments, the system monitoring module 12 further includes: a resource management submodule 19; the resource management submodule 19 is used to receive the heartbeat message, obtain the process information included in the heartbeat message, and manage the resources corresponding to the application based on the process information.

[0055] In this embodiment, the resource management submodule 19 manages the resources and permissions used by the application, analyzes the process information in the heartbeat message packet in real time, obtains the corresponding resources based on this process information, and manages the application's resources. The resources used by the application include CPU utilization, memory utilization, and disk space usage.

[0056] Based on the above embodiments, the system monitoring module 12 further includes a power management submodule 112. The power management submodule 112 is responsible for the power management of the entire system monitoring module 12. It receives power messages from the entire vehicle through the communication submodule 16 and internally maintains a power system state machine to achieve unified management and control of all programs in the entire system under different power states. The starting and stopping of applications are also achieved through the application restart submodule 18.

[0057] Based on the above embodiments, the resource management submodule is further optimized in this disclosure. Figure 4 This is a schematic diagram of the structure of a resource management submodule provided in an embodiment of this disclosure, as shown below. Figure 4 As shown, the resource management submodule 19 includes: CPU management unit 191, memory management unit 192 and disk management unit 193.

[0058] The CPU management unit 191 is used to obtain the CPU utilization rate of the application based on the process information, and send the CPU utilization rate to the log system for storage so that the user can view the CPU utilization rate; at the same time, it reads the application configuration file, obtains the CPU configuration threshold of the application from the configuration file, and controls the CPU utilization rate of the application to be less than the CPU configuration threshold.

[0059] Specifically, the CPU management unit 191 manages the CPU resources of the application. The application adds its own process information to the heartbeat message. As the heartbeat message cycle occurs, it is sent to the heartbeat message listening submodule 17 via the communication submodule 16. The heartbeat message listening submodule 17 then forwards the process information to the resource management submodule 19. Based on this process information, the CPU management unit 191 retrieves the CPU utilization rate corresponding to the process from the system and outputs this CPU utilization rate to the log system for user query. Simultaneously, the CPU management unit 191 reads the configuration file to obtain the CPU configuration threshold corresponding to this application and notifies the kernel 30's Cgroup system to set a CPU limit value for the application corresponding to this process information. After the Cgroup system settings are completed, the maximum CPU utilization rate of the application corresponding to this process information will be limited to below the CPU configuration threshold. The process information can be a process ID.

[0060] Furthermore, the memory management unit 192 is used to obtain the memory usage rate corresponding to the application based on the process information, and send the memory usage rate to the log system for storage so that the user can view the memory usage rate; at the same time, it reads the application configuration file, obtains the memory configuration threshold corresponding to the application from the configuration file, and when the memory usage rate corresponding to the application is greater than the memory configuration threshold, controls the application to exit and releases the memory resources occupied by the application.

[0061] Specifically, the memory management unit 192 manages the application's memory resources. The application adds its process information to the heartbeat message, which is periodically sent to the heartbeat message listening submodule 17 via the communication submodule 16. The heartbeat message listening submodule 17 then forwards the process information to the resource management submodule 19. Based on this process information, the memory management unit 192 retrieves the memory usage rate corresponding to the process from the system and outputs this memory usage rate to the log system for user query. Simultaneously, the memory management unit 192 reads the configuration file to obtain the memory configuration threshold for this application and notifies the kernel's Cgroup system to set the maximum usable memory limit for the application corresponding to this process. After the Cgroup system sets the limit, if the memory usage rate of the application corresponding to this process exceeds the memory configuration threshold, the kernel will kill the application via OOM (Out of Memory) and release the memory resources occupied by the application.

[0062] Furthermore, the disk management unit 193 is used to obtain the disk space occupied by the application from the process information, send the disk space occupied to the log system for storage so that the user can view the disk space occupied; at the same time, it reads the application configuration file, obtains the disk space configuration threshold corresponding to the application from the configuration file, and when the disk space occupied by the disk directory corresponding to the application is greater than the disk space configuration threshold, it controls the application to exit and deletes the contents on the disk.

[0063] Specifically, the disk management unit 193 manages the application's disk resources. The application adds its process information to the heartbeat message, which is periodically sent to the heartbeat message listening submodule 17 via the communication submodule 16. The heartbeat message listening submodule 17 then forwards the process information to the resource management submodule 19. Based on this process information, the disk management unit 193 retrieves the disk space usage corresponding to the process from the system and outputs the disk space usage to the log system for user query. Simultaneously, the disk management unit 193 reads the configuration file to obtain the disk space configuration threshold for this application and notifies the kernel 30's Cgroup system to set a maximum usable disk space limit for the application corresponding to this process. After the Cgroup system settings are complete, if the disk space usage of the application corresponding to this process exceeds the disk space configuration threshold, the application restart submodule 18 is notified to kill the application and delete its disk contents.

[0064] In this embodiment, the resource management submodule can achieve precise control over the CPU, memory, and disk usage of each application, preventing resources from exceeding the usage limit, ensuring that the application's resource usage is within the set quota, and guaranteeing the stability of the entire system.

[0065] Figure 5 This is a flowchart illustrating an application management method provided in this disclosure. The application management method provided in this disclosure is applicable to situations involving application management and can be applied to electronic devices. The electronic device is a device running a Linux system, including smartphones, laptops, tablets, digital cameras / camcorders, gaming devices, and central control devices in automobiles. The application includes multiple sub-functional modules, and the method is applied to the application management device, which includes a sub-functional monitoring module and a system monitoring module.

[0066] like Figure 5 As shown, the application management method provided in this embodiment mainly includes the following steps: S51. The operating status of each sub-function module is monitored in real time through the sub-function monitoring module, and when any sub-function module is in a fault state, the corresponding fault handling operation is performed based on the fault state.

[0067] S52. Receive the heartbeat message of the application through the system monitoring module, and manage the application based on the heartbeat message.

[0068] This disclosure provides an application management method, comprising: real-time monitoring of the operating status of each sub-functional module through a sub-function monitoring module; executing corresponding fault handling operations based on the fault status when any sub-functional module is in a fault state; receiving heartbeat messages from the application through a system monitoring module; and managing the application based on the heartbeat messages. In this technical solution, the sub-function monitoring module handles faults in the sub-functional modules of the application, while the system monitoring module manages the entire application. Through the monitoring and management of these two modules, the stability and reliability of the application service are ensured.

[0069] In one possible implementation, the sub-function monitoring module includes a sentinel sub-module and a fault handling sub-module; the method includes: determining the fault level corresponding to the fault state based on the fault state and a pre-set correspondence between fault states and fault levels through the sentinel sub-module; determining the fault handling operation corresponding to the fault state based on the fault level through the fault handling sub-module, and executing the fault handling operation.

[0070] In one possible implementation, the fault handling submodule includes: a subfunction restart unit, a subfunction shutdown unit, and a heartbeat stop unit; the fault handling submodule determines the fault handling operation corresponding to the fault state based on the fault level, including: controlling the subfunction restart unit to restart the subfunction module when the fault level is a first-level fault; controlling the subfunction shutdown unit to shut down the subfunction module when the fault level is a second-level fault; and controlling the heartbeat stop unit to stop the heartbeat of the application corresponding to the subfunction module when the fault level is a third-level fault, wherein the severity of the third-level fault is greater than the severity of the second-level fault, and the severity of the second-level fault is greater than the severity of the first-level fault.

[0071] In one possible implementation, the system monitoring module includes: a communication submodule, a heartbeat message listening submodule, and an application restart submodule; the method includes: receiving heartbeat messages from the application through the communication submodule and periodically sending them to the heartbeat message listening submodule; listening to the heartbeat messages periodically sent by the communication submodule through the heartbeat message listening submodule; if no heartbeat message is detected within a set period, determining that the heartbeat message is lost and generating a heartbeat loss message; receiving the heartbeat loss message through the application restart submodule and controlling the application corresponding to the heartbeat loss message to restart.

[0072] In one possible implementation, the system monitoring module further includes a resource management submodule; the method further includes receiving the heartbeat message through the resource management submodule, obtaining process information included in the heartbeat message, and managing the resources corresponding to the application based on the process information.

[0073] In one possible implementation, the resource management submodule includes: a CPU management unit; managing the resources corresponding to the application based on the process information, including: obtaining the CPU utilization rate of the application based on the process information through the CPU management unit, sending the CPU utilization rate to a log system for storage; and simultaneously reading the application configuration file, obtaining the CPU configuration threshold of the application from the configuration file, and controlling the CPU utilization rate of the application to be less than the CPU configuration threshold.

[0074] In one possible implementation, the resource management submodule includes: a memory management unit; managing the resources corresponding to the application based on the process information, including: using the memory management unit to obtain the memory usage rate corresponding to the application based on the process information, and sending the memory usage rate to a log system for storage; simultaneously reading the application configuration file, obtaining the memory configuration threshold corresponding to the application from the configuration file, and controlling the application to exit and releasing the memory resources occupied by the application when the memory usage rate corresponding to the application is greater than the memory configuration threshold.

[0075] In one possible implementation, the resource management submodule includes: a disk management unit, which manages the resources corresponding to the application based on the process information, including: obtaining the disk space occupied by the application based on the process information through the disk management unit, and sending the disk space occupied to the log system for storage; simultaneously reading the application configuration file, obtaining the disk space configuration threshold for the application from the configuration file, and controlling the application to exit and deleting the contents on the disk when the occupied space of the disk directory corresponding to the application is greater than the disk space configuration threshold.

[0076] Figure 5 The application management method of the illustrated embodiment can be executed by the application management device described above. Its implementation principle and technical effect are similar, and will not be repeated here.

[0077] Figure 6 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. The electronic device may be a vehicle. See below for details. Figure 6 The diagram illustrates a structural schematic suitable for implementing the electronic device 600 in the embodiments of this disclosure. The electronic device 600 in the embodiments of this disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), wearable terminal devices, etc., as well as fixed terminals such as digital TVs, desktop computers, smart home devices, etc. Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0078] like Figure 6 As shown, electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 602 or a program loaded from storage device 608 into random access memory (RAM) 603 to implement the application management method as described in the embodiments of this disclosure. Various programs and data required for the operation of electronic device 600 are also stored in RAM 603. Processing device 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.

[0079] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and bus 604. Bus 604 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 An electronic device 600 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0080] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts, thereby implementing the application management method as described above. In such embodiments, the computer program can be downloaded and installed from a network via bus 604, or installed from storage device 608, or installed from ROM 602. When the computer program is executed by processing device 601, it performs the functions defined in the methods of embodiments of this disclosure.

[0081] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0082] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0083] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to perform the methods described in any of the embodiments.

[0084] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0085] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0086] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units are not, in some cases, intended to limit the specific unit.

[0087] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.

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

[0089] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0090] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0091] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.

Claims

1. An application management device, characterized in that, The central control device configured in the vehicle includes an application that comprises multiple sub-functional modules, and the device includes a sub-functional monitoring module and a system monitoring module. The sub-function monitoring module is connected to each of the sub-function modules and is used to monitor the operating status of each sub-function module in real time, and to perform corresponding fault handling operations based on the fault status when any of the sub-function modules is in a fault state. The system monitoring module is connected to the application and is used to receive heartbeat messages from the application and manage the application based on the heartbeat messages; The sub-function monitoring module includes a sentinel sub-module and a fault handling sub-module. The sentinel sub-module is used to determine the fault level corresponding to the fault state based on the fault state and a pre-set correspondence between fault state and fault level. The fault handling submodule includes: a subfunction restart unit, a subfunction shutdown unit, and a heartbeat stop unit; The sub-function restart unit is used to control the restart of the sub-function module when the fault level is Level 1. The sub-function shutdown unit is used to control the sub-function module to shut down when the fault level is the second level fault. The heartbeat stop unit is used to control the heartbeat of the application corresponding to the sub-functional module to stop when the fault level is level 3, so as to restart the application. The severity of the level 3 fault is greater than that of the level 2 fault, and the severity of the level 2 fault is greater than that of the level 1 fault.

2. The apparatus according to claim 1, characterized in that, The fault handling submodule is used to determine the fault handling operation corresponding to the fault state based on the fault level, and to execute the fault handling operation.

3. The apparatus according to claim 1, characterized in that, The system monitoring module includes: a communication submodule, a heartbeat message listening submodule, and an application restart submodule; The communication submodule is used to receive heartbeat messages from the application and periodically send them to the heartbeat message listening submodule. The heartbeat message monitoring submodule is used to monitor the heartbeat messages periodically sent by the communication submodule. If the heartbeat message is not detected within a set period, it is determined that the heartbeat message is lost and a heartbeat loss message is generated. The application restart submodule is used to receive the heartbeat loss message and control the restart of the application corresponding to the heartbeat loss message.

4. The apparatus according to claim 3, characterized in that, The system monitoring module also includes: a resource management submodule; The resource management submodule is used to receive the heartbeat message, obtain the process information included in the heartbeat message, and manage the resources corresponding to the application based on the process information.

5. The apparatus according to claim 4, characterized in that, The resource management submodule includes: a CPU management unit; The CPU management unit is configured to obtain the CPU utilization rate of the application based on the process information, and send the CPU utilization rate to the log system for storage; at the same time, it reads the application's configuration file, obtains the CPU configuration threshold corresponding to the application from the configuration file, and controls the CPU utilization rate of the application to be less than the CPU configuration threshold.

6. The apparatus according to claim 4, characterized in that, The resource management submodule also includes: a memory management unit; The memory management unit is used to obtain the memory usage rate of the application based on the process information, and send the memory usage rate to the log system for storage; at the same time, it reads the application's configuration file, obtains the memory configuration threshold of the application from the configuration file, and controls the application to exit and releases the memory resources occupied by the application when the memory usage rate of the application is greater than the memory configuration threshold.

7. The apparatus according to claim 4, characterized in that, The resource management submodule also includes: a disk management unit. The disk management unit is used to obtain the disk space occupied by the application based on the process information, and send the disk space occupied to the log system for storage; at the same time, it reads the configuration file of the application, obtains the disk space configuration threshold of the application from the configuration file, and controls the application to exit and deletes the contents on the disk when the disk space occupied by the disk directory corresponding to the application is greater than the disk space configuration threshold.

8. An application management method, characterized in that, A central control device for vehicles, wherein the application includes multiple sub-functional modules, and the method is applied to the application management device, the device including: a sub-functional monitoring module and a system monitoring module; the method includes: The sub-function monitoring module monitors the operating status of each sub-function module in real time, and when any sub-function module is in a fault state, it performs corresponding fault handling operations based on the fault state. The system monitoring module receives heartbeat messages from the application and manages the application based on these heartbeat messages. The sub-function monitoring module includes a sentinel sub-module and a fault handling sub-module. The sentinel sub-module is used to determine the fault level corresponding to the fault state based on the fault state and a pre-set correspondence between fault state and fault level. The fault handling submodule includes: a subfunction restart unit, a subfunction shutdown unit, and a heartbeat stop unit; When a fault level of Level 1 is detected, the sub-function restart unit controls the sub-function module to restart. When the fault level is level two, the sub-function shutdown unit controls the sub-function module to shut down. When the fault level is level 3, the heartbeat stopping unit controls the application corresponding to the sub-functional module to stop the heartbeat so that the application can be restarted. The severity of level 3 fault is greater than that of level 2 fault, and the severity of level 2 fault is greater than that of level 1 fault.

9. A vehicle, characterized in that, The vehicle includes the device as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, the computer program implementing the method of claim 8 when executed by a processor.

Citation Information

Patent Citations

  • A vehicle-mounted entertainment system fault recovery method and device

    CN109815054A

  • Sub-system fault monitoring device and method

    CN110266549A