Process monitoring method, device and equipment for vehicle-mounted system
By implementing process monitoring methods in the on-board system, the problem of low abnormal handling efficiency of the on-board system is solved, monitoring and optimization of the process operation situation is realized, and exception handling efficiency and driving safety are improved.
Patent Information
- Application Number
- CN202111658900.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2041-12-30
AI Technical Summary
During the operation of the vehicle system, abnormal situations such as lag and crash are prone to occur, resulting in unsafe driving. The existing technology cannot effectively monitor and optimize the process operation of the vehicle system, resulting in low abnormal handling efficiency.
By implementing the process monitoring method in the on-board system, check the execution status of the process to be monitored, and send an operation information query request to the supplier execution module when it is in the execution state, receive a response and determine the query duration. If the query time is greater than the preset standard, store process operation information for subsequent analysis and optimization.
It realizes monitoring of the operation of the on-board system process, facilitates timely determination of the causes of abnormalities and optimizes relevant codes, improves the abnormal handling efficiency of the on-board system, and ensures driving safety.
Smart Images

Figure CN114296938B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of software technology, and in particular to a process monitoring method, device and equipment for a vehicle-mounted system. Background Art
[0002] With the continuous development of automobile technology, the complexity of vehicle-mounted systems continues to increase. Sometimes, abnormal situations such as freezing and freezing may occur during operation. These abnormal situations will have an adverse effect on the normal driving of the vehicle, and thus affect driving safety and even cause traffic accidents. The vehicle-mounted system and related supporting equipment are usually provided by various suppliers. The relevant program code is not open source, and it is impossible to monitor the process operation of the vehicle-mounted system. Once the vehicle-mounted system is abnormal, ordinary users cannot determine the cause of the abnormality at all. Usually, only professional engineers can conduct a detailed inspection of the vehicle to determine the cause of the abnormality, and manually send the relevant data files to the supplier so that the supplier can optimize the relevant code. This processing method is inefficient, and sometimes it is necessary to reinstall the system or application software, which further increases the processing time. Summary of the invention
[0003] In view of this, the purpose of the present invention is to provide a process monitoring method, device and equipment for a vehicle-mounted system to monitor the process operation of the vehicle-mounted system, so that relevant personnel can promptly determine the cause of the abnormality and optimize the relevant code when an abnormality occurs in the vehicle-mounted system, thereby improving the abnormality handling efficiency of the vehicle-mounted system.
[0004] In the first aspect, an embodiment of the present invention provides a process monitoring method for a vehicle-mounted system, the method comprising: based on the operating state of the vehicle-mounted system, checking the execution state of the monitored process to obtain an inspection result; the monitored process is a process to be executed configured under different operating states; if the inspection result of the monitored process is that the monitored process is in an execution state, sending an operation information query request to a supplier execution module corresponding to the monitored process; the operation information query request includes the process identifier of the monitored process; receiving an operation information query response sent by the supplier execution module; the operation information query response includes the process operation information of the monitored process; determining a query duration, the query duration is determined based on the issuance time of the operation information query request and the reception time of the operation information query response; if the query duration is greater than the preset query standard duration, storing the process operation information of the monitored process within a preset historical time period.
[0005] In combination with the first aspect, an embodiment of the present invention provides a first possible implementation method of the first aspect, wherein the method also includes: if the inspection result of the process to be monitored is that the process to be monitored is not in an execution state, determining that the process to be monitored is an abnormal process; obtaining the exception stack information of the abnormal process within a first preset historical time period, and saving the system log of the abnormal process within a second preset historical time period.
[0006] In combination with the first aspect, an embodiment of the present invention provides a second possible implementation method of the first aspect, wherein the preset query standard duration is less than the first preset timeout duration and the second preset timeout duration, and the first preset timeout duration is less than the second preset timeout duration; if the query duration is greater than the preset query standard duration, the process running information of the process to be monitored within the preset historical time period is stored, including: if the query duration is greater than the first preset timeout duration and less than the second preset timeout duration, the process running information of the process to be monitored within the third preset historical time period is stored, and the system log of the process to be monitored within the fourth preset historical time period is saved; if the query duration is greater than the second preset timeout duration, the process running information of the process to be monitored within the fifth preset historical time period is stored, and the process to be monitored is restarted.
[0007] In combination with the first aspect, an embodiment of the present invention provides a third possible implementation method of the first aspect, wherein the method also includes: if the number of restarts of the monitored process is greater than a preset number threshold within the target monitoring time period, the monitored process is controlled not to be restarted.
[0008] In combination with the first aspect, an embodiment of the present invention provides a fourth possible implementation of the first aspect, wherein the process to be monitored includes at least one thread; and the process running information of the process to be monitored includes the running status information of each thread in the at least one thread.
[0009] In combination with the first aspect, an embodiment of the present invention provides a fifth possible implementation of the first aspect, wherein the process running information of the process to be monitored is obtained after the supplier execution module checks the running information of at least one thread in sequence according to a preset thread checking order.
[0010] In combination with the first aspect, an embodiment of the present invention provides a sixth possible implementation of the first aspect, wherein the at least one thread includes a main thread, an I / O thread, a display thread, a CPU usage thread, and a memory usage thread.
[0011] In combination with the first aspect, an embodiment of the present invention provides a seventh possible implementation of the first aspect, wherein the method further includes: if the query duration is not greater than a preset query standard duration, determining that the process to be monitored is a normal process.
[0012] In the second aspect, an embodiment of the present invention also provides a process monitoring device for a vehicle-mounted system, the device comprising: an inspection module, for inspecting the execution status of a process to be monitored based on the operating status of the vehicle-mounted system to obtain an inspection result; the process to be monitored is a process to be executed configured under different operating states; a request sending module, for sending an operation information query request to a supplier execution module corresponding to the process to be monitored when the inspection result of the process to be monitored is that the process to be monitored is in an execution state; the operation information query request includes the process identifier of the process to be monitored; a response receiving module, for receiving an operation information query response sent by the supplier execution module; the operation information query response includes the process operation information of the process to be monitored; a duration determination module, for determining a query duration, the query duration being determined based on the issuance time of the operation information query request and the reception time of the operation information query response; an information storage module, for storing the process operation information of the process to be monitored within a preset historical time period if the query duration is greater than a preset query standard duration.
[0013] In a third aspect, an embodiment of the present invention further provides a device, including a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the process monitoring method of the above-mentioned vehicle-mounted system.
[0014] The embodiment of the present invention provides a process monitoring method, device and equipment for a vehicle-mounted system, the method comprising: checking the execution state of a process to be monitored (a process to be executed configured in different running states) based on the running state of the vehicle-mounted system to obtain a check result, sending a running information query request containing the process identifier of the process to be monitored to the supplier execution module corresponding to the process to be monitored when the check result of the process to be monitored is that the process to be monitored is in the execution state, then receiving a running information query response containing the process running information of the process to be monitored sent by the supplier execution module, and determining the query duration based on the sending time of the running information query request and the receiving time of the running information query response, and storing the process running information of the process to be monitored if the query duration is greater than the preset query standard duration. By adopting the above technology, the process running information of the process to be monitored can be queried when the process of the vehicle-mounted system is in the execution state, and the process running information of the process to be monitored in the preset historical time period is stored when the query duration times out, thereby realizing the monitoring of the process running status of the vehicle-mounted system, so that relevant personnel can timely determine the cause of the abnormality and optimize the relevant code when an abnormality occurs in the vehicle-mounted system, thereby improving the abnormality handling efficiency of the vehicle-mounted system.
[0015] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0016] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 A schematic flow chart of a process monitoring method for a vehicle-mounted system provided by an embodiment of the present invention;
[0019] Figure 2 A schematic diagram of a process checking method provided by an embodiment of the present invention;
[0020] Figure 3 An example diagram of a process monitoring method for a vehicle-mounted system provided by an embodiment of the present invention;
[0021] Figure 4 A schematic diagram of the structure of a process monitoring device for a vehicle-mounted system provided by an embodiment of the present invention;
[0022] Figure 5 A schematic diagram of the structure of a device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described in combination with the embodiments below. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0024] At present, the on-board systems and related supporting equipment on cars are usually provided by various suppliers, and the relevant program codes are not open source, so it is impossible to monitor the process operation of the on-board systems. Once the on-board systems are abnormal, ordinary users cannot determine the cause of the abnormality at all. Usually, professional engineers can only conduct detailed inspections of the vehicles to determine the cause of the abnormality and manually send the relevant data files to the suppliers so that the suppliers can optimize the relevant codes. This processing method is inefficient and sometimes requires reinstalling the system or application software, which further increases the processing time.
[0025] Based on this, the present invention provides a process monitoring method, device and equipment for a vehicle-mounted system, which can monitor the process operation status of the vehicle-mounted system, so that relevant personnel can promptly determine the cause of the abnormality and optimize the relevant code when an abnormality occurs in the vehicle-mounted system, thereby improving the abnormality handling efficiency of the vehicle-mounted system.
[0026] To facilitate understanding of this embodiment, a process monitoring method for a vehicle-mounted system disclosed in an embodiment of the present invention is first described in detail. Figure 1 The flowchart of a process monitoring method of a vehicle-mounted system shown is applied to a process monitoring device. The method may include the following steps:
[0027] Step S101, based on the running state of the vehicle-mounted system, the execution state of the monitored process is checked to obtain a check result.
[0028] The above-mentioned vehicle-mounted systems may include vehicle-mounted entertainment systems, vehicle-mounted navigation systems, vehicle-mounted air circulation systems, and other vehicle-mounted systems used in vehicles. Each of the above-mentioned vehicle-mounted systems may include different operating states (or "working states"). For example, the vehicle-mounted entertainment system may play music or weather forecasts, so the vehicle-mounted entertainment system may include operating states for playing music and for forecasting weather.
[0029] The process to be monitored can be configured for the in-vehicle entertainment system during normal operation, such as the music playback process and the playlist interface display process. In actual application, for different suppliers, the process to be monitored can also be the process of the ADAS supplier, the process of the air conditioning supplier, the process of the headlight supplier, the process of the seat supplier, etc.
[0030] It is understandable that the monitored process can also be configured with related processes to be executed according to different operating states and preset time periods of the vehicle system. For example, the vehicle air circulation system executes air circulation related processes when the air circulation is in the operating state, and can execute weather forecast related processes after the operating state meets the preset time period to inform the driver. The driver can control whether to continue to execute air circulation related processes according to the outside temperature, etc. This application is not limited here.
[0031] In the specific implementation, the execution status of the monitored process is checked, that is, whether the monitored process is in a survival state is determined to obtain the inspection result that the monitored process is in an execution state (or "in a survival state") or not in an execution state (or "in a non-survival state").
[0032] Step S102: Based on the inspection result, a running information query request is sent to the supplier execution module corresponding to the process to be monitored.
[0033] Since the vehicle-mounted system is usually configured with modules provided by suppliers to implement different functions, each process on the vehicle-mounted system usually runs in the corresponding module. For the convenience of description, the module where the above-mentioned process to be monitored is located is defined here as the supplier execution module corresponding to the above-mentioned process to be monitored.
[0034] In a specific implementation, in order to monitor the execution status of each process in the corresponding supplier execution module, when the inspection result of the process to be monitored is that the process to be monitored is in the execution state, an operation information query request is sent to the supplier execution module corresponding to the process to be monitored. The operation information query request may include the process identifier of the process to be monitored. The process identifier is an identifier used to uniquely characterize the process, and may be an ID number, a memory address, etc., which is not limited to this.
[0035] When the inspection result of the process to be monitored is that the process to be monitored is not in the execution state, the process to be monitored is determined to be an abnormal process, that is, the process to be monitored is an abnormal process that should be executed but is not currently executed, that is, the process ends abnormally. At this time, the abnormal process does not exist in the process running on the vehicle system, and there is no process running information of the abnormal process. Since the vehicle system will output stack information (or "abnormal stack information") when an abnormality occurs, these stack information will be saved in the stack, and the stack information is important reference information for relevant personnel to troubleshoot the vehicle system. Based on this, in order to facilitate relevant personnel to locate the cause of the abnormality when an abnormality occurs in the vehicle system, the abnormal stack information of the abnormal process in the first preset historical time period (such as 1 minute) can be obtained at this time, and the system log of the abnormal process in the second preset historical time period (such as 30 minutes) can be saved.
[0036] Furthermore, the acquired abnormal stack information and the saved system log can be packaged and sent to the cloud to realize abnormal analysis of the abnormal process. For example, the acquired abnormal stack information and the saved system log are packaged and compressed and uploaded to the cloud of the relevant personnel, so that the relevant personnel can directly obtain the abnormal stack information and system log corresponding to the abnormal process through the cloud, and perform abnormal analysis on the abnormal process. The relevant personnel mentioned in the present invention can specifically be the supplier's personnel, vehicle owners, vehicle passengers, vehicle maintenance personnel, etc., and this is not limited.
[0037] Among them, the exception stack information within the first preset historical time period can be all stack information related to the process to be monitored generated by the vehicle system within a period of time before the vehicle system determines that the process to be monitored is an abnormal process; the system log within the second preset historical time period can be all system logs related to the process to be monitored cached by the vehicle system within a period of time before the vehicle system determines that the process to be monitored is an abnormal process.
[0038] In actual application, in order to further facilitate relevant personnel to conduct detailed analysis of the cause of the abnormality when an abnormality occurs in the vehicle system, the system log mentioned in the present invention may specifically be a kernel log of the vehicle system and / or a framework log of the vehicle system.
[0039] Step S103, receiving an operation information query response sent by the supplier execution module.
[0040] In a specific implementation, since the process to be monitored may include at least one thread, such as a main thread, an I / O thread, a display thread, a CPU usage thread, and a memory usage thread, after the supplier execution module receives the operation information query request, it can check the operation information of at least one thread in sequence according to a preset thread check order. For example, if the preset thread check order is main thread, I / O thread, display thread, other thread check, CPU usage thread, and memory usage thread, then the main thread, I / O thread, display thread, other thread check, CPU usage thread, and memory usage thread are checked in sequence.
[0041] The main thread is responsible for executing the main tasks corresponding to the monitored process, the I / O thread is responsible for executing the data reading and / or data writing operations corresponding to the monitored process, the display thread is responsible for executing the operations corresponding to the monitored process to display data on the display screen, the CPU use thread is responsible for executing the operations corresponding to the monitored process to use CPU resources, and the memory use thread is responsible for executing the operations corresponding to the monitored process to allocate memory resources for data. For example Figure 2 , Figure 2 In the process to be monitored, the supplier execution module corresponding to the process to be monitored performs main thread check, I / O thread check, display thread check, other thread check, CPU usage thread check and memory usage thread check on the process to be monitored in turn.
[0042] Alternatively, the supplier execution module may also check the running information of at least one thread at the same time.
[0043] In addition, in actual application, the inspection methods of the above-mentioned different threads can also be optimized. For example, the process to be monitored contains multiple I / O threads, and each I / O thread performs at least one data reading operation or data writing operation. When inspecting all I / O threads of a process to be monitored, in order to facilitate operation, the number of data reading operations or data writing operations of all I / O threads in the process to be monitored, the number of disk blocking times, and the CPU time when performing data reading operations or data writing operations can be counted first, and the I / O activity details of a specified number of I / O threads in the process to be monitored can be obtained according to the statistical results as the I / O thread operation information of the process to be monitored. As an example, the number of data read operations or data write operations of all I / O threads in the process to be monitored is counted, and all I / O threads of the process to be monitored are sorted in descending order according to the number of data read operations or data write operations, and then the I / O activity details of the top N (N is a positive integer greater than or equal to 1) I / O threads in the process to be monitored with respect to the number of data read operations or data write operations are determined as the I / O thread running information of the process to be monitored, and the information is obtained. As another example, the number of disk blockages of all I / O threads in the process to be monitored is counted, and all I / O threads of the process to be monitored are sorted in descending order according to the number of disk blockages, and then the I / O activity details of the top M (M is a positive integer greater than or equal to 1) I / O threads in the process to be monitored with respect to the number of disk blockages are determined as the I / O thread running information of the process to be monitored, and the information is obtained.
[0044] Based on the above process checking process, the process running information of the process to be monitored can be obtained, which includes the running information of at least one thread, such as CPU usage information, memory usage information, and I / O file information.
[0045] Finally, the supplier execution module sends an operation information query response to the process monitoring device of the embodiment of the present application, and the operation information query response includes the process operation information of the process to be monitored.
[0046] Step S104, determining the query duration, and based on the query duration, storing the process running information of the process to be monitored within a preset historical time period.
[0047] The query duration is determined based on the time when the query request for the operation information is sent and the time when the query response for the operation information is received. The process operation information within the preset historical time period may be the process operation information of the process to be monitored generated within a period of time before the vehicle system determines that the process to be monitored is an abnormal process.
[0048] If the query duration is not greater than the preset query standard duration, such as 3s, it indicates that the process to be monitored is a normal process, and there is no need to analyze the process running information of the process to be monitored, that is, there is no need to store the process running information of the process to be monitored. A normal process refers to a process that can run normally on the vehicle system, for example, a process that can be started normally, a process that can be ended normally, different processes that can communicate normally, and a process that can use memory normally.
[0049] If the query duration is longer than the preset query standard duration, such as 3s, it indicates that the process to be monitored is abnormal, that is, the process to be monitored is an abnormal process. The abnormal process here refers to a process in which all or part of the threads corresponding to the process running on the vehicle system are abnormal.
[0050] Specifically, for ease of operation, a first preset timeout period and a second preset timeout period may be configured, and the preset query standard period is less than the first preset timeout period, such as 5s, and the first preset timeout period is less than the second preset timeout period, such as 10s. Based on this, the query period greater than the preset query standard period can be divided into two situations: (1) the query period is greater than the first preset timeout period and less than the second preset timeout period; (2) the query period is greater than the second preset timeout period.
[0051] If the query duration is greater than the first preset timeout period and less than the second preset timeout period, it indicates that the process to be monitored is an abnormal process, but the abnormal process can continue to run to meet the needs of users; but at this time, the process running information of the process to be monitored in the third preset historical time period can be stored, and the system log of the process to be monitored in the fourth preset historical time period can be saved.
[0052] Furthermore, the stored process running information and the saved system logs can be packaged and sent to the cloud to implement abnormal analysis of abnormal processes. For example, the stored process running information and the saved system logs are packaged and compressed and uploaded to the cloud of relevant personnel, so that the relevant personnel can directly obtain the process running information and system logs corresponding to the abnormal process through the cloud later, and perform abnormal analysis on the abnormal process.
[0053] Among them, the process running information within the third preset historical time period can be the process running information within a period of time before the moment when the process to be monitored is determined to be an abnormal process, and the system log within the third preset historical time period can be the system log of the vehicle system within a period of time (such as 20 minutes) before the moment when the process to be monitored is determined to be an abnormal process.
[0054] If the query duration is longer than the second preset timeout duration, it indicates that the process to be monitored is an abnormal process, and because the query duration timeout is serious, it seriously affects the needs of the user, so it is necessary to store the process running information of the process to be monitored in the fifth preset historical time period and restart the process to be monitored. The process running information in the fifth preset historical time period is defined in a similar manner to the process running information in the third preset historical time period, and will not be described in detail.
[0055] In actual application, the step of restarting the process to be monitored can be one of the following two operation modes: actively deleting the process to be monitored and then restarting the process to be monitored; the process to be monitored disappears during the execution of the task and then restarting the process to be monitored.
[0056] Furthermore, the process running information of the process to be monitored within the fifth preset historical time period can also be uploaded to the cloud, so that the cloud can subsequently perform an abnormal analysis on the abnormal process based on the process running information. For example, the stored process running information is packaged and compressed and uploaded to the cloud of relevant personnel, so that the relevant personnel can directly obtain the process running information corresponding to the abnormal process through the cloud, and perform an abnormal analysis on the abnormal process.
[0057] Furthermore, if the number of restarts of the monitored process is greater than the preset number threshold within the target monitoring time period, it indicates that the monitored process is not stable, and it is necessary to control the monitored process not to restart. The target monitoring time period and the preset number threshold can be defined according to actual conditions, and there is no limitation on this. For example, the target monitoring time period is defined as 1 minute, and the preset number threshold is defined as 3 times.
[0058] Specifically, after receiving the above operation information query response sent by the supplier execution module corresponding to the process to be monitored, the process operation information of the process to be monitored can be stored in the designated storage area. In actual application, for the Linux vehicle system, the dump technology can be used to store the process operation information.
[0059] For ease of operation, after performing the above step S104 (i.e. determining the query duration, and storing the process running information of the process to be monitored based on the query duration), the following operation method may be used:
[0060] Step S105, determine whether the query duration is greater than the preset query standard duration; if not (i.e. the query duration is not greater than the preset query standard duration), execute the following step S106; if yes (i.e. the query duration is greater than the preset query standard duration), execute the following step S107.
[0061] Step S106, determining that the process to be monitored is a normal process, and no operation will be performed;
[0062] Step S107, storing the process running information of the process to be monitored.
[0063] The process monitoring method of the vehicle-mounted system provided by the embodiment of the present invention comprises: checking the execution state of the process to be monitored (the process to be executed configured in different running states) based on the running state of the vehicle-mounted system to obtain the inspection result, sending the operation information query request containing the process identifier of the process to be monitored to the supplier execution module corresponding to the process to be monitored when the inspection result of the process to be monitored is that the process to be monitored is in the execution state, then receiving the operation information query response containing the process operation information of the process to be monitored sent by the supplier execution module, and determining the query duration based on the sending time of the operation information query request and the receiving time of the operation information query response, if the query duration is greater than the preset query standard duration, then storing the process operation information of the process to be monitored within the preset historical time period. By adopting the above technology, the process operation information of the process to be monitored can be queried when the process of the vehicle-mounted system is in the execution state, and the process operation information of the process to be monitored within the preset historical time period can be stored when the query duration times out, thereby realizing the monitoring of the process operation of the vehicle-mounted system, so that the relevant personnel can timely determine the cause of the abnormality and optimize the relevant code when the vehicle-mounted system is abnormal, thereby improving the abnormality handling efficiency of the vehicle-mounted system. In addition, when an abnormality occurs in the vehicle system, information related to the abnormal process (such as abnormal stack information, process operation information, system log, etc.) can be fed back to relevant personnel, further ensuring that relevant personnel handle the abnormality in a timely manner.
[0064] As a specific example, Figure 3 The process monitoring method of the above-mentioned vehicle-mounted system is described by taking as an example. Figure 3 In the process monitoring device, the vehicle system is equipped with the above process monitoring device, and the above operation information query request is sent to the supplier execution module corresponding to the process to be monitored through the process monitoring device, and the sending time of the operation information query request is recorded in the form of a timestamp (i.e. Figure 3 t1 in the figure); after receiving the operation information query request, the supplier execution module checks the process operation information of the process to be monitored, and sends the above operation information query response to the process monitoring device, and the response includes the process operation information of the process to be monitored; when the process monitoring device receives the operation information query response, it will record the reception time of the operation information query response in the form of a timestamp (i.e. Figure 3t2 in ), and calculate the query duration t=t2-t1 according to t1 and t2, and then perform a timeout judgment on the query duration; if 3s times out (that is, t is greater than 3s), the process monitoring device will determine the process to be monitored as an abnormal process; if 5s times out (that is, t is greater than 5s and less than 10s), the process monitoring device will dump the process running information of the process to be monitored, and save the kernel log and framework log of the vehicle system within 20 minutes before the moment when the process to be monitored is an abnormal process; if 10s times out (that is, t is greater than 10s), the process monitoring device will dump the process running information of the process to be monitored, delete the process to be monitored, and restart the process to be monitored.
[0065] Based on the above-mentioned process monitoring method of the vehicle-mounted system, the embodiment of the present invention also provides a process monitoring device of the vehicle-mounted system, see Figure 4 As shown, the device comprises:
[0066] The checking module 41 is used to check the execution status of the process to be monitored based on the running status of the vehicle-mounted system to obtain the checking result; the process to be monitored is a process to be executed configured under different running statuses;
[0067] The request sending module 42 is used to send an operation information query request to the supplier execution module corresponding to the process to be monitored when the inspection result of the process to be monitored is that the process to be monitored is in an execution state; the operation information query request includes the process identifier of the process to be monitored;
[0068] A response receiving module 43 is used to receive the operation information query response sent by the supplier execution module; the operation information query response includes the process operation information of the process to be monitored;
[0069] A duration determination module 44, configured to determine a query duration, wherein the query duration is determined based on a time when the operation information query request is issued and a time when a response to the operation information query is received;
[0070] The information storage module 45 is used to store the process running information of the process to be monitored within a preset historical time period if the query duration is greater than a preset query standard duration.
[0071] The process monitoring device of the above-mentioned vehicle-mounted system provided by the embodiment of the present invention can query the process running information of the process to be monitored when the process of the vehicle-mounted system is in the execution state, and store the process running information of the process to be monitored within a preset historical time period when the query time expires, thereby realizing the monitoring of the process running status of the vehicle-mounted system, making it convenient for relevant personnel to promptly determine the cause of the abnormality and optimize the relevant code when an abnormality occurs in the vehicle-mounted system, thereby improving the abnormality handling efficiency of the vehicle-mounted system.
[0072] The above-mentioned information storage module 45 is also used to: determine that the process to be monitored is an abnormal process when the inspection result of the process to be monitored is that the process to be monitored is not in an execution state; obtain the abnormal stack information of the abnormal process within a first preset historical time period, and save the system log of the abnormal process within a second preset historical time period.
[0073] The above-mentioned preset query standard duration is less than the first preset timeout duration and the second preset timeout duration, and the first preset timeout duration is less than the second preset timeout duration; based on this, the above-mentioned information storage module 45 is also used to: store the process running information of the process to be monitored within the third preset historical time period when the query duration is greater than the first preset timeout duration and less than the second preset timeout duration, and save the system log of the process to be monitored within the fourth preset historical time period; store the process running information of the process to be monitored within the fifth preset historical time period when the query duration is greater than the second preset timeout duration, and restart the process to be monitored.
[0074] The above-mentioned device is also used for: controlling the process to be monitored not to restart when the number of restarts of the process to be monitored is greater than a preset number threshold within a target monitoring time period.
[0075] The process to be monitored may include at least one thread; the process running information of the process to be monitored includes running status information of each thread in the at least one thread.
[0076] The process running information of the process to be monitored may be obtained after the supplier execution module sequentially checks the running information of the at least one thread according to a preset thread checking order.
[0077] The at least one thread may include a main thread, an I / O thread, a display thread, a CPU usage thread, and a memory usage thread.
[0078] The process monitoring device of the vehicle-mounted system is also used to: determine that the process to be monitored is a normal process when the query duration is not greater than a preset query standard duration.
[0079] The process monitoring device for the vehicle-mounted system provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.
[0080] An embodiment of the present invention provides a device, which may be a vehicle. Specifically, the device includes a processor and a storage device; a computer program is stored on the storage device, and when the computer program is run by the processor, the process monitoring method of the vehicle system described in any one of the above-mentioned implementation modes is executed.
[0081] Figure 5 A structural diagram of a device provided in an embodiment of the present invention, the device 100 includes: a processor 50, a memory 51, a bus 52 and a communication interface 53, wherein the processor 50, the communication interface 53 and the memory 51 are connected via the bus 52; the processor 50 is used to execute an executable module stored in the memory 51, such as a computer program.
[0082] The memory 51 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 53 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.
[0083] The bus 52 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0084] Among them, the memory 51 is used to store programs, and the processor 50 executes the program after receiving the execution instruction. The method executed by the device for flow process definition disclosed in any embodiment of the above-mentioned embodiment of the present invention can be applied to the processor 50 or implemented by the processor 50.
[0085] The processor 50 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the process monitoring method of the vehicle-mounted system can be completed by the hardware integrated logic circuit or software instructions in the processor 50. The processor 50 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the process monitoring method of the vehicle-mounted system disclosed in the embodiment of the present invention can be directly embodied as a hardware decoding processor, or a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 51, and the processor 50 reads the information in the memory 51 and completes the steps of the above-mentioned process monitoring method of the vehicle-mounted system in combination with its hardware.
[0086] The computer program product of the readable storage medium provided in the embodiment of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the process monitoring method of the vehicle-mounted system described in the previous method embodiment. The specific implementation can be referred to the previous method embodiment and will not be repeated here.
[0087] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.
[0088] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A process monitoring method for a vehicle-mounted system, characterized in that: The method comprises: Based on the running state of the vehicle-mounted system, the execution state of the process to be monitored is checked to obtain the inspection result; the process to be monitored is a process to be executed configured under different running states; If the inspection result of the process to be monitored is that the process to be monitored is in an execution state, sending an operation information query request to the supplier execution module corresponding to the process to be monitored; the operation information query request includes the process identifier of the process to be monitored; receiving an operation information query response sent by the supplier execution module; the operation information query response includes process operation information of the process to be monitored; Determining a query duration, where the query duration is determined based on a time when the operation information query request is issued and a time when a response to the operation information query is received; If the query duration is greater than a preset query standard duration, the process running information of the process to be monitored within a preset historical time period is stored.
2. The method according to claim 1, characterized in that The method further comprises: If the inspection result of the process to be monitored is that the process to be monitored is not in an execution state, determining that the process to be monitored is an abnormal process; Exception stack information of the abnormal process in a first preset historical time period is obtained, and system logs of the abnormal process in a second preset historical time period are saved.
3. The method according to claim 1, characterized in that The preset query standard duration is shorter than the first preset timeout duration and the second preset timeout duration, and the first preset timeout duration is shorter than the second preset timeout duration; If the query duration is greater than the preset query standard duration, storing the process running information of the process to be monitored within the preset historical time period includes: If the query duration is greater than the first preset timeout duration and less than the second preset timeout duration, the process running information of the process to be monitored in the third preset historical time period is stored, and the system log of the process to be monitored in the fourth preset historical time period is saved; If the query duration is greater than the second preset timeout duration, the process running information of the process to be monitored within the fifth preset historical time period is stored, and the process to be monitored is restarted.
4. The method according to claim 3, characterized in that The method further comprises: If the number of restarts of the process to be monitored is greater than a preset number threshold within the target monitoring time period, the process to be monitored is controlled not to be restarted.
5. The method according to any one of claims 1 to 4, characterized in that: The process to be monitored includes at least one thread; The process running information of the process to be monitored includes running status information of each thread in the at least one thread.
6. The method according to claim 5, characterized in that The process running information of the process to be monitored is obtained after the supplier execution module checks the running information of the at least one thread in sequence according to a preset thread checking order.
7. The method according to claim 6, characterized in that The at least one thread includes a main thread, an I / O thread, a display thread, a CPU use thread, and a memory use thread.
8. The method according to claim 1, characterized in that: The method further comprises: If the query duration is not greater than the preset query standard duration, it is determined that the process to be monitored is a normal process.
9. A process monitoring device for a vehicle-mounted system, characterized in that: The device comprises: An inspection module is used to inspect the execution status of the process to be monitored based on the running status of the vehicle-mounted system to obtain an inspection result; the process to be monitored is a process to be executed configured under different running statuses; A request sending module, used for sending an operation information query request to a supplier execution module corresponding to the process to be monitored when the inspection result of the process to be monitored is that the process to be monitored is in an execution state; the operation information query request includes a process identifier of the process to be monitored; A response receiving module, used for receiving an operation information query response sent by the supplier execution module; the operation information query response includes process operation information of the process to be monitored; A duration determination module, used to determine a query duration, wherein the query duration is determined based on the time when the operation information query request is issued and the time when the operation information query response is received; The information storage module is used to store the process running information of the process to be monitored within a preset historical time period when the query duration is greater than a preset query standard duration.
10. A device, characterized in that: It includes a processor and a memory, the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the process monitoring method of the vehicle-mounted system according to any one of claims 1 to 8.
Citation Information
Patent Citations
Program exception monitoring method and device
CN104268055A
System notification service control method and device, terminal device, and storage medium
CN107861608A