A mission critical monitoring method, apparatus and device and storage medium

By acquiring task dependencies and baseline configuration information, the earliest start and end times of tasks are calculated, the predicted completion time and critical path are determined, and timeout warnings are automatically issued. This solves the problems of complex task monitoring configuration and false alarms in existing technologies, and achieves accurate task monitoring and improved user experience.

CN115934460BActive Publication Date: 2026-04-21SHENZHEN LEAPFROG NEW TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN LEAPFROG NEW TECH CO LTD
Filing Date
2022-11-30
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing task monitoring methods are complex to configure, generate frequent false alarms, and fail to provide timely alerts, thus failing to effectively ensure the successful completion of critical tasks.

Method used

By acquiring task dependencies and baseline configuration information, the earliest start and end times of tasks are calculated, the predicted completion time and critical path are determined, and timeout warnings are automatically issued, simplifying configuration operations and reducing invalid alarms.

Benefits of technology

It achieves accurate task monitoring, reduces configuration operations, lowers the computational burden, improves user experience, and reduces invalid and duplicate alarms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115934460B_ABST
    Figure CN115934460B_ABST
Patent Text Reader

Abstract

The application discloses a kind of mission critical monitoring method, device and equipment and storage medium, the method comprises: obtaining task dependency relationship and baseline configuration information and the time information of each task in task dependency relationship;Time information includes scheduling time, running time length and actual start time and actual end time;Task dependency relationship is divided into several connected components;For each connected component, the earliest start time of each task is calculated according to scheduling time and actual start time;The earliest end time of each task is calculated according to the earliest start time and running time length and actual end time;According to each connected component and the earliest end time and baseline configuration information, the predicted completion time of each baseline and critical path are determined;According to predicted completion time and critical path and baseline configuration information, it is judged whether to carry out timeout early warning to each baseline.The method of the application can reduce the computing power of monitoring critical tasks, reduce invalid or repeated alarm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of mission monitoring technology, specifically to a method, apparatus, device, and storage medium for monitoring critical missions. Background Technology

[0002] With the continuous development of science and technology, big data platforms are becoming increasingly important. These platforms run various computing tasks for enterprise business analysis, typically numbering in the thousands, and sometimes in the hundreds of thousands or more. To ensure the smooth operation of these computing tasks and the timely, complete, and stable output of data, it is necessary to monitor these tasks.

[0003] Current technologies require manual configuration of monitoring and alerts for critical tasks and their upstream tasks to monitor them. However, this alert configuration is cumbersome and lacks coordination, often resulting in false alarms. For example, configuring a strict alert for only one upstream task might trigger an alert if the upstream task fails to complete on time due to a delay, but subsequent tasks run smoothly and the critical task is ultimately completed normally, rendering the alert unnecessary. Configuring alerts for multiple upstream tasks would be extremely labor-intensive, and it's impractical for users to check so many upstream tasks. Furthermore, configuring alert monitoring only for the last critical task results in a situation where it's too late to take appropriate action when an alert occurs. Therefore, a simple and effective critical task monitoring solution is urgently needed. Summary of the Invention

[0004] This invention provides a method, apparatus, device, and storage medium for monitoring critical tasks, in order to solve the problems of complex configuration, false alarms, and untimely alarms in existing task monitoring methods.

[0005] To address the aforementioned technical problems, in a first aspect, the present invention provides a method for monitoring critical tasks, comprising:

[0006] Obtain task dependencies and baseline configuration information, as well as time information for each task in the task dependencies; wherein, the time information includes scheduling time, runtime, actual start time, and actual end time;

[0007] The task dependencies are divided into several connected components;

[0008] For each connected component, the earliest start time of each task is calculated based on the scheduling time and the actual start time.

[0009] Calculate the earliest end time for each task based on the earliest start time, runtime, and actual end time.

[0010] Based on each connected component, the earliest end time, and the baseline configuration information, determine the predicted completion time and critical path of each baseline;

[0011] Based on the predicted completion time, critical path, and baseline configuration information, determine whether to issue a timeout warning for each baseline.

[0012] Optionally, calculating the earliest end time for each task based on the earliest start time, runtime, and actual end time includes:

[0013] For each task, determine whether the actual end time of the current task exists;

[0014] If it exists, the actual end time shall be taken as the earliest end time of the current task;

[0015] If it does not exist, calculate the earliest end time of the current task based on the earliest start time and runtime.

[0016] Optionally, calculating the earliest start time for each task includes:

[0017] For each task, determine whether the actual start time of the current task exists;

[0018] If it exists, the actual start time shall be taken as the earliest start time of the current task;

[0019] If it does not exist, determine whether the current task is the starting task of the connected component; if not, take the maximum value of the earliest end time of several upstream tasks of the current task and the scheduling time as the maximum value of the scheduling time; if it does exist and the scheduling time exists, take the scheduling time as the earliest start time of the current task; otherwise, take the current time as the earliest start time of the current task.

[0020] Optionally, determining the predicted completion time and critical path of each baseline based on each connected component, the earliest end time, and baseline configuration information includes:

[0021] Based on the key task information corresponding to each connected component and the baseline in the baseline configuration information, establish a mapping relationship between the connected components including the key tasks and the baseline.

[0022] For each baseline, based on the earliest end time and mapping relationship, the earliest end time of several key tasks corresponding to the current baseline is determined, and the maximum value is taken as the predicted completion time of the current baseline.

[0023] The key tasks corresponding to the predicted completion time, along with several upstream tasks, are used as the key subgraph of the current baseline.

[0024] The set of edges with the longest execution time in the critical subgraph is determined as the critical path of the current baseline.

[0025] Optionally, determining the set of edges with the longest execution time in the key subgraph as the critical path of the current baseline includes:

[0026] For each task in the key subgraph, determine whether the current task has downstream tasks; if so, calculate the difference between the earliest end time and the runtime of each downstream task, and calculate the maximum value between the difference and the scheduling time, and take the minimum value among several maximum values ​​as the latest start time of the current task; otherwise, take the earliest start time of the current task as the latest start time of the current task.

[0027] For each edge of the key subgraph, determine whether the sum of the earliest start time and runtime of the head task of the current edge is equal to the difference between the latest start time and waiting time of the tail task. If so, retain the edge.

[0028] Use the set of edges that are retained as the critical path of the current baseline;

[0029] The waiting time for the current task is the time between the completion of preparation work by several upstream tasks of the current task and the scheduling time of the current task.

[0030] Optionally, after determining whether to issue a timeout warning for each baseline, the method further includes:

[0031] If a timeout warning is issued for at least one baseline, for each baseline that issues a warning, the waiting time and preparation time of each task are calculated based on the time information of each task on the critical path of the current baseline.

[0032] Based on the waiting time, preparation time, and runtime, determine the abnormal task that causes a timeout warning for the current baseline;

[0033] The waiting time for the current task is the time between the completion of preparation work by several upstream tasks of the current task and the scheduling time of the current task.

[0034] The preparation time for the current task is the time between the completion of preparation work for several upstream tasks of the current task and the elapsed scheduling time of the current task, and the actual start time of the current task.

[0035] Optionally, the runtime is predicted based on historical runtime.

[0036] The prediction of the runtime of each task based on historical runtime includes:

[0037] For each task, calculate the average historical runtime of the current time at the same time in the historical period, and use it as the historical average runtime of the current task.

[0038] Calculate the duration change rate for several upstream tasks of the current task, and calculate the harmonic mean of the duration change rate; wherein the duration change rate is the ratio of the actual runtime to the historical average runtime.

[0039] The runtime of the current task is predicted based on the historical average duration and the harmonic mean.

[0040] In a second aspect, the present invention provides a monitoring device for critical tasks, including a data acquisition module, a task grouping module, a first calculation module, a second calculation module, a path extraction module, and a timeout warning module.

[0041] The data acquisition module is used to acquire task dependency relationships and baseline configuration information, as well as time information of each task in the task dependency relationships; wherein, the time information includes scheduling time, runtime, actual start time, and actual end time;

[0042] The task grouping module is used to divide the task dependencies into several connected components.

[0043] The first calculation module is used to calculate the earliest start time of each task for each connected component, based on the scheduling time and the actual start time.

[0044] The second calculation module is used to calculate the earliest end time of each task based on the earliest start time, runtime, and actual end time.

[0045] The path extraction module is used to determine the predicted completion time and critical path of each baseline based on each connected component, the earliest end time, and the baseline configuration information.

[0046] The timeout warning module is used to determine whether to issue a timeout warning for each baseline based on the predicted completion time, critical path, and baseline configuration information.

[0047] Thirdly, the present invention provides a mission-critical monitoring device, comprising a memory and a processor, wherein:

[0048] The memory is used to store computer programs;

[0049] The processor is used to read the computer program in the memory and execute the steps of the monitoring method for critical tasks as provided in the first aspect above.

[0050] Fourthly, the present invention provides a computer-readable storage medium having a readable computer program stored thereon, which, when executed by a processor, implements the steps of the monitoring method for a critical task as provided in the first aspect above.

[0051] Compared with the prior art, the method, apparatus, device, and storage medium for monitoring critical tasks provided by the present invention have the following beneficial effects:

[0052] This invention can automatically schedule task dependencies and the time information of each task based on the baseline configured by the user according to their needs, determine the predicted completion time and critical path of the baseline, and determine whether to issue a timeout warning based on the predicted completion time, critical path, and baseline configuration information. When determining the predicted completion time of the baseline, the actual start time and actual end time of each task are considered, making the predicted completion time more accurate. This invention simplifies and reduces the configuration operations for task monitoring; only a baseline needs to be configured for critical tasks to analyze the predicted completion time and corresponding critical path of the configured baseline in advance. This invention can output the completion time and critical path of all baselines at once, and does not perform alarm judgments for intermediate tasks; only a single comparison is needed to determine whether an alarm is needed, greatly reducing invalid and duplicate alarms, improving the user experience, and also reducing the computational burden of task monitoring. Attached Figure Description

[0053] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and not all embodiments. For those skilled in the art, other drawings obtained from these drawings without creative effort are all within the scope of protection of this application.

[0054] Figure 1 This is a flowchart illustrating a method for monitoring critical tasks provided in an embodiment of the present invention;

[0055] Figure 2 This is a schematic diagram of a task dependency graph provided in an embodiment of the present invention;

[0056] Figure 3 This is a schematic diagram of a connected component provided in an embodiment of the present invention;

[0057] Figure 4 This is a flowchart illustrating a process for determining the predicted completion time and critical path of each baseline, as provided in an embodiment of the present invention.

[0058] Figure 5 This is a flowchart illustrating another method for monitoring critical tasks provided in an embodiment of the present invention;

[0059] Figure 6 This is a schematic diagram of the structure of a monitoring device for critical tasks provided in an embodiment of the present invention;

[0060] Figure 7 This is a schematic diagram of the structure of another key task monitoring device provided in an embodiment of the present invention;

[0061] Figure 8 This is a schematic diagram of the structure of a critical task monitoring device provided in an embodiment of the present invention;

[0062] Figure 9 This is a schematic diagram of the structure of a computer-readable storage medium provided in an embodiment of the present invention. Detailed Implementation

[0063] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0064] To make the description of this disclosure more detailed and complete, illustrative descriptions of embodiments and specific examples of the present invention are provided below; however, these are not the only forms of implementing or utilizing the specific embodiments of the present invention. The embodiments cover features of multiple specific embodiments and the methods, steps, and their order for constructing and operating these specific embodiments. However, other specific embodiments may also be used to achieve the same or equivalent functions and step sequences. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of this application.

[0065] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in sequences other than those illustrated or described herein.

[0066] In the description of the embodiments of the present invention, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The word "and / or" in the text is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of this application, "multiple" means two or more. Other quantifiers should be understood similarly. The preferred embodiments described herein are only used to illustrate and explain the present invention and are not intended to limit the present invention. Furthermore, the embodiments and features in the embodiments of this application can be combined with each other without conflict.

[0067] Example 1

