Intelligent task optimization method based on adaptive multi-dimensional dependency graph and dynamic scheduling
By adopting an intelligent optimization method of adaptive multi-dimensional dependency graph and dynamic scheduling in task scheduling, the task scheduling problem under multi-dimensional dependencies is solved, efficient and flexible task scheduling and resource management are achieved, and system performance is improved.
Patent Information
- Application Number
- CN202411553168.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-02-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing technology is difficult to perform accurate and efficient task optimization scheduling under the multi-dimensional dependence between tasks, especially when the task environment changes and resource state dynamically changes, it is impossible to effectively adjust the scheduling strategy.
The intelligent task optimization method based on adaptive multi-dimensional dependency graph and dynamic scheduling is adopted to monitor the task status and resource usage in real time, update the multi-dimensional dependency graph dynamically, and calculate the effective priority of the task based on the updated dependencies, and dynamic scheduling and adjustment are performed.
It realizes the accuracy and flexibility of task scheduling under multi-dimensional dependencies, reduces task execution delay, improves resource utilization and system performance, and can quickly respond to environmental changes.
Smart Images

Figure CN119512707A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to task scheduling, and in particular to an intelligent task optimization method based on an adaptive multi-dimensional dependency graph and dynamic scheduling. Background Art
[0002] Traditional task scheduling algorithms mainly include static task scheduling algorithms, dynamic task scheduling algorithms, scheduling algorithms based on task graphs, and intelligent scheduling algorithms based on reinforcement learning. These task scheduling algorithms are introduced below.
[0003] 1) Static task scheduling algorithm
[0004] Static task scheduling algorithms usually rely on a pre-defined task dependency graph. Based on the existing information, a clearer scheduling order can be calculated. The algorithm design is relatively simple and has high scheduling efficiency when the task volume is small and the task dependency is relatively fixed.
[0005] However, static task scheduling algorithms do not dynamically consider task changes and resource status during scheduling, resulting in poor scheduling results when the task environment changes. In addition, static task scheduling algorithms usually only perform local optimization on task dependencies, ignoring the optimal configuration of resources in the global system, and are unable to adjust scheduling according to dynamic changes in resources, which may result in idle or overloaded resources.
[0006] 2) Dynamic task scheduling algorithm
[0007] Dynamic task scheduling algorithms can update the scheduling plan in real time according to the task arrival time and resource status. They are highly adaptable and can be flexibly adjusted when the task environment changes. Compared with static task scheduling algorithms, dynamic task scheduling algorithms can allocate resources more reasonably according to the real-time status of the system and improve resource utilization. Usually, dynamic task scheduling algorithms can dynamically adjust the scheduling order according to the characteristics of the tasks (such as priority, task urgency, etc.), thereby reducing the response time of certain high-priority tasks.
[0008] However, dynamic task scheduling algorithms need to continuously update task status and make scheduling decisions during runtime, which has a large computational overhead. Especially in large-scale task environments, the scheduler itself may become a bottleneck of the system. Most existing dynamic task scheduling algorithms focus on the balance between task priority and system resources, but they are not perfect in handling complex task dependencies, especially when there are multi-dimensional dependencies between tasks, and cannot provide efficient scheduling solutions. Although dynamic task scheduling algorithms can adapt to system changes well, they are more focused on local optimization at the current moment and lack optimization of global tasks and resources.
[0009] 3) Scheduling algorithm based on task graph
[0010] The scheduling algorithm based on task graph can clearly represent the dependencies between tasks by representing the dependencies between tasks as directed graphs, which helps to handle the dependencies between complex tasks. For scenarios where the dependency order between tasks is clear, such as data processing pipelines and production task chains, the scheduling algorithm based on task graph can handle the scheduling order problem well.
[0011] However, most scheduling algorithms based on task graphs are built on static task graphs and cannot handle real-time requirements such as dynamic changes in tasks and priority adjustments. When the dependencies between tasks are not limited to a single dimension (such as time), but involve multi-dimensional attributes such as resources and priorities, such algorithms are difficult to provide scheduling solutions. Scheduling algorithms based on task graphs focus more on the order of task dependencies, while the dynamic management, configuration, and scheduling optimization of resources are relatively weak.
[0012] 4) Intelligent scheduling algorithm based on reinforcement learning
[0013] Reinforcement learning algorithms can optimize scheduling strategies based on task scheduling history learning, especially in complex multi-task dependencies and resource allocation scenarios, and can find near-optimal solutions. By continuously learning task scheduling history and system feedback, reinforcement learning algorithms can optimize the task scheduling effect and resource utilization of the entire system. Reinforcement learning algorithms can handle multi-dimensional issues such as dynamically changing task dependencies, resources, and priorities, and are suitable for complex task scheduling environments.
[0014] However, reinforcement learning algorithms require a lot of training and exploration to converge to a better scheduling strategy, which may not be timely in actual systems. Reinforcement learning algorithms often require a lot of computing resources during the learning and reasoning process, especially in large-scale task environments, where the computing cost is high. The scheduling strategy obtained by the reinforcement learning algorithm may be unstable or suboptimal during the exploration phase, especially in extreme task scenarios, and the system performance may be unstable.
[0015] With the rapid development of technologies such as distributed computing, cloud computing, and the Internet of Things, more and more tasks need to be executed in multi-node, multi-device, and even globally distributed environments. In these complex environments, there are usually multi-dimensional dependencies between tasks, such as:
[0016] Time dependency: some tasks need to be completed within a specific time, or the execution order of some tasks is strictly controlled by time;
[0017] Resource dependency: Tasks may need to share or compete for the same resources (such as CPU, memory, storage, network bandwidth, etc.);
[0018] Priority dependency: Different tasks have different priorities, and tasks with higher priorities need to be scheduled first;
[0019] Geographic Dependency: In a geographically distributed system, tasks may need to be distributed or executed based on the geographical location of the device.
[0020] Under these multi-dimensional dependencies, how to effectively manage the scheduling and execution of tasks becomes an important technical challenge. Summary of the invention
[0021] 1. Technical issues to be solved
[0022] In view of the above-mentioned shortcomings of the prior art, the present invention provides an intelligent task optimization method based on an adaptive multi-dimensional dependency graph and dynamic scheduling, which can effectively overcome the defect of the prior art that it is difficult to perform accurate and efficient task optimization scheduling when there are multi-dimensional dependencies between tasks.
[0023] (II) Technical solution
[0024] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0025] The intelligent task optimization method based on adaptive multi-dimensional dependency graph and dynamic scheduling includes the following steps:
[0026] S1. Input task information and resource information;
[0027] S2, construct an adaptive multi-dimensional dependency graph based on task information;
[0028] S3. During the task execution process, the task status of each task is monitored in real time, and the adaptive multi-dimensional dependency graph is dynamically updated;
[0029] S4. Calculate the effective priority of the current task, and update the effective priority of the current task according to the updated adaptive multi-dimensional dependency graph;
[0030] S5. Use dynamic scheduling algorithm to dynamically schedule the current task;
[0031] S6, monitor the task execution status and resource usage of each task in real time;
[0032] S7. Determine whether the dynamic scheduling needs to be adjusted according to the task execution status and resource usage. If the dynamic scheduling needs to be adjusted, return to S3; otherwise, return to S6 until all tasks are executed.
[0033] Preferably, the task information and resource information input in S1 include:
[0034] Initialize task information and resource information, input task list T = {t1, t2, ..., t n} and resource list R = {r1,r2,…,r m};
[0035] Among them, each task in the task list T contains the execution time, resource requirements, priority and its dependency with other tasks, and each resource in the resource list R contains the total amount of resources.
[0036] Preferably, constructing an adaptive multi-dimensional dependency graph according to the task information in S2 includes:
[0037] Construct an adaptive multi-dimensional dependency graph G(V,E) based on the input task list T;
[0038] Among them, V is the set of task nodes, representing all tasks;
[0039] E is an edge set, which represents the dependency relationship between tasks. i ,t j , t i ,t j ∈T, if task t j Depends on task t i , then add an edge e to the adaptive multidimensional dependency graph G ij .
[0040] Preferably, during the task execution process, S3 monitors the task status of each task in real time and dynamically updates the adaptive multi-dimensional dependency graph, including:
[0041] S31. During the task execution process, the task status of each task including the execution progress and the remaining execution time is monitored in real time, and the remaining execution time of the task is updated:
[0042] S ti =CurrentTime-StartTime ti ;
[0043] Among them, S ti For task t i The remaining execution time, CurrentTime is the current time, For task t i The execution start time;
[0044] S32. Dynamically update the adaptive multidimensional dependency graph G according to the real-time task status of each task to ensure the accuracy of the adaptive multidimensional dependency graph G.
[0045] Preferably, calculating the effective priority of the current task in S4 and updating the effective priority of the current task according to the updated adaptive multi-dimensional dependency graph includes:
[0046] S41. Calculate the effective priority of the current task based on the priority of the current task and the remaining execution time:
[0047]
[0048] in, For task t i The effective priority of For task t i The priority of For task t i Execution time, priority and execution time All are queried in the task list T;
[0049] S42. Update the effective priority of the current task according to the dependency relationship between tasks in the updated adaptive multi-dimensional dependency graph G to ensure that high-priority tasks are scheduled first.
[0050] Preferably, in S5, a dynamic scheduling algorithm is used to dynamically schedule the current task, including:
[0051] S51. Use the following formula to dynamically schedule the current task:
[0052]
[0053] Among them, T next is the task to be executed currently. The updated task t i The effective priority of
[0054] S52, current task to be executed T next Start execution and start timing.
[0055] Preferably, in S6, the task execution status and resource usage of each task are monitored in real time, including:
[0056] The resource usage of a task is calculated using the following formula:
[0057]
[0058] in, For resources j Resource utilization, For resources j Current usage of For resources j The total amount of resources, the total amount of resources Search in the resource list R, r j ∈R.
[0059] Preferably, judging whether dynamic scheduling needs to be adjusted according to the task execution status and resource usage in S7 includes:
[0060] If the task delay exceeds the preset threshold or the resource usage of each task is uneven, the dynamic scheduling needs to be adjusted, otherwise the dynamic scheduling does not need to be adjusted.
[0061] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the intelligent task optimization method based on adaptive multi-dimensional dependency graph and dynamic scheduling is implemented.
[0062] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the various steps of the above-mentioned intelligent task optimization method based on adaptive multi-dimensional dependency graph and dynamic scheduling.
[0063] (III) Beneficial effects
[0064] Compared with the prior art, the intelligent task optimization method based on adaptive multi-dimensional dependency graph and dynamic scheduling provided by the present invention has the following beneficial effects:
[0065] 1) It can identify and adjust the multi-dimensional dependencies between tasks in real time, ensure the accuracy and flexibility of task scheduling, effectively reduce task execution delays, and improve the efficiency of task optimization scheduling;
[0066] 2) Through intelligent dynamic scheduling strategies, it is possible to optimize resource allocation and improve resource utilization according to task priority and real-time resource status, avoid idleness and overload of resources, and effectively improve the overall performance of the system;
[0067] 3) It has adaptive capabilities and can respond quickly to environmental changes, enabling it to perform well in dynamic scenarios such as cloud computing, the Internet of Things, and edge computing, ultimately improving overall task execution efficiency and system performance, and promoting the realization of optimized scheduling of more complex tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0069] Figure 1 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION
[0070] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0071] Intelligent task optimization methods based on adaptive multi-dimensional dependency graphs and dynamic scheduling, such as Figure 1 As shown, S1, input task information and resource information, specifically including:
[0072] Initialize task information and resource information, input task list T = {t1, t2, ..., t n} and resource list R = {r1,r2,…,r m};
[0073] Among them, each task in the task list T contains the execution time, resource requirements, priority and its dependency with other tasks, and each resource in the resource list R contains the total amount of resources.
[0074] S2. Construct an adaptive multi-dimensional dependency graph based on task information, including:
[0075] Construct an adaptive multi-dimensional dependency graph G(V,E) based on the input task list T;
[0076] Among them, V is the set of task nodes, representing all tasks;
[0077] E is an edge set, which represents the dependency relationship between tasks. i ,t j , t i ,t j ∈T, if task t j Depends on task t i , then add an edge e to the adaptive multidimensional dependency graph G ij .
[0078] S3. During the task execution process, the task status of each task is monitored in real time, and the adaptive multi-dimensional dependency graph is dynamically updated, including:
[0079] S31. During the task execution process, the task status of each task including the execution progress and the remaining execution time is monitored in real time, and the remaining execution time of the task is updated:
[0080]
[0081] in, For task t i The remaining execution time, CurrentTime is the current time, For task t i The execution start time;
[0082] S32. Dynamically update the adaptive multidimensional dependency graph G according to the real-time task status of each task to ensure the accuracy of the adaptive multidimensional dependency graph G.
[0083] S4. Calculate the effective priority of the current task and update the effective priority of the current task according to the updated adaptive multi-dimensional dependency graph, specifically including:
[0084] S41. Calculate the effective priority of the current task based on the priority of the current task and the remaining execution time:
[0085]
[0086] in, For task t i The effective priority of For task t i The priority of For task t i Execution time, priority and execution time All are queried in the task list T;
[0087] S42. Update the effective priority of the current task according to the dependency relationship between tasks in the updated adaptive multi-dimensional dependency graph G to ensure that high-priority tasks are scheduled first.
[0088] S5. Use a dynamic scheduling algorithm to dynamically schedule the current task, including:
[0089] S51. Use the following formula to dynamically schedule the current task:
[0090]
[0091] Among them, T next is the task to be executed currently. The updated task t i The effective priority of
[0092] S52, current task to be executed T next Start execution and start timing.
[0093] S6. Real-time monitoring of the task execution status and resource usage of each task, including:
[0094] The resource usage of a task is calculated using the following formula:
[0095]
[0096] in, For resources j Resource utilization, For resources j Current usage of For resources j The total amount of resources, the total amount of resources Search in the resource list R, r j ∈R.
[0097] S7. Determine whether the dynamic scheduling needs to be adjusted according to the task execution status and resource usage. If the dynamic scheduling needs to be adjusted, return to S3; otherwise, return to S6 until all tasks are executed.
[0098] Specifically, whether dynamic scheduling needs to be adjusted is determined based on the task execution status and resource usage, including:
[0099] If the task delay exceeds the preset threshold or the resource usage of each task is uneven, the dynamic scheduling needs to be adjusted, otherwise the dynamic scheduling does not need to be adjusted.
[0100] The technical solution of the present application also discloses a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the above-mentioned intelligent task optimization method based on adaptive multi-dimensional dependency graph and dynamic scheduling is implemented.
[0101] The technical solution of the present application also discloses a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, each step of the above-mentioned intelligent task optimization method based on adaptive multi-dimensional dependency graph and dynamic scheduling is implemented.
[0102] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements will not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An intelligent task optimization method based on adaptive multi-dimensional dependency graph and dynamic scheduling, characterized by: The following steps are involved: S1. Input task information and resource information; S2, construct an adaptive multi-dimensional dependency graph based on task information; S3. During the task execution process, the task status of each task is monitored in real time, and the adaptive multi-dimensional dependency graph is dynamically updated; S4. Calculate the effective priority of the current task, and update the effective priority of the current task according to the updated adaptive multi-dimensional dependency graph; S5. Use dynamic scheduling algorithm to dynamically schedule the current task; S6, monitor the task execution status and resource usage of each task in real time; S7. Determine whether the dynamic scheduling needs to be adjusted according to the task execution status and resource usage. If the dynamic scheduling needs to be adjusted, return to S3; otherwise, return to S6 until all tasks are executed.
2. The intelligent task optimization method based on adaptive multi-dimensional dependency graph and dynamic scheduling according to claim 1, characterized in that: Enter task information and resource information in S1, including: Initialize task information and resource information, input task list T = {t1, t2, ..., t n } and resource list R = {r1,r2,…,r m }; Among them, each task in the task list T contains the execution time, resource requirements, priority and its dependency with other tasks, and each resource in the resource list R contains the total amount of resources.
3. The intelligent task optimization method based on adaptive multi-dimensional dependency graph and dynamic scheduling according to claim 2 is characterized in that: In S2, an adaptive multi-dimensional dependency graph is constructed based on task information, including: Construct an adaptive multi-dimensional dependency graph G(V,E) based on the input task list T; Among them, V is the set of task nodes, representing all tasks; E is an edge set, which represents the dependency relationship between tasks. i ,t j , t i ,t j ∈T, if task t j Depends on task t i , then add an edge e to the adaptive multidimensional dependency graph G ij .
4. The intelligent task optimization method based on adaptive multi-dimensional dependency graph and dynamic scheduling according to claim 3 is characterized in that: During the task execution process in S3, the task status of each task is monitored in real time, and the adaptive multi-dimensional dependency graph is dynamically updated, including: S31. During the task execution process, the task status of each task including the execution progress and the remaining execution time is monitored in real time, and the remaining execution time of the task is updated: in, For task t i The remaining execution time, CurrentTime is the current time, For task t i The execution start time; S32. Dynamically update the adaptive multidimensional dependency graph G according to the real-time task status of each task to ensure the accuracy of the adaptive multidimensional dependency graph G.
5. The intelligent task optimization method based on adaptive multi-dimensional dependency graph and dynamic scheduling according to claim 4 is characterized in that: In S4, the effective priority of the current task is calculated and updated according to the updated adaptive multi-dimensional dependency graph, including: S41. Calculate the effective priority of the current task based on the priority of the current task and the remaining execution time: in, For task t i The effective priority of For task t i The priority of For task t i Execution time, priority and execution time All are queried in the task list T; S42. Update the effective priority of the current task according to the dependency relationship between tasks in the updated adaptive multi-dimensional dependency graph G to ensure that high-priority tasks are scheduled first.
6. The intelligent task optimization method based on adaptive multi-dimensional dependency graph and dynamic scheduling according to claim 5 is characterized in that: S5 uses a dynamic scheduling algorithm to dynamically schedule the current task, including: S51. Use the following formula to dynamically schedule the current task: Among them, T next is the task to be executed currently. The updated task t i The effective priority of S52, current task to be executed T next Start execution and start timing.
7. The intelligent task optimization method based on adaptive multi-dimensional dependency graph and dynamic scheduling according to claim 6, characterized in that: S6 monitors the task execution status and resource usage of each task in real time, including: The resource usage of a task is calculated using the following formula: in, For resources j Resource utilization, For resources j Current usage of For resources j The total amount of resources, the total amount of resources Search in the resource list R, r j ∈R.
8. The intelligent task optimization method based on adaptive multi-dimensional dependency graph and dynamic scheduling according to claim 7 is characterized in that: S7 determines whether dynamic scheduling needs to be adjusted based on the task execution status and resource usage, including: If the task delay exceeds the preset threshold or the resource usage of each task is uneven, the dynamic scheduling needs to be adjusted, otherwise the dynamic scheduling does not need to be adjusted.
9. A computer device, characterized in that: It includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the intelligent task optimization method based on adaptive multi-dimensional dependency graph and dynamic scheduling as claimed in claim 1 is implemented.
10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the various steps of the intelligent task optimization method based on adaptive multi-dimensional dependency graph and dynamic scheduling as claimed in claim 1 are implemented.
Citation Information
Cited By
Real-time task scheduling optimization method, device and system for FreeRTOS
CN120256063A
Real-time task scheduling optimization method, device and system for FreeRTOS
CN120256063B
Task scheduling method and device, medium and product
CN120353561A
Efficient task allocation method and task scheduling system based on interconnection function
CN120508367A
Efficient task allocation method based on interconnection function and task scheduling system
CN120508367B