Intelligent task scheduling method and device based on plan, equipment, medium and program product
Patent Information
- Application Number
- CN202511944279.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-22
- Publication Date
- 2026-02-17
AI Technical Summary
[0003]首先,在处理任务之间关联关系时,传统的排程方法仅能处理简单的前后置关系(如 FS 关系),导致排程结果无法满足实际业务场景中多样化的任务约束需求
[0045]本发明的一种基于计划的智能任务排程方法,支持 FS、SS、SF、FF 四种关联关系及延迟时间,通过 dependencyDate 精准计算任务依赖时间,排程结果更符合实际业务约束,适用场景更广,相对现有技术提升了关联关系处理能力。通过“先约束子任务时间,后归集上级任务时间”的逻辑,结合任务排序机制,确保上级任务工期由子任务实际时间准确归集而来,提升了上下级任务排程精度。通过提供多类型日历实现,支持自定义工作时间和自动跳过节假日,排程结果与实际工作时间高度匹配,无需人工调整,减少人力成本,提升排程效率,增强了工作日历适配性。通过任务排序 + 遍历计算的流程,将时间复杂度优化为O (n),可快速完成排程,提升项目管理效率,减少硬件资源消耗,显著优化了算法效率。通过同步计算任务 ES、EF、LS、LF,准确识别关键任务和关键路径,完善了关键路径识别功能,项目管理人员可针对关键任务优先配置资源、加强监控,降低项目延期风险,提升项目成功率。
Smart Images

