Task monitoring method and device, equipment and medium

By simulating the task flow in the intelligent driving system to generate anomaly judgment data and monitoring task information in real time, the problem of inefficiently monitoring task status in existing technologies is solved, realizing convenient and efficient monitoring of intelligent driving tasks and improving the stability and safety of the system.

CN120892285APending Publication Date: 2025-11-04BLACK SESAME TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510962096.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-11
Publication Date
2025-11-04

AI Technical Summary

Technical Problem

In intelligent driving systems, existing technologies struggle to efficiently monitor the operational status of each task, making it difficult to detect abnormal tasks in a timely manner and affecting system stability and safety.

Method used

By simulating before the task flow is executed, anomaly judgment data is generated, and task information is monitored in real time during the execution process. The anomaly judgment data is used to determine the running status of the task, including anomalies such as execution time, scheduling delay, and execution order.

Benefits of technology

It enables convenient and efficient monitoring of intelligent driving tasks, timely detection and handling of abnormal tasks, and improves system stability and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120892285A_ABST
    Figure CN120892285A_ABST
Patent Text Reader

Abstract

The invention provides a task monitoring method and device, equipment and a medium, and relates to the technical field of artificial intelligence. The task monitoring method comprises the steps that when a task flow is executed, task information of all tasks in the task flow is acquired; according to the task information and exception judgment data, the running state of each task is determined, and the exception judgment data is generated by simulation data obtained by conducting simulation on each task in advance. According to the method, the tasks in the task flow which is being executed can be monitored, so that the running state of each task is determined, and abnormal tasks can be found in time.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of artificial intelligence, and in particular to a task monitoring method and device, equipment and a medium. BACKGROUND

[0002] With the continuous progress of computer technology and sensor technology, especially artificial intelligence technology, intelligent driving technology has become the focus of attention today, and intelligent driving has brought great influence to the development of the automobile industry.

[0003] The intelligent driving system is a very complex system, including a hardware platform, various software modules and algorithms, etc. The intelligent driving system will execute a large number of various intelligent driving tasks during operation, and therefore, it is crucial for the entire intelligent driving system to monitor the running state of each intelligent driving task in order to timely discover intelligent driving tasks with running abnormalities. SUMMARY

[0004] The present application provides a task monitoring method, device, equipment and medium, which can monitor the tasks in the task flow being executed, thereby determining the running state of each task in order to timely discover abnormal tasks.

[0005] To achieve the above-mentioned purpose, the present application adopts the following technical solutions:

[0006] In a first aspect, a task monitoring method is provided, which can include: when a task flow is executed, obtaining task information of each task in the task flow; and determining a running state of each task according to the task information and abnormality judgment data, the abnormality judgment data being generated from simulation data obtained by simulating each task in advance.

[0007] In a possible implementation manner, the abnormality judgment data includes at least one of an execution duration threshold, a scheduling delay duration threshold, an execution abnormality duration threshold, and a sequence of preceding tasks of the task, the sequence of preceding tasks being used to indicate a sequence of tasks executed before the corresponding task in the task flow.

[0008] In another possible implementation manner, the abnormality judgment data includes an execution duration threshold, the obtaining of the task information of each task in the task flow includes: obtaining an entry time and an exit time of each frame in each task; and the determining of the running state of each task according to the task information and the abnormality judgment data includes: when a difference between the entry time and the exit time of the same frame of the task is greater than the execution duration threshold, determining that the running state of the task is an execution time abnormality.

[0009] In another possible implementation, the abnormality judgment data comprises a scheduling delay duration threshold, the task information of each task in the task flow is obtained, comprising: obtaining the entry time of each frame in each task; and the running state of each task is determined according to the task information and the abnormality judgment data, comprising: when the difference between the entry time of two consecutive frames of a task is greater than the scheduling delay duration threshold corresponding to the task, it is determined that the running state of the task is a scheduling delay abnormality.

[0010] In another possible implementation, the abnormality judgment data comprises an execution abnormality duration threshold, the task information of each task in the task flow is obtained, comprising: obtaining the current time and the entry time of each frame in each task; and the running state of each task is determined according to the task information and the abnormality judgment data, comprising: when the difference between the entry time of the most recent frame of a task and the current time is greater than the execution abnormality duration threshold corresponding to the task, it is determined that the running state of the task is an execution abnormality.

[0011] In another possible implementation, after it is determined that the running state of a task is an execution abnormality, the method further comprises: querying the process of the task; when the process of the task exists, it is determined that the running state of the task is a blocking or a dead loop; and when the process of the task does not exist, it is determined that the running state of the task is an abnormal exit.

[0012] In another possible implementation, the abnormality judgment data comprises a task pre-task sequence, the task information of each task in the task flow is obtained, comprising: sequentially obtaining the task name of each task according to the execution order of each task in the task flow, to obtain a task name queue; and the running state of each task is determined according to the task information and the abnormality judgment data, comprising: determining the length of the pre-task sequence of a task according to the pre-task sequence of the task; when the sequence number of the task name of the task in the task name queue is less than or equal to the length of the pre-task sequence of the task, it is determined that the running state of the task is an execution order abnormality, and the sequence number is the sequence number of the task name of the task in the task name queue; and when the sequence number of the task name of the task in the task name queue is greater than the length of the pre-task sequence of the task, the running state of each task is determined based on the matching condition of the task in the pre-task sequence and the pre-task of the task in the task flow.