[0068] like Figure 1 The diagram shown is a flowchart illustrating a method for monitoring critical tasks according to an embodiment of the present invention, including the following steps:

[0069] Step S101: Obtain task dependency relationships and baseline configuration information, as well as time information for each task in the task dependency relationships.

[0070] The aforementioned task dependencies include several tasks with dependencies, and the aforementioned tasks include at least one critical task.

[0071] It should be noted that any implementation method that can realize the above-mentioned task dependency relationship can be applied to the embodiments of the present invention. For example, the above-mentioned task dependency relationship can be a task dependency relationship graph or a task dependency relationship table. The embodiments of the present invention do not impose any limitations on this.

[0072] like Figure 2 As shown, this is a schematic diagram of a task dependency graph provided in an embodiment of the present invention. The task dependency graph includes 10 tasks A, J, which have dependencies on each other.

[0073] As shown in Table 1 below, this is in accordance with the above. Figure 2 The task dependency graph in Table 1 corresponds to the task dependency table. The contents of the items in Table 1 can be customized according to the specific implementation. For example, in addition to the basic items such as "downstream" and "upstream" that indicate the dependency relationship between tasks, an item for "update time" can be added.

[0074] The information in Table 1 above indicates that the upstream tasks of task C include task A and task B.

[0075] Table 1: Task Dependency Table

[0076] Downstream Upstream Update time Task C Task A 2021-10-17 10:51:37 Task C Task B 2021-10-18 14:23:38 … … …

[0077] Specifically, the above tasks are scheduling tasks created in the big data scheduling platform, and the tasks mainly include pre-configured scheduling expressions.

[0078] It should be noted that any implementation of the scheduling expression that can configure the above-mentioned scheduling tasks can be applied to the embodiments of the present invention. For example, the implementation of the above-mentioned scheduling expression can be a cron expression or a user-defined function, etc. The embodiments of the present invention do not impose any limitations on this.

[0079] The aforementioned key tasks can be defined according to specific implementation needs; that is, a task can be configured as a key task.

[0080] As an alternative implementation, the aforementioned key tasks can be defined as tasks whose output in the big data scheduling platform is used by external systems or reports.

[0081] The baseline configuration information mentioned above includes the critical tasks corresponding to the baseline and the baseline's committed completion time.

[0082] More specifically, in this embodiment, the above baseline is associated with a group of tasks and a corresponding baseline commitment completion time is set, for example, a specific time within a natural day; the function of the above baseline is to issue an alarm if it is determined that the group of tasks associated with it cannot be fully completed by the time the baseline commitment completion time is reached.

[0083] The baselines mentioned above are used for configuration based on critical tasks. A single baseline can be configured with multiple critical tasks, and a single critical task can also be configured with multiple baselines.

[0084] The above time information includes scheduling time, runtime, actual start time, and actual end time.

[0085] The scheduling time of a task refers to the pre-configured start time for executing the task; the runtime of a task is the predicted duration required to execute the task.

[0086] Tasks that have actually started execution have a corresponding actual start time as mentioned above; tasks that have not actually started execution will not have data when the actual start time is obtained. Tasks that have actually finished execution have a corresponding actual end time; tasks that have not actually finished execution will not have data when the actual end time is obtained.

[0087] As an optional implementation, the scheduling time, runtime, actual start time, and actual end time in the above time information can be updated, retrieved, and stored by a specific module.

[0088] Step S102: Divide the task dependencies into several connected components.

[0089] The aforementioned connected components are the set of maximal connected subgraphs of a graph; a maximal connected subgraph is a graph in which any two points can be reached by a path.

[0090] Figure 3 A schematic diagram of a connected component provided in an embodiment of the present invention, as shown below. Figure 3 As shown, there are 3 connected components. The 3 connected components are connected component 1, which includes tasks C, E, F and G; connected component 2, which includes tasks A, B and D; and connected component 3, which includes tasks I, H and J.

[0091] The task dependencies described above are directed graphs. As an optional implementation method, when dividing the task dependencies in this embodiment, the direction of the tasks in the task dependencies is not considered. Instead, the task dependencies are treated as undirected graphs, which can improve the division efficiency.

[0092] It should be noted that any implementation method that can divide the task dependency into several connected components as described above can be applied to the embodiments of the present invention, and the embodiments of the present invention do not impose any limitations on this. As an optional implementation method, the connected components of the task dependency are calculated using breadth-first traversal of the graph and adjacency list algorithms.

[0093] In step S102 above, this embodiment of the invention adopts a technical solution that divides the overall task dependency relationship into local connected components. When a new task and / or a new task dependency relationship is added, if it is unrelated to the existing connected components, there is no need to update the connected components or update the correspondence between the subsequent connected components and the baseline. When no new tasks or task dependencies are added, but only a new baseline is added, there is no need to update the connected components; it is only necessary to add the baseline to the connected component corresponding to the new baseline. If tasks with upstream and downstream relationships are all assigned to one baseline, there is no redundant calculation for this invention. When the number of tasks and / or the number of baselines is large, the computational load of this solution is smaller than that of existing solutions.

[0094] Step S103: For each connected component, calculate the earliest start time of each task based on the scheduling time and the actual start time.

[0095] The connected components mentioned above may include tasks scheduled outside of a preset period, such as within the same day. In this case, the actual start time is the first start time within the preset period.

[0096] It should be noted that any implementation method that can calculate the earliest start time of each task based on the scheduling time and the actual start time can be applied to the embodiments of the present invention. For example, the scheduling time or the actual start time can be directly used as the earliest start time. The embodiments of the present invention do not impose any limitations on this.

[0097] The aforementioned tasks include both tasks that have been actually executed and those that have not. Compared to monitoring schemes that only consider tasks that have not been actually executed, this embodiment of the invention considers the actual start time when calculating the earliest start time of each task, resulting in a more accurate calculation. Furthermore, this embodiment of the invention considers historical tasks and the scheduling time of each task. In addition, this embodiment of the invention can perform better attribution.

[0098] Step S104: Calculate the earliest end time for each task based on the earliest start time, runtime, and actual end time.

