Task alarm method and device, electronic equipment, storage medium and product
By building a task path and an alarm mechanism that accurately locates the target task, the problem of inaccurate task alarms in the existing technology is solved, the alarm scope is narrowed, and the timeliness of task execution is guaranteed.
Patent Information
- Application Number
- CN202410373203.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-27
- Publication Date
- 2025-09-30
AI Technical Summary
The task alarm mechanism in the existing technology causes the downstream task to be alerted when the upstream task alerts, which makes it impossible to achieve accurate alarms and cannot guarantee the timely execution of tasks.
After receiving the alarm information of the first task in the task set, the dependency relationship is determined according to the task flow information, and the first task path and the second task path are constructed, so as to accurately locate the target task and send the alarm information, avoiding alarming for tasks that do not need to be alarmed.
The accuracy of alarms is improved, the scope of alarms is narrowed, and the smooth execution of time-sensitive tasks is ensured.
Smart Images

Figure CN120723593A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a task alarm method, a task alarm device, an electronic device, a computer-readable storage medium, and a computer program product. Background Art
[0002] Currently, in the field of task management, a task alarm mechanism is usually set up, so that when a task is detected to have an abnormal operation, an alarm can be issued for the task so that relevant personnel can deal with the abnormal situation in a timely manner.
[0003] In related technologies, when performing task alerts, if an upstream task triggers an alert, all downstream tasks will be alerted, making it impossible to accurately issue alerts. Moreover, task alerts are usually executed based on a preset cycle, which cannot guarantee that time-sensitive tasks will be executed smoothly and on time. Summary of the Invention
[0004] The present application provides a task alarm method, a task alarm device, an electronic device, a computer-readable storage medium, and a computer program product, which can narrow the alarm scope and improve the accuracy of the alarm.
[0005] In a first aspect, the present application provides a task alert method, comprising: upon receiving first alert information for a first task in a task set, determining, based on the first task and task flow information of the task set, a second task dependent on the first task, and a first task path from the first task to the second task, from the task set; wherein the task set includes multiple tasks, and the task flow information is used to characterize the dependency relationship between the multiple tasks; determining a second task path based on the second task and the task flow information; determining a target task from the tasks in the second task path based on the first task path and the second task path; and sending second alert information for the target task.
[0006] In second aspect, the present application provides a task alarm device, which includes: a determination module for determining, upon receiving a first alarm information for a first task in a task set, a second task that depends on the first task and a first task path from the first task to the second task from the task set based on the task flow information of the first task and the task set; wherein the task set includes multiple tasks, and the task flow information is used to characterize the dependency relationship between the multiple tasks; the determination module is also used to determine a second task path based on the second task and the task flow information; the determination module is also used to determine a target task from the tasks of the second task path based on the first task path and the second task path; and an alarm module is used to send a second alarm information for the target task.
[0007] In a third aspect, the present application provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores one or more computer programs executable by the at least one processor, and one or more of the computer programs are executed by the at least one processor to enable the at least one processor to execute the above-mentioned task alarm method.
[0008] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the above-mentioned task alarm method when executed by a processor.
[0009] In a fifth aspect, the present application provides a computer program product, characterized in that it includes a computer-readable code, or a non-volatile computer-readable storage medium carrying a computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above-mentioned task alarm method.
[0010] The embodiment provided by the present application can, after receiving the first alarm information for the first task in the task set, determine the second task that depends on the first task from the task set, as well as the first task path from the first task to the second task, based on the task flow information of the first task and the task set, and determine the second task path based on the second task and the task flow information, and then determine the target task from the tasks in the second task path based on the first task path and the second task path, thereby sending the second alarm information for the target task, rather than simply and directly alarming all downstream tasks of the first task. In this way, on the one hand, it is possible to avoid alarming tasks that do not need to be alarmed, narrow the alarm scope, and improve the accuracy of the alarm. On the other hand, it can also ensure the smooth execution of time-sensitive tasks.
[0011] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The accompanying drawings are used to provide a further understanding of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. The above and other features and advantages will become more apparent to those skilled in the art by describing the detailed exemplary embodiments with reference to the accompanying drawings. In the accompanying drawings:
[0013] Figure 1 A flowchart of a task alarm method provided in an embodiment of the present application.
[0014] Figure 2 A schematic diagram of a first task path provided in an embodiment of the present application.
[0015] Figure 3 A schematic diagram of a second task path provided in an embodiment of the present application.
[0016] Figure 4 A flowchart of a task alarm method provided in an embodiment of the present application.
[0017] Figure 5 A block diagram of a task alarm device provided in an embodiment of the present application.
[0018] Figure 6 A block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0019] To help those skilled in the art better understand the technical solutions of the present application, the following description of exemplary embodiments of the present application is provided in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding. These details should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0020] In the absence of conflict, the various embodiments of the present application and the various features therein may be combined with each other.
[0021] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0022] The terms used herein are only used to describe specific embodiments and are not intended to limit this application. As used herein, the singular forms "a" and "the" are also intended to include the plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "comprising" and / or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements and / or components is specified, but the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof is not excluded. Similar words such as "connected" or "connected" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect.
[0023] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this application, and will not be interpreted as having an idealized or overly formal meaning unless expressly defined as such herein.
[0024] In related technologies, the developed warning strategy usually results in an upstream task being warned, causing downstream tasks to be warned at the same time. The warning range is too large and accurate warning cannot be achieved.
[0025] In view of this, embodiments of the present application provide a task alarm method, a task alarm device, an electronic device, a computer-readable storage medium, and a computer program product.
[0026] The embodiment provided by the present application can, after receiving the first alarm information for the first task in the task set, determine the second task that depends on the first task from the task set, as well as the first task path from the first task to the second task, based on the task flow information of the first task and the task set, and determine the second task path based on the second task and the task flow information, and then determine the target task from the tasks in the second task path based on the first task path and the second task path, thereby sending the second alarm information for the target task, rather than simply and directly alarming all downstream tasks of the first task. In this way, on the one hand, it is possible to avoid alarming tasks that do not need to be alarmed, narrow the alarm scope, and improve the accuracy of the alarm. On the other hand, it can also ensure the smooth execution of time-sensitive tasks.
[0027] The task alarm method according to the embodiment of the present application can be executed by an electronic device such as a terminal device or a server. The terminal device can be an in-vehicle device, a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, an in-vehicle device, a wearable device, etc. The method can be implemented by a processor calling a computer-readable program instruction stored in a memory. The server can be an independent physical server, a server cluster composed of multiple servers, or a cloud server capable of cloud computing.
[0028] In a first aspect, an embodiment of the present application provides a task alarm method.
[0029] Figure 1 This is a flowchart of a task alarm method provided in an embodiment of the present application. Figure 1 , the method may include the following steps.
[0030] In step S11, when the first alarm information for the first task in the task set is received, the second task that depends on the first task and the first task path from the first task to the second task are determined from the task set according to the task flow information of the first task and the task set.
[0031] In some optional implementations, the task set includes multiple tasks, the task flow information is used to characterize the dependency relationship between the multiple tasks, and the second task is a task with an execution time limit. The tasks can be data processing tasks related to various data types, which is not limited in the embodiments of the present application.
[0032] For example, data processing tasks include various offline tasks in data warehouse scenarios. These offline tasks can perform calculations, analysis, and mining on the corresponding data through batch processing or scheduled processing.
[0033] For example, multiple tasks in a task set can be arranged according to a certain execution order and dependency relationships, thereby forming a task tree. The execution order and dependency relationships between tasks can be represented by task flow information. The execution order can be determined based on the processing logic of the tasks, and the dependency relationships are associated with the input and output data of the tasks.
[0034] For example, task a is a data receiving task, used to receive data to be classified, and task b is a data classification task, used to classify data. The processing logic of task a and task b can be determined as first receiving the data to be classified based on task a, and then classifying the data to be classified based on task b. Therefore, the execution order of the two can be determined as: task a, task b (that is, execute task a first, then execute task b).
[0035] For example, if the output data of task c is the input data of task d, it can be determined that task d is a task that depends on task c.
[0036] In some optional implementations, data processing tasks can be classified according to whether there is an execution time limit, and tasks in a task set can be divided into time-sensitive tasks and non-time-sensitive tasks, where time-sensitive tasks refer to tasks with execution time limits, and non-time-sensitive tasks refer to tasks without execution time limits.
[0037] In some optional implementations, during operation, a first alarm message for the first task may be received from within the system or outside the system, based on which it can be determined that the first task has an operational failure. Since the first task is not an isolated task, there are some tasks in the task set that depend on the first task. Therefore, once the first task fails, it may cause other tasks that depend on the first task to fail to execute smoothly. In addition, among the tasks that depend on the first task, there may be time-sensitive tasks. Since time-sensitive tasks have execution time restrictions, it is necessary to identify these tasks as soon as possible so that they can be processed in a timely manner to avoid exceeding the task execution time limit.
[0038] In some optional implementations, determining a second task from the task set that is dependent on the first task based on task flow information of the first task and the task set includes: determining, based on the task flow information and output data of the first task, from downstream tasks of the first task that has an execution time limit as the second task. In other words, the second task is a task determined based on the output data of the first task, is located downstream of the first task, and is also a time-sensitive task.
[0039] In some optional implementations, the first task path is a task path constructed with the first task as the starting task and the second task as the ending task. There may be no task, one or more tasks between the first task and the second task, which is mainly related to the task flow information and is not limited in this embodiment of the present application.
[0040] The following combination Figure 2 The process of determining the first task path is described in detail.
[0041] Figure 2 This is a schematic diagram of a first task path provided in an embodiment of the present application. Figure 2 , the task set includes multiple tasks (for example, data processing tasks).
[0042] When the first alarm information for task a is received (ie the first task is task a), the downstream tasks adjacent to task a are first determined. Figure 2 It can be seen that the downstream task adjacent to task a is task a1, and the output data of task a is the input data of task a1. Task a1 is not a time-sensitive task. Therefore, task a1 is determined as intermediate task 11, and the downstream tasks adjacent to task a1 are determined. The downstream task adjacent to task a1 is task a2_c2, and the output data of task a1 is the input data of task a2_c2. Since task a2_c2 is not a time-sensitive task, task a2_c2 is determined as intermediate task 12, and the downstream tasks adjacent to task a2_c2 are determined. The downstream task adjacent to task a2_c2 is task a3_c1, and the output data of task a2_c2 is the input data of task a3_c1. Task a3_c1 is not a time-sensitive task. Therefore, task a3_c1 is determined as intermediate task 13, and the downstream tasks adjacent to task a3_c1 are determined. The downstream task adjacent to task a3_c1 is task c1. The output data of task a3_c1 is the input data of task c1, and task c1 is not a time-sensitive task. Therefore, task c1 is determined to be intermediate task 14. Then, the downstream task adjacent to task c1 is determined. The downstream task adjacent to task c1 is task d1. The output data of task c1 is the input data of task d1, and task d1 is a time-sensitive task. Therefore, task d1 is determined to be the second task.
[0043] Furthermore, taking task a as the starting task and task d1 as the end task, and combining the four intermediate tasks, the corresponding first task path can be constructed: task a → task a1 → task a2_c2 → task a3_c1 → task c1 → task d1.
[0044] Similarly, when the first alarm information for task b is received (i.e., the first task is task b), the downstream tasks adjacent to task b can be determined, and the corresponding intermediate tasks 21 (i.e., task b1), intermediate tasks 22 (i.e., task b2_c2), intermediate tasks 23 (i.e., task b3_c1) and intermediate tasks 24 (i.e., task c2) can be determined accordingly, until task d1 is reached. Since task d1 is a time-sensitive task (task b1, task b2_c2, task b3_c1 and task c2 are not time-sensitive tasks), task d1 is determined to belong to the second task, and the corresponding first task path can be constructed: task b→task b1→task b2_c2→task b3_c1→task c2→task d1.
[0045] It should be noted that in Figure 2 In the example, although tasks e1 and f1 are also downstream tasks of task b, since the input data of these tasks are irrelevant to task b, these tasks do not depend on task b and therefore do not participate in constructing the first task path.
[0046] In step S12, a second task path is determined according to the second task and the task flow information.
[0047] In some optional implementations, the second task path ends with the second task. For example, the second task path is a task path constructed with the second task as the end task and the final node task (i.e., a task without an upstream task) as the starting task. In other words, with the second task as the final task, the task searches for upstream tasks sequentially based on the dependency relationship between input data and output data until a final node task without an upstream task is found. These found tasks are then connected in sequence to form the second task path.
[0048] In some optional implementations, determining the second task path based on the second task and task flow information includes: determining the first input data with a limited execution time from the input data of the second task; determining the valid task associated with the first input data from the upstream tasks of the second task based on the task flow information; and constructing the second task path based on the valid task and the second task.
[0049] For example, the second task includes multiple input data, some of which may be associated with the second task's execution time limit, while others may not. Therefore, it is necessary to determine the input data associated with the second task's execution time limit from the second task's input data. This input data is the first input data. Furthermore, after determining the first input data, tasks associated with the first input data can be found from upstream tasks of the second task based on the task flow information, as valid tasks, until the task is traced back to the final node task. Finally, a corresponding second task path can be constructed based on these valid tasks and second tasks.
[0050] It should be noted that when a task is located upstream of a second task and is associated with the first input data, the task is determined to be a valid task; correspondingly, if a task is located upstream of a second task but is not associated with the first input data, the task is determined not to be a valid task. The valid task is associated with the first input data, including two situations where the output data of the valid task is directly associated or indirectly associated with the first input data. Direct association means that the valid task is the upper-level task of the second task, the two are adjacent, and the output data of the valid task is the first input data; indirect association means that there is at least one other valid task between the valid task and the second task, and of any two adjacent valid tasks, at least one output data of one belongs to the input data of the other, and the output data of the valid task adjacent to the second task includes the first input data. For example, the output data d1 of task 1 is the input data of task 2, and the output data d2 of task 2 is the input data of task 3, wherein task 3 is the second task, and d2 is the first input data with a limited execution time for task 3. Therefore, Task 2 is a valid task directly associated with the first input data of Task 3; for Task 1, there is a valid task (i.e., Task 2) between Task 1 and Task 3, and the output data d1 of Task 1 belongs to the input data of Task 2, and the output data d2 of Task 2 is the first input data of Task 3. Therefore, Task 1 is a valid task indirectly associated with the first input data.
[0051] Furthermore, although Task 3 cannot directly affect the first input data d2 of Task 1, it will output data d1. As the output data of Task 2, d1 will affect the output data d2 of Task 2. Therefore, Task 3 will indirectly affect the first input data d2 of Task 1. Therefore, the output data of an indirectly associated valid task has an indirect effect on the first input data. Although it cannot directly affect the first input data, it can affect the valid task that outputs the first input data.
[0052] For example, task a is the second task, and its adjacent upstream tasks include task b and task c, and task c's adjacent upstream tasks include task d, and task d has no upstream tasks. Among them, the first input data of task a includes sr11, the output data of task b includes sr12, the output data of task c includes sr11 and its input data includes sr13, and the output data of task d includes sr13. Therefore, it can be seen that among the upstream tasks adjacent to task a, the output data of task c includes its first input data. Therefore, it is determined that the two are directly associated and task c is a valid task; although task b is also adjacent to task a, the output data of task b does not include the first input data. Therefore, task b is not a valid task. Further, for task c, its adjacent upstream task is task d, and the output data of task d includes the input data of task c. Therefore, it is determined that task d is an indirectly associated valid task. Since task d has no upstream tasks and is a last-level node task, the second task path can be determined to be: task d → task c → task a.
[0053] In some optional implementations, based on the task flow information, valid related tasks associated with the first input data are determined from the upstream tasks of the second task, including: determining the first valid task from the upstream tasks on which the second task depends based on the output data of the upstream task on which the second task depends and the first input data of the second task; determining the i+1th valid task from the upstream tasks on which the i-th valid task depends based on the output data of the upstream task on which the i-th valid task depends and the input data of the i-th valid task, where i is an integer and i≥1; if there is no upstream task for the i+1th valid task, determining the first to i+1th valid tasks as valid tasks.
[0054] It can be seen from this that valid tasks can be determined in sequence, and these valid tasks can be connected in series with the second task to obtain the corresponding second task path.
[0055] It should be noted that if there are multiple (i+1)th valid tasks among the upstream tasks that the (i+1)th valid task depends on, the (i+2)th valid task must be determined for each (i+1)th valid task until it is determined that there are no upstream tasks. In other words, the second task path may not correspond to a single task route, but may have multiple path branches, but the method for determining each path branch is similar.
[0056] The following combination Figure 3 The process of determining the second task path is described in detail.
[0057] Figure 3 A schematic diagram of a second task path provided in an embodiment of the present application. Figure 3, the task set includes multiple tasks (for example, data processing tasks).
[0058] like Figure 3 As shown, task d1 is the second task, and its first input data includes par1, par2, and par3. The upstream tasks on which task d1 depends include tasks c1 and c2. Task c1's output data includes par1, and task c2's output data includes par2 and par3. Since these output data are both the first input data of task d1, tasks c1 and c2 are both considered the first valid task. Subsequently, tasks c1 and c2 need to search for corresponding valid tasks in their respective upstream tasks.
[0059] First, for task c1, the upstream tasks it depends on include task h1 and task a3_c1. Among them, the output data of task h1 will not affect the output par1 of task c1, and the output data par11 of task a3_c1 will affect the output par1 of task c1 (for example, par11 is an essential parameter for calculating par1). Therefore, it can be determined that task a3_c1 is the second valid task, and task h1 does not belong to the second valid task.
[0060] For task a3_c1, the upstream tasks it depends on include task g1, task g2 and task a2_c2. Among them, the output data par111 of task g1 will affect the output par11 of task a3_c1, the output data par112 of task g2 will also affect the output par11 of task a3_c1, and the output data of task a2_c2 will not affect the output par11 of task a3_c1. Therefore, it can be determined that task g1 and task g2 are the third valid tasks, and task a2_c2 does not belong to the third valid task.
[0061] Since there are no upstream tasks for tasks g1 and g2, the process of searching for a valid task upstream for task c1 is completed. A similar method can be used to determine a corresponding valid task for task c2.
[0062] like Figure 3 As shown, task b3_c1 is the second valid task corresponding to task c2, and task f1 is the corresponding third valid task.
[0063] In summary, it can be determined that the second task path includes three branches, namely: task g1 → task a3_c1 → task c1 → task d1, task g2 → task a3_c1 → task c1 → task d1, and task f1 → task b3_c1 → task c2 → task d1.
[0064] In step S13 , according to the first task path and the second task path, a target task is determined from the tasks in the second task path.
[0065] In some optional implementations, the target task includes a first target task and / or a second target task; accordingly, based on the first task path and the second task path, the target task is determined from the tasks in the second task path, including: determining the first intersecting task of the first task path and the second task path, and determining that the first intersecting task belongs to the first target task; and / or, in the second task path, determining a task that is pre-configured with a fault handling plan, and using the determined task as the second target task. The first intersecting task refers to the first identical or overlapping task between the first task path and the second task path in the direction from the upstream task to the downstream task; the plan configuration information is information used to characterize whether a fault handling plan is configured in the task, and whether the task belongs to the second target task can be determined based on the plan configuration information of the task.
[0066] For example, the first task path is: Task b → Task b1 → Task b1_c2 → Task b3_c1 → Task c2 → Task d1, and the second task path is: Task b → Task b2 → Task b2_c2 → Task b3_c1 → Task d2. Task b2's contingency plan configuration information indicates that it has a pre-configured fault handling plan, while the contingency plan configuration information for the other tasks indicates that these tasks do not have fault handling plans configured. Therefore, Task b3_c1 is the first intersecting task and belongs to the first target task; Task b2, because it has a configured fault handling plan, belongs to the second target task.
[0067] In summary, the target tasks can be divided into two categories: one is determined based on the intersection of the first task path and the second task path, and the other is determined based on the contingency configuration information of the tasks in the second task path.
[0068] The following combination Figure 2 and Figure 3 Describe the process of determining the target task. Figure 2 and Figure 3 As can be seen, the first intersecting tasks of the first and second task paths, from upstream to downstream, include tasks a3_c1 and b3_c1. Therefore, tasks a3_c1 and b3_c1 are determined to be the first target tasks. Furthermore, if a task with a pre-configured fault handling plan exists in the second task path, that task is determined as the second target task. All target tasks can be determined using this method.
[0069] In step S14, second warning information for the target task is sent.
[0070] In some optional implementations, the second alarm information is alarm information about the target task. Through the second alarm information, relevant personnel can clearly identify the task that is being alarmed (i.e., the target task), so that they can take targeted alarm processing measures to ensure that the second task can be smoothly executed within its execution time limit and avoid the second task from being executed beyond the deadline.
[0071] In some optional implementations, after an alarm is issued for the target task, the method may further include: in a case where the target task is pre-configured with a fault handling plan, executing the target task according to the fault handling plan to execute the second task within the execution time limit of the target time-limited task; or, in a case where the target task is not pre-configured with a fault handling plan, determining the fault handling plan for the target task based on the execution time limit information of the second task, and executing the target task according to the fault handling plan.
[0072] From this, it can be seen that for the first target task, the fault handling plan for the first target task can be determined based on the execution time limit information of the second task, and the fault handling plan can be executed to ensure that the second task completes the execution operation within its execution time limit; for the second target task, since it is configured with a fault handling plan, the second target task can be directly executed according to the fault handling plan, which can ensure that the second task completes the execution operation within its execution time limit.
[0073] In some optional implementations, if a path branch of the second task path includes both the first target task and the second target task, as long as at least one of the two can be executed smoothly and timely, it can be ensured that the first input data corresponding to the branch can be passed to the second task in a timely and accurate manner, so that the second task can perform task processing based on the first input data of each branch and obtain the corresponding task processing results.
[0074] For example, in Figure 3In the second task path shown, tasks a3_c1 and task c1 belong to the same path branch, and task a3_c1 is the upstream task of task c1. If task a3_c1 is the first target task and task c1 is the second target task, then the fault handling plan for task a3_c1 can be determined based on the execution time limit of the second task (i.e., task d1), and task a3_c1 can be executed according to the fault handling plan. After task a3_c1 is executed promptly and smoothly, the output data par11 can be promptly transferred to task c1, so that task c1 can also be executed promptly and smoothly. Furthermore, after task c1 is executed promptly and smoothly, the output data par1 can be promptly transferred to task d1, so that task d1 can also be executed promptly and smoothly. In another implementation method, task c1 can be directly executed according to the fault handling plan of task c1, and the output data par1 can be obtained and promptly transferred to task d1, so that task d1 can be executed promptly and smoothly, without having to formulate a fault handling plan for task a3_c1.
[0075] It can be seen from this that no matter which processing method is adopted, as long as the first input data can be delivered to the second task in a timely manner, the second task can be executed in a timely manner.
[0076] It should be noted that the alarming of the first task will affect the execution of each task in the first task path; and the smooth and timely execution of each task in the second task path will affect the execution of the second task. For the first intersecting task between the first and second task paths (i.e., the first target task), the tasks upstream of the first target task in the second task path are not affected by the first task and can be executed smoothly and timely. However, the tasks downstream of the first target task in the second task path are affected by the first target task and may not be executed in time, thus affecting the execution of the second task. Specifically, if the first target task can be executed smoothly and timely, then the tasks downstream of it in the second task path can also be executed smoothly and timely, and accordingly, the second task can also be executed in time. If the first target task cannot be executed smoothly and timely, then the tasks downstream of it in the second task path cannot be executed smoothly and timely, and accordingly, the second task cannot be executed in time. Therefore, the first target task becomes the key to whether the second task can be executed smoothly and timely. Similarly, for the second target task, it is pre-configured with a fault handling plan. Therefore, by issuing an alarm for these tasks, the fault handling plan can be used to ensure that the second target task can be executed smoothly. Furthermore, since the second target task can be executed smoothly and timely, the tasks downstream of the second target task in the second task path can also be executed smoothly and timely, so that the second task can be executed in a timely manner.
[0077] In summary, the embodiment of the present application issues an alarm for the target task, which effectively narrows the alarm scope and improves the alarm accuracy compared to the related technology of directly issuing a unified alarm for all downstream tasks of the first task, so that relevant personnel can perform more targeted processing based on the alarm information, thereby improving the efficiency of alarm processing.
[0078] The embodiment provided by the present application can, after receiving the first alarm information for the first task in the task set, determine the second task that depends on the first task and the first task path between the first task and the second task from the task set based on the task flow information of the first task and the task set, and determine the second task path based on the second task and the task flow information, and then determine the target task from the tasks in the second task path based on the first task path and the second task path, thereby sending the second alarm information for the target task, rather than simply and directly alarming all downstream tasks of the first task. In this way, on the one hand, it is possible to avoid alarming tasks that do not need to be alarmed, thereby improving the accuracy of the alarm, and on the other hand, it can also ensure the smooth execution of time-sensitive tasks.
[0079] Figure 4 A flowchart of a task alarm method provided in an embodiment of the present application. Figure 4 , the task alarm method may include the following steps.
[0080] Step S401 : Screening out tasks with execution time limits from a task set and determining these tasks as time-sensitive tasks.
[0081] Step S402 : upon receiving first alarm information for a first task in a task set, determining, from downstream tasks of the first task according to task flow information, a time-sensitive task associated with output data of the first task as a second task.
[0082] Step S403 : constructing a first task path according to the task flow information, taking the first task as the starting task and the second task as the ending task.
[0083] Step S404: determining first input data with a limited execution time from the input data of the second task.
[0084] Step S405 : determining a first valid task from the upstream tasks that the second task depends on based on the output data of the upstream task that the second task depends on and the first input data of the second task.
[0085] Step S406 , determining the (i+1)th valid task from the upstream tasks on which the i-th valid task depends based on the output data of the upstream task on which the i-th valid task depends and the input data of the i-th valid task, where i is an integer and i≥1.
[0086] Step S407 : When there is no upstream task for the (i+1)th valid task, the first to (i+1)th valid tasks are determined as valid tasks.
[0087] Step S408: construct a second task path according to the valid task and the second task.
[0088] Step S409: determine the first intersecting task of the first task path and the second task path, and determine that the first intersecting task belongs to the first target task; and, in the second task path, determine the task with a pre-configured fault handling plan, and use the determined task as the second target task.
[0089] Step S410: Sending second alarm information for a target task, where the target task includes a first target task and a second target task.
[0090] Step S411: If the target task is pre-configured with a fault handling plan, the target task is executed according to the fault handling plan; or, if the target task is not pre-configured with a fault handling plan, the fault handling plan of the target task is determined according to the execution time limit information of the second task, and the target task is executed according to the fault handling plan.
[0091] Step S412: Execute the second task according to the input first input data to obtain an execution result of the second task.
[0092] It is understood that the various method embodiments mentioned in this application can be combined with each other to form combined embodiments without violating the principle logic. Due to space limitations, this application will not go into details. Those skilled in the art will understand that in the above-mentioned methods of specific implementation, the specific execution order of each step should be determined by its function and possible internal logic.
[0093] In a second aspect, an embodiment of the present application provides a task alarm device.
[0094] Figure 5 A block diagram of a task alarm device provided in an embodiment of the present application.
[0095] Reference Figure 5 , an embodiment of the present application provides a task alarm device, and the task alarm device 500 includes the following modules.
[0096] a determination module 501 configured to, upon receiving first alarm information for a first task in a task set, determine, from the task set, a second task that is dependent on the first task and a first task path from the first task to the second task based on the first task and task flow information of the task set;
[0097] The task set includes multiple tasks, and the task flow information is used to represent the dependency relationship between the multiple tasks.
[0098] The determination module 501 is further configured to determine a second task path according to the second task and the task flow information.
[0099] The determination module 501 is further configured to determine a target task from the tasks in the second task path according to the first task path and the second task path.
[0100] The alarm module 502 is configured to send a second alarm message for the target task.
[0101] In some optional implementations, when the determination module 501 determines the second task path based on the second task and task flow information, it performs the following steps: determining the first input data with a limited execution time from the input data of the second task; determining the valid task associated with the first input data from the upstream tasks of the second task based on the task flow information; and constructing the second task path based on the valid task and the second task.
[0102] In some optional implementations, when the determination module 501 determines the valid related tasks associated with the first input data from the upstream tasks of the second task based on the task flow information, the following steps are performed: based on the output data of the upstream task on which the second task depends and the first input data of the second task, the first valid task is determined from the upstream tasks on which the second task depends; based on the output data of the upstream task on which the i-th valid task depends and the input data of the i-th valid task, the i+1th valid task is determined from the upstream tasks on which the i-th valid task depends, where i is an integer and i≥1; if there is no upstream task for the i+1th valid task, the first to i+1th valid tasks are determined as valid tasks.
[0103] In some optional implementations, the target task includes a first target task and / or a second target task; accordingly, when the determination module 501 determines the target task from the tasks in the second task path based on the first task path and the second task path, it performs the following steps: determining the first intersection task of the first task path and the second task path, and determining that the first intersection task belongs to the first target task; and / or, in the second task path, determining a task with a pre-configured fault handling plan, and using the determined task as the second target task.
[0104] In some optional implementations, when the determination module 501 determines a second task that depends on the first task from the task set based on the task flow information of the first task and the task set, it performs the following steps: based on the task flow information and the output data of the first task, determine a second task with an execution time limit from the downstream tasks of the first task.
[0105] In some optional implementations, after the alarm module 502 sends the second alarm information for the target task, the task alarm device 500 is further used to perform the following steps: when the target task is pre-configured with a fault handling plan, execute the target task according to the fault handling plan to execute the second task within the execution time limit of the second task; or, when the target task is not pre-configured with a fault handling plan, determine the fault handling plan for the target task based on the execution time limit information of the second task, and execute the target task according to the fault handling plan.
[0106] The embodiment provided by the present application can, after receiving the first alarm information for the first task in the task set, determine the second task that depends on the first task and the first task path from the task set based on the task flow information of the first task and the task set by the determination module, and determine the second task path based on the second task and the task flow information by the determination module, and then determine the target task from the tasks in the second task path based on the first task path and the second task path by the determination module, so as to send the second alarm information for the target task through the alarm module, rather than simply and directly alarming all downstream tasks of the first task. In this way, on the one hand, it is possible to avoid alarming tasks that do not need to be alarmed, thereby improving the accuracy of the alarm, and on the other hand, it is possible to ensure the smooth execution of time-sensitive tasks.
[0107] Each module in the task alarm device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0108] In addition, the present application also provides electronic devices and computer-readable storage media, which can be used to implement any task alarm method provided by the present application. The corresponding technical solutions and descriptions are referred to the corresponding records in the method section and will not be repeated here.
[0109] Figure 6 A block diagram of an electronic device provided in an embodiment of the present application.
[0110] Reference Figure 6An embodiment of the present application provides an electronic device, which includes: at least one processor 601; at least one memory 602, and one or more I / O interfaces 603, connected between the processor 601 and the memory 602; wherein the memory 602 stores one or more computer programs that can be executed by the at least one processor 601, and the one or more computer programs are executed by the at least one processor 601 to enable the at least one processor 601 to perform the above-mentioned task alarm method.
[0111] Each module in the above-mentioned electronic device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0112] The present application also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor / processing core, implements the task alarm method described above. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium.
[0113] An embodiment of the present application also provides a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above-mentioned task alarm method.
[0114] It will be understood by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable storage medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium).
[0115] As is well known to those skilled in the art, the term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information (such as computer-readable program instructions, data structures, program modules or other data). Computer storage media includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technology, portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, as is well known to those skilled in the art, communication media typically contains computer-readable program instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0116] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in the computer-readable storage medium in each computing / processing device.
[0117] The computer program instructions for performing the operation of the present application can be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data or source code or object code written in any combination of one or more programming languages, wherein the programming language includes object-oriented programming languages such as Smalltalk, C++, and conventional procedural programming languages such as "C" language or similar programming languages. Computer-readable program instructions can be executed completely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or executed completely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer by any type of network including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (such as by using an Internet service provider to connect to the Internet). In certain embodiments, by utilizing the state information of computer-readable program instructions to personalize electronic circuits, such as programmable logic circuits, field programmable gate arrays (FPGAs) or programmable logic arrays (PLAs), the electronic circuits can execute computer-readable program instructions, thereby realizing various aspects of the present application.
[0118] The computer program product described herein may be implemented in hardware, software, or a combination thereof. In one embodiment, the computer program product is implemented as a computer storage medium. In another embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).
[0119] Various aspects of the present application are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.
[0120] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0121] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0122] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the system, method and computer program product according to multiple embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and the part of the module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a special hardware-based system that performs the function or action of the specification, or can be implemented by a combination of special hardware and computer instructions.
[0123] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for purposes of limitation. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly indicated, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, it will be understood by those skilled in the art that various changes in form and detail may be made without departing from the scope of the present application as set forth in the appended claims.
Claims
1. A task alarm method, characterized in that: The method comprises: Upon receiving first alarm information for a first task in a task set, determining, from the task set, a second task that is dependent on the first task and a first task path from the first task to the second task based on task flow information of the first task and the task set; wherein the task set includes a plurality of tasks, and the task flow information is used to characterize dependency relationships between the plurality of tasks; determining a second task path according to the second task and the task flow information; Determining a target task from tasks in the second task path according to the first task path and the second task path; Sending a second warning message for the target task.
2. The method according to claim 1, characterized in that The determining the second task path according to the second task and the task flow information includes: determining first input data with a limited execution time from the input data of the second task; determining, based on the task flow information, a valid task associated with the first input data from upstream tasks of the second task; Constructing the second task path according to the valid task and the second task.
3. The method according to claim 2, characterized in that The determining, based on the task flow information, a valid task associated with the first input data from upstream tasks of the second task, includes: determining a first valid task from the upstream tasks on which the second task depends, according to output data of the upstream task on which the second task depends and first input data of the second task; Determine, based on output data of an upstream task on which the i-th valid task depends and input data of the i-th valid task, an i+1-th valid task from the upstream tasks on which the i-th valid task depends, where i is an integer and i≥1; In a case where there is no upstream task for the (i+1)th valid task, the first to (i+1)th valid tasks are determined as the valid tasks.
4. The method according to claim 1, wherein The target task includes a first target task and / or a second target task; The determining, based on the first task path and the second task path, a target task from tasks in the second task path includes: Determining a first intersecting task between the first task path and the second task path, and determining that the first intersecting task belongs to a first target task; and / or, In the second task path, a task pre-configured with a fault handling plan is determined, and the determined task is used as the second target task.
5. The method according to claim 1, wherein The determining, from the task set according to the first task and the task flow information of the task set, a second task that is dependent on the first task includes: A second task with an execution time limit is determined from downstream tasks of the first task according to the task flow information and the output data of the first task.
6. The method according to claim 1, characterized in that After sending the second warning information for the target task, the method further includes: In a case where the target task is pre-configured with a fault handling plan, executing the target task according to the fault handling plan to execute the second task within the execution time limit of the second task; or, In the case that the target task has no pre-configured fault handling plan, a fault handling plan for the target task is determined according to the execution time limit information of the second task, and the target task is executed according to the fault handling plan.
7. A task alarm device, characterized in that: The device comprises: a determination module configured to, upon receiving first alarm information for a first task in a task set, determine, based on task flow information of the first task and the task set, a second task that is dependent on the first task and a first task path from the first task to the second task from the task set; wherein the task set includes a plurality of tasks, and the task flow information is used to characterize dependency relationships between the plurality of tasks; The determining module is further configured to determine a second task path according to the second task and the task flow information; The determining module is further configured to determine a target task from tasks in the second task path based on the first task path and the second task path; The alarm module is used to send a second alarm message for the target task.
8. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores one or more computer programs that can be executed by the at least one processor, and the one or more computer programs are executed by the at least one processor to enable the at least one processor to perform the task alarm method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the computer program implements the task alarm method according to any one of claims 1 to 6.
10. A computer program product, characterized in that The method comprises a computer-readable code or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the task alarm method according to any one of claims 1 to 6.