[0013] In another possible implementation manner, the running state of each task is determined based on matching of the tasks in the task sequence and the preceding tasks of the task in the task flow, including: matching, by each task in the task sequence of the task, the task corresponding to the task name in the task name queue with a sequence number in a reference interval, the reference interval being a sequence number interval determined according to the sequence number of the task and the length of the task sequence of the preceding tasks of the task, and used to indicate the positions of the task names of the preceding tasks of the task in the task flow in the task name queue; when the task corresponding to the task name in the task name queue with the sequence number in the reference interval is inconsistent with each task in the task sequence of the preceding tasks of the task, determining that the running state of the task is an execution sequence exception; and when the task corresponding to the task name in the task name queue with the sequence number in the reference interval is consistent with each task in the task sequence of the preceding tasks of the task, determining that the running state of the task is normal.

[0014] In another possible implementation manner, before the running state of each task is determined according to the task information and the abnormality judgment data, the method further includes: verifying the abnormality judgment data based on a preset threshold range.

[0015] In a second aspect, a task monitoring apparatus is provided, which can include: an acquisition module configured to acquire task information of each task in a task flow when the task flow is executed; and a monitoring module configured to determine a running state of each task according to the task information and abnormality judgment data, the abnormality judgment data being generated by simulation data obtained by pre-simulating each task.

[0016] In a possible implementation manner, the abnormality judgment data includes at least one of an execution duration threshold value, a scheduling delay duration threshold value, an execution abnormality duration threshold value, and a task sequence of preceding tasks of the task, the task sequence of the preceding tasks being used to indicate a sequence of tasks executed before the corresponding task in the task flow.

[0017] In another possible implementation manner, the abnormality judgment data includes the execution duration threshold value, the acquisition module is specifically configured to acquire an entry time and an exit time of each frame in each task; and the monitoring module is specifically configured to determine that the running state of the task is an execution time exception when a difference between the entry time and the exit time of the same frame of the task is greater than the execution duration threshold value.

[0018] In another possible implementation manner, the abnormality judgment data includes the scheduling delay duration threshold value, the acquisition module is specifically configured to acquire an entry time of each frame in each task; and the monitoring module is specifically configured to determine that the running state of the task is a scheduling delay exception when a difference between the entry times of two consecutive frames of the task is greater than the scheduling delay duration threshold value corresponding to the task.

[0019] In another possible implementation manner, the abnormality judgment data comprises an execution abnormality duration threshold, the obtaining module is specifically configured to obtain a current time and an entry time of each frame of the tasks, and the monitoring module is specifically configured to determine that the running state of the task is execution abnormality when a difference between the entry time of the most recent frame of the task and the current time is greater than the execution abnormality duration threshold corresponding to the task.

[0020] In another possible implementation manner, the monitoring module is further configured to query a process of the task, and determine that the running state of the task is blocking or dead loop when the process of the task exists, and determine that the running state of the task is abnormal exit when the process of the task does not exist.

[0021] In another possible implementation manner, the abnormality judgment data comprises a task predecessor sequence of the task, the obtaining module is specifically configured to obtain task names of the tasks in sequence according to an execution order of the tasks in the task flow to obtain a task name queue, and the monitoring module is specifically configured to determine a length of the task predecessor sequence of the task according to the task predecessor sequence of the task, determine that the running state of the task is execution order abnormality when a sequence number of the task name of the task in the task name queue is less than or equal to the length of the task predecessor sequence of the task, the sequence number being a sequence number corresponding to the task name of the task in the task name queue, and determine the running state of each task based on a matching condition of the tasks in the task predecessor sequence of the task and the predecessor tasks of the task in the task flow when the sequence number of the task name of the task in the task name queue is greater than the length of the task predecessor sequence of the task.

[0022] In another possible implementation manner, the monitoring module is specifically configured to compare, based on the tasks in the task predecessor sequence of the task, the tasks corresponding to the task names in the task name queue whose sequence numbers are located in a reference interval, the reference interval being a sequence number interval determined according to the sequence number of the task and the length of the task predecessor sequence of the task, and used to indicate positions of the task names of the predecessor tasks of the task in the task flow in the task name queue, determine that the running state of the task is execution order abnormality when the tasks corresponding to the task names in the task name queue whose sequence numbers are located in the reference interval are inconsistent with the tasks in the task predecessor sequence of the task, and determine that the running state of the task is normal when the tasks corresponding to the task names in the task name queue whose sequence numbers are located in the reference interval are consistent with the tasks in the task predecessor sequence of the task.

[0023] In another possible implementation manner, the monitoring module is further configured to verify the abnormality judgment data based on a preset threshold range.

[0024] In a third aspect, an electronic device is provided, which includes a processor, a memory and a communication interface. The memory and the communication interface are coupled with the processor, and the memory is configured to store computer program codes including computer instructions. When the processor executes the computer instructions, the electronic device is caused to perform the method according to any one of the first aspect.

[0025] In a fourth aspect, a computer readable storage medium is provided, which stores computer instructions. When the computer instructions are run on an electronic device, the electronic device is caused to perform the method according to any one of the first aspect.

[0026] In a fifth aspect, a computer program product is provided, which includes computer program instructions. When the computer program instructions are run on a processor, the processor is caused to perform the method according to any one of the first aspect.

[0027] In a sixth aspect, an apparatus (e.g., which can be a chip system) is provided, which includes a processor configured to support an electronic device to implement the method according to the first aspect. In a possible design, the apparatus further includes a memory configured to store necessary program instructions and data for the electronic device. When the apparatus is a chip system, it can be constituted by a chip or include a chip and other discrete devices.

[0028] In the embodiments of the present application, each task in a task flow, such as a smart driving task flow, can be simulated in advance before the task flow is executed, so as to obtain simulation data, and the abnormality judgment data can be generated based on the simulation data. Then, when the task flow is executed, the task information of each task is obtained, and the running state of each task can be judged according to the abnormality judgment data of each task and the task information during actual execution, so as to find the abnormal task in time, and thus the task, such as the smart driving task in the smart driving task flow, can be monitored conveniently and efficiently. BRIEF DESCRIPTION OF DRAWINGS