[0099] The connected components mentioned above may include tasks scheduled outside of a preset period, such as within the same day. In this case, the actual end time is the time when the task is first completed within the preset period.

[0100] It should be noted that any implementation method that can calculate the earliest end time of each task based on the earliest start time, runtime, and actual end time can be applied to the embodiments of the present invention. For example, the sum of the earliest start time and runtime, or the actual end time, can be used as the earliest end time. The embodiments of the present invention do not impose any limitations on this.

[0101] Compared to monitoring schemes that only consider tasks that have not actually been executed, the embodiments of the present invention take into account the actual completion time when calculating the earliest completion time of each task, resulting in more accurate calculations. Furthermore, the embodiments of the present invention consider historical tasks. In addition, the embodiments of the present invention can perform better attribution.

[0102] It should be noted that since there is no overlap in tasks between the connected components, steps S103 and S104 can be performed in parallel to further save computation time.

[0103] Step S105: Determine the predicted completion time and critical path of each baseline based on each connected component, the earliest end time, and the baseline configuration information.

[0104] The predicted completion time of each baseline is the latest completion time of the baseline, and the critical path is the set of tasks performed to achieve the aforementioned latest completion time.

[0105] It should be noted that any implementation method that can determine the predicted completion time and critical path of each baseline based on each connected component, the earliest end time, and the baseline configuration information can be applied to the embodiments of the present invention, and the embodiments of the present invention do not impose any limitations on this.

[0106] In this embodiment of the invention, steps S101 to S105 are primarily responsible for inference. That is, steps S101 to S105 fully determine the predicted completion time and critical path of each baseline, while the timeout warning function is decoupled, resulting in system decoupling and more efficient operation. Furthermore, this system can output the completion time and critical path of all baselines after a single inference iteration. Subsequent warning judgments only require comparing the predicted completion time and promised completion time of a single baseline to determine whether a timeout warning should be issued. This eliminates the need to maintain any state information, reducing the risk of duplicate warnings and the computational burden of deduplicating warnings.

[0107] Step S106: Based on the predicted completion time, critical path, and baseline configuration information, determine whether to issue a timeout warning for each baseline.

[0108] Any implementation method that can achieve the above-described determination of whether to issue timeout warnings for each baseline based on the predicted completion time, critical path, and baseline configuration information can be applied to the embodiments of the present invention. For example, implementation method 1: if the predicted completion time of the current baseline is greater than the promised completion time of the baseline, a timeout warning is issued; another example, implementation method 2: if the predicted completion time of the current baseline is greater than the completion time of the upstream baseline - the promised completion time of the upstream baseline + the promised completion time of the current baseline, a timeout warning is issued; the embodiments of the present invention do not impose any limitations on this.

[0109] The specific warning method can be set according to the specific real-time situation. For example, it can include warning messages, telephone calls, emails, etc., which can be sent by text, sound, or vibration. This embodiment of the invention does not limit the specific warning method.

[0110] By making the judgment in step S106 above, the monitoring of critical tasks can be achieved, reducing invalid alarms from upstream tasks.

[0111] This invention can automatically schedule task dependencies and the time information of each task based on a baseline configured by the user according to their needs, determine the predicted completion time and critical path of the baseline, and determine whether to issue a timeout warning based on the predicted completion time, critical path, and baseline configuration information. When determining the predicted completion time of the baseline, the actual start time and actual end time of each task are considered, making the predicted completion time more accurate. This invention simplifies and reduces the configuration operations for task monitoring; only a baseline needs to be configured for critical tasks to analyze the predicted completion time and corresponding critical path of the configured baseline in advance. This invention can output the completion time and critical path of all baselines at once, and does not perform alarm judgments for intermediate tasks; only a single comparison is needed to determine whether an alarm is needed, greatly reducing invalid and duplicate alarms, improving the user experience, and also reducing the computational burden of task monitoring.

[0112] As an optional implementation, in step S101 above, after obtaining the task dependency relationship, baseline configuration information, and time information of each task in the task dependency relationship, the above data is preprocessed.

[0113] The above-described preprocessing implementation can be specifically configured according to the specific real-time situation. For example, cleaning loops, updating the scheduling timestamp of the task's scheduling expression, updating the promised completion time of the baseline, etc. The embodiments of the present invention do not impose any limitations on this.

[0114] In some embodiments, the cleaning loop described above can repeatedly use B. Johnson's simple loop detection algorithm to remove the task dependency with the oldest update time in the task dependency table of the simple loop.

[0115] The scheduling timestamp of the scheduling expression for the above-mentioned update task can be converted into the scheduling timestamp of the current day. For example, assuming the current time is 0:00:00 on the current day, starting from the current time of the input parameter, the seconds, minutes, hours, day, and month are traversed in a loop, and the corresponding intervals are added together until each part is divisible by the corresponding part of the expression, so as to calculate the next scheduling time.

[0116] The promised completion time of the updated baseline can be converted into a timestamp of the current day. For example, the promised completion time of the baseline is in the format of "HH:MM" text, with the current date "yyyy-mm-dd" added in front of it, and then the number of seconds from 1970-01-01 00:00:00 is calculated.

[0117] In step S101 above, the runtime in the time information of each task in the above task dependency relationship is predicted based on the historical runtime. Any implementation method that can realize the above prediction of runtime based on historical runtime can be applied to the embodiments of the present invention. For example, various mathematical average calculation methods can be used to calculate the average of the above historical runtime as the above runtime, etc. The embodiments of the present invention do not impose any limitations on this.

[0118] As an optional implementation, predicting the runtime of each task based on historical runtime includes:

[0119] For each task, calculate the average historical runtime of the current time at the same time in the historical period, and use it as the historical average runtime of the current task.

[0120] For example, if today is Monday, then take the average runtime of this task on historical Mondays as the historical average runtime of the current task, denoted as Avg[day of the week].

[0121] Calculate the duration change rate for several upstream tasks of the current task, and calculate the harmonic mean of the duration change rate; wherein, the duration change rate is the ratio of the actual runtime to the historical average runtime.

[0122] For example, if we set the duration change rate of the upstream tasks as r, then r = today's runtime / historical average runtime, and n is the number of upstream tasks.

[0123] Based on the historical average duration and the harmonic mean, the runtime of the current task is predicted.

[0124] Specifically, the above calculation process for runtime can be: runtime cost of this task = Avg[day of the week] * n / (1 / r1 + 1 / r2 + ...), which is the historical average runtime of the day of the week * the harmonic mean of the runtime change rate of upstream tasks.

[0125] The runtime of a task exhibits heteroscedasticity, and the harmonic mean is susceptible to extreme values, with the minimum value having a greater impact than the maximum value. Therefore, using the harmonic mean of the runtime change rate to predict the runtime of the current task is more accurate.

[0126] As an optional implementation, the calculation of the earliest start time for each task in step S103 includes:

[0127] For each task, determine whether the actual start time of the current task exists;

[0128] If it exists, the above actual start time will be taken as the earliest start time of the current task;

[0129] If it does not exist, determine whether the current task is the starting task of the connected component.

[0130] If not, take the maximum value of the earliest end time of several upstream tasks of the current task and the scheduling time mentioned above as the earliest start time of the current task.

[0131] If the aforementioned scheduling time exists, the aforementioned scheduling time shall be used as the earliest start time of the current task; otherwise, the current time shall be used as the earliest start time of the current task.

[0132] Specifically, the maximum value of the earliest end time of several upstream tasks of the current task can be set as t0, and the maximum value between t0 and the scheduling time mentioned above can be taken as the earliest start time of the current task. For example, if the current task has 3 upstream tasks, the maximum value of the earliest end time of these 3 upstream tasks can be taken as t0, and the maximum value between t0 and the scheduling time of the current task can be taken as the earliest start time of the current task.

[0133] In this embodiment of the invention, the concept of t0 used thereafter is the same as that here, and will not be repeated hereafter.

[0134] As another optional implementation, the calculation of the earliest start time of each task in step S103 includes:

[0135] For each task, determine whether the current task is the starting task of the connected component in which it is located;

[0136] If so, determine if the actual start time of the current task exists; if it exists, take the actual start time as the earliest start time of the current task; if it does not exist but the scheduling time exists, take the scheduling time as the earliest start time of the current task; if neither the actual start time nor the scheduling time of the current task exists, take the current time as the earliest start time of the current task.

[0137] That is, in the above implementation, the earliest start time of the starting task of each connected component is determined first, and then the earliest start time of other tasks is calculated.

[0138] If not, determine if the actual start time of the current task exists; if it exists, take the actual start time as the earliest start time of the current task; if it does not exist, take the maximum value of the earliest end times of several upstream tasks of the current task and the maximum value of the scheduling time mentioned above as the earliest start time of the current task.

[0139] The maximum value between t0 and the scheduling time is taken as the earliest start time of the current task.

[0140] As an optional implementation, step S104 above, which calculates the earliest end time of each task based on the earliest start time, runtime, and actual end time, includes:

[0141] For each task, determine whether the actual end time of the current task exists;

[0142] If it exists, the above actual end time will be taken as the earliest end time of the current task;

[0143] If it does not exist, calculate the earliest end time of the current task based on the earliest start time and runtime mentioned above.

[0144] Specifically, the earliest start time and runtime mentioned above are summed to calculate the earliest end time of the current task.

[0145] It should be noted that there is no explicit order of execution for steps S103 and S104. For example, for a connected component, the earliest start time and earliest end time can be calculated sequentially according to steps S103 and S104. Alternatively, for each task, the earliest start time and earliest end time can be calculated sequentially according to steps S103 and S104. The specific settings can be made according to the specific implementation situation, and the embodiments of the present invention do not impose any limitations on this.

[0146] Figure 4 A flowchart illustrating the process of determining the predicted completion time and critical path of each baseline is provided in this embodiment of the invention, as shown below. Figure 4 As shown, the predicted completion time and critical path of each baseline are determined based on each connected component, the earliest end time, and the baseline configuration information, including:

[0147] Step S401: Based on the critical task information corresponding to the baseline in each connected component and the baseline configuration information, establish a mapping relationship between the connected components and the baseline, including the critical tasks.

[0148] More specifically, based on the many-to-many relationship between baselines and critical tasks, a list of baselines associated with each critical task is compiled, wherein one critical task can be associated with multiple baselines; for each connected component obtained in step S102 above, it is determined whether the task in the current connected component contains the aforementioned critical task; if it contains, the connected component is associated with the aforementioned list; if multiple of the aforementioned lists are associated, the union of the aforementioned lists is taken; if it does not contain, the connected component that does not contain the critical task is filtered out; the association results of the aforementioned connected components and the aforementioned lists are used to establish a mapping relationship between connected components including critical tasks and baselines.

[0149] The above-mentioned mapping relationship between the connected components of key tasks and the baseline can be referred to as the connected component dictionary.

[0150] In order to distinguish each connected component, after performing the above step S102, the connected components can be labeled.

[0151] For example, the established mapping relationship is shown in Table 2 below. The contents of the table items in Table 2 can be specifically set according to the specific implementation situation. For example, "serial number" is used to distinguish each connected component, "graph" is used to represent the tasks in the corresponding connected component and the dependencies between tasks, such as "D<-A, D<-B" means that the connected component includes task A, task B, and task D, and task A and task B are both upstream tasks of task D. "baseline" is used to represent the correspondence between the key tasks in the corresponding connected component and the baseline, such as "{D:[2], B:[1]}" means that task B and task D in the connected component are key tasks, and task D corresponds to baseline 2, and task B corresponds to baseline 1.

[0152] Table 2: Dictionary of Connected Components

[0153] Serial Number picture Baseline 1 {D<-A,D<-B} {D:[2],B:[1]} … … …

[0154] It should be noted that the execution order of step S401 can also be before step S103. The specific execution order can be set according to the specific implementation situation, and the present invention does not impose any limitation on this.

[0155] As an optional implementation, after step S401 and before step S103, the method further includes:

[0156] For each connected component in the mapping relationship between the connected components of the critical task and the baseline, traverse the upstream tasks of the critical task and mark the upstream tasks of the non-critical tasks that have not been traversed as not requiring inference.