Figure CN121543983A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of project management, production scheduling and task planning technology, and in particular to a plan-based intelligent task scheduling method, apparatus, equipment, medium and program product. Background Technology
[0002] In fields such as project management, production scheduling, and task planning, where task scheduling is crucial for ensuring smooth project progress and efficient resource utilization, task scheduling is a key element. However, existing traditional scheduling methods often have numerous shortcomings and deficiencies.
[0003] First, when dealing with the relationships between tasks, traditional scheduling methods can only handle simple pre- and post-relationships (such as FS relationships), resulting in scheduling results that cannot meet the diverse task constraints required in actual business scenarios.
[0004] Secondly, when dealing with hierarchical relationships between tasks, traditional scheduling methods often result in inaccurate calculations of the duration of parent tasks. Since only child tasks typically have clearly defined durations set in advance, directly calculating the duration of parent tasks can easily lead to discrepancies with the actual durations of the child tasks, thus affecting the overall accuracy of the scheduling.
[0005] Furthermore, traditional scheduling methods have low integration with the work calendar, resulting in a mismatch between the scheduling results and the actual working time, which increases the workload of manual adjustments.
[0006] In addition, traditional scheduling methods have shortcomings in computational efficiency and high time complexity. When faced with a large number of task scheduling requirements, they are difficult to respond quickly, which affects the efficiency of project management.
[0007] Finally, traditional scheduling methods fail to accurately identify critical tasks in a project, hindering project managers from monitoring key tasks and allocating resources accordingly, potentially increasing the risk of project delays. This invention aims to address these shortcomings of existing technologies by providing a plan-based intelligent scheduling algorithm to improve scheduling accuracy, flexibility, efficiency, and support for critical paths.
[0008] Therefore, there is an urgent need for a plan-based intelligent task scheduling method that can meet the needs of complex scenarios, improve the accuracy, flexibility, efficiency and support for critical paths in scheduling, and solve the shortcomings of the existing technologies. Summary of the Invention
[0009] In view of this, the present invention provides a plan-based intelligent task scheduling method, apparatus, device, medium and program product, which at least partially solves the problems existing in the prior art.
[0010] To achieve the above objectives, the present invention adopts the following technical solution:
[0011] In a first aspect, the present invention provides a plan-based intelligent task scheduling method, comprising the following steps:
[0012] Sort the tasks and obtain the task sorting queue;
[0013] Obtain task scheduling direction;
[0014] Traverse the task sorting queue according to the task scheduling direction and call the optional work calendar to calculate the scheduling time for the task nodes;
[0015] When calculating the scheduling time for task nodes, the calculation is performed according to the hierarchical relationship and the association relationship between tasks, and finally the start time, end time and period of each task node are calculated.
[0016] When calculating based on the hierarchical relationship of tasks, the time of subtasks is calculated first, and then the time of the superior tasks is aggregated; when calculating based on the task association relationship, the scheduling time is calculated based on the task dependency relationship type FS, SS, SF, FF and taking into account the delay time.
[0017] Perform a reverse traversal in the reverse task scheduling direction, synchronously calculate the earliest start time (ES), earliest end time (EF), latest start time (LS), and latest end time (LF) of each task node, and identify critical tasks and critical paths.
[0018] As a further improvement to the present invention, the sorting of tasks includes: starting from a task node with no preceding or succeeding tasks, inserting virtual start and end nodes, setting recursion checks, and determining the calculation order.
[0019] Furthermore, the scheduling time calculation based on task dependency types FS, SS, SF, and FF, and taking into account latency, includes:
[0020] For FS relationships, when scheduling forward, the task dependency time dependencyDate = the completion time of the predecessor task + the delay time leg; when scheduling backward, the task dependency time dependencyDate = the start time of the successor task - the delay time leg.
[0021] For SS relationships, when scheduling forward, the task dependency time dependencyDate = predecessor task start time + delay time leg; when scheduling backward, the task dependency time dependencyDate = successor task start time - delay time leg + predecessor task duration.
[0022] For SF relationships, when scheduling forward, the task dependency time dependencyDate = predecessor task start time + delay time leg - successor task duration; when scheduling backward, the task dependency time dependencyDate = successor task completion time - delay time leg + successor task duration.
[0023] For FF relationships, when scheduling forward, the task dependency time dependencyDate = completion time of the predecessor task + delay time leg - duration of the successor task; when scheduling backward, the task dependency time dependencyDate = completion time of the successor task - delay time leg.
[0024] Furthermore, when calculating according to the hierarchical relationship of tasks, the process of first calculating the time of sub-tasks and then aggregating the time of superior tasks includes: after calculating the start and end times of each sub-task, the start time of the superior task is taken as the earliest start time of the sub-task, and the end time is taken as the latest end time of the sub-task, with the period being the difference between the two.
[0025] Furthermore, the synchronous calculation of the earliest start time ES, earliest end time EF, latest start time LS, and latest end time LF for each task node, and the identification of critical tasks and critical paths, include:
[0026] The task node's ES = max(previous task EF, parent task ES);
[0027] The EF of a task node = the ES of the task node + the task period, where the task period is the effective period of the work calendar calculation.
[0028] The LF of a task node is min(the LS of the successor task and the LF of the parent task).
[0029] The task node's LS = the task node's LF - the task cycle;
[0030] The criteria for determining critical tasks are: ES = LS and EF = LF, and all critical tasks constitute the critical path.
[0031] Furthermore, the optional work calendar includes no-day work, two-day work week, and configurable calendar;
[0032] The configurable calendar allows users to define a 7-day work week and define special days for custom work hours; these special days include public holidays.
[0033] Secondly, the present invention also provides a plan-based intelligent task scheduling device, comprising:
[0034] The sorting module is configured to sort tasks and obtain a task sorting queue;
[0035] The scheduling direction acquisition module is configured to acquire the task scheduling direction;
[0036] The scheduling time calculation module is configured to traverse the task sorting queue according to the task scheduling direction and call the optional work calendar to calculate the scheduling time for the task nodes.
[0037] When calculating the scheduling time for task nodes, the calculation is performed according to the hierarchical relationship and the association relationship between tasks, and finally the start time, end time and period of each task node are calculated.
[0038] When calculating based on the hierarchical relationship of tasks, the time of subtasks is calculated first, and then the time of the superior tasks is aggregated; when calculating based on the task association relationship, the scheduling time is calculated based on the task dependency relationship type FS, SS, SF, FF and taking into account the delay time.
[0039] The critical task identification module is configured to perform reverse traversal in the reverse task scheduling direction, synchronously calculate the earliest start time ES, earliest end time EF, latest start time LS, and latest end time LF of each task node, and identify critical tasks and critical paths.
[0040] Thirdly, the present invention also provides a computer device, the device comprising: a processor and a memory;
[0041] The memory is used to store one or more program instructions;
[0042] The processor is configured to run one or more program instructions to perform the steps of a plan-based intelligent task scheduling method as described above.
[0043] Fourthly, the present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described intelligent task scheduling method based on a plan.
[0044] Fifthly, the present invention also provides a computer program product comprising computer program instructions that, when executed by a processor, implement the steps of the above-described plan-based intelligent task scheduling method.
[0045] This invention presents a plan-based intelligent task scheduling method that supports four types of relationships (FS, SS, SF, and FF) and delay times. It accurately calculates task dependency times using `dependencyDate`, resulting in scheduling results that better align with actual business constraints and have wider applicability. Compared to existing technologies, it significantly improves the ability to handle relationships. By first constraining sub-task times and then aggregating the times of parent tasks, combined with a task sorting mechanism, it ensures that the duration of parent tasks is accurately derived from the actual times of sub-tasks, thus improving the scheduling accuracy of both parent and child tasks. By providing multiple calendar types, it supports custom working times and automatic skipping of holidays, ensuring a high degree of match between scheduling results and actual working times. This eliminates the need for manual adjustments, reducing labor costs, improving scheduling efficiency, and enhancing the adaptability of work calendars. Through a task sorting + traversal calculation process, the time complexity is optimized to O(n), enabling rapid scheduling, improving project management efficiency, reducing hardware resource consumption, and significantly optimizing algorithm efficiency. By synchronously calculating tasks ES, EF, LS, and LF, critical tasks and critical paths are accurately identified, improving the critical path identification function. Project managers can prioritize resource allocation for critical tasks, strengthen monitoring, reduce the risk of project delays, and improve the project success rate. Attached Figure Description
[0046] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are merely exemplary, and those skilled in the art can derive other embodiments based on the provided drawings without creative effort.
[0047] Figure 1 This is a flowchart of a plan-based intelligent task scheduling method according to an embodiment of the present invention;
[0048] Figure 2 This is a logic diagram (including sorting tasks) of a plan-based intelligent task scheduling method according to an embodiment of the present invention.
[0049] Figure 3 This is a logic diagram (including scheduling time) of a plan-based intelligent task scheduling method according to an embodiment of the present invention.
[0050] Figure 4 This is an example diagram of forward scheduling time calculation;
[0051] Figure 5 This is an example diagram for critical path identification. Detailed Implementation
[0052] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0053] This invention, through extensive research, reveals that existing scheduling algorithms lack sufficient support for task relationships. They can only handle simple FS relationships and cannot meet the scheduling requirements of complex relationships such as SS, SF, and FF, as well as delay times, resulting in scheduling results that do not conform to actual business constraints. When handling hierarchical relationships between tasks, inaccurate calculations of parent task durations are common, and the time constraints and aggregation logic between parent and child tasks are unreasonable, affecting overall scheduling accuracy. The low integration of work calendars means that automatic skipping of holidays and multiple work modes is not supported, leading to significant deviations between scheduling results and actual working times, requiring substantial manual adjustments. The high time complexity of the algorithms results in slow response times when handling large numbers of tasks, leading to low scheduling efficiency and failing to meet the needs of efficient project management. The lack of critical path identification functionality makes it impossible to accurately determine critical tasks in a project, hindering project risk management and resource optimization.
[0054] Based on the above findings, this invention provides a plan-based intelligent task scheduling method. This method explicitly supports four types of association relationships (FS, SS, SF, and FF) and delay times, optimizes the task hierarchy time aggregation logic, provides multiple types of configurable calendars, adopts an algorithm with O(n) time complexity, and can identify critical paths.
[0055] Figure 1 This is a flowchart of a plan-based intelligent task scheduling method according to an embodiment of the present invention. Combined with... Figure 1 As shown in the figure, a plan-based intelligent task scheduling method in this embodiment includes the following steps:
[0056] Step S100: Sort the tasks and obtain the task sorting queue.
[0057] For example, when dealing with hierarchical tasks, starting from a node without any preceding or succeeding tasks, insert virtual start and end nodes, set recursive checks, determine a reasonable calculation order, and avoid deviations caused by the parent task being calculated before the child task.
[0058] Step S200: Obtain the task scheduling direction.
[0059] Task scheduling can be categorized into forward scheduling (forward planning) and backward scheduling (reverse planning). Forward scheduling involves scheduling tasks backward from a given start date to obtain the earliest start and end times for each task. Backward scheduling involves scheduling tasks backward from the deadline to obtain the latest start and end times for each task.
[0060] The following explanation uses forward scheduling as an example, obtained through this step.
[0061] Step S300: Traverse the task sorting queue according to the task scheduling direction, and call the optional work calendar to calculate the scheduling time for the task nodes.
[0062] The optional work calendars mentioned above include three basic calendar implementations: no days off, weekends off, and configurable calendars.
[0063] Specifically, a no-break calendar refers to a calendar with no days off throughout the year, suitable for continuous production scenarios. A two-day weekend calendar refers to a calendar with weekends off, conforming to the regular work pattern. Configurable calendars support customizing work hours through WorkWeek (defining the 7-day work week) and WorkExcepts (defining special days, such as holidays).
[0064] The above work calendar supports calculations with precision down to the day or second, and provides interfaces for calculating the next workday and the effective work period between two dates. When scheduling, it automatically calls the work calendar (such as the selected single-day, double-day, or configurable calendar) to calculate the effective time of the task.
[0065] Compared to the low integration of existing calendar technologies, this solution offers multiple calendar implementations, supports customizable work hours and automatic skipping of holidays, and ensures a high degree of match between scheduling results and actual work hours. Taking a standard weekend calendar as an example, if a task has a 5-day cycle and starts on August 23, 2024 (Friday), the calendar module automatically skips the 24th and 25th (weekend), calculating the task end time as August 29, 2024 (Thursday). No manual adjustments are required, reducing labor costs and improving scheduling efficiency.
[0066] When calculating the scheduling time for task nodes, the calculation is performed according to the hierarchical relationship and the association relationship between tasks, and finally the start time, end time and cycle of each task node are calculated.
[0067] Specifically, when calculating based on the hierarchical relationship of tasks, the time of sub-tasks is calculated first, and then the time of the superior task is aggregated. For example, after the start and end times of each sub-task are calculated, the start time of the superior task is taken as the earliest start time of the sub-task, and the end time is taken as the latest end time of the sub-task, with the period being the difference between the two.
[0068] In this embodiment, the task hierarchy is clearly defined in task management, with only the lowest-level task having a set cycle. During scheduling calculation, the start or end time of the parent task is first determined (forward scheduling constrains the start time of subtasks, and backward scheduling constrains the end time of subtasks), and then the subtask time is calculated. After all subtasks have been calculated, the cycle and time of the parent task are aggregated according to the earliest start time and latest end time of the subtasks to ensure the accuracy of the parent task's schedule.
[0069] This embodiment uses the logic of "first constraining the time of sub-tasks, then aggregating the time of superior tasks" combined with the aforementioned task sorting mechanism to ensure that the duration of superior tasks is accurately derived from the actual time of sub-tasks. For example, in a project's WBS, under the "Research and Development Phase," there are three sub-tasks: "Requirements Analysis," "System Design," and "Code Development." After the start and end times of each sub-task are calculated, the start time of the "Research and Development Phase" is taken as the earliest start time of the sub-task, and the end time is taken as the latest end time of the sub-task, with the period being the difference between the two. This avoids the problem of inaccurate estimation of the duration of superior tasks in traditional methods and improves the overall scheduling accuracy.
[0070] In addition, when calculating based on task dependencies, the scheduling time is calculated based on the task dependency types FS, SS, SF, and FF, taking into account the delay time.
[0071] Specifically:
[0072] For FS relationships, when scheduling forward, the task dependency time dependencyDate = the completion time of the predecessor task + the delay time leg; when scheduling backward, the task dependency time dependencyDate = the start time of the successor task - the delay time leg.
[0073] For SS relationships, when scheduling forward, the task dependency time dependencyDate = predecessor task start time + delay time leg; when scheduling backward, the task dependency time dependencyDate = successor task start time - delay time leg + predecessor task duration.
[0074] For SF relationships, when scheduling forward, the task dependency time dependencyDate = predecessor task start time + delay time leg - successor task duration; when scheduling backward, the task dependency time dependencyDate = successor task completion time - delay time leg + successor task duration.
[0075] For FF relationships, when scheduling forward, the task dependency time dependencyDate = completion time of the predecessor task + delay time leg - duration of the successor task; when scheduling backward, the task dependency time dependencyDate = completion time of the successor task - delay time leg.
[0076] When calculating the schedule, the task time is adjusted in conjunction with dependencyDate to meet the constraints of complex relationships.
[0077] Compared with existing technologies that only support simple FS relationships, this embodiment supports four types of association relationships and delay times: FS, SS, SF, and FF. By accurately calculating task dependency times through dependencyDate, the scheduling results are more in line with actual business constraints and have a wider range of applicable scenarios. For example, in production scheduling, it can handle complex scenarios such as "production preparation work begins after equipment debugging starts (SS relationship)" and "assembly work can only begin after parts processing is completed (FS relationship)," reducing the deviation between scheduling and actual business.
[0078] Steps S100-S300 above adopt a task sorting + traversal calculation method. The task sorting stage determines the task calculation order (time complexity O(n)), and the traversal calculation stage calculates the time of each task in sequence (time complexity O(n)). The overall time complexity of the method is optimized to O(n), which greatly improves the scheduling efficiency in scenarios with a large number of tasks and reduces the consumption of hardware resources.
[0079] Existing algorithms typically have a time complexity of O(n²), resulting in slow response times when handling large numbers of tasks. This embodiment, however, optimizes the time complexity to O(n) through a task sorting and traversal calculation process. Testing shows that in a scenario handling 1000 tasks, the scheduling time of this invention is only 1 / 10 of traditional algorithms. In large projects (such as construction engineering and large-scale production planning), scheduling can be completed quickly, improving project management efficiency and reducing hardware resource consumption.
[0080] Figure 4 This is an example diagram of forward scheduling time calculation; combined with Figure 4As shown, taking a project task as an example, this demonstrates the time calculation process for forward scheduling (given that the project start time is August 20, 2024, using a standard two-day weekend calendar). It includes task hierarchy (e.g., WBS1: technical documents, subordinate activities 1.1: main component procurement list, 1.2: overall technical solution, etc.), the relationships between tasks (e.g., 1.2.1 business design is a prerequisite for 1.1 requirements gathering, FS relationship, no delay), calendar markings (e.g., August 24th and 25th, 2024 are weekends and not included in working hours), and the final calculated start time, end time, and duration for each task.
[0081] Step S400: Perform reverse traversal in the reverse task scheduling direction, synchronously calculate the earliest start time ES, earliest end time EF, latest start time LS, and latest end time LF of each task node, and identify critical tasks and critical paths.
[0082] Specifically, it includes:
[0083] The task node's ES = max(previous task EF, parent task ES);
[0084] The EF of a task node = the ES of the task node + the task period, where the task period is the effective period of the work calendar calculation.
[0085] The LF of a task node is min(the LS of the successor task and the LF of the parent task).
[0086] The task node's LS = the task node's LF - the task cycle;
[0087] The criteria for determining critical tasks are: ES = LS and EF = LF, and all critical tasks constitute the critical path.
[0088] This embodiment accurately identifies critical tasks and critical paths by synchronously computing tasks ES, EF, LS, and LF. For example, in software development projects, the critical path may include tasks such as "core module coding" and "system integration testing." Project managers can prioritize resource allocation and strengthen monitoring for critical tasks to reduce the risk of project delays and improve the project success rate.
[0089] Figure 5 This is an example diagram for critical path identification, combined with... Figure 5 As shown, based on the scheduling results, the ES, EF, LS, and LF of each task are marked. According to the rule "ES=LS and EF=LF", key tasks (such as 1.1 Requirements Research, 1.2.2 Model Design, 1.2.1 Front-end Development, etc.) are identified. The key tasks are connected with bold lines to form the critical path, which intuitively shows the key processes of the project.
[0090] Figure 2 This is a logic diagram (sorting tasks) of a plan-based intelligent task scheduling method according to an embodiment of the present invention. Figure 3 This is a logic diagram (scheduling time) of a plan-based intelligent task scheduling method according to an embodiment of the present invention.
[0091] Combination Figure 2 , 3 As shown, the overall logic of the above-mentioned intelligent task scheduling method based on planning in this invention is as follows: First, the tasks are defined and arranged into a list that can be directly traversed. By directly traversing the list, different processing is performed according to the scheduling direction and the type of list nodes, such as computation time, aggregation time, processing dependency time, and the state of parent and predecessor / successor nodes. For scenarios that require critical path calculation, a reverse traversal is performed again to calculate the earliest or latest time.
[0092] The above-mentioned intelligent task scheduling method based on planning in this invention integrates four types of relationship processing, multi-type calendar adaptation, hierarchical task time aggregation, and critical path identification into a single scheduling method, forming a complete intelligent scheduling method. This solves the problem of fragmented scheduling functions and inability to meet the needs of complex scenarios in existing technologies. This invention optimizes the algorithm's time complexity to O(n) through a task sorting + traversal calculation process. Compared to the genetic algorithm (O(n²) and above) and traditional traversal algorithm (O(n²)) used in existing patents, it significantly improves scheduling efficiency, especially suitable for scenarios with a large number of tasks, solving the problem of low scheduling efficiency in existing technologies. This invention performs critical path identification and scheduling calculation simultaneously, deeply integrating and coordinating the two. Through accurate calculation of task ES, EF, LS, and LF, critical tasks are identified, providing key monitoring basis for project management and improving the practicality of project management.
[0093] This embodiment also provides a plan-based intelligent task scheduling device, which corresponds to the above-described plan-based intelligent task scheduling method, and includes:
[0094] The sorting module is configured to sort tasks and obtain a task sorting queue;
[0095] The scheduling direction acquisition module is configured to acquire the task scheduling direction;
[0096] The scheduling time calculation module is configured to traverse the task sorting queue according to the task scheduling direction and call the optional work calendar to calculate the scheduling time for the task nodes.
[0097] When calculating the scheduling time for task nodes, the calculation is performed according to the hierarchical relationship and the association relationship between tasks, and finally the start time, end time and period of each task node are calculated.
[0098] When calculating based on the hierarchical relationship of tasks, the time of subtasks is calculated first, and then the time of the superior tasks is aggregated; when calculating based on the task association relationship, the scheduling time is calculated based on the task dependency relationship type FS, SS, SF, FF and taking into account the delay time.
[0099] The critical task identification module is configured to perform reverse traversal in the reverse task scheduling direction, synchronously calculate the earliest start time ES, earliest end time EF, latest start time LS, and latest end time LF of each task node, and identify critical tasks and critical paths.
[0100] Other parts corresponding to the method will not be elaborated here.
[0101] Furthermore, this embodiment also provides a computer device, the device comprising: a processor and a memory; the memory for storing one or more program instructions; the processor for executing one or more program instructions to perform the steps of the above-described plan-based intelligent task scheduling method.
[0102] In addition, this embodiment also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described intelligent task scheduling method based on a plan.
[0103] Furthermore, this embodiment also provides a computer program product, which includes computer program instructions that, when executed by a processor, implement the steps of the above-described plan-based intelligent task scheduling method.
[0104] In this embodiment of the invention, the processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in this embodiment of the invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in this embodiment of the invention can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The processor reads information from the storage medium and, in conjunction with its hardware, completes the steps of the above methods. The storage medium can be memory, for example, volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DRRAM).The storage media described in the embodiments of this invention are intended to include, but are not limited to, these and any other suitable types of memory. Those skilled in the art will recognize that the functions described in one or more of the above examples can be implemented using a combination of hardware and software. When applied software, the corresponding functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transmission of computer programs from one place to another. Storage media can be any available medium accessible to general-purpose or special-purpose computers. Although the invention has been described in detail above with general description and specific embodiments, modifications or improvements can be made to it, which will be apparent to those skilled in the art. Therefore, all such modifications or improvements made without departing from the spirit of the invention are within the scope of protection claimed by this invention.
[0105] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Any simple modifications, equivalent changes, or alterations made by those skilled in the art using the disclosed technical content shall fall within the protection scope of the present invention.
Claims
1. A plan-based intelligent task scheduling method, characterized in that, It comprises the following steps: sequencing the tasks to obtain a task sequencing queue; obtaining a task scheduling direction; traversing the task sequencing queue according to the task scheduling direction and calling an optional work calendar to calculate the scheduling time of the task nodes; when calculating the scheduling time of the task nodes, the start time, end time and period of each task node are calculated according to the task superior-subordinate relationship and task association relationship; when calculating according to the task superior-subordinate relationship, the time of the subtasks is calculated first, and then the time of the superior task is collected; when calculating according to the task association relationship, the scheduling time is calculated based on the task dependency relationship types FS, SS, SF and FF and considering the delay time; reverse traversal is performed according to the reverse task scheduling direction, and the earliest start time ES, the earliest end time EF, the latest start time LS and the latest end time LF of each task node are calculated synchronously, and the critical task and the critical path are identified.
2. The plan-based intelligent task scheduling method of claim 1, wherein, The task sequencing comprises: starting from the task node without a preceding or succeeding task, inserting a virtual start node and an end node, setting a recursive check, and determining the calculation order.
3. The schedule-based intelligent task scheduling method of claim 1, wherein, The scheduling time calculation based on the task dependency relationship types FS, SS, SF and FF and considering the delay time comprises: for the FS relationship, when scheduling forward, the task dependency time dependencyDate = preceding task completion time + delay time leg; when scheduling backward, the task dependency time dependencyDate = succeeding task start time - delay time leg; for the SS relationship, when scheduling forward, the task dependency time dependencyDate = preceding task start time + delay time leg; when scheduling backward, the task dependency time dependencyDate = succeeding task start time - delay time leg + preceding task period; for the SF relationship, when scheduling forward, the task dependency time dependencyDate = preceding task start time + delay time leg - succeeding task period; when scheduling backward, the task dependency time dependencyDate = succeeding task completion time - delay time leg + succeeding task period; for the FF relationship, when scheduling forward, the task dependency time dependencyDate = preceding task completion time + delay time leg - succeeding task period; when scheduling backward, the task dependency time dependencyDate = succeeding task completion time - delay time leg.
4. The plan-based intelligent task scheduling method according to claim 1, characterized in that: when calculating according to the task superior-subordinate relationship, the start time of the superior task is the earliest start time of the subtasks, the end time of the superior task is the latest end time of the subtasks, and the period is the difference between the two. 5. The schedule-based intelligent task scheduling method of claim 1, wherein, The synchronization calculates the earliest start time ES, the earliest end time EF, the latest start time LS, and the latest end time LF of each task node, and identifies the critical task and the critical path, which includes: ES of the task node = max (EF of the preceding task, ES of the upper task); EF of the task node = ES of the task node + task period, the task period being the effective period calculated by the working calendar; LF of the task node = min (LS of the subsequent task, LF of the upper task); LS of the task node = LF of the task node - task period; The critical task determination rule is ES = LS and EF = LF, and all the critical tasks form the critical path.
6. The schedule-based intelligent task scheduling method of claim 1, wherein, The optional working calendar includes no rest, double rest, and configurable calendar; The configurable calendar customizes the working time by defining the working type of 7 days in a week and defining special days; the special days include holidays.
7. A plan-based intelligent task scheduling apparatus, characterized by comprising: It includes: The sorting module is configured to sort the tasks and obtain a task sorting queue; The scheduling direction acquisition module is configured to acquire a task scheduling direction; The scheduling time calculation module is configured to traverse the task sorting queue according to the task scheduling direction, and call the optional working calendar to calculate the scheduling time of the task node; When the scheduling time of the task node is calculated, the start time, the end time, and the period of each task node are finally calculated according to the task upper and lower relationship and the task association relationship; When the task upper and lower relationship is calculated, the child task time is calculated first, and then the upper task time is collected; when the task association relationship is calculated, the scheduling time is calculated based on the task dependency relationship types FS, SS, SF, and FF and considering the delay time; The critical task identification module is configured to perform reverse traversal according to the reverse task scheduling direction, to synchronously calculate the earliest start time ES, the earliest end time EF, the latest start time LS, and the latest end time LF of each task node, and to identify the critical task and the critical path.
8. A computer device, comprising: The device includes a processor and a memory; The memory is used to store one or more program instructions; The processor is used to run one or more program instructions to execute the steps of the intelligent task scheduling method based on the plan according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer program stored on the computer readable storage medium is executed by the processor to implement the steps of the intelligent task scheduling method based on the plan according to any one of claims 1 to 6.
10. A computer program product, characterised in that, The computer program product includes computer program instructions, which are executed by the processor to implement the steps of the intelligent task scheduling method based on the plan according to any one of claims 1 to 6.