[0029] Figure 1 is a flow diagram of a task monitoring method provided by the embodiments of the present application;

[0030] Figure 2 is a flow diagram of another task monitoring method provided by the embodiments of the present application;

[0031] Figure 3 is a structural diagram of a task monitoring apparatus provided by the embodiments of the present application;

[0032] Figure 4 is a structural diagram of an electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION

[0033] The terminology used in the following description of the embodiments herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the description of the embodiments and the appended claims herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It also will be understood that the term " / " as used herein, e.g. in A / B, can mean "and / or", that is, A or B or both A and B. Further, the use of "and / or" in the text is merely an emphasis of association with the associated objects and indicates that there can be three relationships, for example, A and / or B, which means that A exists alone, A and B exist together, and B exists alone.

[0034] Reference throughout this specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are they necessarily mutually exclusive of one another. It is expressly understood that the embodiments described herein with either singly or in combination are exemplary and that other embodiments can be utilized and that logical structural, mechanical, electrical, chemical, process changes, etc., are contemplated.

[0035] The terms "first", "second", etc. in the following description of embodiments are used only for descriptive purposes and do not necessarily connote an order of importance, or a required or a preferred orientation or position. Thus, a feature described as "first" can imply or be implicitly understood as "second" and vice versa, unless otherwise explicitly indicated. The terms "a number of" and "a plurality of" as used herein mean two or more, unless the context clearly indicates otherwise.

[0036] With the continuous progress of computer technology and sensor technology, especially artificial intelligence technology, intelligent driving technology has become the focus of attention today. Intelligent driving has brought great influence to the development of the automotive industry.

[0037] An intelligent driving system is a very complex system, including a hardware platform, various software modules and algorithms, etc. During the operation of the intelligent driving system, a large number of various intelligent driving tasks will be executed. Therefore, it is crucial for the entire intelligent driving system to monitor the running state of each intelligent driving task in order to timely discover intelligent driving tasks with running abnormalities.

[0038] To this end, the present application provides a task monitoring method, which can be applied to an electronic device to monitor tasks in a task flow executed by the electronic device. The monitored task flow can be an intelligent driving task flow, an algorithm workflow, etc., which is not limited here. Taking monitoring of intelligent driving tasks as an example, the task monitoring method can be used to monitor the running state of each intelligent driving task in the intelligent driving task flow, so as to timely discover intelligent driving tasks with running abnormalities. Figure 1As shown, by the task monitoring method provided in the present application, the intelligent driving task to be executed can be determined in advance, and then the intelligent driving task to be executed is simulated to obtain simulation data. Thus, the monitoring task is initialized, the simulation data is loaded to generate abnormality judgment data, so as to start the monitoring task. Then, the intelligent driving task is started to execute the intelligent driving task flow. When the intelligent driving task flow is executed, the task information of each intelligent driving task can be acquired, so that the monitoring task can monitor each intelligent driving task according to the acquired task information and the generated abnormality judgment data, and determine the running state of each intelligent driving task.

[0039] In the following, the task monitoring method provided in the present application will be described in detail with reference to the accompanying drawings, taking monitoring of the intelligent driving task as an example.

[0040] As shown, Figure 2 The task monitoring method can specifically include the following S201-S202.

[0041] S201, when the intelligent driving task flow is executed, acquiring the task information of each intelligent driving task in the intelligent driving task flow.

[0042] According to different types of running states of the intelligent driving task to be monitored, the task information of the intelligent driving task in the intelligent driving task flow obtained can be different. For example, the obtained task information can be the current time, the entry time and the exit time of each frame in the intelligent driving task. That is, when the intelligent driving task is executed, the task receives a frame of data, the process of processing the frame of data is one frame of the task, and the start time corresponding to the process of processing the frame of data is the entry time of the frame, and the end time is the exit time. Thus, the entry time and the exit time of each frame can be used to determine whether the intelligent driving task has an abnormal running state such as execution abnormality, scheduling delay abnormality, and execution time abnormality, in combination with corresponding abnormality judgment data (such as an execution time threshold of the intelligent driving task, a scheduling delay time threshold, an execution abnormality time threshold, and the like). For another example, the obtained task information can also be the sequence number of each intelligent driving task in the intelligent driving task flow (that is, the sequence value corresponding to the arrangement of the intelligent driving task in the task queue of the task flow). Thus, the sequence number and corresponding abnormality judgment data (such as the sequence of the previous task corresponding to the intelligent driving task, that is, the sequence of the task executed before the task in the task flow) can be used to determine whether the intelligent driving task has an abnormal running state such as execution sequence abnormality. Of course, in actual applications, the obtained task information can also include the task name or other identifiers corresponding to each intelligent driving task, so that the task information and abnormality judgment data of the intelligent driving task can be matched and corresponded based on the task name or the corresponding identifier when the running state of the intelligent driving task is determined. Alternatively, the obtained task information can also be other information data in the task execution process, which is not limited here and can be configured according to actual running state monitoring requirements and in combination with related abnormality judgment data.

[0043] As an example, the manner of obtaining the task information of the intelligent driving task can be actively reporting the corresponding task information when the intelligent driving task flow is executed. For example, taking the obtained task information as the entry time, the exit time and the task name of each frame in each intelligent driving task as an example, when each intelligent driving task is executed, the intelligent driving task can report the entry time (such as T1) at the entry of each frame, and report the task name and the exit time (such as T2) at the exit, so as to obtain the task information by actively reporting. For another example, taking the obtained task information as the task name as an example, when the intelligent driving task flow is executed, when a certain intelligent driving task starts to be executed, the task name of the intelligent driving task is reported, so that the intelligent driving task name queue arranged according to the execution order of the intelligent driving task can be obtained. The intelligent driving task name queue can save the execution order of each intelligent driving task while saving the task name of each intelligent driving task. Since the task names in the task name queue are sequentially enqueued according to the execution order of the task, the order of each task name in the task name queue corresponds to the order of the corresponding task in the task flow.