[0157] Tasks marked with tags that do not require reasoning do not need to undergo the above steps S103 and subsequent processing steps.

[0158] In some embodiments, the upstream tasks of the aforementioned critical tasks can be traversed using the Breadth First Search (BFS) algorithm.

[0159] Step S402: For each baseline, determine the earliest end time of several key tasks corresponding to the current baseline based on the earliest end time and mapping relationship, and take the maximum value as the predicted completion time of the current baseline.

[0160] Specifically, since a baseline may be configured with multiple critical tasks, in this step, the earliest end time of each critical task is obtained, and then the earliest end times of all critical tasks of the baseline are compared. The maximum value, i.e. the latest time point, is taken as the predicted completion time of the current baseline.

[0161] In some embodiments, each connected component and each baseline is traversed, and the prediction completion time of the baseline associated with each connected component is calculated to obtain the connected component-baseline prediction completion time table as shown in Table 3 below.

[0162] Table 3: Connectivity Component-Baseline Prediction Completion Timeline

[0163]

[0164]

[0165] In Table 3 above, "Serial Number" refers to the serial number of the connected component.

[0166] Each connected component contains critical tasks of concern to the baseline. The latest predicted completion time of one or more critical tasks in each connected component is taken as the predicted completion time of the baseline in that connected component. Since the critical tasks of concern to the baseline may be in different connected components, the latest predicted completion time of the baseline in each connected component is taken as the predicted completion time of the current baseline, resulting in the connected component table corresponding to the latest completion time of the baseline as shown in Table 4 below.

[0167] Table 4: Connectivity Components Corresponding to Latest Baseline Completion Time

[0168] Serial Number Baseline Key Mission Predicted completion time 1 1 B 2022-10-18 04:23:38

[0169] In Table 4 above, "Serial Number" refers to the serial number of the connected component.

[0170] As can be seen from Table 3 above, critical task B is the maximum value of the earliest end time among the critical tasks of baseline 1. Therefore, Table 4 above is obtained, and the earliest end time of critical task B is taken as the predicted completion time of baseline 1.

[0171] Step S403: Use the key tasks corresponding to the predicted completion time and several upstream tasks as the key subgraph of the current baseline.

[0172] Specifically, the key task corresponding to the predicted completion time obtained in step S403 above is used to find all upstream tasks of the key task through a traversal algorithm, and the key task and its upstream tasks are used as the key subgraph of the baseline.

[0173] In some embodiments, a breadth-first search (BFS) algorithm can be used to traverse all upstream tasks of the critical task.

[0174] Step S404: Determine the set of edges with the longest execution time in the key subgraph as the critical path of the current baseline.

[0175] It should be noted that any implementation method that can achieve the above-mentioned determination of the set of edges with the longest time in the key subgraph can be applied to the embodiments of the present invention, and the embodiments of the present invention do not impose any limitations on this.

[0176] As an optional implementation, the step S404 above, which determines the set of edges with the longest execution time in the critical subgraph as the critical path of the current baseline, includes:

[0177] For each task in the above key subgraph, determine whether the current task has downstream tasks;

[0178] If so, calculate the difference between the earliest end time and the runtime of each downstream task, and calculate the maximum value between the difference and the scheduling time, and take the minimum value among the maximum values ​​as the latest start time of the current task.

[0179] Otherwise, the earliest start time of the current task will be taken as the latest start time of the current task;

[0180] That is, the minimum max(scheduling time, earliest end time - runtime) of each downstream task is taken as the latest start time VL.

[0181] For example, if the current task has 3 downstream tasks, first calculate the difference between the earliest end time and the runtime of each of the 3 downstream tasks to obtain the difference for each downstream task; take the maximum value b between the difference of the current downstream task and the scheduling time of the current downstream task to obtain the b corresponding to the 3 downstream tasks; finally, take the minimum value of b corresponding to the 3 downstream tasks as the latest start time of the current task.

[0182] For each edge of the above key subgraph, determine whether the sum of the earliest start time and runtime of the head task of the current edge is equal to the difference between the latest start time and waiting time of the tail task. If so, retain the edge.

[0183] Use the set of edges that are retained as the critical path of the current baseline;

[0184] The waiting time for the current task is the time between the completion of preparation work by several upstream tasks of the current task and the scheduling time of the current task.

[0185] As an optional implementation, the waiting time of the current task is the maximum value between the difference between the scheduling time of the current task and the maximum value of the earliest end time of a number of upstream tasks of the current task, and zero.

[0186] That is, let the waiting time of the current task be wait, then wait = max(0, T-t0); where max is the maximum value, T is the scheduling time of the current task, and t0 is the maximum value of the earliest end time of several upstream tasks of the current task.

[0187] In this embodiment of the invention, the concept of waiting time used subsequently is the same as that here, and will not be repeated hereafter.

[0188] As an optional implementation method, such as Figure 5 As shown in the flowchart of another critical task monitoring method provided by the embodiment of the present invention, after determining whether to issue a timeout warning for each baseline in step S106, the method further includes steps S107 and S108.

[0189] Step S107: If a timeout warning is issued for at least one baseline, for each baseline that issues a warning, the waiting time and preparation time of each task are calculated based on the time information of each task on the critical path of the current baseline.

[0190] The waiting time for the current task is the time between the completion of preparation work by several upstream tasks and the scheduling time of the current task.

[0191] The preparation time for the current task is the time between the completion of preparation work for several upstream tasks and the elapsed scheduling time of the current task, and the actual start time of the current task.

[0192] As an optional implementation, the preparation time of the current task is the maximum of the following three values: the actual start time of the current task, the aforementioned scheduling time, zero value, and the maximum of the earliest end time of several upstream tasks of the current task; the difference between the two values ​​and the maximum of zero value.

[0193] That is, let the preparation time of the current task be prepare, then prepare = max(0, the actual start time of the current task - max(T or 0, t0)).

[0194] Where max is the maximum value, T is the scheduling time of the current task, and t0 is the maximum of the earliest end times of several upstream tasks of the current task.

