CN115759577A - Dynamic task scheduling method and device, electronic equipment and storage medium - Google Patents

Dynamic task scheduling method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115759577A
CN115759577A CN202211353524.XA CN202211353524A CN115759577A CN 115759577 A CN115759577 A CN 115759577A CN 202211353524 A CN202211353524 A CN 202211353524A CN 115759577 A CN115759577 A CN 115759577A
Authority
CN
China
Prior art keywords
task
time
team
target
constraint condition
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211353524.XA
Other languages
Chinese (zh)
Inventor
张莲民
许天阳
刘正锋
彭洋洋
罗敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Research Institute of Big Data SRIBD
Original Assignee
Shenzhen Research Institute of Big Data SRIBD
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Research Institute of Big Data SRIBD filed Critical Shenzhen Research Institute of Big Data SRIBD
Priority to CN202211353524.XA priority Critical patent/CN115759577A/en
Publication of CN115759577A publication Critical patent/CN115759577A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the disclosure provides a method and a device for dynamically scheduling tasks, electronic equipment and a storage medium, and relates to the technical field of task scheduling. The task dynamic scheduling method comprises the following steps: acquiring a target constraint condition; initializing a network topology structure according to a target constraint condition; acquiring current task progress data; obtaining the delay time of the task according to the current task progress data; and if the delay time meets a preset first condition, rescheduling is carried out according to the current task progress data and the target constraint condition, and a target scheduling result is output.

Description