[0044] As another example, the manner of obtaining the task information of the intelligent driving task can also be to obtain the task information of each intelligent driving task by setting an anchor point in the intelligent driving task execution algorithm, which is not limited here.

[0045] S202, determining the running state of each intelligent driving task according to the task information and the abnormality judgment data.

[0046] The abnormality judgment data can be simulation data generated according to simulation of each task.

[0047] For example, before executing the intelligent driving task flow, the intelligent driving tasks corresponding to the intelligent driving task flow can be simulated to obtain simulation data. For example, after the intelligent driving task flow corresponding to the intelligent driving demand is generated, the parameters of each intelligent driving task in the intelligent driving task flow to be executed can be obtained, such as the task name, the execution period, the initial execution offset in the period, the sequence relationship between tasks, and the like. Then, based on these parameters, each intelligent driving task is simulated by using software-in-the-loop simulation or hardware-in-the-loop simulation to obtain simulation data. The simulation data can include the execution time of each frame corresponding to each intelligent driving task, the interval time between the entry times of adjacent frames, the sequence of the preceding tasks corresponding to the task, and the like. Thus, the execution time threshold of the corresponding task (i.e., the worst-case execution time) can be estimated based on the execution time of each frame corresponding to each task in the simulation data, and the scheduling delay time threshold of the corresponding task (i.e., the worst-case scheduling delay) can be estimated based on the interval time between the entry times of adjacent frames. The execution abnormal time threshold can also be calculated based on a preset multiple of the scheduling delay time threshold. Thus, at least one of the execution time threshold, the scheduling delay time threshold, the execution abnormal time threshold, and the sequence of the preceding tasks of the task can be used as abnormality judgment data.

[0048] It should be noted that before starting the intelligent driving task flow to be executed each time, the simulation of each intelligent driving task in the intelligent driving task flow can be performed to obtain simulation data to generate abnormality judgment data, so that the intelligent driving tasks can be monitored by the method provided in the present application when the intelligent driving task flow is executed. Of course, if the intelligent driving task flow to be executed each time is fixed and the corresponding intelligent driving tasks are always the same, the simulation of the intelligent driving tasks can be performed in advance to obtain simulation data, and the abnormality judgment data generated according to the simulation data can be configured as preset data, so that when the intelligent driving task flow is executed each time, the intelligent driving tasks can be monitored based on the configured abnormality judgment data by the method provided in the present application, without the need to repeatedly simulate the intelligent driving tasks, thereby improving the efficiency.

[0049] For example, the abnormality judgment data can include at least one of an execution time length threshold of the corresponding intelligent driving task (i.e., the maximum time for each frame of the corresponding intelligent driving task to normally run), a scheduling delay time length threshold (i.e., the maximum time between the entry times of adjacent two frames when the corresponding intelligent driving task normally runs), an execution abnormality time length threshold, a pre-task sequence of the intelligent driving task (the pre-task sequence can represent the intelligent driving tasks that need to be executed before the execution of the intelligent driving task), and the like. In actual application, the corresponding abnormality judgment data can be determined according to the type of the running state of the intelligent driving task that needs to be monitored in actual application. Of course, the abnormality judgment data can also include the task name of the corresponding intelligent driving task or other identifiers capable of identifying the intelligent driving task, so as to match and correspond the task information and the abnormality judgment data of the intelligent driving task based on the task name or the corresponding identifier when judging the running state of the intelligent driving task.

[0050] As an example, as shown in Table 1 below, the intelligent driving tasks in the intelligent driving task flow, i.e., intelligent driving task A, intelligent driving task B, intelligent driving task C, intelligent driving task D, and intelligent driving task E, are taken as examples for simulation, and the abnormality judgment data obtained according to the simulation data.

[0051] Table 1

[0052] Task name Execution duration threshold Scheduling delay duration threshold Preceding task sequence Intelligent driving task A 20 5 EDC Intelligent driving task B 25 8 CA Intelligent driving task C 30 6 ED Intelligent driving task D 18 10 E Intelligent driving task E 10 3

[0053] As can be seen from Table 1, the abnormality judgment data includes task name, execution duration threshold, scheduling delay duration threshold, and preceding task sequence. For the intelligent driving task flow, intelligent driving task E, intelligent driving task D, and intelligent driving task C need to be executed first before intelligent driving task A is executed, intelligent driving task C and intelligent driving task A need to be executed first before intelligent driving task B is executed, intelligent driving task E and intelligent driving task D need to be executed first before intelligent driving task C is executed, and intelligent driving task E need to be executed first before intelligent driving task D is executed. That is, the intelligent driving task execution order corresponding to the intelligent driving task flow is intelligent driving task E, intelligent driving task D, intelligent driving task C, intelligent driving task A, and intelligent driving task B in sequence. For example, the sequence number of intelligent driving task E in the intelligent driving task flow can be 01, the sequence number of intelligent driving task D in the intelligent driving task flow can be 02, the sequence number of intelligent driving task C in the intelligent driving task flow can be 03, the sequence number of intelligent driving task A in the intelligent driving task flow can be 04, and the sequence number of intelligent driving task B in the intelligent driving task flow can be 05. Thus, it can be seen that in the intelligent driving task flow executed in the normal order, the sequence number (such as X) of each intelligent driving task satisfies X-1≥L, where L is the length of the preceding task sequence (i.e., the number of intelligent driving tasks included in the preceding task sequence) corresponding to the intelligent driving task. Moreover, the sequence number of each intelligent driving task in the preceding task sequence of the intelligent driving task satisfies the interval [X-L, X-1], and X is the sequence number of the intelligent driving task. For example, for intelligent driving task B, its sequence number in the intelligent driving task flow executed in the normal order is 05, and the length of its corresponding preceding task sequence is 2. It can be seen that its sequence number 05 satisfies the above condition. Moreover, the sequence numbers 03 and 04 of intelligent driving task C and intelligent driving task A in the preceding task sequence of intelligent driving task B also satisfy the above interval.