[0195] Step S108: Based on the waiting time, preparation time, and runtime of each task, determine the abnormal task that causes the timeout warning for the current baseline.

[0196] It should be noted that any implementation method that can determine the abnormal task that causes the timeout warning for the current baseline based on the waiting time, preparation time and runtime of each task can be applied to the embodiments of the present invention. For example, the abnormal task that causes the timeout warning for the current baseline can be determined by summing the waiting time, preparation time and runtime of each task respectively, or by weighted summing and sorting, etc. The embodiments of the present invention do not impose any limitations on this.

[0197] As an optional implementation, the abnormal tasks that cause a timeout warning for the current baseline, determined in step S108 based on the waiting time, preparation time, and runtime of each task, include:

[0198] Let M = Sum[wait_i^(0.5) + prepare_i + abs(cost_i - avg_i)]; where i is the sequence number of the task on the critical path, avg_i is the average runtime of task i, cost_i is the runtime of task i, prepare_i is the preparation time of task i, wait_i is the waiting time of task i, abs is the absolute value, ^(0.5) is the square root, and Sum is the summation.

[0199] Divide wait^(0.5), prepare_i, and abs(cost_i-avg_i) of each task on the critical path by M, sort the results from largest to smallest, and output the names and values ​​of the top n results as the abnormal tasks that cause a timeout warning for the current baseline; where n is a preset natural number.

[0200] For example, the output is: [Task B (wait 2000 seconds) (60%), Task F (prepare 700 seconds) (40%)], indicating that the abnormal tasks are Task B and Task F. Among them, the waiting time of Task B for 2000 seconds accounts for 60% of the reasons for the timeout warning of the current baseline, and the preparation time of Task F for 700 seconds accounts for 40% of the reasons for the timeout warning of the current baseline.

[0201] This invention enables automatic attribution of abnormal baselines for each timeout warning. After a timeout warning occurs, it can quickly analyze the abnormal task and its cause. By utilizing the critical path information of the baseline, it can quickly understand the operation of upstream tasks, locate the cause of the abnormality, and resolve the risk of task failure. It can quickly find common causes and prioritize the resolution of key issues. It can detect resource competition problems early and improve work efficiency. It can quickly find the key points and starting points of thousands of scheduled tasks, prevent problems from snowballing, and reduce the possibility of high-risk events.

[0202] Example 2

[0203] Based on the above-mentioned monitoring method for critical tasks, this embodiment of the invention provides a structural schematic diagram of a monitoring device for critical tasks, as shown below. Figure 6 As shown, the critical task monitoring device 60 of this embodiment of the invention includes a data acquisition module 61, a task grouping module 62, a first calculation module 63, a second calculation module 64, a path extraction module 65, and a timeout warning module 66.

[0204] The data acquisition module 61 is used to acquire task dependency relationships and baseline configuration information, as well as time information of each task in the task dependency relationships; wherein, the time information includes scheduling time, runtime, actual start time, and actual end time;

[0205] The task clustering module 62 is used to divide task dependencies into several connected components;

[0206] The first calculation module 63 is used to calculate the earliest start time of each task for each connected component, based on the scheduling time and the actual start time.

[0207] The second calculation module 64 is used to calculate the earliest end time of each task based on the earliest start time, runtime, and actual end time.

[0208] The path extraction module 65 is used to determine the predicted completion time and critical path of each baseline based on each connected component, the earliest end time, and the baseline configuration information.

[0209] The timeout warning module 66 is used to determine whether to issue a timeout warning for each baseline based on the predicted completion time, critical path, and baseline configuration information.

[0210] In an optional embodiment, the monitoring device 60 for the critical task further includes a third computing module 67 and an analysis module 68, such as... Figure 7 The diagram shown is a structural schematic of another critical task monitoring device provided in an embodiment of the present invention.

[0211] The third calculation module 67 is used to calculate the waiting time and preparation time of each task for each baseline that issues a timeout warning, based on the time information of each task on the critical path of the current baseline.

[0212] Analysis module 68 is used to identify abnormal tasks that cause a timeout warning for the current baseline based on waiting time, preparation time, and runtime.

[0213] The waiting time for the current task is the time between the completion of preparation work by several upstream tasks of the current task and the scheduling time of the current task.

[0214] The preparation time for the current task is the time between the completion of preparation work for several upstream tasks and the elapsed scheduling time of the current task, and the actual start time of the current task.

[0215] For further details regarding the implementation of the above technical solutions by each module in the monitoring device for the aforementioned critical tasks, please refer to the description of the monitoring method for critical tasks provided in the above-mentioned embodiments of the invention, which will not be repeated here.

[0216] Based on the monitoring methods for the aforementioned key tasks, such as Figure 8 As shown in the diagram, this embodiment of the invention also provides a structural schematic of a mission-critical monitoring device 80. The mission-critical monitoring device 80 includes a processor 81 and a memory 82 coupled to the processor 81. The memory 82 stores a computer program, which, when executed by the processor 81, causes the processor 81 to perform the steps of the mission-critical monitoring method described in the above embodiment.

[0217] For further details regarding the implementation of the above technical solution by the processor 81 in the monitoring device for the aforementioned critical tasks, please refer to the description in the critical task monitoring method provided in the above embodiments of the invention, which will not be repeated here.

[0218] The processor 81 can also be called a CPU (Central Processing Unit). The processor 81 may be an integrated circuit chip with signal processing capabilities. The processor 81 can also be a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor, or the processor 81 can be any conventional processor.

[0219] like Figure 9As shown in the diagram, this embodiment of the invention also provides a schematic diagram of a computer-readable storage medium 90, on which a readable computer program 91 is stored. The computer program 91 can be stored in the storage medium in the form of a software product, including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in various embodiments of the invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, magnetic disks or optical disks, ROM (Read-Only Memory), RAM (Random Access Memory), or terminal devices such as computers, servers, mobile phones, and tablets.

[0220] In the several embodiments provided in this application, it should be understood that the disclosed devices, computer-readable storage media, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between devices or modules, and may be electrical, mechanical, or other forms.

[0221] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0222] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium.

[0223] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.

[0224] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).

