Cloud computing parallel task optimization scheduling method based on priority dependency graph
By building a priority dependency graph and combining task priority, dependency and resource status, resources are dynamically allocated, which solves the shortcomings of existing task scheduling methods in priority calculation, dependency analysis and resource scheduling, and achieves more efficient task scheduling and resource utilization.
Patent Information
- Application Number
- CN202411882135.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-04-11
AI Technical Summary
The existing DAG-based task scheduling methods have problems in the aspects of insufficient priority calculation, limited dependency analysis, insufficient resource scheduling and load balancing, which leads to insufficient flexibility in dynamic environments.
A cloud computing parallel task optimization scheduling method based on priority dependency graph is proposed. By building a priority dependency graph, comprehensively considering the priority, dependency relationship and resource status of the task, and dynamically allocate resources to achieve more efficient task scheduling.
It significantly improves the overall performance of task scheduling in the cloud computing environment, improves task execution efficiency and resource utilization, and enhances the flexibility of the system in a dynamic environment.
Smart Images

Figure CN119806776A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a cloud computing task parallel scheduling technology, and in particular to a cloud computing parallel task optimization scheduling method based on a priority dependency graph. Background Art
[0002] Cloud computing is an Internet-based computing model that provides users with on-demand computing resources and services, including computing, storage, and networking, through the Internet. Users can flexibly rent computing resources based on their needs without having to purchase and maintain hardware facilities themselves. Cloud computing relies on virtualization technology and resource scheduling algorithms to abstract physical resources into virtual resource pools, supporting dynamic allocation and elastic scaling to meet users' different computing needs and load fluctuations. Through this service model, such as Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Software as a Service (SaaS), users can quickly deploy and run applications, thereby improving development efficiency and reducing operating costs.
[0003] Task scheduling is one of the core issues in cloud computing systems. Its goal is to allocate different tasks to appropriate resources in a multi-task execution environment to optimize system performance, improve resource utilization and meet user needs. This process is affected by many factors, including resource limitations, task dependencies and task priorities. With the increasing complexity of distributed computing environments, task scheduling methods have evolved from static scheduling to dynamic scheduling, which can perform real-time optimization based on the real-time status of tasks, resource availability and system load.
[0004] Directed Acyclic Graph (DAG) is a common data structure that is widely used to describe the dependencies and execution order between tasks. In cloud computing task scheduling, DAG nodes usually represent specific tasks, and directed edges represent the dependencies or order constraints between tasks. Due to its acyclic nature, DAG can ensure that tasks are executed in the correct order and avoid the occurrence of circular dependencies. The characteristics of DAG make it widely used in workflow management, compilation optimization, data analysis and other fields, especially in distributed systems and parallel computing. DAG can define the order of task execution, thereby achieving efficient task decomposition and parallelization.
[0005] At present, the DAG-based task scheduling method analyzes and decomposes tasks by constructing a dependency graph, and uses the parallelism between tasks to improve computing efficiency. However, existing methods have problems such as insufficient precision in priority calculation, limited dependency analysis, and insufficient resource scheduling and load balancing. In response to the above problems, the present invention proposes a cloud computing parallel task optimization scheduling method based on a priority dependency graph. By comprehensively considering the priority, dependency and resource status of the task, PDG can more accurately express the scheduling order and resource requirements of the task. In addition, the present invention introduces a multi-factor optimization mechanism in dynamic resource allocation and load balancing, which effectively solves the problem that the existing methods are not flexible enough in a dynamic environment, thereby significantly improving the overall performance of task scheduling in a cloud computing environment. Summary of the invention
[0006] The purpose of the present invention is to propose a cloud computing parallel task optimization scheduling method based on priority dependency graph, aiming to improve the execution efficiency and resource utilization of tasks in a cloud computing environment.
[0007] The technical solution to achieve the purpose of the present invention is: a cloud computing parallel task optimization scheduling method based on a priority dependency graph, comprising the following steps:
[0008] Step 1: Task decomposition and dependency analysis:
[0009] Receive large-scale tasks and decompose them into multiple subtasks, perform dependency analysis on each subtask, and establish dependencies between tasks;
[0010] Step 2: Task priority calculation
[0011] According to the complexity, execution time, and resource requirements of the task, a priority weight is assigned to each task node, where I / O-intensive tasks are given higher priority weights, and tasks on the critical path are given higher priority weights;
[0012] Step 3: Priority dependency graph construction
[0013] Following the dual principles of priority drive and dependency constraint, a priority dependency graph is constructed. During the construction process, task nodes with higher priorities are added to the graph first. At the same time, the order of nodes is determined according to the dependency relationship to ensure that tasks can be correctly executed according to the dependency chain.
[0014] Step 4: Task Scheduling
[0015] Scheduling is performed based on the priority and dependency of tasks to optimize task completion time and reduce waiting time on the critical path. For parallel tasks, the tasks with fewer dependencies and the highest priority are selected first and assigned to computing nodes with lower current loads. If a task has multiple dependencies, it is scheduled after its dependent tasks are completed.
[0016] Step 5: Dynamic resource allocation
[0017] During the task execution process, the resource utilization and task status of each node are monitored, and dynamic resource allocation is triggered when node overload, load imbalance or task status changes occur.
[0018] Further, step 1, task decomposition and dependency analysis: receiving a large-scale task and decomposing it into multiple subtasks, performing dependency analysis on each subtask, and establishing dependency relationships between tasks, where:
[0019] The dependency relationship is represented as a directed acyclic graph, where nodes represent subtasks and edges represent data dependencies between tasks. i and T j The dependencies between them are represented as directed edges (T i →T j ), where T i The output is T j The input of this directed edge is represented by mathematical symbols as follows:
[0020]
[0021] To facilitate analysis, we further use the dependency matrix D to represent the dependency relationship, where D[i][j]=1 represents T j Depends on T i , the dependency matrix is an N×N matrix, where N is the number of subtasks. If T is decomposed into n subtasks {T 1 ,T 2 ,…,T n}, then the dependency matrix D is:
[0022]
[0023] Further, step 2, task priority calculation: according to the complexity, execution time, and resource requirements of the task, a priority weight is assigned to each task node, which is expressed as:
[0024] W i =α·c i +β·e i +γ·r i
[0025] where c irepresents the complexity of the task, e i represents the estimated execution time of the task, r i represents the resource requirement of the task, and α, β, and γ are weight coefficients used to indicate the importance of each factor.
[0026] Furthermore, step 3, priority dependency graph construction: follow the dual principles of priority drive and dependency constraint to construct a priority dependency graph. The specific method is as follows:
[0027] Step 3.1, define the node set, each task T i Represented as a node N i , and add the priority weight W of the task i , the node set N is defined as N = {(T i ,W i )|i=1,2,…,n};
[0028] Step 3.2: Define edge sets. The dependencies between tasks are represented by edge sets E. If task T i It is task T j The pre-dependent task of j Dependency on T i The output of , then define the directed edge (N i →N j ); the edge set E is defined as E = {(N i ,N j )|D[i][j]=1}, where D[i][j] is the dependency matrix;
[0029] Step 3.3, initialize the graph structure and calculate the in-degree of the node. According to the node set N and the edge set E, construct the initial priority dependency graph PDG = (N, E), where the graph structure only contains the dependency relationship of the tasks, but has not been sorted. The in-degree of each node in (N j ) represents node N j The number of dependent predecessor tasks is obtained through the dependency matrix D, and the formula is as follows:
[0030]
[0031] Step 3.4: Use a topological sorting algorithm to sort the nodes in the graph according to dependency and priority;
[0032] Step 3.4.1. Initialize a queue Q and add all nodes with in-degree 0 to the queue:
[0033] Q = {N i |in(N i )=0}
[0034] Step 3.4.2: Take out nodes N from queue Q one by onei , and according to the priority W i Sort in descending order and update the sorting results:
[0035] R'=R∪{N i},W i =max(W)
[0036] Where W is the priority weight matrix, R' is the sorting result after the update, and R is the sorting result before the update;
[0037] Step 3.4.3: For each node N removed i , update all its subsequent nodes N j The in-degree of:
[0038] in'(N j )=in(N j )-1
[0039] Among them, in'(N j ) and in(N j ) represent the nodes N j In-degree before and after updating;
[0040] Step 3.4.4, when the queue Q is empty, the topological sorting is completed and the final sorting result is output;
[0041] Step 3.5, output the priority dependency graph. The final priority dependency graph PDG' is a directed acyclic graph PDG' = (N', E') with the task execution order, where N' is the node set sorted by priority and dependency, and E' is the corresponding edge set, keeping the task dependency unchanged.
[0042] Further, step 4, task scheduling: scheduling according to the priority and dependency of tasks, the specific method is:
[0043] Step 4.1: Select tasks, giving priority to those that meet the following conditions:
[0044] a. Fewer dependencies: Select tasks with in-degree 0 to form the candidate task set Γ Tasks :
[0045] Γ Tasks = {N i |in(N i )=0}
[0046] b. Highest priority: Select the task N with the highest priority from the candidate tasks i , construct the selected set N selected :
[0047] N selected= argmax(W i ),N i ∈Γ Tasks
[0048] Step 4.2: Allocate computing nodes. The selection of computing nodes is based on the following indicators:
[0049] a. The node with the smallest load: select node C with the lowest current load k , node load is L(C k ) indicates that C selected For the selected node set:
[0050]
[0051] b. Resource matching: Ensure that the selected node C k Can meet the task T i Resource requirements i :
[0052] r i ≤R(C k )
[0053] Where R(C k ) represents node C k currently available resources;
[0054] Step 4.3, update the dependency graph. After the task scheduling is completed, remove the scheduled tasks from the node set and update the in-degree of the subsequent tasks. If all dependencies of a task are completed, add it to the candidate task set. The formula for updating the in-degree of the subsequent tasks is:
[0055]
[0056] E' represents the set of edges in the priority dependency graph.
[0057] Furthermore, step 5, dynamic resource allocation: during the task execution process, monitor the resource utilization and task status of each node, and trigger dynamic resource allocation when node overload, load imbalance or task status change occurs. The specific method is as follows:
[0058] Step 5.1: During task execution, control the resource requirements of the task i (t), including CPU, memory and bandwidth consumption, is expressed as:
[0059]
[0060] Among them, r max represents the maximum resource requirement during task execution; r min Indicates the minimum resource requirement when the task is in I / O or waiting state;current Indicates the current actual resource consumption of the task;
[0061] Step 5.2: Dynamically adjust the resource allocation of computing nodes based on resource demand forecast;
[0062] Step 5.2.1: Resource allocation, when task T i It is about to enter a computationally intensive phase, so allocate more resources to it:
[0063] R allocated (T i )=min(r i (t)+Δr,R(C k ))
[0064] Among them, Δr is the amount of additional resources allocated, R(C k ) is the computing node C k The currently available resources, R allocated (T i ) is task T i Adjusted resource volume;
[0065] Step 5.2.2, Resource Recovery, when task T i When in the waiting state, reduce its resource usage:
[0066] R allocated (T i )=max(ri(t)-Δr,r min )
[0067] Step 5.2.3: Load balancing: if the load of a node exceeds the threshold L max , migrate some tasks to nodes with lower load.
[0068] A cloud computing parallel task optimization scheduling system based on priority dependency graph implements the cloud computing parallel task optimization scheduling method based on priority dependency graph to achieve cloud computing parallel task optimization scheduling based on priority dependency graph, which is divided into five modules and executes steps 1 to 5 respectively.
[0069] A computer device 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 method for optimizing and scheduling parallel tasks in cloud computing based on a priority dependency graph is implemented to achieve optimized and scheduling parallel tasks in cloud computing based on a priority dependency graph.
[0070] A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the control method of the multi-working state three-phase motor driver is implemented, the cloud computing parallel task optimization scheduling method based on the priority dependency graph is implemented, and the cloud computing parallel task optimization scheduling based on the priority dependency graph is realized.
[0071] Compared with the prior art, the present invention has the following significant advantages: 1) By constructing a directed acyclic graph (DAG) and a priority dependency graph (PDG), the dependencies between tasks can be accurately analyzed, and the priority can be calculated based on the complexity, resource requirements and execution time of the tasks. Compared with previous methods, the priority of task execution can be determined more efficiently, thereby reducing the waiting time on the critical path and significantly improving the efficiency of task scheduling. 2) The resource utilization of each node can be monitored and dynamically adjusted according to actual conditions. For example, when a node is overloaded or a task is timed out, resources can be automatically added or the task can be migrated to other nodes. Compared with traditional static resource allocation methods, this dynamic scheduling mechanism can better adapt to real-time changes in the system, improve resource utilization, and reduce task execution time. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] Figure 1 It is an optimization scheduling method for parallel tasks in cloud computing based on priority dependency graph.
[0073] Figure 2 This is a comparison chart before and after cloud computing task scheduling. DETAILED DESCRIPTION
[0074] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0075] like Figure 1 As shown, a cloud computing parallel task optimization scheduling method based on priority dependency graph includes the following steps:
[0076] Step 1) Task decomposition and dependency analysis
[0077] Task decomposition can be viewed as breaking down a complex task T into a series of subtasks T i ,There are dependencies between these subtasks, and the dependencies are usually represented as a directed acyclic graph (DAG), where nodes represent subtasks and edges represent data dependencies between tasks.
[0078] Task dependency representation: subtask T i and T j The dependencies between them can be represented as directed edges (T i→T j ), where T i The output is T j The input of this directed edge can be mathematically represented as:
[0079]
[0080] Dependency matrix: For ease of analysis, the dependency matrix D is used, where D[i][j] = 1 represents T j Depends on T i , the dependency matrix is an N×N matrix, where N is the number of subtasks. If T is decomposed into n subtasks {T 1 ,T 2 ,…,T n}, then the dependency matrix D is:
[0081]
[0082] Step 2), task priority calculation
[0083] Task priority calculation is based on factors such as task complexity, execution time, and resource requirements. Each task T i We can use a vector f i =[c i ,e i ,r i ] to represent, where:
[0084] c i Indicates the complexity of the task (e.g., amount of computation).
[0085] e i Indicates the estimated execution time of the task.
[0086] r i Represents the resource requirements of the task (such as CPU, memory, bandwidth).
[0087] Priority weight W i is the weighted sum of these factors:
[0088] W i =α·c i +β·e i +γ·r i
[0089] Among them, α, β, and γ are weight coefficients used to indicate the importance of each factor.
[0090] Step 3) Priority dependency graph construction
[0091] The priority dependency graph (PDG) is based on DAG and is adjusted and constructed according to the task priority. The nodes in the PDG represent subtasks, and the edges represent the dependencies of tasks. When constructing the PDG, the priority of the task is taken into account to ensure that high-priority tasks are scheduled first, thereby optimizing the overall execution time.
[0092] Step 3.1), define the node set. Each task T i Represented as a node N i , and add the priority weight W of the task i , the node set N is defined as N = {(T i ,W i )|i=1,2,…,n}, where W i Calculated from step 2, it means that task T i priority.
[0093] Step 3.2) Define edge sets. The dependencies between tasks are represented by edge sets E. If task T i It is task T j The predecessor dependent task (i.e. T j Dependency on T i output), then define the directed edge (N i →N j ). The edge set E is defined as E = {(N i ,N j )|D[i][j]=1}, where D[i][j] is the dependency matrix (obtained from step 1).
[0094] Step 3.3) Initialize the graph structure and calculate the in-degree of the node. Based on the node set N and the edge set E, construct the initial priority dependency graph PDG = (N, E), where the graph structure only contains the dependency relationships of the tasks, but has not yet been sorted. The in-degree of each node in(N j ) represents node N j (Task T j ) The number of predecessor tasks that it depends on can be obtained through the dependency matrix D, as follows:
[0095]
[0096] Step 3.4), topological sorting. Use the topological sorting algorithm to sort the nodes in the graph according to dependency and priority.
[0097] Step 3.4.1) Initialize a queue Q and add all nodes with in-degree 0 (tasks without pre-dependencies) to the queue:
[0098] Q = {N i |in(N i )=0}
[0099] Step 3.4.2) Take out nodes N from the queue one by one i , and according to the priority W i Arrange in descending order and add the final sort result R:
[0100] R'=R∪{N i},where W i =max(W)
[0101] Step 3.4.3), for each node N removed i , update all its subsequent nodes N j The in-degree of:
[0102] in'(N j )=in(N j )-1
[0103] Step 3.4.4), when the queue Q is empty, the topological sort is completed and the sort result R' is output.
[0104] Step 3.5), output the priority dependency graph. The final priority dependency graph PDG' is a directed acyclic graph PDG' = (N', E') with the task execution order, where N' is the node set sorted by priority and dependency, and E' is the corresponding edge set, keeping the task dependency unchanged.
[0105] Step 4) Task Scheduling
[0106] Task scheduling is performed based on the constructed priority dependency graph PDG', according to the priority W of the task. i , dependencies D[i][j], and the current load of the computing node, appropriate tasks are selected for allocation, with the goal of optimizing task completion time and reducing waiting time on the critical path.
[0107] Step 4.1) Select a task. When selecting a scheduling task, give priority to those that meet the following conditions:
[0108] a. Fewer dependencies: Select tasks with in-degree 0 (i.e., no predecessor tasks) to form the candidate task set Γ Tasks :
[0109] Γ Tasks = {N i |in(N i )=0}
[0110] b. Highest priority: Select the task N with the highest priority from the candidate tasks i , priority W i Calculated from step 3, construct the selected set N selected:
[0111] N selected = argmax(W i ),N i ∈Γ Tasks
[0112] Step 4.2) Allocate computing nodes. The selection of computing nodes is based on the following indicators:
[0113] a. The node with the smallest load: select node C with the lowest current load k , node load is L(C k ) indicates that C selected For the selected node set:
[0114]
[0115] b. Resource matching: Ensure that the selected node C k Can meet the task T i Resource requirements i :
[0116] r i ≤R(C k )
[0117] Where R(C k ) represents node C k Currently available resources.
[0118] Step 4.3) Update the dependency graph. After the task scheduling is completed, update PDG', remove the scheduled tasks from the node set, and update the in-degree of the subsequent tasks. If all dependencies of a task are completed (i.e., the in-degree is 0), add it to the candidate task set. The formula for updating the in-degree of the subsequent task is:
[0119]
[0120] Step 5) Dynamic resource allocation
[0121] The goal of dynamic resource allocation is to improve the utilization efficiency of system resources while avoiding resource bottlenecks. The system dynamically adjusts the allocation of computing resources according to the real-time status of the task (such as entering a computing-intensive phase or being in a waiting state).
[0122] Step 5.1) Resource demand prediction. During the task execution, the system monitors the resource demand of the task. i (t), including CPU, memory and bandwidth consumption. Resource requirement function r i The dynamic change of (t) can be approximated by the following formula:
[0123]
[0124] Among them, r max represents the maximum resource requirement during task execution; r min Indicates the minimum resource requirement when the task is in I / O or waiting state; current Indicates the actual resource consumption of the task.
[0125] Step 5.2) Dynamic resource allocation: Dynamically adjust the resource allocation of computing nodes according to resource demand forecast.
[0126] Step 5.2.1) Add resources. When task T i The system is about to enter a computationally intensive phase, and allocates more resources to it:
[0127] R allocated (T i )=min(r i (t)+Δr,R(C k ))
[0128] Among them, Δr is the amount of additional resources allocated, R(C k ) is the computing node C k The currently available resources, R allocated (T i ) is task T i Adjusted resource volume;
[0129] Step 5.2.2), resource recovery. When task T i When in the waiting state, reduce its resource usage:
[0130] R allocated (T i )=max(r i (t)-Δr,r min )
[0131] Step 5.2.3), load balancing. If the load of a node exceeds the threshold L max , the system will try to migrate some tasks to nodes with lower load.
[0132] The present invention also proposes a cloud computing parallel task optimization scheduling system based on a priority dependency graph, implements the cloud computing parallel task optimization scheduling method based on a priority dependency graph, realizes the cloud computing parallel task optimization scheduling based on a priority dependency graph, and is divided into five modules, executing steps 1 to 5 respectively.
[0133] A computer device 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 method for optimizing and scheduling parallel tasks in cloud computing based on a priority dependency graph is implemented to achieve optimized and scheduling parallel tasks in cloud computing based on a priority dependency graph.
[0134] A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the control method of the multi-working state three-phase motor driver is implemented, the cloud computing parallel task optimization scheduling method based on the priority dependency graph is implemented, and the cloud computing parallel task optimization scheduling based on the priority dependency graph is realized.
[0135] In summary, the present invention combines the priority, resource requirements and dependencies of tasks to dynamically generate the optimal scheduling scheme to maximize the resource utilization of the system and reduce scheduling delays and resource waste while ensuring the efficiency of task execution. Compared with traditional task scheduling algorithms, this method can more accurately capture the dependencies and priorities between tasks, thereby dynamically adjusting the scheduling strategy and achieving the optimal arrangement of task execution, thereby improving the execution efficiency of tasks and maximizing overall resource utilization.
[0136] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0137] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for optimizing and scheduling parallel tasks in cloud computing based on a priority dependency graph, characterized in that: The following steps are involved: Step 1: Task decomposition and dependency analysis: Receive large-scale tasks and decompose them into multiple subtasks, perform dependency analysis on each subtask, and establish dependencies between tasks; Step 2: Task priority calculation According to the complexity, execution time, and resource requirements of the task, a priority weight is assigned to each task node, where I / O-intensive tasks are given higher priority weights, and tasks on the critical path are given higher priority weights; Step 3: Priority dependency graph construction Following the dual principles of priority drive and dependency constraint, a priority dependency graph is constructed. During the construction process, task nodes with higher priorities are added to the graph first. At the same time, the order of nodes is determined according to the dependency relationship to ensure that tasks can be correctly executed according to the dependency chain. Step 4: Task Scheduling Scheduling is performed based on the priority and dependency of tasks to optimize task completion time and reduce waiting time on the critical path. For parallel tasks, the tasks with fewer dependencies and the highest priority are selected first and assigned to computing nodes with lower current loads. If a task has multiple dependencies, it is scheduled after its dependent tasks are completed. Step 5: Dynamic resource allocation During the task execution process, the resource utilization and task status of each node are monitored, and dynamic resource allocation is triggered when node overload, load imbalance or task status changes occur.
2. The method for optimizing and scheduling cloud computing parallel tasks based on priority dependency graph according to claim 1 is characterized in that: Step 1: Task decomposition and dependency analysis: Receive a large-scale task and decompose it into multiple subtasks. Perform dependency analysis on each subtask and establish dependency relationships between tasks, where: The dependency relationship is represented as a directed acyclic graph, where nodes represent subtasks and edges represent data dependencies between tasks. j and T j The dependencies between them are represented as directed edges (T i →T j ), where T j The output is T j The input of this directed edge is represented by mathematical symbols as follows: To facilitate analysis, we further use the dependency matrix D to represent the dependency relationship, where D[i][j]=1 represents T j Depends on T i , the dependency matrix is an N×N matrix, where N is the number of subtasks. If T is decomposed into n subtasks {T1, T2, …, T n }, then the dependency matrix D is:
3. The method for optimizing and scheduling cloud computing parallel tasks based on priority dependency graph according to claim 1, characterized in that: Step 2: Task priority calculation: According to the complexity, execution time, and resource requirements of the task, a priority weight is assigned to each task node, expressed as: W i =α·c i +β·e i +γ·r i where c i represents the complexity of the task, e i represents the estimated execution time of the task, r i represents the resource requirement of the task, and α, β, and γ are weight coefficients used to indicate the importance of each factor.
4. The method for optimizing and scheduling cloud computing parallel tasks based on priority dependency graph according to claim 1, characterized in that: Step 3: Priority dependency graph construction: Follow the dual principles of priority drive and dependency constraint to build a priority dependency graph. The specific method is as follows: Step 3.1, define the node set, each task T i Represented as a node N i , and add the priority weight W of the task i , the node set N is defined as N = {(T i ,W i )|i=1,2,…,n}; Step 3.2: Define edge sets. The dependencies between tasks are represented by edge sets E. If task T i It is task T j The pre-dependent task of j Dependency on T i The output of , then define the directed edge (N i →N j ); the edge set E is defined as E = {(N i ,N j )|D[i][j]=1}, where D[i][j] is the dependency matrix; Step 3.3, initialize the graph structure and calculate the in-degree of the node. According to the node set N and the edge set E, construct the initial priority dependency graph PDG = (N, E), where the graph structure only contains the dependency relationship of the tasks, but has not been sorted. The in-degree of each node in (N j ) represents node N j The number of dependent predecessor tasks is obtained through the dependency matrix D, and the formula is as follows: Step 3.4: Use a topological sorting algorithm to sort the nodes in the graph according to dependency and priority; Step 3.4.
1. Initialize a queue Q and add all nodes with in-degree 0 to the queue: Q={N i |in(N i )=0} Step 3.4.2: Take out nodes N from queue Q one by one i , and according to the priority W i Sort in descending order and update the sorting results: R'=R∪{N i },W i =max(W) Where W is the priority weight matrix, R' is the sorting result after the update, and R is the sorting result before the update; Step 3.4.3: For each node N removed i , update all its subsequent nodes N j The in-degree of: in'(N j )=in(N j )-1 Among them, in'(N j ) and in(N j ) represent the nodes N j In-degree before and after updating; Step 3.4.4, when the queue Q is empty, the topological sorting is completed and the final sorting result is output; Step 3.5, output the priority dependency graph. The final priority dependency graph PDG' is a directed acyclic graph PDG' = (N', E') with the task execution order, where N' is the node set sorted by priority and dependency, and E' is the corresponding edge set, keeping the task dependency unchanged.
5. The method for optimizing and scheduling cloud computing parallel tasks based on priority dependency graph according to claim 1, characterized in that: Step 4: Task scheduling: Scheduling tasks based on their priorities and dependencies. The specific method is as follows: Step 4.1: Select tasks, giving priority to those that meet the following conditions: a. Fewer dependencies: Select tasks with in-degree 0 to form the candidate task set Γ Tasks : C Tasks ={N i ∣in(N i )=0} b. Highest priority: Select the task N with the highest priority from the candidate tasks i , construct the selected set N selected : N selected =argmax(W i ),N i ∈Γ Tasks Step 4.2: Allocate computing nodes. The selection of computing nodes is based on the following indicators: a. The node with the smallest load: select node C with the lowest current load k , node load is L(C k ) indicates that C selected For the selected node set: b. Resource matching: Ensure that the selected node C k Can meet the task T i Resource requirements i : r i ≤R(C k ) Where R(C k ) represents node C k currently available resources; Step 4.3, update the dependency graph. After the task scheduling is completed, remove the scheduled tasks from the node set and update the in-degree of the subsequent tasks. If all dependencies of a task are completed, add it to the candidate task set. The formula for updating the in-degree of the subsequent tasks is: E' represents the set of edges in the priority dependency graph.
6. The method for optimizing and scheduling cloud computing parallel tasks based on priority dependency graph according to claim 1, characterized in that: Step 5: Dynamic resource allocation: During the task execution process, monitor the resource utilization and task status of each node. When a node is overloaded, the load is uneven, or the task status changes, dynamic resource allocation is triggered. The specific method is as follows: Step 5.1: During task execution, control the resource requirements of the task i (t), including CPU, memory and bandwidth consumption, is expressed as: Among them, r max represents the maximum resource requirement during task execution; r min Indicates the minimum resource requirement when the task is in I / O or waiting state; current Indicates the current actual resource consumption of the task; Step 5.2: Dynamically adjust the resource allocation of computing nodes based on resource demand forecast; Step 5.2.1: Resource allocation, when task T i It is about to enter a computationally intensive phase, so allocate more resources to it: R allocated (T i )=min(r i (t)+Δr,R(C k )) Among them, Δr is the amount of additional resources allocated, R(C k ) is the computing node C k The currently available resources, R allocated (T i ) is task T i Adjusted resource volume; Step 5.2.2, Resource Recovery, when task T i When in the waiting state, reduce its resource usage: R allocated (T i )=max(ri(t)-Δr,r min ) Step 5.2.3: Load balancing: if the load of a node exceeds the threshold L max , migrate some tasks to nodes with lower load.
7. A cloud computing parallel task optimization scheduling system based on priority dependency graph, characterized in that: Implement the cloud computing parallel task optimization scheduling method based on the priority dependency graph as described in any one of claims 1-6 to realize the cloud computing parallel task optimization scheduling based on the priority dependency graph, which is divided into five modules and executes steps 1 to 5 respectively.
8. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for optimizing and scheduling parallel tasks in cloud computing based on a priority dependency graph as described in any one of claims 1 to 6 is implemented to achieve optimizing and scheduling parallel tasks in cloud computing based on a priority dependency graph.
9. A computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the control method of the multi-working state three-phase motor driver is implemented, and the cloud computing parallel task optimization scheduling method based on the priority dependency graph according to any one of claims 1 to 6 is implemented to realize the cloud computing parallel task optimization scheduling based on the priority dependency graph.
Citation Information
Cited By
Cross-domain workflow scheduling system for dynamic resource arrangement
CN120104345A
Service starting sequence optimization method and device, electronic equipment and storage medium
CN120371479A
Method and device for optimizing service startup sequence, electronic device, and storage medium
CN120371479B
Uniform resource pooling management method for multiple computing power sources of unmanned aerial vehicle platform
CN120371552A
Unified resource pooling management method for multiple computing power sources of UAV platforms
CN120371552B