Early warning method for task time and related equipment
By building a task node tree and predicting the completion time, the problem of task status monitoring lag in the existing technology is solved, and timely warning and adjustment of task delays is realized to ensure that the task is completed on time.
Patent Information
- Application Number
- CN202410045796.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-10
- Publication Date
- 2025-07-11
AI Technical Summary
The existing task status monitoring methods have lags, and the shortcomings in the task execution process cannot be adjusted in time, resulting in delays.
By building a task node tree, predict the completion time based on the historical completion time of upstream tasks and target tasks, determine the promised warning time and start and end time, calculate the task delay time, and issue an alarm when the preset value exceeds.
Timely warning of task delays is achieved, relevant personnel are allowed to make adjustments in advance, and ensure that the task is completed within the promised warning time.
Smart Images

Figure CN120295720A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular, to a method for warning of task time and related devices. Background Art
[0002] During the execution of a task, mastering the running time of the task, such as the start time, end time, and delay time, is beneficial for managers to better grasp the running state of the task, enabling managers to better adjust the deficiencies in the task execution process.
[0003] In the existing method, first, information such as the configured SLA (Service Level Agreement) time of the task is queried, then the completion status of the task is queried in real time, and finally, by comparing the configured SLA time of the task and the actual completion time of the task, the statistics of delayed tasks are realized.
[0004] However, determining the running state of the task by the above method has a lag, which is not conducive to the adjustment of the task. Summary of the Invention
[0005] Embodiments of this application provide a method for warning of task time and related devices. The related devices may include a warning device for task time, an electronic device, a computer-readable storage medium, and a computer program product, which can warn in advance of the running time of a target task, facilitating timely adjustment of the deficiencies of the target task in advance.
[0006] Embodiments of this application provide a method for warning of task time, including:
[0007] Determine a task node tree, where the task node tree includes a target task that needs to be warned and upstream tasks on which the target task depends;
[0008] According to the respective historical completion durations of the upstream task and the target task, obtain the respective predicted completion durations of the upstream task and the target task;
[0009] Determine the promised warning time of the target task, and according to the promised warning time, the respective predicted completion durations of the upstream task and the target task, and the current time, determine the first start and end times of the currently executed task;
[0010] Based on the first start and end times, the current time, and the respective predicted completion durations of the upstream task and the target task, obtain the task delay duration of the currently executed task;
[0011] If the task delay duration exceeds a preset value, then give an alarm for the target task.
[0012] Optionally, in some embodiments, obtaining the predicted completion durations of the upstream task and the target task according to the respective historical completion durations of the upstream task and the target task includes:
[0013] Calculating the duration mean of the historical completion duration of the upstream task to obtain the predicted completion duration of the upstream task;
[0014] Calculating the duration mean of the historical completion duration of the target task to obtain the predicted completion duration of the target task.
[0015] Optionally, in some embodiments, determining the commitment warning time of the target task, and determining the first start and end time of the currently executing task according to the commitment warning time, the predicted completion durations of the upstream task and the target task, and the current time, includes:
[0016] Determining the commitment warning time of the target task, and determining the second start and end time of the task downstream of the currently executing task according to the commitment warning time, the predicted completion durations of the upstream task and the target task, and the current time;
[0017] Based on the current time and the second start and end time, determining the first start and end time of the currently executing task.
[0018] Optionally, determining the commitment warning time of the target task, and determining the second start and end time of the task downstream of the currently executing task according to the commitment warning time, the predicted completion durations of the upstream task and the target task, and the current time, includes:
[0019] Determining the commitment warning time of the target task, and taking the commitment warning time as the first latest end time of the target task;
[0020] Based on the first latest end time and the predicted completion duration of the target task, obtaining the first latest start time of the target task;
[0021] Taking the first latest start time as the second latest end time of the upstream task;
[0022] Based on the second latest end time and the predicted completion duration of the upstream task, obtaining the second latest start time of the upstream task;
[0023] Based on the current time, the first latest start time, the first latest end time, the second latest start time, and the second latest end time, determining the second start and end time of the task downstream of the currently executing task.
[0024] Optionally, in some embodiments, determining the second start and end times of a task downstream of the currently executing task based on the current time, the first latest start time, the first latest end time, the second latest start time, and the second latest end time includes:
[0025] Determining the minimum value among the second latest start times of the same upstream task in different task chains that execute the target task in the task node tree as the first start time;
[0026] Taking the second latest end time corresponding to the first start time as the first end time;
[0027] Based on the current time, the first start time, the first end time, the first latest start time, and the first latest end time, determining the second start and end times of a task downstream of the currently executing task.
[0028] Optionally, in some embodiments, determining the promised warning time of the target task includes:
[0029] Displaying a warning task configuration interface, where the warning task configuration interface includes a warning condition configuration area, and the warning condition configuration area includes a modifiable warning time;
[0030] In response to a modification operation on the modifiable warning time, determining the promised warning time of the target task.
[0031] Optionally, the first start and end times include the actual start time of the currently executing task, the predicted completion duration of the currently executing task, the latest start time of the currently executing task, and the latest end time of the currently executing task. Obtaining the task delay duration of the currently executing task based on the first start and end times, the current time, and the predicted completion durations of the upstream task and the target task respectively includes:
[0032] Determining the task status of the currently executing task;
[0033] If the task status is in progress, then based on the first start and end times and the predicted completion durations of the upstream task and the target task respectively, obtaining the predicted completion time of the currently executing task;
[0034] Based on the predicted completion time and the first start and end times, obtaining the task delay duration of the currently executing task.
[0035] Optionally, in some embodiments, then obtaining the predicted completion time of the currently executing task based on the first start and end times and the predicted completion duration includes:
[0036] Based on the actual start time and the predicted completion duration of the currently executing task, obtain the predicted completion time of the currently executing task;
[0037] The obtaining the task delay duration of the currently executing task based on the predicted completion time and the first start and end time includes:
[0038] Calculate the difference between the predicted completion time and the latest end time of the currently executing task to obtain the task delay duration of the currently executing task.
[0039] Optionally, in some embodiments, after determining the task status of the currently executing task, it further includes:
[0040] If the task status is waiting to be executed or execution fails, obtain the task delay duration of the currently executing task based on the current time and the first start and end time.
[0041] Optionally, in some embodiments, after obtaining the task delay duration of the currently executing task based on the first start and end time, the current time, and the predicted completion duration, it further includes:
[0042] If the task delay duration does not exceed the preset value, obtain the upstream tasks located between the currently executing task and the target task as intermediate upstream tasks;
[0043] Determine the cumulative sum of the predicted completion durations of the intermediate upstream tasks to obtain the sum value of the completion durations;
[0044] Based on the task delay duration, the sum value of the completion durations, and the predicted completion duration of the target task, obtain the predicted completion time of the target task.
[0045] Optionally, in some embodiments, after obtaining the predicted completion time of the target task, it further includes:
[0046] If the predicted completion time exceeds the promised warning time, issue an alarm for the target task.
[0047] Optionally, in some embodiments, after obtaining the task delay duration of the currently executing task based on the first start and end time, the current time, and the predicted completion durations of the upstream task and the target task respectively, it further includes:
[0048] Obtain the task chain of the task node tree;
[0049] Determine the maximum value of the task delay duration of the currently executing task in the task chain of each of the task node trees as the maximum delay duration;
[0050] Obtain the currently executing task corresponding to the maximum delay duration as the maximum delay task;
[0051] Obtain the task chain of the task node tree corresponding to the maximum delay task as the critical task chain; based on the maximum delay task and the critical task chain, obtain link warning information.
[0052] Correspondingly, an embodiment of the present application provides a task time warning device, including:
[0053] A node tree determination module, configured to determine a task node tree, where the task node tree includes a target task to be warned and upstream tasks upon which the execution of the target task depends;
[0054] A predicted duration acquisition module, configured to obtain the predicted completion durations of the upstream task and the target task respectively according to the historical completion durations of the upstream task and the target task;
[0055] A start and end time acquisition module, configured to determine the promised warning time of the target task, and determine the first start and end time of the currently executing task according to the promised warning time, the predicted completion durations of the upstream task and the target task respectively, and the current time;
[0056] A delay duration acquisition module, configured to obtain the task delay duration of the currently executing task based on the first start and end time, the current time, and the predicted completion durations of the upstream task and the target task respectively;
[0057] A task warning module, if the task delay duration exceeds a preset value, is configured to warn the target task.
[0058] An electronic device provided by an embodiment of the present application includes a processor and a memory, where the memory stores multiple instructions, and the processor loads the instructions to execute the steps in the task time warning method provided by the embodiment of the present application.
[0059] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps in the task time warning method provided by the embodiment of the present application.
[0060] In addition, an embodiment of the present application further provides a computer program product, including a computer program or instruction, and when the computer program or instruction is executed by a processor, it implements the steps in the task time warning method provided by the embodiment of the present application.
[0061] An embodiment of the present application provides a method for warning of task time and related devices, which can determine a task node tree. The task node tree includes a target task that needs to be warned, a first upstream task on which the target task depends, and a second upstream task on which the first upstream task depends; obtain the historical completion durations of executing the first upstream task, the second upstream task, and the target task; based on the historical completion durations, obtain the predicted completion durations of all tasks in the task node tree; determine the promised warning time of the target task; based on the promised warning time and the predicted completion durations, determine the second start and end times of all tasks in the task node tree; obtain the current time, and based on the current time and the second start and end times, determine the currently executing task and the first start and end time of the currently executing task; based on the first start and end time, the current time, and the predicted completion duration, obtain the task delay duration of the currently executing task; if the task delay duration exceeds a preset value, give an alarm for the target task. By calculating the task delay time of the upstream tasks of the target task, the present application determines whether the target task will be delayed according to the task delay time and the preset value, can warn of the running time of the target task before the target task is executed, and give an alarm for the target task when the task delay time exceeds the preset value, enabling relevant personnel to have a certain amount of time to adjust the target task in advance. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following described drawings are only some embodiments of the present application. For those skilled in the art, without creative efforts, other drawings can be obtained according to these drawings.
[0063] Figure 1 is a schematic diagram of the scenario of the method for warning of task time provided by an embodiment of the present application;
[0064] Figure 2 is a flowchart of the method for warning of task time provided by an embodiment of the present application;
[0065] Figure 3 is a schematic diagram of the structure of a guarantee node tree provided by an embodiment of the present application;
[0066] Figure 4 is a schematic diagram of the structure of a warning task configuration interface provided by an embodiment of the present application;
[0067] Figure 5 is a schematic diagram of the time path of a task provided by an embodiment of the present application;
[0068] Figure 6 is a schematic diagram of the task time prediction of tasks in the same task chain provided by an embodiment of the present application;
[0069] Figure 7 is a schematic diagram of the time axis for calculating the latest start time and the latest end time provided by the embodiments of the present application;
[0070] Figure 8 is a schematic diagram of the alarm message format provided by the embodiments of the present application;
[0071] Figure 9 is a schematic diagram of the completion time of the target task provided by the embodiments of the present application;
[0072] Figure 10 is a schematic diagram of the process of task timed polling provided by the embodiments of the present application;
[0073] Figure 11 is another flowchart of the warning method for task time provided by the embodiments of the present application;
[0074] Figure 12 is a schematic diagram of the structure of the warning device for task time provided by the embodiments of the present application;
[0075] Figure 13 is a schematic diagram of the structure of the electronic device provided by the embodiments of the present application. Detailed implementation manners
[0076] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present application.
[0077] The embodiments of the present application provide a warning method for task time and related devices. The related devices may include a warning device for task time, an electronic device, a computer-readable storage medium, and a computer program product. The warning device for task time may be specifically integrated in the electronic device, and the electronic device may be a device such as a terminal or a server.
[0078] The image recognition method provided by the embodiments of this application relates to machine learning (ML) in the field of artificial intelligence (AI). Through machine learning, this application can determine a task node tree, obtain the predicted completion times of the upstream task and the target task respectively based on the historical completion times of the upstream task and the target task, determine the commitment warning time of the target task, and determine the start and end times of the currently executed task based on the commitment warning time, the predicted completion times of the upstream task and the target task, and the current time. Based on the start and end times, the current time, and the predicted completion times of the upstream task and the target task, obtain the task delay time of the currently executed task. If the task delay time exceeds a preset value, an alarm is issued for the target task, so that the completion time of the task can be predicted, and an alarm is issued when the commitment warning time is exceeded, facilitating relevant personnel to adjust the task in a timely manner and enabling the task to be completed within the commitment warning time.
[0079] Among them, artificial intelligence (AI) is to use a digital computer or a machine controlled by a digital computer to simulate, extend, and expand human intelligence, a theory, method, technology, and application system that can perceive the environment, acquire knowledge, and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a way similar to human intelligence. Artificial intelligence also studies the design principles and implementation methods of various intelligent machines, enabling the machines to have the functions of perception, reasoning, and decision-making.
[0080] Artificial intelligence technology is an interdisciplinary subject involving a wide range of fields, including both hardware-level technologies and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, pre-trained model technology, operation / interaction systems, mechatronics, etc. Among them, the pre-trained model, also known as the large model or the basic model, can be widely applied to downstream tasks in various major directions of artificial intelligence after fine-tuning. The software technologies of artificial intelligence mainly include several major directions such as computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0081] Machine Learning (ML) is an interdisciplinary field that involves multiple disciplines such as probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers can simulate or implement human learning behaviors to acquire new knowledge or skills, and reorganize the existing knowledge structure to continuously improve their own performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent, and its applications cover all fields of artificial intelligence. Machine learning and deep learning usually include technologies such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and formal teaching learning. Pre-trained models are the latest development results of deep learning, integrating the above technologies.
[0082] It can be understood that the warning method for task time in this embodiment can be executed on the terminal, or on the server, or jointly by the terminal and the server. The above examples should not be construed as a limitation of this application.
[0083] As Figure 1 shown, taking the warning method for task time jointly executed by the terminal and the server as an example. The model training system provided by the embodiment of this application includes the terminal 10 and the server 11, etc.; the terminal 10 and the server 11 are connected through a network, for example, through a wired or wireless network connection, etc., where the warning device for task time can be integrated in the terminal.
[0084] Among them, the terminal 10 can be used to determine the task node tree, which includes the target task that needs to be warned, the first upstream task on which the target task depends, and the second upstream task on which the first upstream task depends; obtain the historical completion durations of executing the first upstream task, the second upstream task, and the target task; based on the historical completion durations, obtain the predicted completion durations of all tasks in the task node tree; determine the promised warning time of the target task; based on the promised warning time and the predicted completion durations, determine the second start and end times of all tasks in the task node tree; obtain the current time, and based on the current time and the second start and end times, determine the currently executing task and the first start and end time of the currently executing task; based on the first start and end time, the current time, and the predicted completion duration, obtain the task delay duration of the currently executing task; if the task delay duration exceeds the preset value, give an alarm for the target task.
[0085] Among them, the terminal 10 can include a mobile phone, a smart voice interaction device, a smart home appliance, a vehicle-mounted terminal, an aircraft, a tablet computer, a laptop computer, or a personal computer (PC, Personal Computer), etc. A client can also be set on the terminal 10, and the client can be an application client or a browser client, etc.
[0086] Among them, the server 11 can be used to: receive the task node tree sent by the terminal 10, where the task node tree includes the target task that needs to be warned, the first upstream task on which the target task depends, and the second upstream task on which the first upstream task depends. It can also be used to receive the historical completion duration, predicted completion duration, second start and end time, currently executed task, first start and end time, task delay duration, and alarm information of the target task sent by the terminal 10.
[0087] Among them, the server 11 can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. For the warning method or device of task time disclosed in this application, multiple servers can form a blockchain, and the server is a node on the blockchain.
[0088] The following will be described in detail respectively. It should be noted that the description order of the following embodiments does not limit the preferred order of the embodiments.
[0089] This embodiment will be described from the perspective of the task time warning device. The task time warning device can be specifically integrated in an electronic device, and the electronic device can be a device such as a server or a terminal.
[0090] This embodiment can be applied to various scenarios such as cloud technology, artificial intelligence, intelligent transportation, and assisted driving.
[0091] As Figure 2 shown, the specific process of the task time warning method can be as follows:
[0092] 110. Determine the task node tree, where the task node tree includes the target task that needs to be warned and the upstream tasks on which the target task depends.
[0093] First, construct the task node tree of the target task. After constructing the task node tree, the relationship between each task can be determined. Refer to Figure 3 , Figure 3It is a schematic structural diagram of a guarantee node tree provided by an embodiment of the present application. The task node tree includes a target task that needs to be warned, and upstream tasks on which the execution of the target task depends. In some embodiments, the upstream tasks include a first upstream task on which the execution of the target task depends, and a second upstream task on which the execution of the first upstream task depends. When it is necessary to determine whether a certain task can be completed within a predetermined time, the task can be identified as the target task, and when it is predicted that the task cannot be completed within the predetermined time, a warning is issued for the task. Therefore, the target task is the task that ultimately needs to be inspected and the warning result is obtained.
[0094] The construction process of the task node tree is reverse construction, that is, after determining the target task, according to the breadth or depth of the task blood relationship of the target task, a priority traversal is performed to determine the upstream tasks of the target task and the dependency relationship between each task, thereby constructing a task node tree.
[0095] Task blood relationship includes the relationship between input and output and the dependency relationship between tasks. The input and output relationship means that the output of one task is the input of another task. If the output of task A is the input of task B, then task B depends on task A, and there is a task blood relationship. The dependency relationship means that the execution of one task depends on the completion of another task. If task A must be completed before task B, then task B depends on task A, and there is a task blood relationship.
[0096] The breadth of the task blood relationship refers to how many other tasks use or depend on the output of a task. If the output of a task is used by many other tasks, then the blood relationship of the task has a greater breadth. The depth of the task blood relationship refers to the level or hierarchy at which the output of a task is used by other tasks. If the output of a task is directly used as the input of other tasks, and the outputs of these other tasks are used by deeper-level tasks, then the depth of the task blood relationship is greater. Therefore, by constructing a task node tree, the scope of tasks that need to be inspected can be determined.
[0097] As Figure 3 shown, Figure 3 in the figure, task D is the target task, task C1 and task C2 are the first upstream tasks for executing the target task D, task B1 and task B2 are the second upstream tasks for executing the first upstream task C1, and task B2 and task B3 are the second upstream tasks for executing the first upstream task C2. Task A1 and task A2 are the second upstream tasks for executing task B1. That is, relative to task A1, task A2, and task B1, task A1 and task A2 are the second upstream tasks of task B1. The same is true for task A2, task A3, task A4, and task B2. Of course, the same is true for task A5 and task B3, and task A6 and task C2.
[0098] Through Figure 3 the task node tree shown, multiple task chains for executing the target task D can be obtained. For example, task chain one: A1→B1→C1→D, task chain two: A2→B1→C1→D, and task chain three: A2→B2→C2→D, etc. Among them, the same task may appear in different task chains. For example, task B1 and task C1 appear in both task chain one and task chain two, and task A2 appears in both task chain two and task chain three.
[0099] 120. Obtain the predicted completion durations of the upstream task and the target task respectively according to the historical completion durations of the upstream task and the target task.
[0100] Specifically, first obtain the historical completion durations of executing the first upstream task, the second upstream task, and the target task. That is, during the historical task execution process, the respective completion durations for completing the first upstream task, the second upstream task, and the intermediate upstream task. The historical completion duration includes the first historical completion duration of the first upstream task during the historical task execution, the second historical completion duration of the second upstream task during the historical task execution, and the third historical completion duration of the target task during the historical task execution.
[0101] Then, based on the historical completion durations, obtain the predicted completion durations of each task in the task node tree.
[0102] Among them, each task in the task node tree includes the first upstream task, the second upstream task, and the target task. According to the historical completion durations, to obtain the predicted completion durations of all tasks in the task node tree, a certain historical completion duration of the first upstream task can be used as the predicted completion duration of the corresponding first upstream task, a certain historical completion duration of the second upstream task can be used as the predicted completion duration of the corresponding second upstream task, and a certain historical completion duration of the target task can be used as the predicted completion duration of the corresponding target task. The predicted completion durations of all tasks in the task node tree are composed of the predicted completion duration of the first upstream task, the predicted completion duration of the second upstream task, and the predicted completion duration of the target task.
[0103] In some embodiments, the predicted completion durations of the first upstream task, the second upstream task, and the target task respectively can also be obtained by means such as exponential averaging, median, or mode, etc., and specifically can be selected according to the actual situation, and this embodiment does not limit this.
[0104] Of course, in some embodiments, the predicted completion duration can also be obtained by averaging the historical completion durations. Specifically, in some embodiments, according to the historical completion durations of the upstream task and the target task respectively, the predicted completion durations of the upstream task and the target task are obtained, including:
[0105] Calculating the duration average of the historical completion duration of the upstream task to obtain the predicted completion duration of the upstream task;
[0106] Calculating the duration average of the historical completion duration of the target task to obtain the predicted completion duration of the target task.
[0107] Since the upstream task includes a first upstream task and a second upstream task, obtaining the predicted completion duration of the upstream task is also obtaining the predicted completion durations of the first upstream task and the second upstream task. That is, calculating the duration average of all the first historical completion durations to obtain the first predicted completion duration of the first upstream task; calculating the duration average of all the second historical completion durations to obtain the second predicted completion duration of the second upstream task; where the predicted completion duration of the upstream task includes the first predicted completion duration and the second predicted completion duration.
[0108] Calculating the duration average of all the third historical completion durations to obtain the third predicted completion duration of the target task, and thus obtaining the predicted completion duration of the target task. Then, according to the first predicted completion duration, the second predicted completion duration, and the third predicted completion duration, the predicted completion durations of the upstream task and the target task can be correspondingly obtained.
[0109] Among them, the historical completion duration includes the first historical completion durations of all the first upstream tasks, the second historical completion durations of all the second upstream tasks, and the third historical completion durations of all the target tasks. Refer to Figure 3 , for task chain one: A1→B1→C1→D, task chain two: A2→B1→C1→D, and task chain three: A2→B2→C2→D, for one round of execution of task D, the first upstream task C1 has two historical completion durations, the target task D has three historical completion durations, and the second upstream task B1 has two historical completion durations. Assuming that the completion data of 10 rounds of task execution is obtained, then the first upstream task C1 has 2×10 = 20 historical completion durations, the target task D has 3×10 = 30 historical completion durations, and the second upstream task B1 has 2×10 = 20 historical completion durations. Of course, by analogy, the acquisition methods of the historical completion durations of other tasks are the same. The historical completion duration of each first upstream task is a first historical completion duration, the historical completion duration of each second upstream task is a second historical completion duration of the second upstream task, and the historical completion duration of each target task is a third historical completion duration of the target task.
[0110] Still using the above example, for the first upstream task C1, obtain 20 first historical completion durations of the first upstream task C1, then obtain the sum value of these 20 first historical completion durations, and then divide by 20 to obtain the average value of all the first historical completion durations. Then this average value is the first predicted completion duration of the first upstream task C1. The method for obtaining the first predicted completion durations of other first upstream tasks, the second predicted completion durations of the second upstream tasks, and the predicted completion durations of the target tasks is the same as that of the first upstream task C1.
[0111] Of course, in addition to selecting the data within several cycles of task completion, it is also possible to select the average values of all the first historical completion durations, all the second historical completion durations, and all the third historical completion durations within a period of time. Among them, the period of time can be selected according to the actual situation. For example, it can be two weeks of data, two months of data, or two days of data, etc. This embodiment does not limit this.
[0112] 130. Determine the commitment warning time of the target task, and determine the first start and end time of the currently executed task according to the commitment warning time, the predicted completion durations of the upstream task and the target task respectively, and the current time.
[0113] It is possible to calculate the start and end times of the upstream task and the target task respectively through the commitment warning time, the predicted completion times of the upstream task and the target task, and then locate the start and end time of the currently executed task through the current time, that is, the first start and end time of the currently executed task. That is to say, the currently executed task may be an upstream task or a target task.
[0114] The method for determining the commitment warning time can be by pre-setting the time. For example, it can be input through the terminal device, or it can be sent through the terminal device.
[0115] Specifically, determining the commitment warning time of the target task includes:
[0116] Display a warning task configuration interface, and the warning task configuration interface includes a warning condition configuration area, and the warning condition configuration area includes a modifiable warning time;
[0117] In response to the modification operation of the modifiable warning time, determine the commitment warning time of the target task.
[0118] Refer to Figure 4 , Figure 4It is a schematic structural diagram of the warning task configuration interface provided by an embodiment of the present application. When it is necessary to determine the promised warning time of a target task, the warning task configuration interface is displayed at this time. The warning task configuration interface includes a warning condition configuration area, and the warning condition configuration area includes a modifiable warning time.
[0119] In response to the modification operation of the modifiable warning time, determine the promised warning time of the target task. That is, relevant staff can control and connect to the warning task configuration interface through hardware devices such as a mouse or a keyboard. Of course, other terminal devices can also be used, such as wired connection or wireless connection, to modify the modifiable warning time in the warning condition configuration area, so as to obtain the promised warning time of the target task.
[0120] Furthermore, the warning task configuration interface also includes a warning object, that is, the target task. The warning object includes the task platform for executing the task and the corresponding task ID. Through these two, the target task that needs to be warned can be determined.
[0121] In some embodiments, the modifiable warning time includes a promised time and a warning time. During the setting process, it is possible to select to alarm through the warning time by enabling the warning time. At this time, the promised warning time is the warning time, or close the warning time to select to alarm through the promised time. Then, the promised warning time is the promised time at this time. Among them, the promised time is the latest time for the target task to be completed, and the warning time is a time earlier than the promised time. For example, the promised time is 13:23:30 on January 3, 2023, and the warning time is 10:23:30 on January 3, 2023. Of course, the specific promised time and warning time can be set according to the actual situation. The time can be specific to seconds or can be set to days. This situation can also be set according to actual needs. This embodiment does not limit it here.
[0122] Determine the promised warning time of the target task, and determine the first start and end time of the currently executed task according to the promised warning time, the predicted completion durations of the upstream task and the target task respectively, and the current time, including:
[0123] Determine the promised warning time of the target task, and determine the second start and end time of the task located downstream of the currently executed task according to the promised warning time, the predicted completion durations of the upstream task and the target task respectively, and the current time;
[0124] Based on the predicted completion durations of the upstream task and the target task respectively and the second start and end time, determine the first start and end time of the currently executed task.
[0125] First, according to the promised warning time, the predicted completion durations of the upstream task and the target task respectively, and the current time, determine the second start and end time of the task located downstream of the currently executing task. Hereinafter, the task located downstream of the currently executing task is referred to as the downstream task.
[0126] The second start and end time includes the first start time and the first end time of the downstream task. The tasks in the same task chain of the task node tree are consecutive to each other. Therefore, the second start and end time can be calculated by directly obtaining the difference between the promised warning time and the predicted completion duration. Of course, if there is a time difference between the tasks in the same task chain, when calculating the second start and end time, the difference obtained by obtaining the difference between the promised warning time and the predicted completion duration can be combined with the time difference to calculate the second start and end time.
[0127] Specifically, in some embodiments, when ignoring the time difference between two adjacent tasks in the same task chain, determine the promised warning time of the target task, and according to the promised warning time, the predicted completion durations of the upstream task and the target task respectively, and the current time, determine the second start and end time of the task located downstream of the currently executing task, including:
[0128] Determine the promised warning time of the target task, and use the promised warning time as the first latest end time of the target task.
[0129] That is, the latest completion time of the target task is the promised warning time. If it exceeds the promised warning time, it proves that the target task cannot be completed within the specified time. Therefore, use the promised warning time as the first latest end time of the target task to calculate the start and end times of the first upstream task and the second upstream task, which can ensure the accuracy of the predicted time as much as possible.
[0130] Next, based on the first latest end time and the predicted completion duration of the target task, obtain the first latest start time of the target task. That is, subtract the predicted completion duration of the target task from the first latest end time, and the obtained difference is the first latest start time of the target task.
[0131] Then, use the first latest start time as the second latest end time of the upstream task;
[0132] Based on the second latest end time and the predicted completion duration of the upstream task, obtain the second latest start time of the upstream task.
[0133] In the process of obtaining the second latest start time and the second latest end time, it includes taking the first latest start time as the latest end time of the first upstream task, that is, the third latest end time; then based on the third latest end time and the first predicted completion duration, obtaining the latest start time of the first upstream task, that is, the third latest start time; then taking the third latest start time as the latest end time of the second upstream task, that is, the fourth latest end time; finally, based on the fourth latest end time and the second predicted completion duration, obtaining the latest start time of the second upstream task, that is, the fourth latest start time.
[0134] Due to ignoring the time difference, when the first upstream task ends, the target task starts to execute or run, so the first latest start time is taken as the latest end time of the first upstream task, that is, the third latest end time. Then, subtracting the first predicted completion duration from the third latest end time, the obtained difference is the second latest start time of the first upstream task, that is, the third latest start time.
[0135] Similarly, when the second upstream task ends, the first upstream task starts to execute or run, so the third latest start time is taken as the latest end time of the second upstream task, that is, the fourth latest end time. Then, subtracting the second predicted completion duration from the fourth latest end time, the obtained difference is the latest start time of the second upstream task.
[0136] Then, based on the third latest start time and the fourth latest start time, as well as the third latest end time and the fourth latest end time, the second latest start time and the second latest end time are obtained. That is, the second latest start time includes the third latest start time and the fourth latest start time, and the second latest end time includes the third latest end time and the fourth latest end time.
[0137] Since B1, A1, and A2 are all second upstream tasks, but for task B1, tasks A1 and A2 are both second upstream tasks of task B1, so the latest end times of tasks A1 and A2 are the latest start time of task B1.
[0138] From the above, it can be known that for any task node in the task node tree, assuming that the predicted completion duration of each task is F(t), the latest start time of the T node is T1, and the latest end time is T2, then T1 = commitment warning time - the sum of all predicted completion durations from the T node to the target task node, and T2 = T1 + F(t) = commitment warning time - the sum of all predicted completion durations from the T node to the target task node except the T node itself. Therefore, by the method of backward deduction, the start and end times of each task in each task chain in the task node tree can be obtained.
[0139] Determine the second start and end times of the tasks downstream of the currently executing task based on the current time, the first latest start time, the first latest end time, the second latest start time, and the second latest end time.
[0140] When the third latest start time and the third latest end time of the first upstream task, and the fourth latest start time and the fourth latest end time of the second upstream task are obtained, it is possible to determine that the second latest start time includes the third latest start time and the fourth latest start time, and the second latest end time includes the third latest end time and the fourth latest end time.
[0141] Based on the current time, the currently executing task can be determined, and thus the corresponding downstream tasks can be determined. The second start and end times of the downstream tasks include the first start time and the first end time. Therefore, the first start time includes the first latest start time and the second latest start time, and the first end time includes the first latest end time and the second latest end time.
[0142] If the currently executing task is an upstream task, it can be determined that the first start time is the second latest start time of the corresponding upstream task, and the first end time is the second latest end time of the corresponding upstream task. If the currently executing task is the target task, it can be determined that the first start time is the corresponding first latest start time, and the first end time is the corresponding first latest end time.
[0143] Furthermore, in some embodiments, in order to ensure as much as possible that all tasks on each task chain can produce task outputs according to the promised warning time, it is necessary to select the same task nodes of each task chain on the task node tree.
[0144] Therefore, determining the second start and end times of the tasks downstream of the currently executing task based on the current time, the first latest start time, the first latest end time, the second latest start time, and the second latest end time includes:
[0145] Determine the minimum value among the second latest start times of the same upstream task in different task chains of the target task executed in the task node tree as the first start time;
[0146] Take the second latest end time corresponding to the first start time as the first end time;
[0147] Based on the current time, the first start time, the first end time, the first latest start time, and the first latest end time, determine the second start and end times of the tasks downstream of the currently executing task.
[0148] For example, for task chain four: A3→B2→C2→D and task chain five: A3→B2→C1→D, for task chain four and task chain five, task A3 is the same first upstream task. Assume that the predicted completion duration of node A3 is 45 minutes, the predicted completion duration of node B2 is 2 hours, the predicted completion duration of node C2 is 3 hours, the predicted completion duration of node C1 is 2 hours and 30 minutes, and the predicted completion duration of node D is 1 hour and 30 minutes.
[0149] Assume that the promised warning time for task D is 9:00. Then for the node of task A3, in task chain four, the latest end time of task A3 is: 9:00 - F(B2) - F(C2) - F(D) = 2:30. In task chain five, the latest end time of task A3 is: 9:00 - F(B2) - F(C1) - F(D) = 3:00. If we choose the larger value of 3:00 as the latest end time of task A3 at this time, it will cause at least a half-hour delay in task chain four, resulting in the target node D not being able to be executed and completed on time. Therefore, at this time, we choose the minimum value of the two, that is, choose 2:30 as the latest end time of task A3.
[0150] After obtaining the minimum latest end time of the task, adding the predicted completion duration of the task can obtain the minimum latest start time of the task, so that the first start time and the first end time of the same upstream task can be obtained.
[0151] When determining the minimum latest start time and the latest end time of the task, when all task chains execute this task, only the minimum latest start time and the latest end time need to be used, and it is not necessary to calculate the latest start time and the latest end time of this task in each task chain. Taking task chain four and task chain five as an example, the latest start time and the latest end time of task A3 in different task chains are different. If the minimum value is not selected, every time we reach task A3, we need to determine the task chain where task A3 is located, and then determine the latest start time and the latest end time of task A3, which greatly increases the calculation amount of the system. By the method of the present application, only the minimum value is used. Therefore, through this method, the time calculation of unnecessary tasks in the task chain can be effectively reduced, the calculation amount of the system can be effectively reduced, and the resource occupancy can be reduced.
[0152] Of course, in some embodiments, when not obtaining the minimum latest start time and the minimum latest end time of the downstream task of the currently executed task and obtaining the second start and end time, it is necessary to calculate the second latest start time of the same upstream task in each task chain of the task node tree that executes the target task. Then, according to the second start and end time, the first start and end time of the corresponding currently executed task in each task chain is determined.
[0153] Similarly, since the upstream tasks include the first upstream task and the second upstream task, correspondingly, the first start time includes the second start time of the first upstream task and the third start time of the second upstream task, and the first end time includes the second end time of the first upstream task and the third end time of the second upstream task.
[0154] Refer to Figure 5 , Figure 5 is a schematic diagram of the time path of the tasks provided by the embodiments of the present application. Based on the second start time, the second end time, the third start time, the third end time, the first latest start time, and the first latest end time, the second start and end times of all the tasks in the task node tree are determined.
[0155] Since the time of the node where the target task is located does not change due to different task chains, the minimum first latest start time and the minimum first latest end time of the target task are itself. Therefore, the first start time includes the second start time, the third start time, and the first latest start time, and the first end time includes the second end time, the third end time, and the first latest end time.
[0156] Based on the current time and the second start and end times, the first start and end times of the currently executed task are determined.
[0157] According to the second start and end times, the start and end times of all the nodes in the node task tree can be obtained. Based on the current time and the start and end times of all the nodes in the node task tree, the currently executed task can be determined. After determining the currently executed task, the start and end times of the currently executed task, that is, the first start and end times, can be determined.
[0158] The way to obtain the current time can be obtained through conventional acquisition methods, which will not be elaborated here. Since the second start and end times include the first start time and the first end time of all the tasks of the downstream tasks, the start time and the end time of the tasks of all the nodes in the task node tree can also be calculated. Therefore, by determining the position of the current time line based on the current time, the currently executed task, that is, the currently executed task, can be determined.
[0159] Refer to Figure 6 , Figure 6 is a schematic diagram of task time prediction of tasks located in the same task chain provided by the embodiments of the present application. The current time is located in the time period corresponding to Task 5. At this time, the task of Task 5 has started to be executed, and the current time is after the latest start time of Task 5 and before the latest end time of Task 5, and the actual start time of Task 5 can be obtained. At the same time, the actual start time of Task 5 is before the current time. Therefore, Task 5 is the currently executed task.
[0160] When obtaining the currently executing task, the first start and end time of the current task can be obtained. The first start and end time includes the latest start time and the latest end time of the currently executing task. The essence of the currently executing task is the first upstream task, the second upstream task, or the target task. Therefore, when determining the currently executing task, the latest start time and the latest end time of the currently executing task can be obtained.
[0161] Further, after obtaining the latest start time and the latest end time of each task, the running status of these tasks will be polled regularly and periodically. For the sake of a simpler and clearer description, refer to Figure 7 , Figure 7 which is a schematic diagram of the time axis for calculating the latest start time and the latest end time provided by an embodiment of the present application. Some tasks are arranged in an orderly manner on the time axis according to the latest start time and the latest end time. Figure 7 In
[0162] each task is divided into two time checkpoints: the latest start time and the latest end time with the time line corresponding to the current time as the reference line. Tasks that have not been successfully run and whose time checkpoints are less than the current time can be found. Among them, tasks that have not been successfully run can be obtained after being detected through other detection interfaces. Tasks that have not been successfully run include those in execution, waiting for execution, and execution failure. The time checkpoint being less than the current time means the time checkpoint before the current time, such as Figure 7 the latest start time of task 1 and the latest start time of task 5 in
[0163] Refer to Figure 7 , tasks whose time checkpoints are before or exactly at the current time can be determined according to the current time. When obtaining tasks that have not been successfully run, the tasks that have not been successfully run are screened, and tasks among the tasks that have not been successfully run whose time checkpoints are earlier than the current time are screened.
[0164] When screening out the corresponding tasks that have not been successfully run, the actual start time of the tasks that have not been successfully run can be directly obtained through the detection interface. Taking task 5 in Figure 7 as an example, the actual start time of task 5 can be obtained, and then based on the actual start time of task 5, the latest start time of task 5, and the current time, it is determined whether task 5 is delayed. If the actual start time of task 5 is earlier than or equal to the latest start time of task 5, it is proved that task 5 is not delayed. If the actual start time of task 5 is later than the latest start time of task 5, it is proved that task 5 is delayed, which in turn causes the target task D to be delayed.
[0165] Similarly, if the latest end time of Task 5 is also earlier than the current timeline, obtain the actual end time of Task 5. If the actual end time of Task 5 is later than the latest end time of Task 5, it proves that Task 5 is delayed; otherwise, it is not.
[0166] Since the latest start time and the latest end time of Task 5 are calculated based on the latest end time of the target task and the predicted completion duration of the task, if Task 5 is delayed, the target task will definitely be delayed. At this time, the latest end time of the target task will definitely be after the warning time, and then a warning can be triggered. When there is a delay, the delay time can be continuously calculated subsequently to determine whether to issue a line-breaking warning, etc. If the delay time exceeds the promised time, a line-breaking warning is issued.
[0167] 140. Obtain the task delay duration of the currently executing task based on the first start and end time, the current time, and the predicted completion durations of the upstream task and the target task respectively.
[0168] According to the predicted completion duration, the corresponding first upstream task or second upstream task of the currently executing task can be determined, and then the predicted completion duration of the currently executing task can be determined. Refer to Figure 6 , when determining the current time and the currently executing task, the actual start time of the currently executing task can be obtained. After obtaining the actual start time of the currently executing task, adding the actual start time to the predicted completion time of the currently executing task can obtain the predicted completion time of the currently executing task.
[0169] Then, based on the predicted completion time of the currently executing task and the latest end time of the currently executing task, the task delay duration of the currently executing task can be obtained. For example, by obtaining the difference between the two, the difference is the task delay duration of the currently executing task.
[0170] Of course, in some embodiments, it can also be determined whether the currently executing task corresponds to the target task according to the predicted completion duration. If it corresponds to the target task, obtain the actual start time of the target task, and then subtract the actual start time from the current time. The obtained value is the task delay duration of the currently executing task.
[0171] Furthermore, in some embodiments, determining the task delay duration also requires determining the task status of the currently executing task. Therefore, obtaining the task delay duration of the currently executing task based on the first start and end time, the current time, and the predicted completion duration includes:
[0172] Determine the task status of the currently executing task.
[0173] The task status of a task can be determined through system API functions, system logs, or interfaces provided by the task itself. The task status includes in execution, waiting to execute, execution failed, and completed.
[0174] If the task status is in execution, then based on the first start and end time, the upstream task, and the predicted completion duration of the target task, the predicted completion time of the currently executing task is obtained.
[0175] If the task status is in execution, as Figure 6 shown, Task 5 is in the task status of in execution. At this time, the actual start time of the currently executing task can be obtained, and then the predicted completion duration of the currently executing task can be obtained according to the first start and end time. Adding the actual start time and the predicted completion duration can obtain the predicted completion time of the currently executing task.
[0176] Specifically, when the actual start time of the currently executing task and the predicted completion duration of the currently executing task are obtained, they can be added to the first start and end time. Therefore, the first start and end time includes the actual start time of the currently executing task, the predicted completion duration of the currently executing task, the latest start time of the currently executing task, and the latest end time of the currently executing task. Based on the first start and end time and the predicted completion duration, obtaining the predicted completion time of the currently executing task includes:
[0177] Based on the actual start time and the predicted completion duration of the currently executing task, the predicted completion time of the currently executing task is obtained.
[0178] That is, adding the actual start time and the predicted completion duration of the currently executing task, and the sum value obtained is the predicted completion time of the currently executing task.
[0179] Based on the predicted completion time and the first start and end time, the task delay duration of the currently executing task is obtained;
[0180] Specifically, by calculating the difference between the predicted completion time and the latest end time of the currently executing task, the task delay duration of the currently executing task is obtained.
[0181] After obtaining the predicted completion time of the currently executing task, the latest end time of the currently executing task can be subtracted from the predicted completion time of the currently executing task to obtain a difference, and this difference is the task delay duration of the previous executing task.
[0182] Furthermore, in some embodiments, after determining the task status of the currently executing task, it further includes:
[0183] If the task status is waiting to execute or execution failed, then based on the current time and the first start and end time, the task delay duration of the currently executing task is obtained.
[0184] If the task status is waiting to be executed or the execution fails, at this time, according to the current time and the latest start time of the currently executing task in the first start and end time, calculate the task delay duration. The calculation method is to subtract the current time from the latest start time of the currently executing task, and the obtained difference is the task delay duration of the currently executing task, that is, based on the current time and the first start and end time, obtain the task delay duration of the currently executing task, including:
[0185] Calculate the difference between the current time and the latest start time of the currently executing task to obtain the task delay duration of the currently executing task.
[0186] Of course, in some embodiments, if the task status is execution failure, directly obtain the task warning information at this time and issue a warning for the currently executing task. If the task status is completed, it proves that the completed task has no impact on whether the subsequent target task will exceed the promised warning completion time. Therefore, at this time, there is no need to pay attention to this task, and only the task nodes after this task need to be calculated. Therefore, when performing the next cycle task execution check, this completed task can be ignored.
[0187] Of course, further, the delay time of the completed task can also be calculated and updated to the corresponding preset database for subsequent query. Among them, the delay time is the difference obtained by subtracting the actual completion time from the latest completion time of the completed task.
[0188] 150. If the task delay duration exceeds the preset value, issue a warning for the target task.
[0189] After obtaining the task delay duration, it is necessary to issue a warning for the target task according to the task delay duration. That is, if the task delay duration exceeds the preset value, it proves that there is a delay in the execution process of the currently executing task, which means that the target task will exceed the promised warning time to complete during the execution process. Therefore, a warning is issued for the target task at this time.
[0190] The warning information can refer to Figure 8 , Figure 8It is a schematic diagram of the alarm message format provided by the embodiments of the present application. When an alarm needs to be issued, the alarm information is sent to the terminal devices of relevant personnel, such as mobile phones, tablets, computers, etc. The alarm information includes event information, baseline information, and problem description. Among them, the event information includes an event description, such as a broken line risk warning, and also includes the estimated completion time and task delay time. The baseline information includes the baseline name (i.e., the name of the target task), the baseline node (i.e., the task node corresponding to the task chain), the baseline person in charge, the committed time, and the warning time. The problem description includes the problem node, the problem reason, and the person in charge of the node. Among them, the problem node is the node where the delay occurs. The problem reason can be, for example: delayed start, and the running time exceeds the set value, etc.
[0191] Therefore, by calculating the delay of the target task in the above manner, it is not necessary to wait until the target task is completed to obtain the delay time. The completion time of the upstream task of the target task can be predicted in advance to obtain the delay time, and then the target task can be predicted. This enables relevant personnel to have a certain amount of time to adjust the target task in advance.
[0192] Of course, further, in some embodiments, in addition to obtaining the task delay duration, the estimated completion time of the target task can also be calculated according to the task delay duration. That is, after obtaining the task delay duration of the currently executed task based on the first start and end time, the current time, and the predicted completion duration, it further includes:
[0193] If the task delay duration does not exceed the preset value, obtain the upstream tasks between the currently executed task and the target task as the intermediate upstream tasks.
[0194] Among them, the preset value can be set according to the actual situation. For example, the preset value can be set to zero. If the task delay duration does not exceed zero, it proves that the task delay duration is negative, which means that the currently executed task will be delayed. For tasks with a status of waiting to be executed or execution failure, a negative task delay duration proves that the current time has exceeded the latest start time of the currently executed task. For tasks with a status of being executed, a negative task delay duration proves that the predicted completion time of the currently executed task is later than the latest end time of the currently executed task.
[0195] At this time, obtain the upstream tasks between the currently executed task and the target task as the intermediate upstream tasks. If the currently executed task is the second upstream task, the intermediate upstream tasks include the first upstream task and the second upstream task. If the currently executed task is the first upstream task, the intermediate upstream tasks include part of the first upstream task. If the currently executed task is the second upstream task of the adjacent first upstream task, the intermediate upstream tasks include the first upstream task.
[0196] Determine the cumulative sum of the predicted completion durations of the intermediate upstream tasks to obtain the sum value of the completion durations;
[0197] Based on the task delay duration, the sum value of the completion durations, and the predicted completion duration of the target task, obtain the estimated completion time of the target task.
[0198] That is, calculate the cumulative sum of all the predicted completion durations of the intermediate upstream tasks to obtain the sum value of the completion durations, and then add the task delay duration of the currently executed task, the sum value of the completion durations, and the predicted completion duration of the target task to obtain the estimated completion time of the target task, thereby facilitating relevant personnel to determine the completion time of the target task.
[0199] Further, after obtaining the estimated completion time of the target task, it further includes:
[0200] If the estimated completion time exceeds the promised warning time, give an alarm for the target task.
[0201] The information for the alarm can refer to Figure 8 . When an alarm needs to be given, send the alarm information to the terminal devices of relevant personnel, such as mobile phones, tablets, computers, etc.
[0202] Certainly, in some embodiments, after obtaining the estimated completion time, the actual completion time of the same target task obtained each time can be statistically analyzed and visually displayed, referring to Figure 9 , Figure 9 is a schematic diagram of the completion time of the target task provided by the embodiment of the present application, including the actual completion time of the target task and the actual running time. Among them, the actual running time refers to the running duration of the longest task chain for completing the target task. Figure 9 In, Time 1 to Time 10 represent the same target task recorded at different times. The recorded target tasks are distinguished by time. For example, Time 1 can be represented as 20230302, that is, the actual completion time and the actual running time of the target task recorded on March 2, 2023. Time 2 is represented as 20230303, that is, the actual completion time and the actual running time of the target task recorded on March 3, 2023, and so on for the subsequent times.
[0203] Further, in some embodiments, the alarm information can have multiple types, such as task delay warning, broken line risk warning, broken line for completion, baseline broken line completion, failure alarm, time-consuming fluctuation, and safety output, etc., and for different types of alarm information, there are different triggering conditions.
[0204] For task delay warning, it is triggered when the expected completion time exceeds the warning time. For this warning, it can be executed through the following convergence method: If a task is only delayed and warned once, then if there has been a delay warning for this task before, there will be no warning this time. If there has been no such warning before, then if it is the first warning currently, a direct warning will be given. If it is the second warning, the warning interval and whether the task delay duration increases can be set to determine whether to give a warning.
[0205] For broken line risk warning, it is triggered when the expected completion time exceeds the promised time. This warning can also be executed using the above convergence method. At the same time, warnings can be given to the baseline person in charge via phone, text message, voice, etc.
[0206] For the triggering conditions of the above multiple warning types and the convergence method of the warning, they can all be set according to the actual situation. Through various different settings, different warnings can be given for different warning types, making the task warning more accurate.
[0207] After obtaining the task delay duration of the currently executing task based on the first start and end time, the current time, and the predicted completion durations of the upstream task and the target task respectively, it further includes:
[0208] Obtain the task chain of the task node tree;
[0209] Determine the maximum value of the task delay duration of the currently executing task in the task chain of each task node tree as the maximum delay duration;
[0210] Obtain the currently executing task corresponding to the maximum delay duration as the maximum delay task;
[0211] Obtain the task chain of the task node tree corresponding to the maximum delay task as the critical task chain;
[0212] Based on the maximum delay task and the critical task chain, obtain the link warning information.
[0213] During the execution process of the target task, there will be several different task chains. In each task chain, the step of obtaining the task delay duration of the currently executing task based on the first start and end time, the current time, and the predicted completion durations of the upstream task and the target task respectively will be executed. Due to the differences in the task chains, the currently executing tasks in each task chain may be different.
[0214] At this time, determining the task chain of the task node tree, that is, all the task chains for executing the target task and giving warnings to the target task. Continuing with the previous example, task chains one to five are five different task chains, but they are all task chains for executing target task D and giving warnings to target task D.
[0215] At this time, obtain the task delay duration of the currently executing task in all task chains, compare all the task delay durations, obtain the currently executing task corresponding to the maximum value of the task delay duration as the maximum delay task, and then determine the task chain where the maximum delay task is located according to the task chain. This task chain is the critical task chain.
[0216] Finally, generate a link warning message based on the maximum delay task and the critical task chain, that is, the link warning message includes the maximum delay task and the critical task chain. Then send the link warning message to the terminal devices of relevant personnel, such as mobile phones, tablets or laptops, etc., so as to be able to remind relevant personnel, determine the upstream task that has the greatest impact on the target task and the corresponding task chain where the upstream task is located, and facilitate relevant personnel to pay attention to or adjust the maximum delay task and the critical task chain.
[0217] As can be seen from the above, this embodiment can determine a task node tree, which includes a target task to be warned, a first upstream task on which the execution of the target task depends, and a second upstream task on which the execution of the first upstream task depends; obtain the historical completion durations of the execution of the first upstream task, the second upstream task, and the target task; based on the historical completion durations, obtain the predicted completion durations of all tasks in the task node tree; determine the promised warning time of the target task; based on the promised warning time and the predicted completion durations, determine the second start and end times of all tasks in the task node tree; obtain the current time, and according to the current time and the second start and end times, determine the currently executing task and the first start and end time of the currently executing task; based on the first start and end time, the current time, and the predicted completion duration, obtain the task delay duration of the currently executing task; if the task delay duration exceeds a preset value, alarm the target task. This application calculates the task delay time of the upstream task of the target task, and thus determines whether the target task will be delayed according to the task delay time and the preset value, can warn the running time of the target task before the target task is executed, and when the task delay time exceeds the preset value, alarm the target task, enabling relevant personnel to have a certain amount of time to adjust the target task in advance.
[0218] Therefore, for the task time warning method provided by this application, it can be executed according to the following process. Refer to Figure 10 , Figure 10It is a schematic flow diagram of task timing polling provided by an embodiment of the present application. First, a periodic check is performed on the task, and it is determined whether the task is completed, that is, the running state of the task is determined. If the task status is completed, at this time, the completed task is set with a task status of success, and the checkpoint status is updated. The checkpoint is the task node being checked, that is, the current execution node. Then, a checkpoint analysis is performed. If the status of the checkpoint is successful, at this time, the check node of the task is ignored, and then the task ends and enters the next task polling cycle. The next task polling cycle filters out the task nodes with a task status of success.
[0219] If the task is not completed, at this time, it is determined whether the currently executing task is in a running state. If it is in a running state but the task is not completed, that is, the task status is in execution at this time, the checkpoint status is updated. If the current task is delayed at this time, it proves that the checkpoint status is unsafe. At this time, the task status is set to unsuccessful, proving that the current node is the checkpoint. Then the task ends and enters the next task polling cycle, and then continue to perform a polling check on the task nodes with an unsuccessful task status.
[0220] If the currently executing task is not in a running state, at this time, it is determined whether the currently executing task has failed to run. If it fails, a failure alarm is issued, and the checkpoint status is updated to unsafe, and then the task status is set to unsuccessful. If the currently executing task has not failed to run, it is determined whether the currently executing task is delayed. If it is delayed, the checkpoint status is updated to unsafe, and then the task status is set to unsuccessful.
[0221] The task status being unsuccessful proves that the current node is the checkpoint. Then the task ends and enters the next task polling cycle, and then continue to perform a polling check on the task nodes with an unsuccessful task status.
[0222] If the task is not completed and is running, and there is no delay, or, if the task is not completed, not running and not failed to run, and there is no delay, the checkpoint is set to safe. At this time, the task can be ignored or the next round of polling check can be continued, which can be specifically set according to requirements.
[0223] According to the method described in the previous embodiment, the following will take the specific integration of the warning device for the task time in the terminal as an example for further detailed description.
[0224] An embodiment of the present application provides a warning method for task time, as Figure 11 shown, the specific process of the warning method for task time can be as follows:
[0225] 210. The terminal determines a task node tree, which includes a target task that needs to be alerted, a first upstream task upon which the execution of the target task depends, and a second upstream task upon which the execution of the first upstream task depends.
[0226] First, construct the task node tree of the target task. After constructing the task node tree, the relationships between various tasks can be determined. The task node tree includes a target task that needs to be alerted, a first upstream task upon which the execution of the target task depends, and a second upstream task upon which the execution of the first upstream task depends. The target task is the task that ultimately needs to be inspected and the alert result obtained.
[0227] 220. The terminal obtains the historical completion durations of executing the first upstream task, the second upstream task, and the target task.
[0228] The historical completion durations of executing the first upstream task, the second upstream task, and the target task refer to the respective completion durations of completing the first upstream task, the second upstream task, and the intermediate upstream task during the historical task execution process. That is, the historical completion duration includes the historical completion duration of the first upstream task during the historical task execution, the historical completion duration of the second upstream task during the historical task execution, and the historical completion duration of the target task during the historical task execution.
[0229] 230. The terminal obtains the predicted completion durations of all tasks in the task node tree based on the historical completion durations.
[0230] Among them, all tasks in the task node tree include the first upstream task, the second upstream task, and the target task. Based on the historical completion durations, the predicted completion durations of all tasks in the task node tree can be obtained. A certain historical completion duration of the first upstream task can be used as the predicted completion duration of the corresponding first upstream task, a certain historical completion duration of the second upstream task can be used as the predicted completion duration of the corresponding second upstream task, and a certain historical completion duration of the target task can be used as the predicted completion duration of the corresponding target task. The predicted completion durations of all tasks in the task node tree are composed of the predicted completion duration of the first upstream task, the predicted completion duration of the second upstream task, and the predicted completion duration of the target task.
[0231] 240. The terminal determines the promised alert time of the target task.
[0232] When it is necessary to determine the promised alert time of the target task, an alert task configuration interface is displayed at this time. The alert task configuration interface includes an alert condition configuration area, and the alert condition configuration area includes an editable alert time.
[0233] In response to a modification operation on the modifiable warning time, determine the promised warning time of the target task. That is, relevant staff can control and connect to the warning task configuration interface through hardware devices such as a mouse or keyboard. Of course, they can also use other terminal devices for wired or wireless connections to modify the modifiable warning time in the warning condition configuration area to obtain the promised warning time of the target task.
[0234] 250. The terminal determines the second start and end times of the downstream task of the currently executing task based on the promised warning time, the upstream task, and the predicted completion duration of the target task.
[0235] The second start and end times include the first start time and the first end time of the downstream task. The tasks in the same task chain of the task node tree are consecutive. Therefore, the second start and end times can be calculated by directly obtaining the difference between the promised warning time and the predicted completion duration. Of course, if there is a time difference between the tasks in the same task chain, when calculating the second start and end times, the difference between the promised warning time and the predicted completion duration can be combined with the time difference to calculate the second start and end times.
[0236] 260. The terminal obtains the current time and determines the currently executing task and the first start and end times of the currently executing task based on the current time and the second start and end times.
[0237] The current time can be obtained through conventional methods, which will not be elaborated here. Since the second start and end times include the first start time and the first end time of all tasks in the task node tree, the currently executing task can be determined by determining the position of the current time on the current time line, that is, the currently executing task.
[0238] When the currently executing task is obtained, the first start and end times of the current task can be obtained. The first start and end times include the latest start time and the latest end time of the currently executing task. The essence of the currently executing task is the first upstream task or the second upstream task. Therefore, when the currently executing task is determined, the latest start time and the latest end time of the currently executing task can be obtained.
[0239] 270. The terminal obtains the task delay duration of the currently executing task based on the first start and end times, the current time, and the predicted completion duration.
[0240] According to the predicted completion duration, the first upstream task or the second upstream task corresponding to the currently executing task can be determined, and then the predicted completion duration of the currently executing task can be determined. When determining the current time and the currently executing task, the actual start time of the currently executing task can be obtained. After obtaining the actual start time of the currently executing task, adding the actual start time to the predicted completion time of the currently executing task can obtain the predicted completion time of the currently executing task.
[0241] Then, based on the predicted completion time of the currently executing task and the latest end time of the currently executing task, the task delay duration of the currently executing task can be obtained. For example, by obtaining the difference between the two, the difference is the task delay duration of the currently executing task.
[0242] 280. If the task delay duration exceeds the preset value, the terminal alarms the target task.
[0243] After obtaining the task delay duration, it is necessary to alarm the target task according to the task delay duration. That is, if the task delay duration exceeds the preset value, it proves that a delay has occurred during the execution of the currently executing task, which means that the target task will exceed the promised warning time to complete during the execution process. Therefore, the target task is alarmed at this time.
[0244] The alarm information can refer to Figure 8 , when an alarm needs to be issued, the alarm information is sent to the terminal devices of relevant personnel, such as mobile phones, tablets, computers, etc. The alarm information includes event information, baseline information, and problem description. Among them, the event information includes an event description, such as a broken line risk warning, and also includes the expected completion time and the task delay time. The baseline information includes the baseline name (i.e., the name of the task line to which the target task belongs), the guarantee node (i.e., the node corresponding to the target task), the baseline person in charge, the promised time, and the warning time. The problem description includes the problem node, the problem reason, and the node person in charge. Among them, the problem node is the node where the delay occurs, and the problem reason can be, for example: delayed start, and the running time exceeds the set value, etc.
[0245] As can be seen from the above, in this embodiment, the terminal can determine the task node tree, which includes the target task that needs to be warned, the first upstream task on which the target task depends, and the second upstream task on which the first upstream task depends. Then, the terminal obtains the historical completion durations of executing the first upstream task, the second upstream task, and the target task. The terminal obtains the predicted completion durations of all tasks in the task node tree based on the historical completion durations. The terminal determines the promised warning time of the target task. Based on the promised warning time and the predicted completion durations, the terminal determines the second start and end times of all tasks in the task node tree. Then, the terminal obtains the current time and determines the currently executing task and the first start and end time of the currently executing task according to the current time and the second start and end times. Then, the terminal obtains the task delay duration of the currently executing task based on the first start and end time, the current time, and the predicted completion duration. Finally, if the task delay duration exceeds the preset value, the terminal issues an alarm for the target task. By calculating the task delay time of the upstream task of the target task, this application can determine whether the target task will be delayed according to the task delay time and the preset value, can warn the running time of the target task before the target task is executed, and issue an alarm for the target task when the task delay time exceeds the preset value, enabling relevant personnel to have a certain amount of time to adjust the target task in advance.
[0246] To better implement the above method, the embodiment of this application also provides an early warning device for task time, as Figure 12 shown. The early warning device for task time may include a node tree determination module 310, a predicted duration acquisition module 320, a start and end time acquisition module 330, a delay duration acquisition module 340, and a task alarm module 350, as follows:
[0247] The node tree determination module 310 is configured to determine a task node tree, which includes a target task that needs to be warned and an upstream task on which the target task depends;
[0248] The predicted duration acquisition module 320 is configured to obtain the predicted completion durations of the upstream task and the target task respectively according to the historical completion durations of the upstream task and the target task respectively;
[0249] The start and end time acquisition module 330 is configured to determine the promised warning time of the target task, and determine the first start and end time of the currently executing task according to the promised warning time, the predicted completion durations of the upstream task and the target task respectively, and the current time;
[0250] The delay duration acquisition module 340 is configured to obtain the task delay duration of the currently executing task based on the first start and end time, the current time, and the predicted completion durations of the upstream task and the target task respectively;
[0251] The task warning module 350 is used to warn the target task if the task delay duration exceeds the preset value.
[0252] Meanwhile, the early warning device also includes a baseline management module: responsible for basic operations such as adding, deleting, querying, and modifying baseline metadata.
[0253] Baseline distribution module: Since the task data of each baseline is isolated from each other, in order to support concurrent execution on multiple server nodes, the system designs a distribution module based on the master-slave architecture, elects a server node as the master node, responsible for the distribution of baseline data, and other server nodes are responsible for the execution of specific modules after receiving the allocated baseline messages. The baseline messages are mainly divided into two types:
[0254] Baseline initialization message: Executed by the initialization module, mainly responsible for generating the instance data of the baseline. It includes the checkpoint data involved in the baseline, and at the same time calculates the latest start and end times of each checkpoint according to data such as the early warning time of the baseline, task association relationship, and predicted completion duration of each task.
[0255] Baseline checkpoint update message: Executed by the baseline checkpoint update module, mainly responsible for analyzing and calculating based on the task execution status and the time checkpoint data calculated in the previous step, judging whether the current checkpoint is delayed, and then performing summary analysis to judge whether the baseline will be delayed and predicting the baseline output time. If there is a delay, combined with the alarm policy and the stuck-point task, judge whether an alarm is required this time.
[0256] As can be seen from the above, in this embodiment, the task node tree can be determined by the task node tree determination module 310. The task node tree includes the target task that needs to be warned and the upstream tasks on which the execution of the target task depends. Then, the predicted duration acquisition module 320 obtains the predicted completion durations of the upstream task and the target task respectively according to the historical completion durations of the upstream task and the target task. Next, the start and end time acquisition module 330 determines the promised warning time of the target task, and determines the first start and end time of the currently executed task according to the promised warning time, the predicted completion durations of the upstream task and the target task, and the current time. Then, the delay duration acquisition module 340 obtains the task delay duration of the currently executed task based on the first start and end time, the current time, and the predicted completion durations of the upstream task and the target task. Finally, if the task delay duration exceeds the preset value, the task warning module 350 warns the target task. By calculating the task delay time of the upstream task of the target task, this application can determine whether the target task will be delayed according to the task delay time and the preset value, can warn the running time of the target task before the target task is executed, and when the task delay time exceeds the preset value, warns the target task, enabling relevant personnel to have a certain amount of time to adjust the target task in advance.
[0257] In the embodiments of this application, the term "module" or "unit" refers to a computer program with a predetermined function or a part of a computer program, which works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as a processing circuit or a memory), or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of the overall module or unit that includes the function of the module or unit.
[0258] The embodiments of this application also provide an electronic device, such as Figure 13 shown, which shows the structural schematic diagram of the electronic device involved in the embodiments of this application. The electronic device can be a terminal or a server, etc. Specifically:
[0259] The electronic device may include a processor 101 with one or more processing cores, a memory 102 with one or more computer-readable storage media, a power supply 103, an input unit 104, and other components. Those skilled in the art can understand that Figure 13 the structure of the electronic device shown in
[0260] The processor 101 is the control center of the electronic device, connecting various parts of the entire electronic device through various interfaces and circuits. By running or executing software programs and / or modules stored in the memory 102, and by calling the data stored in the memory 102, it executes various functions of the electronic device and processes data. Optionally, the processor 101 may include one or more processing cores; preferably, the processor 101 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor 101 either.
[0261] The memory 102 can be used to store software programs and modules. The processor 101 executes various functional applications and data processing by running the software programs and modules stored in the memory 102. The memory 102 mainly includes a program storage area and a data storage area. Among them, the program storage area can store the operating system, application programs required for at least one function (such as the sound playback function, image playback function, etc.); the data storage area can store the data created according to the use of the electronic device. In addition, the memory 102 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices. Correspondingly, the memory 102 may also include a memory controller to provide the processor 101 with access to the memory 102.
[0262] The electronic device further includes a power supply 103 for powering each component. Preferably, the power supply 103 can be logically connected to the processor 101 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 103 may also include any components such as one or more DC or AC power supplies, a recharge system, a power failure detection circuit, a power converter or inverter, and a power status indicator.
[0263] The electronic device may further include an input unit 104, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.
[0264] Although not shown, the electronic device may further include a display unit, etc., which will not be elaborated here. Specifically, in this embodiment, the processor 101 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 102 according to the following instructions, and the processor 101 will run the application programs stored in the memory 102 to realize various functions as follows:
[0265] The task node tree can be determined. The task node tree includes the target task that needs to be warned, the first upstream task on which the execution of the target task depends, and the second upstream task on which the execution of the first upstream task depends; obtain the historical completion durations of executing the first upstream task, the second upstream task, and the target task; based on the historical completion durations, obtain the predicted completion durations of all tasks in the task node tree; determine the promised warning time of the target task; based on the promised warning time and the predicted completion durations, determine the second start and end times of all tasks in the task node tree; obtain the current time, and based on the current time and the second start and end times, determine the currently executing task and the first start and end time of the currently executing task; based on the first start and end time, the current time, and the predicted completion duration, obtain the task delay duration of the currently executing task; if the task delay duration exceeds a preset value, give an alarm for the target task.
[0266] For the specific implementation of each of the above operations, reference may be made to the previous embodiments and will not be elaborated here.
[0267] As can be seen from the above, in this embodiment, the task node tree can be determined. The task node tree includes the target task that needs to be warned, the first upstream task on which the execution of the target task depends, and the second upstream task on which the execution of the first upstream task depends; obtain the historical completion durations of executing the first upstream task, the second upstream task, and the target task; based on the historical completion durations, obtain the predicted completion durations of all tasks in the task node tree; determine the promised warning time of the target task; based on the promised warning time and the predicted completion durations, determine the second start and end times of all tasks in the task node tree; obtain the current time, and based on the current time and the second start and end times, determine the currently executing task and the first start and end time of the currently executing task; based on the first start and end time, the current time, and the predicted completion duration, obtain the task delay duration of the currently executing task; if the task delay duration exceeds a preset value, give an alarm for the target task. By calculating the task delay time of the upstream task of the target task, this application can determine whether the target task will be delayed according to the task delay time and the preset value, can warn the running time of the target task before the target task is executed, and when the task delay time exceeds the preset value, give an alarm for the target task, enabling relevant personnel to have a certain amount of time to adjust the target task in advance.
[0268] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions or by controlling relevant hardware through instructions. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0269] To this end, an embodiment of the present application provides a computer-readable storage medium, which stores multiple instructions that can be loaded by a processor to execute the steps in any one of the task time warning methods provided by the embodiments of the present application. For example, the instructions can execute the following steps:
[0270] A task node tree can be determined. The task node tree includes a target task that needs to be warned, a first upstream task on which the target task depends, and a second upstream task on which the first upstream task depends; obtain the historical completion durations of executing the first upstream task, the second upstream task, and the target task; based on the historical completion durations, obtain the predicted completion durations of all tasks in the task node tree; determine the promised warning time of the target task; based on the promised warning time and the predicted completion durations, determine the second start and end times of all tasks in the task node tree; obtain the current time, and based on the current time and the second start and end times, determine the currently executing task and the first start and end time of the currently executing task; based on the first start and end time, the current time, and the predicted completion duration, obtain the task delay duration of the currently executing task; if the task delay duration exceeds a preset value, give an alarm for the target task.
[0271] For the specific implementation of each of the above operations, reference can be made to the previous embodiments, which will not be elaborated here.
[0272] Among them, the computer-readable storage medium can include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc.
[0273] Since the instructions stored in the computer-readable storage medium can execute the steps in any one of the task time warning methods provided by the embodiments of the present application, the beneficial effects that can be achieved by any one of the task time warning methods provided by the embodiments of the present application can be realized. For details, reference can be made to the previous embodiments, which will not be elaborated here.
[0274] According to one aspect of the present application, a computer program product or a computer program is provided. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in various optional implementation manners in the above content sorting aspect.
[0275] The above has introduced in detail a method for warning of task time and related devices provided by the embodiments of the present application. Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation on the present application.
[0276] It should be noted that when the above embodiments of the present application are applied to specific products or technologies, for the relevant data of the object, the permission or consent of the object needs to be obtained, and the collection, use, and processing of the relevant data need to comply with the relevant laws, regulations, and standards of the relevant countries and regions.
Claims
1. A warning method for task time, characterized in that Including: Determine a task node tree, where the task node tree includes a target task that needs to be warned and upstream tasks upon which the target task depends; Based on the historical completion durations of the upstream tasks and the target task respectively, obtain the predicted completion durations of the upstream tasks and the target task respectively; Determine the promised warning time of the target task, and based on the promised warning time, the predicted completion durations of the upstream tasks and the target task respectively, and the current time, determine the first start and end time of the currently executed task; Based on the first start and end time, the current time, and the predicted completion durations of the upstream tasks and the target task respectively, obtain the task delay duration of the currently executed task; If the task delay duration exceeds a preset value, then give an alarm for the target task.
2. The warning method for task time according to claim 1, wherein The step of obtaining the predicted completion durations of the upstream tasks and the target task respectively based on the historical completion durations of the upstream tasks and the target task respectively includes: Calculate the duration average of the historical completion duration of the upstream task to obtain the predicted completion duration of the upstream task; Calculate the duration average of the historical completion duration of the target task to obtain the predicted completion duration of the target task.
3. The warning method for task time according to claim 1, wherein The step of determining the promised warning time of the target task, and based on the promised warning time, the predicted completion durations of the upstream tasks and the target task respectively, and the current time, determining the first start and end time of the currently executed task includes: Determine the promised warning time of the target task, and based on the promised warning time, the predicted completion durations of the upstream tasks and the target task respectively, and the current time, determine the second start and end time of the task located downstream of the currently executed task; Based on the current time and the second start and end time, determine the first start and end time of the currently executed task.
4. The warning method for task time according to claim 3, characterized in that, The step of determining the promised warning time of the target task, and based on the promised warning time, the predicted completion durations of the upstream tasks and the target task respectively, and the current time, determining the second start and end time of the task located downstream of the currently executed task includes: Determine the promised warning time of the target task, and use the promised warning time as the first latest end time of the target task; Based on the first latest end time and the predicted completion duration of the target task, obtain the first latest start time of the target task; Use the first latest start time as the second latest end time of the upstream task; Based on the second latest end time and the predicted completion duration of the upstream task, obtain the second latest start time of the upstream task; Based on the current time, the first latest start time, the first latest end time, the second latest start time, and the second latest end time, determine the second start and end time of the task located downstream of the currently executed task.
5. The warning method for task time according to claim 4, wherein The step of determining the second start and end time of the task located downstream of the currently executed task based on the current time, the first latest start time, the first latest end time, the second latest start time, and the second latest end time includes: Determine the minimum value among the second latest start times of the same upstream task in different task chains that execute the target task in the task node tree as the first start time; Use the second latest end time corresponding to the first start time as the first end time; Based on the current time, the first start time, the first end time, the first latest start time, and the first latest end time, determine the second start and end times of the tasks downstream of the currently executing task.
6. The warning method for task time according to claim 1, wherein The determination of the commitment warning time of the target task includes: Display a warning task configuration interface, where the warning task configuration interface includes a warning condition configuration area, and the warning condition configuration area includes a modifiable warning time; In response to the modification operation of the modifiable warning time, determine the commitment warning time of the target task.
7. The warning method for task time according to claim 1, characterized in that, The first start and end times include the actual start time of the currently executing task, the predicted completion duration of the currently executing task, the latest start time of the currently executing task, and the latest end time of the currently executing task. The obtaining of the task delay duration of the currently executing task based on the first start and end times, the current time, and the predicted completion durations of the upstream task and the target task respectively includes: Determine the task status of the currently executing task; If the task status is in progress, then based on the first start and end times and the predicted completion durations of the upstream task and the target task respectively, obtain the predicted completion time of the currently executing task; Based on the predicted completion time and the first start and end times, obtain the task delay duration of the currently executing task.
8. The warning method for task time according to claim 7, characterized in that, The obtaining of the predicted completion time of the currently executing task based on the first start and end times and the predicted completion duration includes: Based on the actual start time and the predicted completion duration of the currently executing task, obtain the predicted completion time of the currently executing task; The obtaining of the task delay duration of the currently executing task based on the predicted completion time and the first start and end times includes: Calculate the difference between the predicted completion time and the latest end time of the currently executing task to obtain the task delay duration of the currently executing task.
9. The warning method for task time according to claim 7, wherein After determining the task status of the currently executing task, it further includes: If the task status is waiting to be executed or execution fails, then based on the current time and the first start and end times, obtain the task delay duration of the currently executing task.
10. The warning method for task time according to claim 1, characterized in that, After obtaining the task delay duration of the currently executing task based on the first start and end times, the current time, and the predicted completion duration, it further includes: If the task delay duration does not exceed the preset value, then obtain the upstream tasks between the currently executing task and the target task as intermediate upstream tasks; Determine the cumulative sum of the predicted completion durations of the intermediate upstream tasks to obtain the sum value of the completion durations; Based on the task delay duration, the sum value of the completion durations, and the predicted completion duration of the target task, obtain the estimated completion time of the target task.
11. The warning method for task time according to claim 10, wherein After obtaining the estimated completion time of the target task, the following steps are further included: If the estimated completion time exceeds the commitment warning time, an alarm is issued for the target task.
12. The early warning method for task time according to claim 1, characterized in that, After obtaining the task delay duration of the currently executing task based on the first start and end time, the current time, and the predicted completion durations of the upstream task and the target task respectively, the following steps are further included: Obtain the task chain of the task node tree; Determine the maximum value of the task delay duration of the currently executing task in the task chain of each task node tree as the maximum delay duration; Obtain the currently executing task corresponding to the maximum delay duration as the maximum delay task; Obtain the task chain of the task node tree corresponding to the maximum delay task as the critical task chain; Based on the maximum delay task and the critical task chain, obtain link warning information.
13. An early warning device for task time, characterized in that, It includes: A node tree determination module for determining a task node tree, where the task node tree includes a target task that needs to be warned and an upstream task on which the target task depends; A predicted duration acquisition module for obtaining the predicted completion durations of the upstream task and the target task respectively according to the historical completion durations of the upstream task and the target task; A start and end time acquisition module for determining the commitment warning time of the target task, and determining the first start and end time of the currently executing task according to the commitment warning time, the predicted completion durations of the upstream task and the target task respectively, and the current time; A delay duration acquisition module for obtaining the task delay duration of the currently executing task based on the first start and end time, the current time, and the predicted completion durations of the upstream task and the target task respectively; A task alarm module for issuing an alarm for the target task if the task delay duration exceeds a preset value.
14. An electronic device, characterized in that, It includes a memory and a processor; the memory stores an application program, and the processor is used to run the application program in the memory to execute the operations in the warning method for task time according to any one of claims 1 to 12.
15. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instruction is executed by the processor, the steps in the warning method for task time according to any one of claims 1 to 12 are implemented.
Citation Information
Cited By
Information processing method and device, equipment and medium
CN121681304A