[0054] As a possible implementation, before determining the running state of each intelligent driving task according to the task information and the abnormality judgment data, or when the above-mentioned abnormality judgment data is obtained, the abnormality judgment data can also be verified to determine whether the abnormality judgment data is abnormal. If it is determined that the abnormality judgment data is not abnormal, the step of determining the running state of each intelligent driving task according to the task information and the abnormality judgment data is performed.

[0055] For example, the checking of whether the abnormality judgment data has abnormal data can be checking whether the pre-task sequences in the abnormality judgment data are reasonable, such as checking whether there is a conflict between the pre-task sequences of each intelligent driving task, and if there is a conflict, the pre-task sequence with the conflict is considered as abnormal data. For another example, the checking of whether the abnormality judgment data has abnormal data can also be checking whether the execution time threshold and / or the scheduling delay time threshold in the abnormality judgment data are abnormal, such as checking whether the execution time threshold and / or the scheduling delay time threshold of each intelligent driving task is not in the preset threshold range, and it can be determined that the execution time threshold or the scheduling delay time threshold not in the preset reasonable range is abnormal data.

[0056] In the embodiments of the present application, when determining the running state of each intelligent driving task according to the task information and the abnormality judgment data, this step can be performed based on different task information and abnormality judgment data according to different types of running states to be monitored.

[0057] As an example, when the task information includes the current time, the entry time and the exit time of each frame in the intelligent driving task flow to be executed, and the abnormality judgment data includes the execution abnormality time threshold, the execution time threshold and the scheduling delay time threshold, the running state of each corresponding intelligent driving task can be determined according to the task information and the abnormality judgment data, whether it is a scheduling delay abnormality, an execution abnormality, an execution time abnormality, etc.

[0058] For example, for any one intelligent driving task, the difference between the entry time of two consecutive frames (such as deltaT1), the difference between the entry time of the latest frame and the current time (such as deltaT2), and the difference between the entry time and the exit time of the same frame (such as deltaT3) can be calculated according to the current time and the entry time and exit time of each frame of the intelligent driving task. Thus, when the difference between the entry time of two consecutive frames in the intelligent driving task is greater than the scheduling delay duration threshold corresponding to the intelligent driving task (i.e., the difference between the entry time of two consecutive frames exceeds the maximum scheduling delay time), it is determined that the running state of the intelligent driving task is scheduling delay abnormality. When the difference between the entry time of the latest frame in the intelligent driving task and the current time is greater than the execution abnormality duration threshold corresponding to the intelligent driving task (for example, the execution abnormality duration threshold can be twice the scheduling delay duration threshold, of course, the multiple in actual application can also be set to other preset multiples such as 3 times, 1.5 times, etc., which is not limited here, and can be set according to actual conditions), it is determined that the running state of the intelligent driving task is execution abnormality. For example, taking twice the scheduling delay duration threshold as the execution abnormality duration threshold as an example, when the difference between the entry time of the latest frame in the intelligent driving task and the current time is greater than the execution abnormality duration threshold corresponding to the intelligent driving task, it means that the intelligent driving task has not been scheduled for two consecutive frames, indicating that the intelligent driving task has execution abnormality. Of course, when the difference between the entry time and the exit time of a frame in the intelligent driving task is greater than the execution duration threshold corresponding to the intelligent driving task (i.e., the execution time of a frame exceeds the maximum time in normal operation), it is determined that the running state of the intelligent driving task is execution time abnormality. It should be noted that in some possible embodiments, the calculation of the above deltaT1, deltaT2 and deltaT3 can be performed periodically according to a preset time duration for each intelligent driving task in the intelligent driving task stream, or can be performed once when a new frame of the intelligent driving task is generated, which is not limited here. In some possible embodiments, the above processes of determining the running state of the intelligent driving task by combining deltaT1, deltaT2 and deltaT3 with the corresponding abnormality judgment data can be set individually according to actual needs, only one of the running state determination methods is executed, or two or three of the running state determination methods are combined and executed, which is not limited here. When performing the corresponding running state determination method, according to the required task information, the corresponding task information can be obtained first, and then the corresponding implementation method of determining the running state according to the task information and the abnormality judgment data is performed.

[0059] In a case where it is determined that the running state of the intelligent driving task is an execution exception, the process of the intelligent driving task can be further queried. If the process of the intelligent driving task is queried (i.e., the process of the intelligent driving task exists), it can be determined that the running state of the intelligent driving task is a blocking or a dead loop in the execution exception. If the process of the intelligent driving task cannot be queried (i.e., the process of the intelligent driving task does not exist), it can be determined that the running state of the intelligent driving task is an abnormal exit in the execution exception.

[0060] As another example, when the task information includes task names of the intelligent driving tasks and a task name queue corresponding to the task names, and the exception judgment data includes a precedent task sequence of the intelligent driving tasks, it can be determined according to the task information and the exception judgment data whether the running state of each intelligent driving task is an execution sequence exception. For example, the length of the precedent task sequence (i.e., the number of intelligent driving tasks included in the precedent task sequence) can be calculated based on the precedent task sequence of the intelligent driving tasks. Then, according to the sequence number (i.e., the order value corresponding to the arrangement of the task names in the task name queue) of the task name of the intelligent driving task in the task name queue, and the length of the precedent task sequence corresponding to the intelligent driving task, it can be determined whether the running state of the intelligent driving task is an execution sequence exception.

[0061] For example, for any intelligent driving task, it can be determined whether the intelligent driving task is an execution sequence exception according to the size relationship between the sequence number (e.g., index) of the task name of the intelligent driving task in the task name queue and the length (e.g., L) of the precedent task sequence of the intelligent driving task. For example, if index-1

[0062] Accordingly, if it is determined that the running state of the intelligent driving task is abnormal in execution order according to the size relationship between the sequence number of the task name in the task name queue and the length of the sequence of the preceding tasks of the intelligent driving task, such as index-1≥L or index>L, the running state of the task can be further determined based on the matching of the tasks in the sequence of the preceding tasks of the task and the preceding tasks of the task in the intelligent driving task flow. For example, each task in the sequence of the preceding tasks of the task can be compared with each task corresponding to the task name in the task name queue whose sequence number is located in the reference interval [index-L, index-1] to determine whether each intelligent driving task in the sequence of the preceding tasks in the simulation data of the intelligent driving task is consistent with each task corresponding to the task name in the task name queue whose sequence number is located in the reference interval (such as whether the task names are consistent, or whether other identifiers capable of identifying the corresponding tasks are consistent, etc.). If not, it can be determined that the actual preceding task of the intelligent driving task in the currently executed intelligent driving task flow is inconsistent with the sequence of the preceding tasks in the abnormal judgment data (i.e., the expected preceding task), and therefore, the running state of the intelligent driving task is determined to be abnormal in execution order. The reference interval is a sequence number interval determined according to the sequence number of the task and the length of the sequence of the preceding tasks of the task, and is used to indicate the positions of the task names of the preceding tasks of the task in the task name queue, and specific reference intervals can be referred to the above examples of reference intervals.

[0063] For example, based on the foregoing example, in actual application, the task name queue can also be set as a fixed-length queue, so that the task names of the tasks in the intelligent driving task flow are saved to the task name queue in a circular queue mechanism. The length of the task name queue can be the maximum allowed length (kMaxLength) of the preceding task sequence obtained through simulation, i.e., the length of the longest task execution path in the intelligent driving task flow. Of course, the length can also be set according to actual conditions, which is not limited here. By setting the fixed-length task name queue, the task names of the tasks that are executed too early and will not be used for execution sequence anomaly judgment can be discarded, reducing the memory occupation of the task name queue. Based on this, when the sequence numbers of the task names in the task name queue exceed the length of the task name queue, the sequence numbers can be limited within the length of the queue by means of backtracking. For example, taking the length of the task name queue as kMaxLength, when the sequence numbers of the task names in the task name queue satisfy index≥2kMaxLength, the sequence numbers can be backtracked by index―=kMaxLength, i.e., the sequence numbers are backtracked by kMaxLength corresponding values, so that the range of the sequence numbers is limited to [1, kMaxLength]. In this way, the calculation complexity of the execution sequence anomaly judgment based on the foregoing example can be reduced, the calculation resource occupation can be reduced, and the calculation efficiency can be improved. Moreover, the memory overflow can be avoided by backtracking the sequence numbers.

[0064] Alternatively, in some other possible implementations, the sequence numbers of the intelligent driving tasks in the intelligent driving task flow being executed can also be directly obtained, i.e., the order values of the intelligent driving tasks arranged in sequence in the intelligent driving task flow, and the sequence numbers are taken as the task information. Thus, based on the sequence number (such as X) and the length (such as L) of the preceding task sequence of the intelligent driving task, the execution sequence anomaly is judged and monitored according to the foregoing example. For example, if X―1

[0065] The process of determining whether the running state of the intelligent driving task is an execution sequence exception shown in the foregoing example can be performed periodically on each intelligent driving task in the intelligent driving task flow according to a preset time length, or can be performed once each time a new data frame is input into the intelligent driving task flow, and the like, which is not limited herein. In actual application, when determining the corresponding running state according to the task information and the abnormality judgment data, the corresponding task information can be acquired first, and then the running state is determined.

[0066] It should be noted that in the embodiments of the present application, the running state of each intelligent driving task can be determined respectively according to the foregoing example, so as to realize the monitoring of each intelligent driving task. In some other possible embodiments, when it is determined that the running state of the intelligent driving task is not a scheduling delay exception, an execution exception, an execution time exception, and an execution sequence exception based on the foregoing example, it can also be determined that the running state of the intelligent driving task is normal. For example, based on the foregoing example, when each task in the task sequence of the task is consistent with each task corresponding to the task name with the sequence number in the task name queue located in the reference interval, it is determined that the running state of the task is normal.

[0067] According to the task monitoring method provided in the embodiments of the present application, each task in the task flow can be simulated before the task flow is executed, so as to generate abnormality judgment data according to the simulation data. Then, when the task flow is executed, the task information of each task is acquired, and the running state of each task can be determined according to the abnormality judgment data of each task and the task information during actual execution, so as to discover abnormal tasks in time, for example, tasks with a running state of a scheduling delay exception, an execution exception (blocking or dead loop, abnormal exit, etc.), an execution time exception, and an execution sequence exception. In this way, the task such as the intelligent driving task can be monitored conveniently and efficiently.

[0068] According to the foregoing example, various equivalent modifications or changes can be made by those skilled in the art, and such modifications or changes also fall within the scope of the embodiments of the present application.

[0069] It can be understood that, in order to realize the above functions, the electronic device can include hardware structures and / or software modules corresponding to the functions. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of the examples described in the embodiments disclosed in the present application, the embodiments of the present application can be realized in the form of hardware or a combination of hardware and computer software. Whether a certain function is realized in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of the present application.

[0070] The embodiments of the present application can divide the functions of the modules according to the above method examples, so as to obtain a device capable of realizing the above method examples. For example, Figure 3 A structural schematic diagram of a task monitoring device provided by an embodiment of the present application is shown. As shown in the figure, Figure 3 The device can include: an acquisition module 301, configured to acquire task information of each task in a task flow when the task flow is executed; and a monitoring module 302, configured to determine a running state of each task according to the task information and abnormality judgment data, the abnormality judgment data being generated by simulation data obtained by pre-simulating each task.

[0071] In a possible implementation, the abnormality judgment data includes at least one of an execution duration threshold, a scheduling delay duration threshold, an execution abnormality duration threshold, and a sequence of preceding tasks of the task, the sequence of preceding tasks being used to indicate a sequence of tasks executed before the corresponding task in the task flow.

[0072] In another possible implementation, the abnormality judgment data includes an execution duration threshold, the acquisition module 301 is specifically configured to acquire an entry time and an exit time of each frame in each task; and the monitoring module 302 is specifically configured to determine that the running state of the task is an execution time abnormality when a difference between the entry time and the exit time of the same frame of the task is greater than the execution duration threshold.

[0073] In another possible implementation, the abnormality judgment data includes a scheduling delay duration threshold, the acquisition module 301 is specifically configured to acquire an entry time of each frame in each task; and the monitoring module 302 is specifically configured to determine that the running state of the task is a scheduling delay abnormality when a difference between the entry times of two consecutive frames of the task is greater than the scheduling delay duration threshold corresponding to the task.

[0074] In another possible implementation, the abnormality judgment data includes an execution abnormality duration threshold, the obtaining module 301 is specifically configured to obtain a current time and an entry time of each frame of the tasks; and the monitoring module 302 is specifically configured to determine that the running state of the task is an execution abnormality when a difference between the entry time of the most recent frame of the task and the current time is greater than the execution abnormality duration threshold corresponding to the task.

[0075] In another possible implementation, the monitoring module 302 is further configured to query a process of the task; and when the process of the task exists, determine that the running state of the task is a blocking or a dead loop; and when the process of the task does not exist, determine that the running state of the task is an abnormal exit.

[0076] In another possible implementation, the abnormality judgment data includes a task predecessor sequence of the task, the obtaining module 301 is specifically configured to obtain task names of the tasks in the task flow in sequence according to an execution order of the tasks in the task flow, to obtain a task name queue; and the monitoring module 302 is specifically configured to determine a length of the task predecessor sequence of the task according to the task predecessor sequence of the task; when a sequence number of the task name of the task in the task name queue is less than or equal to the length of the task predecessor sequence of the task, determine that the running state of the task is an execution order abnormality, and the sequence number is a corresponding sequence number of the task name of the task in the task name queue in sequence; and when the sequence number of the task name of the task in the task name queue is greater than the length of the task predecessor sequence of the task, determine the running state of each task based on a matching condition of the tasks in the task predecessor sequence of the task and the predecessor tasks of the task in the task flow.

[0077] In another possible implementation, the monitoring module 302 is specifically configured to compare, based on the tasks in the task predecessor sequence of the task, the tasks corresponding to the task names in the task name queue whose sequence numbers are located in a reference interval, the reference interval being a sequence number interval determined according to the sequence number of the task and the length of the task predecessor sequence of the task, and used to indicate positions of the task names of the predecessor tasks of the task in the task flow in the task name queue; when the tasks corresponding to the task names in the task name queue whose sequence numbers are located in the reference interval are inconsistent with the tasks in the task predecessor sequence of the task, determine that the running state of the task is an execution order abnormality; and when the tasks corresponding to the task names in the task name queue whose sequence numbers are located in the reference interval are consistent with the tasks in the task predecessor sequence of the task, determine that the running state of the task is normal.

[0078] In another possible implementation, the monitoring module 302 is further configured to verify the abnormality judgment data based on a preset threshold range.

[0079] The embodiment of the present application further provides an electronic device, which can be a smart driving device, and can also be other computing devices capable of performing a smart driving task or other task flow. Figure 4 A structural schematic diagram of an electronic device provided by the embodiment of the present application is shown. As shown in the figure, the electronic device comprises a bus 401, a processor 402, a memory 403 and a communication interface 404. The processor 402, the memory 403 and the communication interface 404 communicate through the bus 401. The memory 403 stores computer program codes, and the computer program codes comprise computer instructions, which, when executed by the processor 402, cause the electronic device to perform the method provided by the foregoing embodiment. It should be understood that the number of processors 402 and memories 403 in the electronic device is not limited by the present application. Figure 4

[0080] The bus 401 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus 401 can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, Figure 4 only one line is used in the figure, but it does not mean that there is only one bus or only one type of bus. The bus 401 can include a path for transmitting information between various components (for example, the memory 403, the processor 402, the communication interface 404) of the electronic device.

[0081] The processor 402 can include any one or more of a central processor, a graphics processor, a microprocessor (MP), or a digital signal processor (DSP).

[0082] The memory 403 can include a volatile memory (for example, a random access memory (RAM)), and can also include a non-volatile memory (for example, a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid state drive (SSD)).

[0083] The communication interface 404 uses a command distribution module such as but not limited to a network interface card and a transceiver to realize the communication between the electronic device and other devices or communication networks.​

[0084] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the computer program comprises program instructions. When the program instructions are executed by a processor, the processor executes the method provided in the foregoing embodiment.

[0085] In addition, each function unit or module of the device for implementing the foregoing method examples in the embodiment of the present application can be integrated in one processing unit, or each unit can be physically present independently, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function unit.

[0086] When the integrated unit is realized in the form of a software function unit and sold or used as an independent product, the integrated unit can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present application essentially or the parts that make contributions to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to make a device (which can be a single-chip microcomputer, a chip, etc.) or a processor execute all or part of the steps of the methods described in the embodiments of the present application. The foregoing storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk and various media that can store program codes.

[0087] Therefore, the embodiment of the present application further provides a computer program product, which comprises computer program instructions. When the computer program instructions are run by a processor, the processor executes the method provided in the foregoing embodiment.

[0088] The embodiment of the present application further provides a chip system, which comprises at least one processor and at least one interface circuit. The processor and the interface circuit can be interconnected through a circuit. For example, the interface circuit can be used to receive signals from other devices (for example, a memory of an electronic device). For another example, the interface circuit can be used to send signals to other devices (for example, a processor).

[0089] For example, the interface circuit can read instructions stored in a memory and send the instructions to the processor. When the instructions are executed by the processor, the chip system can execute each step in the foregoing embodiment. Of course, the chip system can also include other discrete devices, and the embodiment of the present application does not make a specific limitation in this regard.

[0090] The above merely provides the specific implementation of the present application, but the protection scope of the present application is not limited to this. Any change or replacement within the technical scope disclosed by the present application should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method of task monitoring, characterized by, The method comprises: obtaining task information of each task in the task flow when the task flow is executed; determining a running state of each task according to the task information and abnormality judgment data, the abnormality judgment data being generated according to simulation data obtained by simulating each task in advance.

2. The method of claim 1, wherein, The abnormality judgment data comprises at least one of an execution time length threshold value, a scheduling delay time length threshold value, an execution abnormality time length threshold value, and a sequence of preceding tasks of the task, the sequence of preceding tasks being used to indicate a sequence of tasks executed before the corresponding task in the task flow.

3. The method of claim 2, wherein, The abnormality judgment data comprises an execution time length threshold value, and the obtaining of the task information of each task in the task flow comprises: obtaining an entry time and an exit time of each frame in each task; The determining of the running state of each task according to the task information and the abnormality judgment data comprises: when a difference between the entry time and the exit time of the same frame of the task is greater than the execution time length threshold value, determining that the running state of the task is an execution time abnormality.

4. The method of claim 2, wherein, The abnormality judgment data comprises a scheduling delay time length threshold value, and the obtaining of the task information of each task in the task flow comprises: obtaining an entry time of each frame in each task; The determining of the running state of each task according to the task information and the abnormality judgment data comprises: when a difference between the entry times of two consecutive frames of the task is greater than the scheduling delay time length threshold value corresponding to the task, determining that the running state of the task is a scheduling delay abnormality.

5. The method of claim 2, wherein, The abnormality judgment data comprises an execution abnormality time length threshold value, and the obtaining of the task information of each task in the task flow comprises: obtaining a current time and an entry time of each frame in each task; The determining of the running state of each task according to the task information and the abnormality judgment data comprises: when a difference between the entry time of the most recent frame of the task and the current time is greater than the execution abnormality time length threshold value corresponding to the task, determining that the running state of the task is an execution abnormality.

6. The method of claim 5, wherein, After determining that the running state of the task is an execution abnormality, the method further comprises: inquiring a process of the task; when the process of the task exists, determining that the running state of the task is a blocking or a dead loop; when the process of the task does not exist, determining that the running state of the task is an abnormal exit.

7. The method of claim 2, wherein, The abnormality judgment data comprises a sequence of preceding tasks of the task, and the obtaining of the task information of each task in the task flow comprises: obtaining task names of each task in sequence according to an execution order of each task in the task flow to obtain a task name queue; The determining of the running state of each task according to the task information and the abnormality judgment data comprises: determining a length of the sequence of preceding tasks of the task according to the sequence of preceding tasks of the task; when a serial number of the task name of the task in the task name queue is less than or equal to the length of the sequence of preceding tasks of the task, determining that the running state of the task is an execution order abnormality, the serial number being a corresponding sequence number of the task name of the corresponding task arranged in sequence in the task name queue. When the sequence number of the task name of the task in the task name queue is greater than the length of the sequence of the preceding tasks of the task, a running state of each of the tasks is determined based on matching of the tasks in the sequence of the preceding tasks and the preceding tasks of the task in the task flow.

8. The method of claim 7, wherein, The determining of the running state of each of the tasks based on the matching of the tasks in the sequence of the preceding tasks and the preceding tasks of the task in the task flow comprises: performing comparison between each of the tasks in the sequence of the preceding tasks of the task and a task corresponding to a task name in the task name queue and having a sequence number in a reference interval, the reference interval being a sequence number interval determined according to the sequence number of the task and the length of the sequence of the preceding tasks of the task, and used to indicate positions of the task names of the preceding tasks of the task in the task flow in the task name queue; when the task corresponding to the task name in the task name queue and having the sequence number in the reference interval is inconsistent with each of the tasks in the sequence of the preceding tasks of the task, determining that the running state of the task is an execution sequence exception; when the task corresponding to the task name in the task name queue and having the sequence number in the reference interval is consistent with each of the tasks in the sequence of the preceding tasks of the task, determining that the running state of the task is normal.

9. The method of claim 1, wherein, Before the determining of the running state of each of the tasks according to the task information and the exception determination data, the method further comprises: verifying the exception determination data based on a preset threshold range.

10. A task monitoring apparatus characterized by comprising: comprises: an acquisition module, configured to acquire task information of each task in a task flow when the task flow is executed; a monitoring module, configured to determine a running state of each of the tasks according to the task information and exception determination data, the exception determination data being simulation data generated in advance according to simulation of each of the tasks.

11. An electronic device, comprising: The electronic device comprises a processor, a memory and a communication interface; the memory and the communication interface are coupled with the processor, the memory is configured to store computer program code, and the computer program code comprises computer instructions; when the processor executes the computer instructions, the electronic device executes the method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, the computer program comprising program instructions, when the program instructions are executed by a processor, the processor executes the method according to any one of claims 1 to 9.