Task dynamic scheduling method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of task scheduling technologies, and in particular, to a method and an apparatus for dynamically scheduling tasks, an electronic device, and a storage medium.
Background
The implementation process of the project is often limited by resource constraints, different tasks may need the same resources, time constraints, and the like, and the complexity of project planning decisions is increased.
In the resource scheduling problem, the traditional methods are linear programming, shaping programming, dynamic programming and the like. Critical path algorithms (CPM) and plan review techniques (PERT) work well for single project management, but ignore multiple project management under resource constraints. In addition, some current researches are based on single project management, and an iterative algorithm of multi-project scheduling is designed by combining the advantages of a serial schedule generation mechanism and a reverse algorithm; some researches improve the initial solution generation method and genetic operator of the traditional genetic algorithm aiming at the distribution and scheduling of tasks according to intelligent optimization algorithms such as the genetic algorithm and the like. In addition, the trainees have also proposed virtual machine scheduling models with the four goals of minimizing time, minimizing cost, maximizing resource utilization and load.
The task scheduling method has the problem of low scheduling efficiency.
Disclosure of Invention
The embodiment of the disclosure mainly aims to provide a method and a device for dynamically scheduling tasks, an electronic device, and a storage medium, which can improve the efficiency of task scheduling.
In order to achieve the above object, a first aspect of the embodiments of the present disclosure provides a method for dynamically scheduling tasks, including:
acquiring a target constraint condition; the target constraint condition at least comprises a time constraint condition and an inter-task constraint condition;
initializing a network topology structure according to the target constraint condition;
acquiring current task progress data; the current task progress data comprise a planning period, a current time, a project deadline, a task accumulated progress, team allocation details, available team resources, a standby team number and an emergency team increase lead time;
obtaining the delay time of the task according to the current task progress data;
if the delay time meets a preset first condition, rescheduling is carried out according to the current task progress data and the target constraint condition, and a target scheduling result is output; the target scheduling result comprises the team allocation condition, the starting time and the finishing time of the middle task.
In some embodiments, the method further comprises:
and if the delay time meets a preset second condition, calculating to obtain a first critical path, and adding a standby team according to the first critical path.
In some embodiments, the method further comprises:
and if the delay time meets a preset third condition, calculating to obtain a second critical path, and adding an emergency team according to the second critical path.
In some embodiments, said adding a standby team according to said first critical path comprises:
judging a first target task on the first critical path to obtain a first judgment result;
if the first judgment result is that the number of the standby teams is not equal to zero and completion time can be shortened by adding one team, adding one standby team for the same type of tasks under the same subcontractor of the first target task;
the number of spare teams is reduced by one.
In some embodiments, said adding emergency teams according to said second critical path comprises:
judging a second target task on the second critical path to obtain a second judgment result;
and if the second judgment result is that the starting time of the second objective task is after the emergency team arrives and the completion time can be shortened by adding one team, adding one emergency team for the second objective task.
In some embodiments, the calculating a first critical path includes:
acquiring a current network topological structure;
calculating node time data of each node in the current network topological structure according to the time constraint condition and the inter-task constraint condition; the node time data comprises the earliest starting time, the latest starting time, the earliest ending time and the latest ending time of each node;
and searching a key path according to the node time data to obtain the first key path.
In some embodiments, said calculating node time data for each node in said current network topology based on said time constraints and said inter-task constraints comprises:
performing first assignment processing on each node according to the sequence from front to back;
and carrying out second assignment processing on each node according to the sequence from back to front.
To achieve the above object, a second aspect of the present disclosure provides a task dynamic scheduling apparatus, including:
the constraint condition acquisition module is used for acquiring a target constraint condition; the target constraint condition at least comprises a time constraint condition and an inter-task constraint condition;
the network initialization module is used for initializing a network topology structure according to the target constraint condition;
the task progress acquisition module is used for acquiring current task progress data; the current task progress data comprise a planning period, a current time, a project deadline, a task accumulated progress, team allocation details, available team resources, a standby team number and an emergency team increase lead time;
the delay time calculation module is used for obtaining the delay time of the task according to the current task progress data;
the task scheduling module is used for rescheduling according to the current task progress data and the target constraint condition and outputting a target scheduling result if the delay time meets a preset first condition; the target scheduling result comprises the team distribution condition, the starting time and the finishing time of the tasks.
To achieve the above object, a third aspect of the present disclosure provides an electronic device, including:
at least one memory;
at least one processor;
at least one program;
the program is stored in a memory and a processor executes the at least one program to implement the method of the present disclosure as described in the above first aspect.
To achieve the above object, a fourth aspect of the present disclosure proposes a storage medium which is a computer-readable storage medium storing computer-executable instructions for causing a computer to perform:
the method of the first aspect as described above.
According to the task dynamic scheduling method and device, the electronic device and the storage medium, the target constraint condition is obtained first, then the network topology structure is initialized according to the target constraint condition, the current task progress data is obtained, the delay time of the task is obtained according to the current task progress data, re-scheduling is carried out according to the delay time and the current task progress data and the target constraint condition, and the target scheduling result is output.
Drawings
Fig. 1 is a first flowchart of a task dynamic scheduling method provided by an embodiment of the present disclosure.
Fig. 2 is a second flowchart of a task dynamic scheduling method provided by an embodiment of the present disclosure.
Fig. 3 is a first flowchart of step S210 in fig. 2.
Fig. 4 is a flowchart of step S220 in fig. 2.
Fig. 5 is a second flowchart of step S210 in fig. 2.
Fig. 6 is a flowchart of step S520 in fig. 5.
Fig. 7 is a schematic diagram illustrating a principle of a task dynamic scheduling method according to an embodiment of the present disclosure.
Fig. 8 is a block diagram of a dynamic task scheduling device according to an embodiment of the present disclosure.
Fig. 9 is a schematic hardware structure diagram of an electronic device according to an embodiment of the present disclosure.
Reference numerals: constraint condition 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, and bus 905.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It is noted that while functional block divisions are provided in device diagrams and logical sequences are shown in flowcharts, in some cases, steps shown or described may be performed in sequences other than block divisions within devices or flowcharts. The terms first, second and the like in the description and in the claims, and the drawings described above, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Unless defined otherwise, 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 belongs. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to be limiting of the invention.
The implementation process of the project is often limited by resource constraints, different tasks may need the same resources, time constraints, and the like, and the complexity of project planning decisions is increased.
Among the resource scheduling problems, the conventional methods are linear planning, shaping planning, dynamic planning, and the like. Many algorithms for solving scheduling problems have been demonstrated as NP-hard (meaning a problem where all NP problems can be scaled to within polynomial time complexity, NP meaning a non-deterministic polynomial) problem.
Critical path algorithms (CPM) and plan review techniques (PERT) work well for single project management, but ignore multiple project management under resource constraints.
Some current researches are based on single project management, and an iterative algorithm for multi-project scheduling is designed by combining the advantages of a serial schedule generation mechanism and a reverse algorithm; some researches improve the initial solution generation method and genetic operator of the traditional genetic algorithm aiming at the distribution and scheduling of tasks according to intelligent optimization algorithms such as the genetic algorithm and the like. In addition, the scholars propose a virtual machine scheduling model with four goals of minimizing time, minimizing cost, maximizing resource utilization and load.
The task in the current project scheduling can not truly reflect the actual situation, and the problems exist as follows:
(1) Many project scheduling problems do not truly reflect time constraints of tasks, in reality, tasks have various time constraint limits, and time constraint limits exist among tasks, and the current method ignores the limits of constraint relations, so that the efficiency of task scheduling is reduced.
(2) In order to ensure that the task is completed within a specified period, the task progress needs to be reported, a team needs to reasonably arrange planning time and adjust resource allocation in real time, and the current scheduling method has the problems of insufficient resource utilization and low resource utilization rate in the dynamic project implementation process.
(3) Current scheduling methods also ignore the consideration of: in a centralized delivery scenario in which a project can be delivered to a plurality of subcontractors, each work package needs to be delivered to the same subcontractor, different tasks have different time and resource relation limitations, front and back time limitations among the tasks and the like, and the efficiency of task scheduling is reduced.
Based on this, the present disclosure provides a method and an apparatus for dynamically scheduling a task, an electronic device, and a storage medium, where a target constraint condition is obtained first, then a network topology is initialized according to the target constraint condition, current task progress data is obtained, then delay time of the task is obtained according to the current task progress data, and finally rescheduling is performed according to the delay time, the current task progress data and the target constraint condition, and a target scheduling result is output.
The task dynamic scheduling method provided by the embodiment of the disclosure aims to solve the problem that a first-line project manager is complex to schedule under the current condition, improve the scheduling efficiency, assist the project manager to make a more appropriate decision in a shorter time, save the energy of the project manager, fully utilize the characteristics of a subcontractor team and the like, and achieve the goal of quick and efficient response of a decision process. Under the dynamic scene that the subpackage resources are not enough to finish the project before the deadline, the scheduling optimization is realized quickly and efficiently, the cost is reduced, and the efficiency is improved.
The embodiment of the present disclosure provides a method and an apparatus for dynamically scheduling a task, an electronic device, and a storage medium, which are specifically described with reference to the following embodiments, and first, a method for dynamically scheduling a task in the embodiment of the present disclosure is described.
The embodiment of the disclosure provides a task dynamic scheduling method, and relates to the technical field of task scheduling. The task dynamic scheduling method provided by the embodiment of the disclosure can be applied to a terminal, a server, or software running in the terminal or the server. In some embodiments, the terminal may be a smartphone, tablet, laptop, desktop computer, smart watch, or the like; the server can be an independent server, and can also be a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, content Delivery Network (CDN), big data and artificial intelligence platform and the like; the software may be an application or the like implementing a method of dynamically scheduling tasks, but is not limited to the above form.
The application is operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiment of the disclosure provides a method for dynamically scheduling tasks, which includes: acquiring a target constraint condition; the target constraint condition at least comprises a time constraint condition and an inter-task constraint condition; initializing a network topology structure according to a target constraint condition; acquiring current task progress data; the current task progress data comprises a planning period, a current time, a project deadline, a task accumulated progress, team allocation details, available team resources, a standby team number and an emergency team increase lead time; obtaining delay time of the task according to the current task progress data; if the delay time meets a preset first condition, rescheduling is carried out according to the current task progress data and the target constraint condition, and a target scheduling result is output; the target scheduling result comprises the allocation condition, the starting time and the finishing time of the team of the middle task.
Fig. 1 is an optional flowchart of a method for dynamically scheduling tasks according to an embodiment of the present disclosure, where the method in fig. 1 may include, but is not limited to, step S110 to step S150, and specifically includes:
s110, acquiring a target constraint condition;
s120, initializing a network topology structure according to the target constraint condition;
s130, acquiring current task progress data;
s140, obtaining delay time of the task according to the current task progress data;
and S150, if the delay time meets a preset first condition, rescheduling according to the current task progress data and the target constraint condition, and outputting a target scheduling result.
In step S110, when allocating different subcontractor teams for the project, the target constraints include, but are not limited to:
(1) One team can only carry out one task in the same time period;
(2) The tasks of the same work package are completed by the same subcontractor;
(3) A time constraint;
(4) An inter-task constraint condition;
(5) The maximum number of teams that a task can accommodate is limited;
(6) The base line team and the standby team of one subcontractor have a certain number;
(7) If the project time limit is not satisfied after all the base line team and the standby team are put into operation, the emergency team is considered, and the emergency team can arrive after a certain time and can be used only by tasks that are not started.
The time constraint condition is a time limit of the task, and specifically includes:
1) The task start time is not earlier than a certain time (marked as NES);
2) The task start time is not later than a certain time (marked as NLS);
3) The task ending time must not be earlier than a certain time (denoted as NEF);
4) The task end time must not be later than a certain time (noted as NLF).
The inter-task constraint condition is a time constraint limit between tasks, and specifically includes:
1) Tasks must start after start (denoted S-S);
2) Tasks must end after starting (denoted S-F);
3) Tasks must begin after completion (denoted as F-S);
4) The task must end after finishing (denoted as F-F).
In step S120, the network topology is initialized according to the context of the task start.
In step S130, the current task progress data includes, but is not limited to, a planning period (denoted as duration), a current time (denoted as now _ time), a project deadline (denoted as deadline), a task accumulation progress (denoted as α), a team allocation detail, available team resources, a spare team number, and an emergency team increment lead.
After the current task progress data and the target constraint condition of the current task are known, and under the condition that the target constraint condition is met, the current project planning arrangement is obtained.
In step S140, obtaining the delay time of the task according to the current task progress, which specifically includes: if play _ time origin If + delay _ time is less than deadline, then the plan is refreshed, and the specific process of planning refresh includes: the start/finish time of the un-started task plan = the original plan start/finish time + the delay time; if play _ time origin If + delay _ time is greater than or equal to deadline, step S150 is performed.
In step S150, the target scheduling result includes the allocation status, start time, and completion time of the team of the task.
Step S150 includes rescheduling according to the task progress at the current time, which specifically includes:
(1) Refreshing the original scheduling plan according to the shortest time scheduling algorithm:
for each task i, if the task is ongoing and not yet completed, 0<α<1, updating the standard construction period and calling a shortest time scheduling algorithm to rearrange the plan, wherein the updating method of the standard construction period is P [ i ]]=(1-α)×duration i And calling a shortest time scheduling algorithm to rearrange the plan.
And if the task is not started, calling a shortest time scheduling algorithm for the task which is not started to rearrange the plan.
(2) Judging the time requirement:
if the demand is not met after rescheduling, the project plan time satisfies the play _ time origin If + delay _ time is greater than or equal to deadline, the standby team is increased.
And if the requirements are met after rescheduling, outputting the team allocation condition of the tasks in the dynamic scene, and corresponding start time and finish time.
Wherein, the first condition is that the requirement is not reached after the rescheduling.
According to the task dynamic scheduling method provided by the embodiment of the disclosure, the target constraint condition is obtained first, then the network topology is initialized according to the target constraint condition, the current task progress data is obtained, the delay time of the task is obtained according to the current task progress data, and finally the target scheduling result is output according to the delay time, the current task progress data and the target constraint condition.
In some embodiments, the method further comprises: if the delay time meets a preset second condition, calculating to obtain a first critical path, and adding a standby team according to the first critical path; and if the delay time meets a preset third condition, calculating to obtain a second critical path, and adding an emergency team according to the second critical path.
As shown in fig. 2, fig. 2 is a flowchart of a method for dynamically scheduling tasks according to other embodiments, where the method for dynamically scheduling tasks further includes:
and S210, if the delay time meets a preset second condition, calculating to obtain a first critical path, and adding a standby team according to the first critical path.
And S220, if the delay time meets a preset third condition, calculating to obtain a second critical path, and adding emergency teams according to the second critical path.
In step S210, the second condition is "there is a standby team corresponding to the corresponding resource type, and adding a critical task that can shorten the completion time most by one team".
In step S220, the third condition is that "the start time is after the arrival of the emergency team and the addition of a critical task that can shorten the completion time by one team is the most".
In some embodiments, adding a standby team according to the first critical path comprises: judging a first target task on a first critical path to obtain a first judgment result; if the first judgment result is that the number of the standby teams is not equal to zero and completion time can be shortened by adding one team, adding one standby team for the same type of tasks under the same subcontractor of the first target task; the number of standby teams is reduced by one.
Fig. 3 is a flow chart of step S210 in some embodiments, and step S210 illustrated in fig. 3 includes, but is not limited to, step S310 to step S330:
s310, judging a first target task on the first critical path to obtain a first judgment result;
s330, if the first judgment result shows that the number of the standby teams is not equal to zero and the completion time can be shortened by adding one team, adding one standby team to the same type of tasks under the same subcontractor of the first target task;
s330, the number of standby teams is reduced by one.
In steps S310 to S330, the process of adding the standby team specifically includes:
(1) Calling the improved critical path algorithm to calculate a first critical path;
(2) And judging the tasks on the first critical path:
if the standby teams corresponding to the corresponding types of the corresponding resources still exist, and the key task which can shorten the completion time most by adding one team is added, one team is added for the task and the tasks of the same type under the same subcontractor, and the number of the standby teams of the corresponding resources is reduced by one.
(3) (1) and (2) in the step S210 are continued until there is no team, if the plan _ time origin If the + delay _ time is greater than or equal to the deadline, step S220 is executed to increase the emergency team; step S150 is executed to output the team allocation status of the tasks in the dynamic scenario, and the corresponding start time and completion time.
In some embodiments, adding an emergency team according to the second critical path comprises: judging a second target task on a second critical path to obtain a second judgment result; and if the second judgment result is that the starting time of the second target task is after the arrival of the emergency team and the completion time can be shortened by adding one team, adding one emergency team for the second target task.
Fig. 4 is a flow chart of step S220 in some embodiments, and step S220 illustrated in fig. 4 includes, but is not limited to, step S210 to step S230:
s410, judging a second target task on a second critical path to obtain a second judgment result;
and S420, if the second judgment result shows that the starting time of the second target task is after the arrival of the emergency team and the completion time can be shortened by adding one team, adding one emergency team for the second target task.
In steps S410 to S420, the process of adding the emergency team specifically includes:
(1) Calling the improved key path algorithm to calculate a second key path;
(2) And judging the task on the second critical path:
if the start time is after the arrival of the emergency team and adding a team most shortens the completion time of the critical task, adding a team to the task.
(3) Steps S220 (1) and (2) are continued until there is no suitable task or the completion time is no longer shortened.
In some embodiments, the calculating a first critical path includes: acquiring a current network topological structure; calculating node time data of each node in the current network topology structure according to the time constraint condition and the task constraint condition; the node time data comprises the earliest starting time, the latest starting time, the earliest ending time and the latest ending time of each node; and searching the key path according to the node time data to obtain a first key path.
In the existing scheduling method, a shortest time scheduling algorithm is to prioritize a preposition relation over a start time and a construction period and prioritize over a logic of a completion time to sequence all tasks according to a certain strategy under the condition of considering a target constraint condition, and schedule a base line queue of a subcontractor so that a project has the shortest completion time.
In the existing critical path algorithm, generally only the task completion-start (F-S) context and the task duration (duration) are considered, but in an actual project, because other time constraint relationships exist between tasks, when the existing critical path algorithm is applied to a scheduling algorithm, the scheduling efficiency is low. The task dynamic scheduling provided by the application is matched with the actual scheduling process of the application to improve the existing critical path algorithm, so that the improved critical path algorithm is obtained. The improved critical path algorithm is shown in fig. 5.
Fig. 5 is a flowchart of step S210 in other embodiments, and step S210 illustrated in fig. 5 includes, but is not limited to, step S510 to step S530:
s510, acquiring a current network topology structure;
s520, calculating node time data of each node in the current network topology structure according to the time constraint condition and the task constraint condition;
s530, searching the key path according to the node time data to obtain a first key path.
It should be noted that, the input data of the improved critical path algorithm of the present application is: network topology (including constraint relation among tasks), construction period and time constraint relation; the output data of the improved critical path algorithm is as follows: critical path, node time data.
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) of each node.
In steps S510 to S530, the improved critical path algorithm specifically includes:
(1) Calculating ES, EF, LF and LS of each node specifically comprises the following steps:
start [ ES ], start [ ES ] =0 is initialized.
1) From front to back, the following processing is carried out on all front nodes of F-S and S-S of each Node: node [ ES ]]=max{Node pre_F-S [EF],Node pre_S-S [ES]NES }; and for eachAll S-F and F-F front nodes of the Node perform the following processing:
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]。
2) From back to front, all F-S and F-F post nodes of each Node are processed as follows: node [ LF ]]=min{Node succ_S-F [LS],Node succ_F-F [ES]NLF }; and all the S-S and S-F post nodes of each Node are processed as follows:
Node[LF]=max{Nodesucc_S-F[LS],Nodesucc_S-F[LF],Node[LF]+D}。
(2) Searching a critical path from back to front specifically comprises:
initializing a critical path: CP = [ End ], and searches for a critical path from the End Node from back to front according to the latest End time, and then assigns the value of End to the current Node.
The following processing is performed on four front nodes corresponding to all the inter-task constraint conditions in the Node:
N=argMax{Node pre [LF]}; if N = none, then N = argMin { Node pre [LF]-Node pre [FS]};
CP.append(N);
Node = N, return execution N = argMax { Node pre [LF]Until Node = Start Node.
(3) The critical path CP is returned, as well as ES, LS, EF, LF for each node.
In some embodiments, calculating node time data for each node in the current network topology based on the time constraints and the inter-task constraints comprises: performing first assignment processing on each node according to the sequence from front to back; and carrying out second assignment processing on each node according to the sequence from back to front.
Fig. 6 is a flowchart of step S520 in some embodiments, and step S520 illustrated in fig. 6 includes, but is not limited to, step S610 to step S620:
s610, performing first assignment processing on each node according to the sequence from front to back;
and S620, performing second assignment processing on each node according to the sequence from back to front.
Step S610 specifically includes:
from front to back, the following processing is performed on all the front nodes of the F-S and S-S of each Node: node [ ES ]]=max{Node pre_F-S [EF],Node pre_S-S [ES]NES }; and all the S-F and F-F front nodes of each Node are processed as follows:
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]。
Step S620 specifically includes:
from back to front, all F-S and F-F post nodes of each Node are processed as follows: node [ LF ]]=min{Node succ_S-F [LS],Node succ_F-F [ES]NLF }; and all the S-S and S-F post nodes of each Node are processed as follows:
Node[LF]=max{Node succ_S-F [LS],Node succ_S-F [LF],Node[LF]+D}。
fig. 7 is a schematic diagram of a task dynamic scheduling method in some embodiments, and the task dynamic scheduling method is described in detail in a specific embodiment with reference to fig. 7. It is to be understood that the following description is illustrative only and is not intended to be in any way limiting.
Considering a project with 4 tasks, the project deadline is deadline =16, and currently the now-th _ time =7 days. The topology of the network is shown in fig. 7, only the task has the earliest start time (NES) is considered, and the other three types of time constraints are not considered; only the finish-start (F-S) one context is considered.
Table 1 shows the progress of the task and the subcontractor team allocated to the task, and when the now _ time =7, the subcontractors and the progress corresponding to the task are as shown in table 1:
Figure BDA0003919971720000091
TABLE 1
And (3) considering calling a standby team and an emergency team if the dynamic scheduling algorithm refreshes the project plan according to the shortest time scheduling algorithm and the project plan completion time Wt > deadline still exists. Subcontractors 2 and 3 each have 1 standby team, subcontractor 1 does not have a standby team, and the emergency team arrives 2 days later.
Step0: task D1 also has a workload P [ D1] =20 × (1-0.2) =16 at this time; d2 also has a workload P [ D2] =7 × (1-0) =7; d3 also has a workload P [ D3] =8 × (1-0.2) =8; d4 also has a workload P [ D4] =8 × (1-0.05) =13.3.
Step1: the current critical path is: d1 to D2, project plan completion time Wt =19.33 >/deadlines =16, considering adding standby queues for tasks on the critical path. Only the subcontractor 3 corresponding to the task D2 has a standby team, so that the D2 is added with one standby team.
Step2: the current critical path is: d4 to D3, project plan completion time Wt =17.65> -deadline =16. The SCE 2 corresponding to D4 has 1 spare team, so that D4 is added by one team.
Step3: the standby team has been scheduled in its entirety, but the project plan completion time is still greater than the project deadline, and therefore, the emergency team is invoked. The current critical path is: d1 to D3, project plan completion time Wt =16.33>, deadline =16.
The standby team arrives 2 days later. If D1 is added with an emergency team, the shortened time is 16/3-16/4=1.33, and if D3 is added with an emergency team, the shortened time is 8/2-8/3=1.33, the shortened time of the two tasks is the same, but only the starting time of the task D3 is after the emergency team arrives, namely ES =5.33+7 ++ 2 7, and therefore an emergency team is added for D3.
Step4: the current critical path is: d1 to D2, project plan completion time Wt =15.83 and skirt =16, and the project deadline is satisfied, and the process ends.
According to the task dynamic scheduling method, on the basis of a traditional key path algorithm and a traditional scheduling method, a network topological structure of a project is fully utilized, resources of an existing subcontractor are integrated, and the problem that a front-line project manager is complex to schedule under the current situation is solved under the condition that different tasks are limited by different time and resource relations, time limits before and after the tasks are limited and the like. Under the dynamic scene that the sub-package resources are not enough to finish the project before the deadline, the scheduling optimization is realized quickly and efficiently, the cost is reduced, and the efficiency is improved.
The embodiment of the present disclosure provides a dynamic task scheduling device, including: the constraint condition acquisition module is used for acquiring a target constraint condition; the target constraint condition at least comprises a time constraint condition and an inter-task constraint condition; the network initialization module is used for initializing a network topology structure according to the target constraint condition; the task progress acquiring module is used for acquiring current task progress data; the current task progress data comprises a planning period, a current time, a project deadline, a task accumulation progress, team allocation details, available team resources, a standby team number and an emergency team increase lead period; the delay time calculation module is used for obtaining the delay time of the task according to the current task progress data; the task scheduling module is used for rescheduling according to the current task progress data and the target constraint condition and outputting a target scheduling result if the delay time meets a preset first condition; the target scheduling result comprises the team distribution condition, the starting time and the finishing time of the middle task.
Referring to fig. 8, fig. 8 illustrates a dynamic task scheduler according to an embodiment, where the dynamic task scheduler includes: the system comprises 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, wherein the constraint condition acquisition module 810 is connected with the network initialization module 820, the network initialization module 820 is connected with the task progress acquisition module 830, the task progress acquisition module 830 is connected with the delay time calculation module 840, and the delay time calculation module 840 is connected with the task scheduling module 850.
The specific implementation of the task dynamic scheduling apparatus of this embodiment is basically the same as the specific implementation of the task dynamic scheduling method, and belongs to the same inventive concept, and is not described herein again.
An embodiment of the present disclosure further provides an electronic device, including:
at least one memory;
at least one processor;
at least one program;
the program is stored in the memory, and the processor executes the at least one program to implement the present disclosure to implement the task dynamic scheduling method described above. The electronic device can be any intelligent terminal including a mobile phone, a tablet computer, a Personal Digital Assistant (PDA for short), a vehicle-mounted computer and the like.
Referring to fig. 9, fig. 9 illustrates a hardware structure of an electronic device according to another embodiment, where the electronic device includes:
the processor 901 may be implemented by a general-purpose CPU (central processing unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits, and is configured to execute a relevant program to implement the technical solution provided by the embodiment of the present disclosure;
the memory 902 may be implemented in a ROM (read only memory), a static memory device, a dynamic memory device, or a RAM (random access memory). The memory 902 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present disclosure is implemented by software or firmware, the relevant program codes are stored in the memory 902 and called by the processor 901 to execute the task dynamic scheduling method of the embodiments of the present disclosure;
an input/output interface 903 for inputting and outputting information;
a communication interface 904, configured to implement communication interaction between the device and another device, where communication may be implemented in a wired manner (e.g., USB, network cable, etc.), and communication may also be implemented in a wireless manner (e.g., mobile network, WIFI, bluetooth, etc.); and
a bus 905 that transfers information between various components of the device (e.g., the processor 901, the memory 902, the input/output interface 903, and the communication interface 904);
wherein the processor 901, the memory 902, the input/output interface 903 and the communication interface 904 are communicatively connected to each other within the device via a bus 905.
The embodiment of the present disclosure also provides a storage medium, which is a computer-readable storage medium, where the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the above task dynamic scheduling method.
According to the task dynamic scheduling method and device, the electronic device and the storage medium, the target constraint condition is obtained first, then the network topology structure is initialized according to the target constraint condition, the current task progress data is obtained, the delay time of the task is obtained according to the current task progress data, re-scheduling is carried out according to the delay time and the current task progress data and the target constraint condition, and the target scheduling result is output.
The memory, as a non-transitory computer-readable storage medium, may be used to store non-transitory software programs as well as non-transitory computer-executable programs. Further, the 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, the memory optionally includes memory located remotely from the processor, and these remote memories may be connected to the processor through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The embodiments described in the embodiments of the present disclosure are for more clearly illustrating the technical solutions of the embodiments of the present disclosure, and do not constitute a limitation on the technical solutions provided in the embodiments of the present disclosure, and it is obvious to a person skilled in the art that, with the evolution of the technology and the appearance of new application scenarios, the technical solutions provided in the embodiments of the present disclosure are also applicable to similar technical problems.
It will be appreciated by those skilled in the art that the solutions shown in fig. 1-6 are not limiting of the embodiments of the present disclosure, and may include more or fewer steps than those shown, or some of the steps may be combined, or different steps.
The above-described embodiments of the apparatus are merely illustrative, wherein the units illustrated as separate components may or may not be physically separate, i.e. may be located in one place, or may also be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
One of ordinary skill in the art will appreciate that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof.
The terms "first," "second," "third," "fourth," and the like (if any) in the description of the present application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be implemented in sequences other than those illustrated or described herein. Moreover, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that, in this application, "at least one" means one or more, "a plurality" means two or more. "and/or" for describing an association relationship of associated objects, indicating that there may be three relationships, e.g., "a and/or B" may indicate: only A, only B and both A and B are present, wherein A and B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of single item(s) or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, in essence or part of the technical solutions contributing to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product, which is stored in a storage medium and includes multiple instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing programs, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The preferred embodiments of the disclosed embodiments have been described above with reference to the accompanying drawings, which are not intended to limit the scope of the embodiments of the disclosure. Any modifications, equivalents, and improvements within the scope and spirit of the embodiments of the present disclosure that may occur to persons skilled in the art are to be within the scope of the embodiments of the present disclosure.

Claims (10)

1. A method for dynamically scheduling tasks, comprising:
acquiring a target constraint condition; the target constraint condition at least comprises a time constraint condition and an inter-task constraint condition;
initializing a network topology structure according to the target constraint condition;
acquiring current task progress data; the current task progress data comprise a planning period, a current time, a project deadline, a task accumulated progress, team allocation details, available team resources, a standby team number and an emergency team increase lead time;
obtaining delay time of the task according to the current task progress data;
if the delay time meets a preset first condition, rescheduling is carried out according to the current task progress data and the target constraint condition, and a target scheduling result is output; the target scheduling result comprises the team distribution condition, the starting time and the finishing time of the tasks.
2. The method of claim 1, further comprising:
and if the delay time meets a preset second condition, calculating to obtain a first critical path, and adding a standby team according to the first critical path.
3. The method of claim 2, wherein said adding standby teams according to the first critical path comprises:
judging a first target task on the first critical path to obtain a first judgment result;
if the first judgment result is that the number of the standby teams is not equal to zero and completion time can be shortened by adding one team, adding one standby team for the same type of tasks under the same subcontractor of the first target task;
the number of spare teams is reduced by one.
4. The method of claim 1, further comprising:
and if the delay time meets a preset third condition, calculating to obtain a second critical path, and adding an emergency team according to the second critical path.
5. The method of claim 4, wherein said adding emergency teams according to the second critical path comprises:
judging a second target task on the second critical path to obtain a second judgment result;
and if the second judgment result is that the starting time of the second target task is after the emergency team arrives and the completion time can be shortened by adding one team, adding one emergency team for the second target task.
6. The method of claim 2, wherein the computing a first critical path comprises:
acquiring a current network topology structure;
calculating node time data of each node in the current network topological structure according to the time constraint condition and the inter-task constraint condition; the node time data comprises the earliest starting time, the latest starting time, the earliest ending time and the latest ending time of each node;
and searching a key path according to the node time data to obtain the first key path.
7. The method of claim 6, wherein the calculating node time data for each node in the current network topology according to the time constraint and the inter-task constraint comprises:
performing first assignment processing on each node according to the sequence from front to back;
and carrying out second assignment processing on each node according to the sequence from back to front.
8. A dynamic task scheduler, comprising:
the constraint condition acquisition module is used for acquiring a target constraint condition; the target constraint condition at least comprises a time constraint condition and an inter-task constraint condition;
the network initialization module is used for initializing a network topology structure according to the target constraint condition;
the task progress acquisition module is used for acquiring current task progress data; the current task progress data comprises a planning period, a current time, a project deadline, a task accumulation progress, team allocation details, available team resources, a standby team number and an emergency team increase lead period;
the delay time calculation module is used for obtaining the delay time of the task according to the current task progress data;
the task scheduling module is used for rescheduling according to the current task progress data and the target constraint condition and outputting a target scheduling result if the delay time meets a preset first condition; the target scheduling result comprises the team allocation condition, the starting time and the finishing time of the middle task.
9. An electronic device, comprising:
at least one memory;
at least one processor;
at least one program;
the program is stored in the memory, and the processor executes the at least one program to:
the method of any one of claims 1 to 7.
10. A storage medium that is a computer-readable storage medium having stored thereon computer-executable instructions for causing a computer to perform:
the method of any one of claims 1 to 7.
CN202211353524.XA 2022-11-01 2022-11-01 Dynamic task scheduling method and device, electronic equipment and storage medium Pending CN115759577A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211353524.XA CN115759577A (en) 2022-11-01 2022-11-01 Dynamic task scheduling method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211353524.XA CN115759577A (en) 2022-11-01 2022-11-01 Dynamic task scheduling method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115759577A true CN115759577A (en) 2023-03-07

Family

ID=85354862

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211353524.XA Pending CN115759577A (en) 2022-11-01 2022-11-01 Dynamic task scheduling method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115759577A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116611519A (en) * 2023-07-19 2023-08-18 中国电子科技集团公司第十研究所 Time planning method and system based on production chain full-period rational atlas

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116611519A (en) * 2023-07-19 2023-08-18 中国电子科技集团公司第十研究所 Time planning method and system based on production chain full-period rational atlas
CN116611519B (en) * 2023-07-19 2023-10-13 中国电子科技集团公司第十研究所 Time planning method and system based on production chain full-period rational atlas

Similar Documents

Publication Publication Date Title
Huang et al. An optimistic job scheduling strategy based on QoS for cloud computing
CN111338791A (en) Method, device and equipment for scheduling cluster queue resources and storage medium
CN104092767A (en) Posting/subscribing system for adding message queue models and working method thereof
CN103927225A (en) Multi-core framework Internet information processing and optimizing method
CN105187327A (en) Distributed message queue middleware
CN113138860B (en) Message queue management method and device
CN113172625A (en) Robot scheduling method, device, equipment and storage medium
CN103365711A (en) Task scheduling mechanism and method applied to business platform of internet of Things
CN110795238A (en) Load calculation method and device, storage medium and electronic equipment
CN115759577A (en) Dynamic task scheduling method and device, electronic equipment and storage medium
CN104102533A (en) Bandwidth aware based Hadoop scheduling method and system
CN106845746A (en) A kind of cloud Workflow Management System for supporting extensive example intensive applications
CN105302650A (en) Dynamic multi-resource equitable distribution method oriented to cloud computing environment
CN103685492B (en) Dispatching method, dispatching device and application of Hadoop trunking system
Ye et al. SHWS: Stochastic hybrid workflows dynamic scheduling in cloud container services
CN115202847A (en) Task scheduling method and device
CN112884367B (en) Multi-project collaborative scheduling method and system for equipment research and development with multi-skill employee constraint
CN114444715A (en) Graph data processing method, device and system, electronic equipment and readable storage medium
Hung et al. Task scheduling for optimizing recovery time in cloud computing
CN109783236A (en) Method and apparatus for output information
CN116302453B (en) Task scheduling method and device for quantum electronic hybrid platform
CN112099932A (en) Optimal pricing method and system for soft-hard deadline task offloading in edge computing
CN112948088A (en) Cloud workflow intelligent management and scheduling system in cloud computing platform
CN115373860B (en) Scheduling method, device and equipment of GPU (graphics processing Unit) tasks and storage medium
Benali et al. A pareto-based Artificial Bee Colony and product line for optimizing scheduling of VM on cloud computing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination