Task dynamic scheduling methods and devices, electronic devices, and storage media
By acquiring target constraints and task progress data, and using an improved critical path algorithm to optimize task scheduling, the problem of low task scheduling efficiency in existing technologies is solved, and efficient scheduling and resource utilization under resource constraints are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-01
- Publication Date
- 2026-04-03
AI Technical Summary
Existing task scheduling methods are inefficient in multi-project management under resource constraints. They fail to accurately reflect the time constraints of tasks and the insufficient utilization of resources, and ignore the time and resource relationship constraints between tasks, resulting in reduced scheduling efficiency.
By obtaining target constraints, initializing network topology, acquiring current task progress data, calculating delay time, and rescheduling based on delay time, adding backup or emergency teams to optimize task allocation, and utilizing the improved critical path algorithm to consider various time constraints between tasks.
It improves the efficiency of task scheduling, assists project managers in making quick and efficient decisions, makes full use of subcontractor resources, reduces costs, and improves the speed and accuracy of project completion.
Smart Images

Figure CN115759577B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of task scheduling technology, and in particular to a task dynamic scheduling method and apparatus, electronic device, and storage medium. Background Technology
[0002] Project implementation is often constrained by resource limitations. Different tasks may require the same resources or have time constraints, which increases the complexity of project planning and decision-making.
[0003] In resource scheduling problems, traditional methods include linear programming, integral programming, and dynamic programming. Critical Path Management (CPM) and Program Evaluation and Review Technique (PERT) are effective for single-project management but neglect multi-project management under resource constraints. Furthermore, some current research, based on single-project management, combines the advantages of serial schedule generation mechanisms and inverse algorithms to design iterative algorithms for multi-project scheduling. Other research, based on intelligent optimization algorithms such as genetic algorithms, improves the initial solution generation method and genetic operators of traditional genetic algorithms for task allocation and scheduling. In addition, some scholars have proposed virtual machine scheduling models with four objectives: minimizing time, minimizing cost, maximizing resource utilization, and maximizing load.
[0004] The task scheduling method described above suffers from low scheduling efficiency. Summary of the Invention
[0005] The main objective of this disclosure is to provide a task dynamic scheduling method, apparatus, electronic device, and storage medium that can improve the efficiency of task scheduling.
[0006] To achieve the above objectives, a first aspect of this disclosure provides a dynamic task scheduling method, comprising:
[0007] Obtain the target constraints; the target constraints include at least time constraints and inter-task constraints.
[0008] Initialize the network topology according to the target constraints;
[0009] Obtain current task progress data; the current task progress data includes planned duration, current time, project deadline, cumulative task progress, team allocation details, available team resources, number of backup teams, and lead time for emergency teams;
[0010] Based on the current task progress data, the task delay time is obtained;
[0011] If the delay time meets the preset first condition, then the task is rescheduled based on the current task progress data and the target constraint, and the target scheduling result is output; the target scheduling result includes the team allocation status, start time and completion time of the task.
[0012] In some embodiments, the method further includes:
[0013] If the delay time meets the preset second condition, the first critical path is calculated, and a backup team is added based on the first critical path.
[0014] In some embodiments, the method further includes:
[0015] If the delay time meets the preset third condition, the second critical path is calculated, and an emergency team is added based on the second critical path.
[0016] In some embodiments, adding backup teams according to the first critical path includes:
[0017] The first target task on the first critical path is judged to obtain the first judgment result;
[0018] If the first judgment result is that the number of backup teams is not equal to zero, and adding a team can shorten the completion time, then add a backup team for the same type of task under the same subcontractor of the first target task.
[0019] The number of backup teams is reduced by one.
[0020] In some embodiments, adding emergency teams according to the second critical path includes:
[0021] The second target task on the second critical path is evaluated to obtain a second evaluation result;
[0022] If the second determination result is that the start time of the second target task is after the arrival of the emergency team, and adding a team can shorten the completion time, then an emergency team will be added to the second target task.
[0023] In some embodiments, the calculation to obtain the first critical path includes:
[0024] Get the current network topology;
[0025] Calculate the node time data of each node in the current network topology based on the time constraints and the inter-task constraints; the node time data includes the earliest start time, latest start time, earliest end time, and latest end time of each node.
[0026] The first critical path is obtained by performing critical path search processing based on the node time data.
[0027] In some embodiments, calculating the node time data of each node in the current network topology based on the time constraints and the inter-task constraints includes:
[0028] Each node is assigned a value in the order from front to back.
[0029] The second assignment process is performed on each node in reverse order.
[0030] To achieve the above objectives, a second aspect of this disclosure provides a task dynamic scheduling apparatus, comprising:
[0031] A constraint acquisition module is used to acquire target constraints; the target constraints include at least time constraints and inter-task constraints.
[0032] The network initialization module is used to initialize the network topology according to the target constraints.
[0033] The task progress acquisition module is used to acquire current task progress data; the current task progress data includes planned duration, current time, project deadline, cumulative task progress, team allocation details, available team resources, number of backup teams, and emergency team lead time.
[0034] The delay time calculation module is used to calculate the delay time of a task based on the current task progress data.
[0035] The task scheduling module is used to reschedule based on the current task progress data and the target constraint if the delay time meets the preset first condition, and output the target scheduling result; the target scheduling result includes the team allocation status, start time and completion time of the task.
[0036] To achieve the above objectives, a third aspect of this disclosure provides an electronic device comprising:
[0037] At least one memory;
[0038] At least one processor;
[0039] At least one program;
[0040] The program is stored in a memory, and the processor executes the at least one program to implement the method described in the first aspect of this disclosure.
[0041] To achieve the above objectives, a fourth aspect of this disclosure provides a storage medium that is a computer-readable storage medium storing computer-executable instructions for causing a computer to perform:
[0042] As described in the first aspect above.
[0043] The task dynamic scheduling method, apparatus, electronic device, and storage medium proposed in this disclosure first obtain target constraints, then initialize the network topology according to the target constraints, and obtain the current task progress data. Then, based on the current task progress data, the task delay time is obtained. Finally, based on the delay time, and according to the current task progress data and target constraints, rescheduling is performed, and the target scheduling result is output. The technical solution provided by this disclosure can improve the efficiency of task scheduling. Attached Figure Description
[0044] Figure 1 This is a first flowchart of the task dynamic scheduling method provided in the embodiments of this disclosure.
[0045] Figure 2 This is a second flowchart of the task dynamic scheduling method provided in the embodiments of this disclosure.
[0046] Figure 3 yes Figure 2 The first flowchart of step S210 in the process.
[0047] Figure 4 yes Figure 2 The flowchart for step S220.
[0048] Figure 5 yes Figure 2 The second flowchart of step S210 in the process.
[0049] Figure 6 yes Figure 5 The flowchart for step S520.
[0050] Figure 7 This is a schematic diagram illustrating the principle of the task dynamic scheduling method provided in the embodiments of this disclosure.
[0051] Figure 8 This is a block diagram of the task dynamic scheduling device provided in the embodiments of this disclosure.
[0052] Figure 9 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this disclosure.
[0053] Reference numerals: Constraint acquisition module 810, Network initialization module 820, Task progress acquisition module 830, Delay time calculation module 840, Task scheduling module 850, Processor 901, Memory 902, Input / output interface 903, Communication interface 904, Bus 905. Detailed Implementation
[0054] To make the objectives, technical solutions, and advantages of this invention clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only for explaining this application and are not intended to limit this application.
[0055] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to limit the invention.
[0057] Project implementation is often constrained by resource limitations. Different tasks may require the same resources, time constraints, and so on, which increases the complexity of project planning and decision-making.
[0058] In resource scheduling problems, traditional methods include linear programming, integer programming, dynamic programming, and so on. Many algorithms for solving scheduling problems have been proven to be NP-hard (meaning that all NP problems can be reduced to polynomial time complexity; NP stands for non-deterministic polynomial).
[0059] Critical Path Method (CPM) and Program Evaluation and Review Technique (PERT) are good at solving single-project management, but they neglect multi-project management under resource constraints.
[0060] Current research has developed iterative algorithms for multi-project scheduling based on single-project management, combining the advantages of serial schedule generation mechanisms and inverse algorithms. Other studies have improved the initial solution generation methods and genetic operators of traditional genetic algorithms for task allocation and scheduling, based on intelligent optimization algorithms such as genetic algorithms. Furthermore, some scholars have proposed virtual machine scheduling models with four objectives: minimizing time, minimizing cost, maximizing resource utilization, and maximizing load.
[0061] The tasks currently scheduled in the project do not accurately reflect the actual situation, and the following problems exist:
[0062] (1) Many project scheduling problems do not truly reflect the time constraints of tasks. In reality, tasks have multiple time constraints and time constraints exist between tasks. Current methods ignore these constraints, which leads to reduced efficiency in task scheduling.
[0063] (2) In order to ensure that the task is completed within the specified time limit, the task progress needs to be reported. The team needs to make reasonable arrangements for planning time and adjust resource allocation in real time. However, the current scheduling method has the problem of insufficient resource utilization and low resource utilization rate during the dynamic implementation of the project.
[0064] (3) The current scheduling method also ignores the following situations: in a centralized delivery scenario where a project can be delivered to multiple subcontractors, each work package needs to be delivered to the same subcontractor, and different tasks have different time and resource relationship restrictions, and time restrictions between tasks, which leads to a decrease in the efficiency of task scheduling.
[0065] Based on this, embodiments of this disclosure provide a task dynamic scheduling method and apparatus, electronic device, and storage medium. First, target constraints are obtained; then, the network topology is initialized according to the target constraints; and current task progress data is obtained. Then, based on the current task progress data, the task delay time is obtained. Finally, based on the delay time, and according to the current task progress data and target constraints, rescheduling is performed, and the target scheduling result is output. The technical solution provided by embodiments of this disclosure can improve the efficiency of task scheduling.
[0066] The task dynamic scheduling method provided in this disclosure aims to solve the problem of cumbersome scheduling for frontline project managers in the current situation. It can improve scheduling efficiency, assist project managers in making more appropriate decisions in a shorter time, save project manager energy, and make full use of the characteristics of subcontractor teams to achieve the goal of rapid and efficient response in the decision-making process. Considering dynamic scenarios where subcontractor resources are insufficient to complete the project before the deadline, it can quickly and efficiently optimize scheduling, reduce costs, and improve efficiency.
[0067] This disclosure provides a task dynamic scheduling method and apparatus, electronic device, and storage medium, which are specifically described through the following embodiments. First, the task dynamic scheduling method in this disclosure is described.
[0068] The task dynamic scheduling method provided in this disclosure relates to the field of task scheduling technology. The task dynamic scheduling method provided in this disclosure can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, or smartwatch, etc.; the server can be an independent server or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms; the software can be an application implementing the task dynamic scheduling method, but is not limited to the above forms.
[0069] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0070] This disclosure proposes a dynamic task scheduling method, comprising: acquiring target constraints; the target constraints include at least time constraints and inter-task constraints; initializing the network topology according to the target constraints; acquiring current task progress data; the current task progress data includes planned duration, current time, project deadline, cumulative task progress, team allocation details, available team resources, number of backup teams, and emergency team lead time; obtaining the task delay time based on the current task progress data; if the delay time meets a preset first condition, rescheduling is performed based on the current task progress data and target constraints, and the target scheduling result is output; the target scheduling result includes the team allocation status, start time, and completion time of the task.
[0071] Figure 1 This is an optional flowchart of the task dynamic scheduling method provided in the embodiments of this disclosure. Figure 1The method may include, but is not limited to, steps S110 to S150, specifically including:
[0072] S110, Obtain the target constraints;
[0073] S120, Initialize the network topology according to the target constraints;
[0074] S130, Get the current task progress data;
[0075] S140, Based on the current task progress data, obtain the task delay time;
[0076] S150, if the delay time meets the preset first condition, then rescheduling is performed based on the current task progress data and target constraints, and the target scheduling result is output.
[0077] In step S110, when assigning different subcontractor teams to the project, the target constraints include, but are not limited to:
[0078] (1) A team can only perform one task at a time.
[0079] (2) The tasks of the same work package are completed by the same subcontractor;
[0080] (3) Time constraints;
[0081] (4) Inter-task constraints;
[0082] (5) There is a limit to the maximum number of teams that a task can accommodate;
[0083] (6) The number of baseline teams and backup teams of a subcontractor is fixed;
[0084] (7) If the project time limit is still not met after all baseline and backup teams have been deployed to the operation, emergency teams will be considered. Emergency teams will arrive after a certain period of time and can only be used for tasks that have not yet started.
[0085] The time constraints are the time limits for the task, specifically including:
[0086] 1) The task start time must not be earlier than a certain time (denoted as NES);
[0087] 2) The task start time must not be later than a certain time (denoted as NLS);
[0088] 3) The task end time must not be earlier than a certain time (denoted as NEF);
[0089] 4) The task completion time must not be later than a certain time (denoted as NLF).
[0090] Inter-task constraints are time constraints between tasks, specifically including:
[0091] 1) The task must begin after the task has begun (denoted as SS);
[0092] 2) The task must end after it begins (denoted as SF);
[0093] 3) The task must start after it has finished (denoted as FS);
[0094] 4) The task must end after the task ends (denoted as FF).
[0095] In step S120, the network topology is initialized according to the order in which the tasks begin.
[0096] In step S130, the current task progress data includes, but is not limited to, the planned duration (denoted as duration), the current time (denoted as now_time), the project deadline (denoted as deadline), the cumulative task progress (denoted as α), team allocation details, available team resources, the number of backup teams, and the lead time for emergency teams.
[0097] Given the current task progress data and target constraints, and provided that the target constraints are met, the current project plan is obtained.
[0098] In step S140, the task delay time is obtained based on the current task progress, specifically including: if plan_time origin If `delay_time` is less than `deadline`, the plan is refreshed. The specific process for refreshing the plan includes: Planned start / finish time for unstarted tasks = Original planned start / finish time + Delay time; if `plan_time` is less than `deadline`, the plan is refreshed. origin If +delay_time is greater than or equal to deadline, then proceed to step S150.
[0099] In step S150, the target scheduling result includes the team allocation, start time, and completion time of the task.
[0100] Step S150 includes rescheduling based on the current task progress, specifically including:
[0101] (1) Update the original scheduling plan according to the shortest time scheduling algorithm:
[0102] For each task i, if the task is in progress and not yet completed (i.e., 0 < α < 1), then update the standard duration and call the shortest time scheduling algorithm to reschedule. The method for updating the standard duration is P[i] = (1 - α) × duration. iThe shortest time scheduling algorithm is invoked to reschedule the plan.
[0103] If a task has not yet started, the shortest time scheduling algorithm is invoked to reschedule the task.
[0104] (2) Determine the time requirement:
[0105] If the requirements are still not met after rescheduling, meaning the project's planned time meets the plan_time requirement... origin If +delay_time is greater than or equal to deadline, a backup team will be added.
[0106] If the requirements are met after rescheduling, output the team allocation for the task in the dynamic scenario, along with the corresponding start and finish times.
[0107] The first condition is "the requirements are still not met after rescheduling".
[0108] The task dynamic scheduling method proposed in this disclosure first obtains the target constraints, then initializes the network topology based on the target constraints, and obtains the current task progress data. Then, based on the current task progress data, the task delay time is obtained. Finally, based on the delay time, the task progress data, and the target constraints, rescheduling is performed, and the target scheduling result is output. The technical solution provided by this disclosure can improve the efficiency of task scheduling.
[0109] In some embodiments, the method further includes: if the delay time meets a preset second condition, then calculating a first critical path and adding a backup team based on the first critical path; if the delay time meets a preset third condition, then calculating a second critical path and adding an emergency team based on the second critical path.
[0110] like Figure 2 As shown, Figure 2 This is a flowchart of a task dynamic scheduling method provided in other embodiments, which further includes:
[0111] S210, if the delay time meets the preset second condition, the first critical path is calculated, and a backup team is added according to the first critical path.
[0112] S220, if the delay time meets the preset third condition, the second critical path is calculated, and an emergency team is added based on the second critical path.
[0113] In step S210, the second condition is "there are corresponding backup teams with corresponding resources and types, and adding a team is the key task that can shorten the completion time the most".
[0114] In step S220, the third condition is "the start time is after the arrival of the emergency team, and the addition of a team is the key task that can most shorten the completion time".
[0115] In some embodiments, adding a backup team based on the first critical path includes: judging the first target task on the first critical path and obtaining a first judgment result; if the first judgment result is that the number of backup teams is not equal to zero and adding a team can shorten the completion time, then adding a backup team for the same type of task under the same subcontractor of the first target task; the number of backup teams is reduced by one.
[0116] Figure 3 This is a flowchart of step S210 in some embodiments. Figure 3 The illustrated step S210 includes, but is not limited to, steps S310 to S330:
[0117] S310, make a judgment on the first target task on the first critical path and obtain the first judgment result;
[0118] S330, if the first judgment result is that the number of backup teams is not equal to zero, and adding a team can shorten the completion time, then add a backup team for the same type of task under the same subcontractor of the first target task.
[0119] S330, the number of reserve teams is reduced by one.
[0120] In steps S310 to S330, the process of adding a backup team specifically includes:
[0121] (1) Call the improved critical path algorithm of this application to calculate the first critical path;
[0122] (2) Determine the tasks on the first critical path:
[0123] If there are still spare teams corresponding to the relevant resources and types, and adding a team is the key task that can shorten the completion time the most, then add a team for the same type of task under the same subcontractor, and reduce the number of spare teams for the corresponding resources by one.
[0124] (3) Continue steps (1) and (2) in S210 until there are no more queues, if plan_time origin If +delay_time is greater than or equal to deadline, then execute step S220 to add an emergency team; execute step S150 to output the team allocation for the task in the dynamic scenario, as well as the corresponding start and finish times.
[0125] In some embodiments, adding an emergency team based on a second critical path includes: judging a second target task on the second critical path and obtaining a second judgment result; if the second judgment result is that the start time of the second target task is after the arrival of the emergency team, and adding a team can shorten the completion time, then an emergency team is added for the second target task.
[0126] Figure 4 This is a flowchart of step S220 in some embodiments. Figure 4 The illustrated step S220 includes, but is not limited to, steps S210 to S230:
[0127] S410, make a judgment on the second target task on the second critical path and obtain the second judgment result;
[0128] S420, if the second judgment result is that the start time of the second objective task is after the arrival of the emergency team, and adding a team can shorten the completion time, then add an emergency team for the second objective task.
[0129] In steps S410 to S420, the process of adding an emergency team specifically includes:
[0130] (1) Call the improved critical path algorithm of this application to calculate the second critical path;
[0131] (2) Determine the tasks on the second critical path:
[0132] If the start time is after the emergency team arrives, and adding another team is the most effective way to shorten the completion time for a critical task, then add another team for that task.
[0133] (3) Continue steps (1) and (2) in S220 until there are no suitable tasks or the completion time is no longer shortened.
[0134] In some embodiments, calculating the first critical path includes: obtaining the current network topology; calculating the node time data of each node in the current network topology based on time constraints and inter-task constraints; the node time data includes the earliest start time, latest start time, earliest end time, and latest end time of each node; and performing critical path search processing based on the node time data to obtain the first critical path.
[0135] In existing scheduling methods, the shortest time scheduling algorithm, under the consideration of target constraints, sorts all tasks according to a certain strategy, prioritizing the start time, duration, and completion time, and schedules the baseline teams of subcontractors to ensure that the project has the shortest completion time.
[0136] Existing critical path algorithms typically only consider the completion-start (FS) relationship of tasks and task duration. However, in real-world projects, other time constraints exist between tasks, resulting in low scheduling efficiency when applied to scheduling algorithms. This application proposes a dynamic task scheduling mechanism that improves upon existing critical path algorithms through its practical scheduling process, leading to an improved critical path algorithm. The improved critical path algorithm is as follows: Figure 5 As shown.
[0137] Figure 5 This is a flowchart of step S210 in some other embodiments. Figure 5 The illustrated step S210 includes, but is not limited to, steps S510 to S530:
[0138] S510, obtain the current network topology;
[0139] S520 calculates the node time data of each node in the current network topology based on time constraints and inter-task constraints.
[0140] S530 performs critical path search processing based on node time data to obtain the first critical path.
[0141] It should be noted that the input data of the improved critical path algorithm in this application are: network topology (including inter-task constraints), project duration, and time constraints; the output data of the improved critical path algorithm in this application are: critical path and node time data.
[0142] The node time data includes, but is not limited to, the earliest start time (denoted as ES), the latest start time (denoted as LS), the earliest end time (denoted as EF), and the latest end time (denoted as LF) for each node.
[0143] In steps S510 to S530, the improved critical path algorithm of this application specifically includes:
[0144] (1) Calculate the ES, EF, LF, and LS of each node, specifically including:
[0145] Initialize Start[ES], Start[ES] = 0.
[0146] 1) From front to back, process the preceding nodes of all FS and SS of each node as follows: Node[ES] = max{Node pre_F-S [EF], Node pre_S-S[ES], NES}; and process the preceding nodes of all SF and FF of each node as follows:
[0147] Node[EF] = max{Node pre_S-F [ES], Node pre_F-F [EF], Node[ES]+D, NES}; then, End[LF]=End[EF], End[LS]=End[ES].
[0148] 2) Starting from the end, process all subsequent nodes of each node's FS and FF as follows: Node[LF] = min{Node succ_S-F [LS],Node succ_F-F [ES], NLF}; and process all SS and SF successor nodes of each node as follows:
[0149] Node[LF]=max{Nodesucc_S-F[LS], Nodesucc_S-F[LF], Node[LF]+D}.
[0150] (2) Find the critical path from back to front, specifically including:
[0151] Initialize the critical path: CP = [End], and search the critical path from the End node backwards based on the latest end time, and then assign the value of End to the current Node.
[0152] For all four types of predecessor nodes corresponding to the inter-task constraints in Node, the following processing is performed:
[0153] N = argMax{Node pre [LF]};If N=none, then N=argMin{Node pre [LF]-Node pre [FS]};
[0154] CP.append(N);
[0155] If Node = N, return to execute N = argMax{Node pre [LF]}, until Node = Start node.
[0156] (3) Return the critical path CP, as well as the ES, LS, EF, and LF of each node.
[0157] In some embodiments, the node time data of each node in the current network topology is calculated based on time constraints and inter-task constraints, including: performing a first assignment process on each node in a forward-to-back order; and performing a second assignment process on each node in a backward-to-forward order.
[0158] Figure 6 This is a flowchart of step S520 in some embodiments. Figure 6 The illustrated step S520 includes, but is not limited to, steps S610 to S620:
[0159] S610, perform the first assignment process on each node according to the order from front to back;
[0160] S620 performs a second assignment process on each node in a backward order.
[0161] Step S610 specifically includes:
[0162] From front to back, for each node Node, perform the following processing on all its predecessor nodes FS and SS: Node[ES] = max{Node pre_F-S [EF], Node pre_S-S [ES], NES}; and process the preceding nodes of all SF and FF of each node as follows:
[0163] Node[EF] = max{Node pre_S-F [ES], Node pre_F-F [EF], Node[ES]+D, NES}; then, End[LF]=End[EF], End[LS]=End[ES].
[0164] Step S620 specifically includes:
[0165] Starting from the back and working backwards, for each node Node, perform the following processing on all its FS and FF successor nodes: Node[LF] = min{Node succ_S-F [LS],Node succ_F-F [ES], NLF}; and process all SS and SF successor nodes of each node as follows:
[0166] Node[LF] = max{Node succ_S-F [LS],Node succ_S-F [LF],Node[LF]+D}.
[0167] Figure 7 These are schematic diagrams illustrating the principles of dynamic task scheduling methods in some embodiments, as shown below. Figure 7 The following describes a dynamic task scheduling method in detail with reference to a specific embodiment. It is important to understand that the following description is merely illustrative and not intended to limit the scope of the application.
[0168] Consider a project with 4 tasks, a deadline of deadline = 16, and currently on day now_time = 7. The network topology is as follows. Figure 7 As shown, only the earliest start time (NES) of a task is considered, while the other three types of time constraints are not considered; only the finish-start (FS) relationship is considered.
[0169] Table 1 illustrates the task progress and assigned subcontractor teams. When now_time = 7, the subcontractors and progress corresponding to the task are shown in Table 1:
[0170]
[0171] Table 1
[0172] Assuming the dynamic scheduling algorithm has already updated the project plan according to the shortest time scheduling algorithm, and there is still a project completion time Wt > deadline, then consider calling in backup teams and emergency teams. Subcontractors 2 and 3 each have one backup team, subcontractor 1 has no backup team, and the emergency team will arrive in 2 days.
[0173] Step 0: At this point, task D1 still has a workload P[D1] = 20 × (1 - 0.2) = 16; task D2 still has a workload P[D2] = 7 × (1 - 0) = 7; task D3 still has a workload P[D3] = 8 × (1 - 0.2) = 8; task D4 still has a workload P[D4] = 8 × (1 - 0.05) = 13.3.
[0174] Step 1: The current critical path is from D1 to D2. The planned project completion time Wt = 19.33 > deadline = 16. Consider adding a backup team for the tasks on the critical path. Only subcontractor 3, corresponding to task D2, has a backup team; therefore, add a backup team for D2.
[0175] Step 2: The current critical path is from D4 to D3, with a planned project completion time Wt = 17.65 > deadline = 16. Subcontractor 2 for D4 has one backup team; therefore, add one team for D4.
[0176] Step 3: All backup teams have been deployed, but the project's planned completion time is still longer than the project deadline. Therefore, the emergency team is called in. The current critical path is from D1 to D3, and the planned project completion time Wt = 16.33 > deadline = 16.
[0177] The backup team will arrive in 2 days. If an emergency team is added to D1, the time reduced is 16 / 3 - 16 / 4 = 1.33. If an emergency team is added to D3, the time reduced is 8 / 2 - 8 / 3 = 1.33. The time reduced for both tasks is the same, but only the start time of task D3 is after the arrival of the emergency team, i.e., ES = 5.33 + 7 > 2 + 7. Therefore, an emergency team is added to D3.
[0178] Step4: The current critical path is: D1 to D2, and the planned project completion time Wt = 15.83 < deadline = 16, which meets the project deadline, and the process ends.
[0179] The task dynamic scheduling method provided by this application, based on the traditional critical path algorithm and scheduling method, makes full use of the network topology structure of the project, integrates the resources of existing subcontractors, and solves the problem of cumbersome scheduling for on-site project managers in the current situation considering different time and resource relationship constraints for different tasks, the front and back time constraints between tasks, etc. This invention can improve the scheduling efficiency, assist project managers to make more appropriate decisions in a shorter time, save the energy of project managers, make full use of subcontractor teams and other features, and achieve the goal of fast and efficient response in the decision-making process. In the dynamic scenario where subcontracting resources are insufficient to complete the project before the deadline, it can quickly and efficiently achieve scheduling optimization, reduce costs, and improve efficiency.
[0180] The embodiments of this disclosure propose a task dynamic scheduling device, including: a constraint condition acquisition module for acquiring target constraint conditions; the target constraint conditions at least include time constraint conditions and inter-task constraint conditions; a network initialization module for initializing the network topology structure according to the target constraint conditions; a task progress acquisition module for acquiring current task progress data; the current task progress data includes planned construction period, current time, project deadline, task cumulative progress, team allocation details, available team resources, number of backup teams, and emergency team addition lead time; a delay time calculation module for obtaining the delay time of the task according to the current task progress data; a task scheduling module for re-scheduling based on the current task progress data and target constraint conditions if the delay time meets a preset first condition, and outputting a target scheduling result; the target scheduling result includes the team allocation situation, start time, and completion time of the task.
[0181] Please refer to Figure 8 , Figure 8A task dynamic scheduling device according to one embodiment is illustrated. The task dynamic scheduling device includes: a constraint condition acquisition module 810, a network initialization module 820, a task progress acquisition module 830, a delay time calculation module 840, and a task scheduling module 850. The constraint condition acquisition module 810 is connected to the network initialization module 820, the network initialization module 820 is connected to the task progress acquisition module 830, the task progress acquisition module 830 is connected to the delay time calculation module 840, and the delay time calculation module 840 is connected to the task scheduling module 850.
[0182] The specific implementation of the task dynamic scheduling device in this embodiment is basically the same as the specific implementation of the task dynamic scheduling method described above, and they belong to the same inventive concept, so they will not be described again here.
[0183] This disclosure also provides an electronic device, including:
[0184] At least one memory;
[0185] At least one processor;
[0186] At least one program;
[0187] The program is stored in a memory, and the processor executes the at least one program to implement the task dynamic scheduling method described above in this disclosure. The electronic device can be any smart terminal, including mobile phones, tablets, personal digital assistants (PDAs), in-vehicle computers, etc.
[0188] Please see Figure 9 , Figure 9 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes:
[0189] The processor 901 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this disclosure.
[0190] The memory 902 can be implemented in the form of ROM (Read-Only Memory), static storage device, dynamic storage device, or RAM (Random Access Memory). The memory 902 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 902 and is called and executed by the processor 901 using the task dynamic scheduling method of the embodiments of this disclosure.
[0191] The 903 input / output interface is used to implement information input and output.
[0192] Communication interface 904 is used to enable communication and interaction between this device and other devices. Communication can be achieved via wired means (e.g., USB, Ethernet cable) or wireless means (e.g., mobile network, Wi-Fi, Bluetooth).
[0193] Bus 905 transmits information between various components of the device (e.g., processor 901, memory 902, input / output interface 903, and communication interface 904);
[0194] The processor 901, memory 902, input / output interface 903, and communication interface 904 are connected to each other within the device via bus 905.
[0195] This disclosure also provides a storage medium, which is a computer-readable storage medium storing computer-executable instructions for causing a computer to perform the above-described task dynamic scheduling method.
[0196] The task dynamic scheduling method, apparatus, electronic device, and storage medium proposed in this disclosure first obtain target constraints, then initialize the network topology according to the target constraints, and obtain the current task progress data. Then, based on the current task progress data, the task delay time is obtained. Finally, based on the delay time, and according to the current task progress data and target constraints, rescheduling is performed, and the target scheduling result is output. The technical solution provided by this disclosure improves the efficiency of task scheduling.
[0197] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0198] The embodiments described in this disclosure are for the purpose of more clearly illustrating the technical solutions of this disclosure and do not constitute a limitation on the technical solutions provided by this disclosure. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by this disclosure are also applicable to similar technical problems.
[0199] It will be understood by those skilled in the art that Figure 1-6 The technical solutions shown in the figures do not constitute a limitation on the embodiments of this disclosure. They may include more or fewer steps than those shown in the figures, or combine certain steps, or different steps.
[0200] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0201] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0202] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0203] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0204] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0205] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0206] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0207] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0208] The preferred embodiments of the present disclosure have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present disclosure. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and spirit of the present disclosure shall be within the scope of the claims of the present disclosure.
Claims
1. A dynamic task scheduling method, characterized in that, include: Obtain the target constraints; The target constraints include at least time constraints and inter-task constraints; Initialize the network topology according to the target constraints; Obtain current task progress data; the current task progress data includes planned duration, current time, project deadline, cumulative task progress, team allocation details, available team resources, number of backup teams, and lead time for emergency teams; Based on the current task progress data, the task delay time is obtained; If the delay time meets the preset first condition, then rescheduling is performed based on the current task progress data and the target constraint, and the target scheduling result is output; the target scheduling result includes the team allocation status, start time, and completion time of the task; wherein, the first condition is that the requirement is still not met after rescheduling; If the delay time meets the preset second condition, the first critical path is calculated, and a backup team is added according to the first critical path; wherein, the second condition is that there is a backup team with corresponding resources and type, and adding a team can shorten the completion time of the critical task; the first critical path is the execution path of the task under the second condition. If the delay time meets the preset third condition, the second critical path is calculated, and an emergency team is added according to the second critical path; wherein, the third condition is the critical task whose start time is after the arrival of the emergency team and adding a team can shorten the completion time the most, and the second critical path is the execution path of the task under the third condition.
2. The method according to claim 1, characterized in that, The step of adding a backup team according to the first critical path includes: The first target task on the first critical path is judged to obtain the first judgment result; If the first judgment result is that the number of backup teams is not equal to zero, and adding a team can shorten the completion time, then add a backup team for the same type of task under the same subcontractor of the first target task. The number of backup teams is reduced by one.
3. The method according to claim 1, characterized in that, The addition of emergency teams based on the second critical path includes: The second target task on the second critical path is evaluated to obtain a second evaluation result; If the second determination result is that the start time of the second target task is after the arrival of the emergency team, and adding a team can shorten the completion time, then an emergency team will be added to the second target task.
4. The method according to claim 1, characterized in that, The calculation yields the first critical path, including: Get the current network topology; Calculate the node time data of each node in the current network topology based on the time constraints and the inter-task constraints; the node time data includes the earliest start time, latest start time, earliest end time, and latest end time of each node. The first critical path is obtained by performing critical path search processing based on the node time data.
5. The method according to claim 4, characterized in that, The step of calculating the node time data of each node in the current network topology based on the time constraints and the inter-task constraints includes: Each node is assigned a value in the order from front to back. The second assignment process is performed on each node in reverse order.
6. A task dynamic scheduling device, characterized in that, include: The constraint acquisition module is used to acquire the target constraints. The target constraints include at least time constraints and inter-task constraints; The network initialization module is used to initialize the network topology according to the target constraints. The task progress acquisition module is used to acquire current task progress data; the current task progress data includes planned duration, current time, project deadline, cumulative task progress, team allocation details, available team resources, number of backup teams, and emergency team lead time. The delay time calculation module is used to calculate the delay time of a task based on the current task progress data. The task scheduling module is used to reschedule based on the current task progress data and the target constraint if the delay time meets a preset first condition, and output the target scheduling result; the target scheduling result includes the team allocation status, start time, and completion time of the task; wherein, the first condition is that the requirement is still not met after rescheduling; If the delay time meets the preset second condition, the first critical path is calculated, and a backup team is added according to the first critical path; wherein, the second condition is that there is a backup team with corresponding resources and type, and adding a team can shorten the completion time of the critical task; the first critical path is the execution path of the task under the second condition. If the delay time meets the preset third condition, the second critical path is calculated, and an emergency team is added according to the second critical path; wherein, the third condition is the critical task whose start time is after the arrival of the emergency team and adding a team can shorten the completion time the most, and the second critical path is the execution path of the task under the third condition.
7. An electronic device, characterized in that, include: At least one memory; At least one processor; At least one program; The program is stored in memory, and the processor executes the at least one program to achieve the following: The method as described in any one of claims 1 to 5.
8. A storage medium, said storage medium being a computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to perform: The method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Task scheduling method, device and equipment and computer storage medium
CN111666141A
Method and system for restarting a project management system scheduling engine based on user input of contractual start / finish data
CN1728168A