[0225] The technical solutions provided in this application have been described in detail above. Specific examples have been used in this application to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

[0226] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0227] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1One or more processes and / or

[0228] or box Figure 1 A device that provides the functions specified in one or more boxes.

[0229] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0230] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0231] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A method for monitoring critical tasks, characterized in that, include: Obtain task dependencies and baseline configuration information, as well as time information for each task in the task dependencies; wherein, the time information includes scheduling time, runtime, actual start time, and actual end time; The task dependencies are divided into several connected components; For each connected component, the earliest start time of each task is calculated based on the scheduling time and the actual start time. Calculate the earliest end time for each task based on the earliest start time, runtime, and actual end time. Based on each connected component, the earliest end time, and the baseline configuration information, the predicted completion time and critical path of each baseline are determined. The baseline is configured according to the critical task. One baseline can be configured with multiple critical tasks, and one critical task can also be configured by multiple baselines. Based on the predicted completion time, critical path, and baseline configuration information, determine whether to issue a timeout warning for each baseline; The step of determining the predicted completion time and critical path of each baseline based on each connected component, the earliest end time, and the baseline configuration information includes: Based on the key task information corresponding to each connected component and the baseline in the baseline configuration information, establish a mapping relationship between the connected components including the key tasks and the baseline. For each baseline, based on the earliest end time and mapping relationship, the earliest end time of several key tasks corresponding to the current baseline is determined, and the maximum value is taken as the predicted completion time of the current baseline. The key tasks corresponding to the predicted completion time, along with several upstream tasks, are used as the key subgraph of the current baseline. Determine the set of edges with the longest execution time in the critical subgraph, and use them as the critical path of the current baseline; The calculation of the earliest start time for each task includes: For each task, determine whether the actual start time of the current task exists; If it exists, the actual start time shall be taken as the earliest start time of the current task; If it does not exist, determine whether the current task is the starting task of the connected component; if not, take the maximum value of the earliest end time of several upstream tasks of the current task and the scheduling time as the maximum value of the scheduling time; if it does exist and the scheduling time exists, take the scheduling time as the earliest start time of the current task; otherwise, take the current time as the earliest start time of the current task.

2. The method for monitoring critical tasks according to claim 1, characterized in that, The calculation of the earliest end time for each task based on the earliest start time, runtime, and actual end time includes: For each task, determine whether the actual end time of the current task exists; If it exists, the actual end time shall be taken as the earliest end time of the current task; If it does not exist, calculate the earliest end time of the current task based on the earliest start time and runtime.

3. The method for monitoring critical tasks according to claim 1, characterized in that, The process of determining the set of edges with the longest execution time in the key subgraph, as the critical path of the current baseline, includes: For each task in the key subgraph, determine whether the current task has downstream tasks; if so, calculate the difference between the earliest end time and the runtime of each downstream task, and calculate the maximum value between the difference and the scheduling time, and take the minimum value among several maximum values ​​as the latest start time of the current task; otherwise, take the earliest start time of the current task as the latest start time of the current task. For each edge of the key subgraph, determine whether the sum of the earliest start time and runtime of the head task of the current edge is equal to the difference between the latest start time and waiting time of the tail task. If so, retain the edge. Use the set of edges that are retained as the critical path of the current baseline; The waiting time for the current task is the time between the completion of preparation work by several upstream tasks of the current task and the scheduling time of the current task.

4. The method for monitoring critical tasks according to claim 1, characterized in that, After determining whether to issue a timeout warning for each baseline, the process also includes: If a timeout warning is issued for at least one baseline, for each baseline that issues a warning, the waiting time and preparation time of each task are calculated based on the time information of each task on the critical path of the current baseline. Based on the waiting time, preparation time, and runtime, determine the abnormal task that causes a timeout warning for the current baseline; The waiting time for the current task is the time between the completion of preparation work by several upstream tasks of the current task and the scheduling time of the current task. The preparation time for the current task is the time between the completion of preparation work for several upstream tasks of the current task and the elapsed scheduling time of the current task, and the actual start time of the current task.

5. The method for monitoring critical tasks according to claim 1, characterized in that, The runtime is predicted based on historical runtime. The prediction of the runtime of each task based on historical runtime includes: For each task, calculate the average historical runtime of the current time at the same time in the historical period, and use it as the historical average runtime of the current task. Calculate the duration change rate for several upstream tasks of the current task, and calculate the harmonic mean of the duration change rate; wherein the duration change rate is the ratio of the actual runtime to the historical average runtime. The runtime of the current task is predicted based on the historical average duration and the harmonic mean.

6. A monitoring device for critical tasks, the device being used to implement the steps of the monitoring method for critical tasks as described in any one of claims 1-5, characterized in that, It includes a data acquisition module, a task grouping module, a first calculation module, a second calculation module, a path extraction module, and a timeout warning module; The data acquisition module is used to acquire task dependency relationships and baseline configuration information, as well as time information of each task in the task dependency relationships; wherein, the time information includes scheduling time, runtime, actual start time, and actual end time; The task grouping module is used to divide the task dependencies into several connected components. The first calculation module is used to calculate the earliest start time of each task for each connected component, based on the scheduling time and the actual start time. The second calculation module is used to calculate the earliest end time of each task based on the earliest start time, runtime, and actual end time. The path extraction module is used to determine the predicted completion time and critical path of each baseline based on each connected component, the earliest end time, and the baseline configuration information. The timeout warning module is used to determine whether to issue a timeout warning for each baseline based on the predicted completion time, critical path, and baseline configuration information.

7. A mission-critical monitoring device, characterized in that, Includes memory and processor, wherein: The memory is used to store computer programs; The processor is used to read the computer program in the memory and execute the steps of the monitoring method for any of the critical tasks as described in claims 1 to 5.

8. A computer-readable storage medium, characterized in that, It stores a readable computer program that, when executed by a processor, implements the steps of the monitoring method for any of the critical tasks as described in claims 1 to 5.

Citation Information

Patent Citations

  • Monitoring method and device

    CN109558292A

  • Calculation task early warning method and device, computer equipment and storage medium

    CN113220542A