A directed acyclic graph task priority allocation method under a heterogeneous server cluster

CN122111677APending Publication Date: 2026-05-29QINGDAO INST OF COMPUTING TECH XIDIAN UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
QINGDAO INST OF COMPUTING TECH XIDIAN UNIV
Filing Date
2026-03-12
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In heterogeneous server clusters, existing technologies struggle to effectively manage the heterogeneity of computing nodes, leading to distorted communication overhead modeling, insufficient awareness of topological invariants, an inability to balance search accuracy and inference efficiency, and difficulties in reinforcement learning convergence, resulting in low task scheduling efficiency.

Method used

A policy network based on graph neural networks is adopted, which combines heuristic search and progressive training methods. By constructing multi-dimensional feature vectors and a comprehensive scoring function, communication overhead and topology are explicitly perceived. Policy distillation technology is used to internalize the decision logic of heuristic search into the neural network, thereby achieving fast and high-precision task priority allocation.

Benefits of technology

It achieves efficient and rapid task priority allocation in heterogeneous server clusters, improves resource utilization and scheduling efficiency, enhances the model's generalization ability to complex topologies, and solves the convergence problem of reinforcement learning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122111677A_ABST
    Figure CN122111677A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of task scheduling processing methods, in particular to a directed acyclic graph task priority allocation method under a heterogeneous server cluster, which adopts strategy guided search, closed loop design of search counterproductive strategy, realizes perfect balance of scheduling quality and reasoning efficiency, greatly improves the response speed of the algorithm, and makes it adapt to the demand of fast response of the heterogeneous cluster; In the feature aggregation stage of the graph neural network and the scoring function of the heuristic search, the communication overhead feature is explicitly introduced, which significantly improves the communication efficiency and overall resource utilization in the heterogeneous environment; The graph neural network GNN based on the attention mechanism is adopted to process the DAG topological structure, which enhances the generalization ability of the model to complex topological structures; The progressive training method containing behavior cloning, curriculum learning and strategy distillation is adopted, which solves the convergence difficulty problem of reinforcement learning in large-scale task scheduling, and ensures the fast convergence and stability of the model training.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of task scheduling and processing methods, specifically to a method for prioritizing tasks in a directed acyclic graph under a heterogeneous server cluster. Background Technology

[0002] With increasingly stringent requirements for data security and business privacy, more and more enterprises and organizations are choosing to deploy their own server clusters in local or private cloud environments. Unlike public cloud infrastructure, which can be expanded infinitely on demand, the available computing power of these private server clusters is strictly limited by the existing hardware scale, making it difficult to achieve boundless elastic expansion. Furthermore, due to differences in hardware procurement batches and upgrade cycles, the individual computing nodes constituting the server cluster often differ in CPU architecture, memory configuration, accelerator card type, and network interface bandwidth, exhibiting heterogeneous characteristics. These resource-constrained and highly heterogeneous characteristics bring unprecedented challenges to the efficient resource management of private clusters.

[0003] In real-world server cluster scenarios, complex computational tasks are typically modeled as a Directed Acyclic Graph (DAG) data structure. Nodes in the graph represent subtasks, and edges represent data dependencies between tasks. The core objective of a scheduling system is to map thousands of task nodes onto a limited number of heterogeneous computing nodes through reasonable task priority allocation, while satisfying dependencies, thereby minimizing the overall task completion time. However, this is a typical NP-hard problem, and its solution complexity increases exponentially with the scale of the task and the heterogeneity of the hardware.

[0004] Current methods for solving the problem of DAG task priority allocation and scheduling mainly fall into two categories: (1) Traditional metaheuristic algorithms, such as simulated annealing (SA), genetic algorithms (GA), and list scheduling algorithms (such as HEFT). These methods simulate the physical annealing process or the laws of biological evolution, and gradually converge to a suboptimal solution by performing extensive random search or greedy selection in the solution space; (2) End-to-end scheduling methods based on deep reinforcement learning (DRL), such as the Decima algorithm. These methods use graph neural networks (GNNs) to extract the topological features of DAGs and use reinforcement learning agents to autonomously learn scheduling strategies through extensive interactions with the environment, attempting to achieve a direct mapping from task state to scheduling actions.

[0005] However, existing technologies still have the following problems: (1) The communication overhead model is distorted and difficult to adapt to heterogeneous bandwidth environments. Traditional scheduling methods often simplify the communication overhead to static weights, ignoring the dynamic interaction between data transmission volume and real-time bandwidth between heterogeneous nodes. Existing technologies cannot explicitly perceive the matching relationship between data dependencies and physical network topology, which will lead to high communication density tasks being incorrectly assigned to nodes on low bandwidth links, thereby causing serious communication congestion and greatly slowing down the overall computing progress.

[0006] (2) Lack of awareness of topological invariants and poor policy generalization ability. Some existing deep learning-based methods, such as some MLP or basic GNN schemes, do not make sufficient use of the topological structure of directed acyclic graphs when extracting features. When the scale or structural distribution of the task graph used during offline training differs significantly from the actual online task, policy networks trained only based on absolute time values ​​or simple features are prone to failure and cannot capture long-range dependencies between tasks, i.e., topological invariants, resulting in poor generalization ability of the model when facing new tasks.

[0007] (3) It is impossible to balance search accuracy and inference efficiency, and convergence is difficult. Although traditional search algorithms such as simulated annealing can find good solutions, their computational overhead is huge as the task scale expands, which cannot meet the real-time requirements. In the early stage of training, end-to-end reinforcement learning methods, due to the lack of effective guidance, may lead to serious cascading effects in subsequent tasks due to incorrect priority allocation, resulting in high variance in reward evaluation. If this variance is not constrained, the agent will conduct too many ineffective explorations in the huge action space, which will not only converge very slowly, but also easily get trapped in local optima. Summary of the Invention

[0008] The purpose of this invention is to provide a method for prioritizing tasks in a directed acyclic graph under a heterogeneous server cluster, so as to solve the existing technical problems in the background art.

[0009] To address the aforementioned technical problems, the present invention provides a method for prioritizing tasks in a directed acyclic graph under a heterogeneous server cluster, comprising the following steps: S1: Obtain the directed acyclic graph of the tasks to be scheduled and the real-time resource status information of the heterogeneous server cluster. The directed acyclic graph contains the task set and the dependencies between tasks, and determines its topology. S2: Based on the directed acyclic graph and its determined topology obtained in step S1, extract the original features of each task node and construct a multi-dimensional feature vector; use a graph neural network that integrates communication edge features to aggregate and update the multi-dimensional feature vector to obtain a task node embedding vector containing global topological context information and communication features. S3: Embed the task nodes obtained in step S2 into the pre-constructed policy network via vector input and perform inference, outputting the prior probability distribution of each task node in the current ready task set; simultaneously, based on the current global state, calculate the lower bound of the estimated completion time of the remaining unfinished tasks as heuristic information; the current global state of the system is defined as a tuple. , This indicates that static graph structure information is provided to support task dependencies. This refers to the sorted set of tasks, from which the current set of ready tasks is derived. , This refers to the resource timeline. This refers to global statistics; S4: Construct a heuristic search tree based on the prior probability distribution and heuristic information obtained in step S3; for candidate task nodes in the current ready task set, simulate their execution process on the heterogeneous server cluster, construct a comprehensive scoring function and calculate the priority score of the candidate task nodes, output the state priority queue sorted by priority score and generate the task scheduling trajectory. S5: Based on the task scheduling trajectory generated in step S4, the policy network is updated and iterated using a progressive training method, and the decision logic of the heuristic search tree is distilled into the policy network to obtain the final policy with fixed parameters. S6: The final strategy reasoning yields the final task priority allocation sequence; the task node embedding vector of the task to be scheduled is directly processed using the final strategy, and the task node with the peak probability distribution after a single forward propagation is the optimal action at the current moment. The execution order of all task nodes is determined, and the final task priority allocation sequence is output.

[0010] This invention constructs a policy network containing a graph neural network, utilizing its ability to perceive the topology and communication overhead of directed acyclic graphs to guide the heuristic search process. Through a progressive training framework, the high-quality decision logic of the search algorithm is distilled into the neural network, thereby ultimately obtaining a final policy model that possesses both high-precision decision-making capabilities and fast reasoning. This effectively solves the problems of traditional heuristic rule computation being fast but having limited solution quality, while pure search algorithms, although highly accurate, are too time-consuming.

[0011] The core logic of the directed acyclic graph task priority allocation method for heterogeneous server clusters provided in this invention lies in strategy-guided search, with the search feedback strategy. Through deep interaction and learning, a task priority allocation model that can adapt to complex heterogeneous environments is constructed, including the following key components: (1) This invention constructs a global state space model for heterogeneous cluster servers. Unlike traditional methods that only focus on computational overhead, this scheme explicitly incorporates communication latency into state modeling. By dynamically calculating the time loss caused by cross-node data transmission, it accurately characterizes the impact of heterogeneous bandwidth on task completion time. To handle the non-Euclidean structure of DAG graphs, this invention uses a graph neural network (GNN) with an attention mechanism as a feature extractor. This network not only aggregates the computational features of task nodes but also incorporates the data transmission volume on the edges as a key feature into the message passing process, thereby generating node embedding vectors that include global topological context and communication cost awareness.

[0012] (2) To efficiently find the optimal solution in the huge solution space, this invention designs a policy-guided heuristic search mechanism. This mechanism uses the prior probability distribution output by the policy network to prune the search tree, retaining only high-probability high-priority task nodes as candidate branches, thereby significantly compressing the search width. Simultaneously, this invention constructs a four-element comprehensive scoring function that includes the incurred cost (actual completion time), the expected future cost (lower bound of the critical path), a local smoothing term, and a policy-guided term. This function utilizes the hard constraint of physical time to ensure the feasibility of the solution and leverages neural networks to accelerate search convergence, ensuring the generation of high-quality scheduling trajectories within a finite number of steps.

[0013] (3) To address the convergence problem of reinforcement learning in large-scale DAG scheduling, this invention proposes a progressive training method. The first stage utilizes behavior cloning to enable the policy network to quickly learn basic scheduling rules. The second stage introduces course learning, training in stages according to task size and complexity, using the PPO algorithm and search trajectory to guide the policy network to gradually overcome high-difficulty tasks. The third stage performs policy distillation, mapping the decision logic of the heuristic search tree to the parameter distribution of the policy network. The resulting final policy model is independent of the search tree and can infer a high-precision task priority sequence with only a single forward propagation.

[0014] The working principle of this invention is based on a closed-loop logic of "topology awareness - policy guidance - search optimization - model distillation," aiming to internalize the complex heuristic search process into the efficient reasoning capability of neural networks. Its core workflow includes four main stages: state representation, network reasoning, heuristic search, and incremental optimization. The specific principles are as follows: (1) State Representation Principle Based on Graph Attention Mechanism: In heterogeneous cluster scheduling, the primary challenge is how to enable computers to grasp the complex structure and communication overhead of directed acyclic graphs. This invention abandons the traditional simple feature concatenation and adopts a graph neural network (GNN) based on an attention mechanism for state representation. During operation, the system first extracts the original features of each task node. Subsequently, the GNN layer performs message passing operations. Unlike conventional GNNs that only aggregate neighbor node features, this invention introduces a communication-aware attention mechanism. That is, at the computing node... with neighboring nodes Attention coefficient between At that time, not only the node's own embedding vector was input, but also the data transmission volume features of the connecting edges were explicitly fused. Through this mechanism, the network can automatically assign higher weights to edges with high data dependencies, i.e., communication-intensive edges. After multiple layers of nonlinear aggregation, the final embedding vector of each task node not only contains its global topological location information in the directed acyclic graph, but also implicitly implies the task's sensitivity to communication bandwidth. This provides semantically rich, high-dimensional state input for subsequent scheduling decisions.

[0015] (2) Scoring and Search Principles of Multi-Objective Fusion: This invention does not directly use neural networks to output scheduling actions, but instead uses neural networks to guide heuristic search. In order to accurately locate the optimal scheduling trajectory in the vast solution space, this invention constructs a comprehensive scoring function for multi-objective fusion. This function consists of physical constraint terms and intelligent guidance terms: ① Physical Constraints: This includes incurred costs and local smoothing terms. The system calculates the actual completion time of the task based on the resource occupancy schedule of the current heterogeneous nodes. During this process, dynamic communication delay calculation rules are strictly enforced; that is, if the predecessor and successor tasks are assigned to different nodes, network transmission delay is forcibly increased. This ensures the physical feasibility and accuracy of the scheduling scheme.

[0016] ② Global Vision Term: This refers to the expected future cost. The system estimates the theoretical shortest time to complete the tasks by calculating the critical path length of the remaining unfinished tasks and the lower bound of the total workload. This term prevents the algorithm from lengthening the overall critical path due to short-term gains.

[0017] ③ Smart guidance items: i.e. The system incorporates the prior probability distribution output by the policy network into the scoring function. By learning from a large number of historical high-probability trajectories, the policy network can intuitively identify high-potential nodes. This function rewards tasks deemed high-probability by the neural network during the search process by lowering their scores, thus guiding the search tree towards high-potential regions.

[0018] During the search process, the system maintains a priority queue. To balance the breadth and depth of the search, a Top-K pruning strategy and queue capacity limits are used. Only the strategy network considers the highest probability to be retained. K Each task is simulated and expanded, and the worst-rated node in the queue is removed. This mechanism reduces the computational complexity from exponential to polynomial level while ensuring the quality of the solution.

[0019] (3) Progressive training and policy distillation principle: In order to obtain a final policy that can be used for rapid reasoning, this invention designs a progressive evolution path of behavior cloning-curriculum reinforcement learning-policy distillation: ① Cold start, or behavior cloning: In the early stages of training, the network is randomly initialized and cannot provide effective guidance. At this time, trajectories generated by static algorithms are used as teachers. Through supervised learning, the policy network can quickly master the basic dependency handling logic and avoid blind exploration.

[0020] ② Capability Enhancement, or Course Reinforcement Learning: To tackle complex tasks, the system categorizes the training set by difficulty. During training, the aforementioned heuristic search (PHS) is used as a better teacher. PHS leverages the current weak guidance of the policy network, combined with the search mechanism, to generate trajectories superior to those of the network itself. By using the Proximal Policy Optimization (PPO) algorithm, the policy network continuously evolves, approximating the performance of the search algorithm.

[0021] ③ Model internalization, or policy distillation: This is crucial for achieving fast online inference. At the end of training, the system forces the output distribution of the policy network to fit the comprehensive score distribution of the heuristic search tree for candidate actions by minimizing the KL divergence. Essentially, this process compresses the time-consuming search computation into the parameter weights of the neural network.

[0022] (4) Final Inference Mechanism: After the above training, the policy network has fully internalized the decision-making wisdom of the search algorithm and transformed it into the final policy. In the inference stage, the system no longer constructs a search tree, but directly inputs the real-time task graph features into the final policy model. The model performs a single forward propagation, and the peak value of the output probability distribution corresponds to the current optimal task node. This allows scheduling decisions to be made without cumbersome simulation exercises, and can output a high-quality priority sequence that balances communication overhead and load balancing within milliseconds.

[0023] This application also provides a directed acyclic graph task priority allocation system for heterogeneous server clusters, including: The data acquisition module is used to acquire the directed acyclic graph data of the tasks to be scheduled and the resource status information of the heterogeneous server cluster, and parse them into graph structure data that can be processed by a computer. The feature extraction module is used to construct multi-dimensional feature vectors for task nodes and run a graph neural network to aggregate and update the multi-dimensional feature vectors, thereby obtaining task node embedding vectors that contain global topological context information and communication features. The policy network module is used to construct the policy network and perform reasoning, output the prior probability distribution of each task node in the current ready task set, and obtain heuristic information based on the current global state. The heuristic search module is used to construct a heuristic search tree, build a comprehensive scoring function and calculate the priority scores of candidate task nodes, output a state priority queue sorted by priority scores and generate a task scheduling trajectory. The model training module is used for updating and iterating the policy network. It adopts a progressive training method of behavior cloning, course learning and policy distillation to distill the decision logic of the heuristic search tree into the policy network to obtain the final policy with fixed parameters. The priority output module is used to directly output the final task priority allocation sequence based on the final policy during the inference phase.

[0024] This application also provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of a directed acyclic graph task priority allocation method under a heterogeneous server cluster.

[0025] This application also provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, it implements the steps of a method for prioritizing directed acyclic graph tasks in a heterogeneous server cluster.

[0026] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of a directed acyclic graph task priority allocation method under a heterogeneous server cluster.

[0027] The beneficial effects of the technical solution provided by this invention are as follows: (1) Achieving a perfect balance between scheduling quality and inference efficiency: This invention uses a closed-loop design where policy guides search and search feeds back into the policy. It utilizes heuristic search to explore high-quality solutions in the offline stage, and then internalizes the decision-making wisdom of the search algorithm into neural network parameters through policy distillation technology. This allows the final generated policy model to infer a priority sequence close to the optimal solution without performing time-consuming search operations in the inference stage, greatly improving the algorithm's response speed and enabling it to adapt to the needs of rapid response in heterogeneous clusters.

[0028] (2) Significantly improves communication efficiency in heterogeneous environments: To address the problem of uneven bandwidth resources in heterogeneous clusters, this invention explicitly introduces communication overhead features, i.e., the coupling of data transmission volume and bandwidth, in both the feature aggregation stage of the graph neural network and the scoring function of the heuristic search. This deep communication awareness mechanism enables the algorithm to proactively allocate communication-intensive task pairs to the same node or high-bandwidth link, effectively avoiding idle computing resources caused by network congestion and significantly improving the overall resource utilization of the cluster.

[0029] (3) Enhanced generalization ability of the model to complex topological structures: Unlike existing technologies that only use fully connected layers or simple recurrent neural networks, this invention uses graph neural networks (GNNs) based on attention mechanisms to process DAG topological structures. GNNs can effectively capture long-range dependencies and topological invariants between task nodes, enabling the trained model to maintain stable performance when facing unknown task graphs with larger node scales and more complex dependencies.

[0030] (4) This invention addresses the difficulty of convergence in reinforcement learning during large-scale task scheduling: Considering the large state space and sparse rewards of DAG-scheduled tasks, this invention proposes a progressive training framework that includes behavior cloning, curriculum learning, and policy distillation. By setting up courses from easy to difficult and guiding high-quality search trajectories, the exploration space of reinforcement learning is effectively constrained, the variance of gradient estimation is reduced, and the rapid convergence and stability of model training are ensured, avoiding the tendency of end-to-end methods to get trapped in local optima. Attached Figure Description

[0031] Figure 1 This is a flowchart illustrating the method for prioritizing tasks in a directed acyclic graph under a heterogeneous server cluster in this invention. Figure 2 This is a schematic diagram illustrating the principle of the policy network in this invention; Figure 3 This is a schematic diagram of the overall system architecture of the directed acyclic graph task priority allocation system under a heterogeneous server cluster in this invention. Figure 4 This is the infrastructure layer information interface in this embodiment of the invention; Figure 5 This is the allocation monitoring interface of the offline allocation layer in this embodiment of the invention; Figure 6 This is the trajectory playback and Top-K pruning monitoring interface in this embodiment of the invention. Detailed Implementation

[0032] The present invention will be further described below with reference to the accompanying drawings and embodiments: In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0033] In the description of this invention, it should be understood that the terms "left", "right", "front", "rear", "top", "bottom", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.

[0034] like Figures 1 to 6 As shown, a method for prioritizing tasks in a directed acyclic graph under a heterogeneous server cluster includes the following steps: S1: Obtain the directed acyclic graph of the tasks to be scheduled and the real-time resource status information of the heterogeneous server cluster. The directed acyclic graph contains the task set and the dependencies between tasks, and determines its topology. The real-time resource status information includes the computing power of each computing node, the communication bandwidth matrix between nodes, and the earliest available time of each computing node. This information provides a physical constraint basis for subsequent scheduling decisions. The computing power is used to estimate the execution time in combination with the task workload, the communication bandwidth matrix is ​​used to calculate the cross-node dynamic communication delay in step S4, and the earliest available time is used to calculate the cost item that has been incurred when the system updates to the next state in step S4.

[0035] Constructing a task scheduling model and state space in a heterogeneous environment: Before priority allocation, it is necessary to perform accurate mathematical modeling of the heterogeneous server cluster and the directed acyclic graph (DAG) tasks to be scheduled, and define the global state space during the scheduling process. This involves the following steps: (1) To facilitate feature extraction and quantization, the computation task is modeled as a directed acyclic graph carrying data flow features. .in, Represents a set of task nodes. This represents the set of edges indicating dependencies between tasks. For any task node... The computational workload is defined as That is, the number of instructions required to complete the task; for any dependent edge The amount of data transferred on it is defined as Furthermore, the heterogeneous server cluster is modeled as containing A collection of computing nodes. Due to the heterogeneity of node hardware, different nodes... Processing capacity Different, tasks At the node The execution time is expressed as Simultaneously, the physical network topology between nodes is modeled as a fully connected graph, with nodes... and The communication bandwidth between them is denoted as The above mathematical modeling process transforms the unstructured properties of the physical environment into structured numerical parameters that can be directly called by subsequent graph neural networks and heuristic search. (2) In order to solve the problem of insufficient communication perception in the existing technology, this invention defines a dynamic communication delay function. (3) At any decision step in the process The global state of the system is defined as a tuple. .

[0036] S2: Based on the directed acyclic graph and its determined topology obtained in step S1, extract the original features of each task node and construct a multi-dimensional feature vector; use a graph neural network that integrates communication edge features to aggregate and update the multi-dimensional feature vector to obtain a task node embedding vector containing global topological context information and communication features. Topological Feature Extraction and Embedding Based on Graph Neural Networks: To enable the algorithm to perceive the topological structure of the DAG graph and the long-range dependencies between tasks, this invention designs a graph neural network (GNN) based on an attention mechanism to encode the features of task nodes. It consists of the following steps: For each task node in the DAG Construct a high-dimensional feature vector that includes static attributes and dynamic scheduling states. Then, a parameterized GNN is used to perform multiple rounds of message passing on the task graph. After multi-layer aggregation, each node obtains a final embedding vector that includes global topological context and communication cost awareness.

[0037] S3: Embed the task nodes obtained in step S2 into the pre-constructed policy network via vector input and perform inference, outputting the prior probability distribution of each task node in the current ready task set; simultaneously, based on the current global state, calculate the lower bound of the estimated completion time of the remaining unfinished tasks as heuristic information; the current global state of the system is defined as a tuple. , This indicates that static graph structure information is provided to support task dependencies. This refers to the sorted set of tasks, from which the current set of ready tasks is derived. , This refers to the resource timeline. This refers to global statistics; Specifically, at any decision step in the process The global state of the system is defined as above. This indicates that static graph structure information is provided to support task dependencies. This refers to the sorted set of tasks, i.e., the set of tasks that have been assigned priorities. The set of currently ready tasks can be derived from this set. ; This refers to the resource timeline, which captures the timeline of each compute node in the cluster. Current resource usage and earliest available time ; It refers to global statistics, including macro-level indicators such as the remaining workload of currently unfinished tasks and the remaining critical path length.

[0038] Constructing the Policy Network and Value Network: To guide heuristic search and evaluate state value, this invention constructs two core neural network modules: (1) Policy network: Its function is to provide a policy network for the current ready set. Each task in the process is assigned a prior probability, indicating its likelihood of being scheduled first.

[0039] (2) Value network: Its function is to predict the current state. The generalized potential energy value is the total length of the critical path that can be shortened from the current state until the end of the scheduling process.

[0040] S4: Construct a heuristic search tree based on the prior probability distribution and heuristic information obtained in step S3; for candidate task nodes in the current ready task set, simulate their execution process on the heterogeneous server cluster, construct a comprehensive scoring function and calculate the priority score of the candidate task nodes, output the state priority queue sorted by priority score and generate the task scheduling trajectory. The comprehensive scoring function calculates the priority score of candidate task nodes using a comprehensive scoring function that includes the incurred cost, the expected future cost, the local smoothing, and the strategy guidance, and maintains a state priority queue sorted by the score. Policy-Guided Heuristic Search Based on Comprehensive Scoring Function: This invention utilizes prior knowledge provided by policy networks to optimize the heuristic search process, addressing the search efficiency problem in large-scale spaces. It consists of the following steps: (1) In order to scientifically evaluate the merits of each intermediate state in the search tree, this invention designs a comprehensive scoring function that includes four core indicators. ; (2) When expanding the search tree, a pruning strategy for large-scale state spaces is also included.

[0041] S5: Based on the task scheduling trajectory generated in step S4, the policy network is updated and iterated using a progressive training method, and the decision logic of the heuristic search tree is distilled into the policy network to obtain the final policy with fixed parameters. S6: The final strategy reasoning yields the final task priority allocation sequence; the task node embedding vector of the task to be scheduled is directly processed using the final strategy, and the task node with the peak probability distribution after a single forward propagation is the optimal action at the current moment. The execution order of all task nodes is determined, and the final task priority allocation sequence is output.

[0042] The final policy reasoning process in step S6 does not require rebuilding the search tree. It includes the following steps: at each decision step in the reasoning phase, obtain the feature vector of the current task graph state; directly input the feature vector into the final policy model for a single forward propagation; directly select the task node with the highest probability value in the probability distribution of the final policy output as the optimal action at the current moment, until all task scheduling is completed.

[0043] Progressive Training and Final Policy Generation: To obtain a final policy capable of rapidly inferring priorities, this invention designs a progressive training method comprising three stages. It consists of the following steps: (1) Behavioral cloning pre-training; (2) Progressive reinforcement learning fine-tuning: Introducing a course learning mechanism. The PPO algorithm is used to update the policy network parameters by using a proximal policy optimization, and the value network is used as a baseline to converge the gradient variance.

[0044] (3) Policy Distillation: The heuristic search tree is considered as the teacher model, and the policy network as the student model. In each state, the comprehensive score of the candidate action by the search tree is transformed into a teacher probability distribution. By minimizing the KL divergence between the student model output distribution and the teacher distribution, the high-quality decision logic of the search algorithm is distilled into the policy network. The policy network trained in this stage is the final policy, which has the ability to infer high-quality task priorities through forward propagation alone without performing complex search.

[0045] Based on the above technical solution, the multidimensional feature vector in step S2 The construction formula is:

[0046] in, The relative computational cost of the task. The normalized upward topology level for task nodes. For the normalized downward topology level of task nodes, Let be the in-degree of the task node. This represents the out-degree of the task node. This is a feature indicating the ready state.

[0047] Specifically, This represents the relative computational cost of a task, which is the ratio of the task's computational cost to the average computational cost. This represents the normalized upward topology level of a task node, used to identify the depth of the node in the task graph; This represents the normalized downward topological level of a task node, used to identify the relative distance of a node from the end point of the task graph; Indicates the in-degree of the task node, and indicates the number of input dependencies of the task; Indicates the out-degree of the task node, and indicates the range of influence of the task's output; The ready status identifier indicates whether the task currently belongs to the ready set, and is used to enable the neural network to perceive the current dynamic scheduling progress.

[0048] Based on the above technical solution, in step S2, the graph neural network (GNN) uses a multi-round message passing mechanism to aggregate and update multi-dimensional feature vectors, so that for any task node... and the task node number Layer embedding vector Taking aggregated updates as an example, the steps include: Step S21: Calculate the attention coefficient The attention coefficient Including task nodes The previous layer embedding vector Neighbor task nodes The previous layer embedding vector and the edge features connecting the two The calculation formula is: ,in This represents a vector concatenation operation; Step S22: Based on attention coefficient For neighboring task nodes The embedding vectors are weighted and aggregated, and then activated by a nonlinear activation function. The updated embedding vector is calculated. The calculation formula is:

[0049] in For task nodes The set of neighboring task nodes, The weight matrix is ​​learnable. Non-linear activation function. Use the ReLU activation function.

[0050] After multi-layer aggregation, each task node obtains a final embedding vector that includes global topological context and communication cost awareness.

[0051] By utilizing a parameterized GNN for multi-round message passing on the task graph, and to explicitly handle communication overhead, this invention incorporates data transmission volume features from edges when aggregating neighborhood information. .

[0052] Task Node The previous layer embedding vector Neighbor task nodes The previous layer embedding vector and the edge features connecting the two The data transmission volume is linearly transformed and then concatenated; the LeakyReLU activation function is applied to the concatenated vector, and then the vector is normalized within the range of neighboring task nodes using the Softmax function to obtain the attention coefficients. This mechanism can automatically assign higher weights to communication-intensive tasks.

[0053] Based on the above technical solution, the construction and inference of the policy network in step S3 includes the following process: Step S31: Extract the global feature vector of the heterogeneous server cluster The global feature vector contains the load distribution and remaining resource statistics of the current heterogeneous server cluster; Step S32: For the current set of ready tasks Each task node in The updated embedding vector is then processed by a graph neural network. With global feature vectors The features are then concatenated to form a comprehensive feature vector. Step S33: Input the integrated feature vector into a multilayer perceptron (MLP) with shared weights, mapping it to a scalar score for the task node. ; Step S34: Use the Softmax function to evaluate the current set of ready tasks. The scalar scores of all task nodes are normalized, and the prior probability distribution of each task node is calculated. : .

[0054] The prior probability distribution applies only to the set of currently ready tasks. By definition, non-ready tasks do not participate in computation.

[0055] Based on the above technical solution, the comprehensive scoring function in step S4 The calculation formula is:

[0056] in, Indicates the current state. Indicates the selected task node. Indicates the next state after the action is performed; For costs that have already been incurred, For future expected cost terms, For local smoothing terms, As a strategy guide, , and These are the preset weighting coefficients.

[0057] Specifically, The cost already incurred represents the transition from the initial state to the next state. The actual system completion time and the maximum value of the earliest available time of all nodes in the cluster reflect the real physical scheduling cost. The expected cost for the future represents the estimated lower bound of the time required to complete the remaining unscheduled tasks; For the local smoothing term, its calculation formula is: , indicating scheduling tasks Real-time increment of the system completion time; As a policy guide, it is a task-specific output by the policy network. The prior probability; , and These are preset weighting coefficients; Used to balance the impact of current costs with future projections To suppress drastic cost changes caused by sudden increases in communication overhead, the Used to control the intensity of the policy network's intervention in heuristic search.

[0058] Based on the above technical solution, the calculation process of the incurred cost item includes: obtaining the state of all computing nodes. The earliest available time And calculate the maximum value using the following formula: ; in Implicitly, it includes the execution time of the scheduled tasks as well as the data transmission time due to data transfer volume and bandwidth limitations.

[0059] The formula for calculating the expected future cost term is as follows: ,in, This represents the critical path length of the remaining unfinished task subgraph. This represents the total computational workload for the remaining unfinished tasks. The equivalent total computing power of a heterogeneous server cluster; Preferably, when calculating the critical path length, the weight of a task node is taken as its average execution time across all available computing nodes. ; This represents the total computational workload of the remaining unfinished tasks, which is the sum of the number of instructions and computational workload for all remaining tasks. The equivalent total computing power of the heterogeneous server cluster is equal to the scalar sum of the processing capabilities of all computing nodes in the cluster; the future expected cost term guarantees the global scope of the search.

[0060] The formula for calculating the local smoothing term is as follows: ; in, This represents the transition from the initial state to the next state. The actual system completion time, correspondingly, This represents the transition from the initial state to the current state. The actual system completion time. This represents the instantaneous increment of the system completion time after scheduling the current task. This item is used to suppress greedy actions that could lead to a sudden increase in completion time.

[0061] The strategy guidance item The task-specific output of the policy network The prior probability.

[0062] The policy guidance term uses the prior probability output by the policy network to intervene in the search. The higher the probability of a task, the lower its score, i.e., the better it is, and thus it is prioritized for expansion.

[0063] Based on the above technical solution, step S4 is performed at the task node. The next state is calculated during the execution process. At that time, the task node is calculated on the target computing node. The earliest start time also includes dynamic communication delay. The judgment includes the following process: judging the task node. Precursor mission node Is it assigned to the target compute node? Different computing nodes superior; If the predecessor task node Distributed across different computing nodes Therefore, the formula for calculating dynamic communication delay is: ;in, For the precursor mission node To the task node Data transfer volume between them For computing nodes and Communication bandwidth between them Due to network startup delay; If the predecessor task node Assigned to the same computing node If the connection is established, the communication delay is 0. Task Node The data readiness time is determined by the maximum sum of the completion times of all predecessor task nodes and their corresponding communication delays.

[0064] Preferably, in order to address the problem of insufficient communication sensing in the prior art, the present invention defines a dynamic communication delay function. The model forces the scheduling process to balance the computational speedup from cross-node parallelism with the communication overhead caused by data transmission.

[0065] Based on the above technical solution, the construction of the heuristic search tree in step S4 also includes a pruning strategy for the state space, comprising the following steps: Step S41: Based on the prior probability distribution output by the policy network Sort the current set of ready tasks and retain only the ones with the highest probability. One task node is used as a branch to expand the search tree for candidate actions, and the search branches corresponding to the remaining low-probability task nodes are directly removed. Step S42: Set the maximum capacity of the state priority queue to [value]. When the number of state nodes to be expanded in the queue exceeds At that time, the comprehensive scoring function was forcibly removed. The node with the worst rating.

[0066] Force removal of the comprehensive scoring function The node with the worst rating (i.e., the highest numerical value) ensures that search resources are concentrated on the most promising ones. On the search path, the node with the lowest score in the priority queue is iteratively expanded until a complete scheduling trajectory is generated.

[0067] Based on the above technical solution, the progressive training method in step S5 includes the following steps: Step S51: Use the teacher trajectories generated by the static heuristic scheduling algorithm as demonstration data. Each trajectory contains a state sequence and a reference action sequence. Minimize the cross-entropy loss between the policy network output distribution and the teacher reference actions. This updates the policy network parameters, enabling the policy network to quickly learn the basic task dependency processing logic. Step S52: Using a course-based learning strategy, the training task set is divided into several difficulty levels based on the node size and dependency complexity of the directed acyclic graph. Model training starts from the lowest difficulty level. Starting with a task set, the model gradually migrates to a task set with higher difficulty after it converges. In each training iteration, the scheduling trajectory generated by the heuristic search tree is used as a guide to generate sample data that is better than the current policy network, and the policy network parameters are updated using the near-end policy optimization algorithm.

[0068] Step S53: Policy distillation accelerates and obtains the final policy; the heuristic search tree PHS is used as the teacher model, and the policy network is used as the student model; in each state The following will be the comprehensive score of the candidate actions by the heuristic search tree. Transformed into teacher probability distribution By minimizing the student model output distribution Probability distribution of teachers The KL divergence between the two is used to update the policy network parameters; the policy network trained by distillation is the final policy.

[0069] Based on the above technical solution, step S52 further includes the construction and training of the value network, comprising the following processes: The global importance weights of the embedding vectors of each task node output by the graph neural network are calculated using a multilayer perceptron. The embedding vectors of all task nodes are weighted and aggregated based on global importance weights to generate graph-level feature vectors. The calculation formula is:

[0070] in, For time steps The set of all task nodes in the time graph. For time steps Time node Global importance weights, For time steps Time node The embedding vector; Compare graph-level feature vectors with global feature vectors The data is spliced ​​together and output as a scalar value through a regression network. The estimated value of the current state is calculated as follows:

[0071] in For parameters The regression network is a multilayer perceptron composed of fully connected layers; For time steps The global feature vector; Compare graph-level feature vectors with global feature vectors The data is spliced ​​together and output as a scalar value through a regression network. As an estimated value of the current state; The training objective of the value network is to minimize the predicted value. Compared to real cumulative returns Mean squared error between; true cumulative return Defined as the difference between the current predicted completion time and the final actual completion time.

[0072] Preferably, the second-stage progressive reinforcement learning fine-tuning also includes constructing a value network as a baseline to converge gradient variance.

[0073] Based on the above technical solution, the objective function of the mid-range strategy optimization PPO algorithm in step S52 includes a pruning mechanism, specifically: ;in, The ratio of the old to the new strategies. For the estimation of the advantage function, For pruning hyperparameters; The advantage function The generalized advantage estimation (GAE) is used for calculation, and the calculation method is as follows: ;in For timing difference error, For the reward function at each step, This is the time step offset. As a discount factor, This is the attenuation hyperparameter of GAE.

[0074] Specifically, Let be the reward function for each step, and let be the difference in state potential energy, which is the reduction in critical path length. This is the time step offset, used to calculate the cumulative sum of time-series difference errors over multiple future steps. This is a discount factor used to determine the weighting of future state value or future reward in the current calculation. is the attenuation hyperparameter of GAE, used to balance the bias and variance of the advantage function estimation.

[0075] Based on the above technical solution, in the process of obtaining the final strategy in step S53, the teacher probability distribution... The conversion formula is:

[0076] Including temperature parameters To achieve a smooth distribution.

[0077] This application also provides a directed acyclic graph task priority allocation system for heterogeneous server clusters, including: The data acquisition module is used to acquire the directed acyclic graph data of the tasks to be scheduled and the resource status information of the heterogeneous server cluster, and parse them into graph structure data that can be processed by a computer. The feature extraction module is used to construct multi-dimensional feature vectors for task nodes and run a graph neural network to aggregate and update the multi-dimensional feature vectors, thereby obtaining task node embedding vectors that contain global topological context information and communication features. The policy network module is used to construct the policy network and perform reasoning, output the prior probability distribution of each task node in the current ready task set, and obtain heuristic information based on the current global state. The heuristic search module is used to construct a heuristic search tree, build a comprehensive scoring function and calculate the priority scores of candidate task nodes, output a state priority queue sorted by priority scores and generate a task scheduling trajectory. The model training module is used for updating and iterating the policy network. It adopts a progressive training method of behavior cloning, course learning and policy distillation to distill the decision logic of the heuristic search tree into the policy network to obtain the final policy with fixed parameters. The model training module also includes a difficulty assessment unit, which automatically evaluates the complexity of directed acyclic graph tasks during course learning and training, and assigns the tasks to the appropriate difficulty level. The complexity assessment is based on the number of task nodes, edge density, and communication computation ratio (CCR).

[0078] The priority output module is used to directly output the final task priority allocation sequence based on the final policy during the inference phase.

[0079] This application also provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of a directed acyclic graph task priority allocation method under a heterogeneous server cluster.

[0080] This application also provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, it implements the steps of a method for prioritizing directed acyclic graph tasks in a heterogeneous server cluster.

[0081] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of a directed acyclic graph task priority allocation method under a heterogeneous server cluster.

[0082] The technical solution of the present invention will be described in detail below through specific system architecture, hardware environment, the specific execution process of offline priority allocation method, and online inference and system operation: This application constructs a directed acyclic graph task priority allocation system under a heterogeneous server cluster. The system is based on the Kubernetes container orchestration platform and utilizes graph neural networks and reinforcement learning techniques to achieve a complete closed loop of extracting knowledge from historical log data, training high-precision policy models offline, and finally guiding task scheduling in the heterogeneous cluster.

[0083] Example 1: System Architecture and Hardware Environment like Figure 3 As shown in the figure, the directed acyclic graph task priority allocation system under the heterogeneous server cluster provided in this embodiment mainly includes an infrastructure layer, an offline allocation layer and an online control layer in terms of logical architecture from bottom to top.

[0084] 1. Infrastructure Layer and Hardware Configuration: The infrastructure layer is the physical carrier and operating platform of the system. In this embodiment, to simulate a real heterogeneous cluster server environment, a Kubernetes cluster (version 1.28.2) is built using multiple physical servers with different configurations. The specific hardware deployment topology includes the following types of nodes: (1) Central Management Node (1 unit): Configured with an Intel Xeon E5-2620 v3 CPU (2.40GHz) and 128GB of memory, and running Ubuntu 18. This node serves as the Kubernetes Master node, and also deploys the core scheduling service and MinIO object storage service (version RELEASE.2025-04-22), responsible for the overall management and metadata storage of the system.

[0085] (2) Compute worker nodes (2 units): configured with Intel Xeon E5-2650 v4 CPU (2.20GHz) and 240GB of memory. These nodes are used to handle CPU-intensive and memory-intensive computing tasks.

[0086] (3) Graphics-type work node (1 unit): configured with Intel Xeon E5-2620 v4 CPU and equipped with NVIDIA RTX3090Ti (12G video memory) accelerator card.

[0087] (4) Edge computing node (1 unit): adopts Rockchip RK3588 (ARM architecture) for low-power, heterogeneous instruction set edge device scenarios.

[0088] At the software level, the cluster monitors the CPU architecture, GPU model, memory and PCIe bandwidth information of each node in real time through the Node Feature Discovery (NFD) component, and injects these heterogeneous features into the system resource view through the Kubernetes Label mechanism, providing accurate environmental status input to the upper layer.

[0089] 2. The offline allocation layer is the core processing layer: The offline allocation layer is the core of this embodiment, responsible for executing the algorithm logic based on policy-guided heuristic search (PHS). This layer mainly includes the following three functional modules: (1) Data Collection and Cleaning Module: Developed using Go (1.21.5). This module uses the Kubernetes Informer mechanism to monitor Pod lifecycle events in the cluster in real time, extracting task dependencies and resource consumption data. The module incorporates a loop detection algorithm based on depth-first search (DFS) to remove invalid tasks and serializes valid directed acyclic graphs (DAGs) into standard JSON format, which is then persistently stored in MinIO.

[0090] (2) State Construction Module: Developed using Python (3.10.13) and the NetworkX library. This module reads JSON data from MinIO and constructs a memory graph object. It is responsible for calculating the static topology attributes of each task node and simulating communication latency using the cluster bandwidth matrix to generate a feature vector. PyG Data objects are used as training samples for neural networks.

[0091] (3) Training and Distillation Module: Built on the PyTorch (2.1.2) and PyG (2.4.0) frameworks, and utilizing the Ray (1.8.1) framework to implement distributed parallel search. This module loads Data objects, runs policy networks and value networks, executes progressive training processes, and finally outputs distilled TorchScript model files.

[0092] Example 2: Specific Execution Process of Offline Priority Allocation Method In this embodiment, the method for prioritizing directed acyclic graph tasks in a heterogeneous server cluster, executed by the offline allocation layer, specifically includes the following steps: S1 Multidimensional Feature Extraction and State Modeling: The system first obtains the directed acyclic graph of the tasks to be scheduled. For each task node in the graph The state construction module extracts and constructs a six-dimensional feature vector. :

[0093] in, This represents the normalized relative computational cost, reflecting the computational workload of the task. and These represent the upward and downward topological levels of the task nodes, precisely quantifying the depth and relative position of the nodes in the directed acyclic graph. and In-degree and out-degree, respectively, represent the local dependency complexity; This is a dynamic identifier indicating whether all predecessors of the current task have been completed.

[0094] S2 Feature Aggregation Based on Graph Attention Network: To perceive the impact of communication bandwidth on scheduling in heterogeneous clusters, this embodiment employs a graph attention network (GAT) that integrates edge features. For example... Figure 2 As shown, message passing operations are performed. When aggregating neighborhood information, the network explicitly utilizes edges. Data transfer volume characteristics For the first Layers, nodes Embedded vector The update rules are as follows: Attention coefficient The weighting is determined by both node and edge features. Through this mechanism, the system automatically assigns higher weights to dependent edges with high data transmission volumes, resulting in more favorable node embedding vectors. Highly sensitive to communication.

[0095] S3 Policy Guidance and Heuristic Search: This is a crucial step in generating high-quality scheduling trajectories. Computational worker nodes utilize the Ray framework to launch multiple parallel workers, executing a policy-guided heuristic search (PHS). First, the node embedding vector obtained in step S2 is... Input the policy network MLP layer and output the set of currently ready tasks. Prior probability distribution The system only retains the one with the highest probability. One task (in this embodiment) Setting it to 10) as a candidate action significantly reduces the search space. Secondly, for each candidate task... The system simulates its execution on a heterogeneous cluster and calculates a comprehensive score. :

[0096] Among them, the costs already incurred That is, calculating the actual system completion time (Makespan) from the initial state to the execution of the task. Let... Using WorkflowSim simulation logic, the latency caused by cross-node communication was accurately calculated. Expected future costs This involves calculating the larger of the critical path length (CPL) of the remaining tasks and the lower bound of the total workload, ensuring the search has a global perspective. The policy regularization term utilizes... Incorporating the intuition of neural networks into the search, the search tree is guided to expand towards high-probability regions. (Example) The value decreases linearly from 1.0 to 0.1. Finally, the optimal trajectory is generated, and the system maintains a register with a capacity of... (In this embodiment, B is set to 6) The priority queue is continuously expanded by the node with the lowest score, i.e., the optimal node, to eventually generate a complete task scheduling trajectory. .

[0097] S4 Progressive Training and Model Distillation: To obtain a lightweight model suitable for online inference, the training module performs three stages of progressive optimization. First, in the Behavior Cloning (BC) stage, static scheduling trajectories generated by the HEFT algorithm are used as teachers to pre-train the policy network by minimizing cross-entropy loss, enabling it to quickly learn basic scheduling rules. Second, in the Course Reinforcement Learning (CRL) stage, the task set is hierarchically divided into 50-500 nodes. Using the PHS search trajectories generated in step S3 as high-quality samples, the Proximal Policy Optimization (PPO) algorithm is employed to update the policy network parameters. The PPO pruning threshold is set to 0.2, and the learning rate is set to... In this process, the value network serves as a baseline for converging gradient variance, and its training objective is to minimize the mean squared error between the predicted value and the actual completion time. Finally, the policy distillation stage is crucial for connecting offline and online processes. The system transforms the comprehensive score of candidate actions from the PHS search tree into a teacher probability distribution, and by minimizing the Kullback-Leibler divergence, distills the complex decision-making logic of the search algorithm into the policy network parameters. Ultimately, the trained policy network is exported as a TorchScript file and uploaded to MinIO.

[0098] Example 3: Online Inference and System Operation The online control layer applies the results of the offline training in the following ways: 1. Forward Inference: The controller in the online control layer listens to the Kubernetes API Server. When a new task is submitted, the controller calls LibTorch via CGO to load the final policy model from MinIO.

[0099] 2. Real-time Priority Generation: The controller extracts real-time features of new tasks, inputs them into the model for a forward propagation, and directly outputs the scheduling probability of each task node. The system sorts ready tasks according to this probability, generating a queue to be scheduled. This process takes only milliseconds, avoiding complex online searches.

[0100] 3. Scheduling and execution: The generated priority queue is pushed to the Kubernetes scheduler to complete the scheduling.

[0101] Through the above implementation methods, the present invention successfully transforms complex offline heuristic search capabilities into efficient online inference capabilities, solving the technical problem of balancing task scheduling efficiency and quality in heterogeneous private clusters under resource-constrained conditions.

[0102] The foregoing has shown and described the basic principles and main features of the present invention. It will be apparent to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments. Therefore, the embodiments should be considered as exemplary and not restrictive. The scope of the present invention is defined by the appended claims rather than the foregoing description. Therefore, it is intended that all variations falling within the meaning and scope of the equivalents of the claims be included within the present invention.

[0103] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims

1. A method for prioritizing tasks in a directed acyclic graph under a heterogeneous server cluster, characterized in that, Includes the following steps: S1: Obtain the directed acyclic graph (DAG) of the tasks to be scheduled and the real-time resource status information of the heterogeneous server cluster. The directed acyclic graph contains a set of tasks and the dependencies between tasks, and determines its topology. S2: Based on the directed acyclic graph and its determined topology obtained in step S1, extract the original features of each task node and construct a multidimensional feature vector; use a graph neural network (GNN) that integrates communication edge features to aggregate and update the multidimensional feature vector to obtain a task node embedding vector containing global topological context information and communication features. S3: Embed the task nodes obtained in step S2 into the pre-constructed policy network via vector input and perform inference, outputting the prior probability distribution of each task node in the current ready task set; simultaneously, based on the current global state, calculate the lower bound of the estimated completion time of the remaining unfinished tasks as heuristic information; the current global state of the system is defined as a tuple. , This indicates that static graph structure information is provided to support task dependencies. This refers to the sorted set of tasks, from which the current set of ready tasks is derived. , This refers to the resource timeline. This refers to global statistics; S4: Construct a heuristic search tree based on the prior probability distribution and heuristic information obtained in step S3; for candidate task nodes in the current ready task set, simulate their execution process on the heterogeneous server cluster, construct a comprehensive scoring function and calculate the priority score of the candidate task nodes, output the state priority queue sorted by priority score and generate the task scheduling trajectory. S5: Based on the task scheduling trajectory generated in step S4, the policy network is updated and iterated using a progressive training method, and the decision logic of the heuristic search tree is distilled into the policy network to obtain the final policy with fixed parameters. S6: The final strategy reasoning yields the final task priority allocation sequence; the task node embedding vector of the task to be scheduled is directly processed using the final strategy, and the task node with the peak probability distribution after a single forward propagation is the optimal action at the current moment. The execution order of all task nodes is determined, and the final task priority allocation sequence is output.

2. The method for prioritizing tasks in a directed acyclic graph under a heterogeneous server cluster according to claim 1, characterized in that, The multidimensional feature vector in step S2 The construction formula is: in, The relative computational cost of the task. The normalized upward topology level for task nodes. For the normalized downward topology level of task nodes, Let be the in-degree of the task node. This represents the out-degree of the task node. This is a feature indicating the ready state.

3. The method for prioritizing tasks in a directed acyclic graph under a heterogeneous server cluster according to claim 1, characterized in that, In step S2, the graph neural network (GNN) employs a multi-round message passing mechanism to aggregate and update multi-dimensional feature vectors, so that for any task node... and the task node number Layer embedding vector Taking aggregated updates as an example, the steps include: Step S21: Calculate the attention coefficient The attention coefficient Including task nodes The previous layer embedding vector Neighbor task nodes The previous layer embedding vector and the edge features connecting the two The calculation formula is: ,in This represents a vector concatenation operation; Step S22: Based on attention coefficient For neighboring task nodes The embedding vectors are weighted and aggregated, and then activated by a nonlinear activation function. The updated embedding vector is calculated. The calculation formula is: in For task nodes The set of neighboring task nodes, This is a learnable weight matrix.

4. The method for prioritizing tasks in a directed acyclic graph under a heterogeneous server cluster according to claim 1, characterized in that, The construction and inference of the policy network in step S3 includes the following processes: Step S31: Extract the global feature vector of the heterogeneous server cluster The global feature vector contains the load distribution and remaining resource statistics of the current heterogeneous server cluster; Step S32: For the current set of ready tasks Each task node in The updated embedding vector is then processed by a graph neural network. With global feature vectors The features are then concatenated to form a comprehensive feature vector. Step S33: Input the integrated feature vector into a multilayer perceptron (MLP) with shared weights, mapping it to a scalar score for the task node. ; Step S34: Use the Softmax function to evaluate the current set of ready tasks. The scalar scores of all task nodes are normalized, and the prior probability distribution of each task node is calculated. : 。 5. The method for prioritizing tasks in a directed acyclic graph under a heterogeneous server cluster according to claim 1, characterized in that, The comprehensive scoring function in step S4 The calculation formula is: in, Indicates the current state. Indicates the selected task node. Indicates the next state after the action is performed; For costs that have already been incurred, For future expected cost terms, For local smoothing terms, As a strategy guide, , and These are the preset weighting coefficients.

6. The method for prioritizing tasks in a directed acyclic graph under a heterogeneous server cluster according to claim 5, characterized in that, The calculation process for the incurred cost item includes: obtaining the state of all computing nodes. The earliest available time And calculate the maximum value using the following formula: ; The formula for calculating the expected future cost term is as follows: ,in, This represents the critical path length of the remaining unfinished task subgraph. This represents the total computational workload for the remaining unfinished tasks. The equivalent total computing power of a heterogeneous server cluster; The formula for calculating the local smoothing term is as follows: ; The strategy guidance item The task-specific output of the policy network The prior probability.

7. The method for prioritizing tasks in a directed acyclic graph under a heterogeneous server cluster according to claim 1, characterized in that, Step S4 is at the task node The next state is calculated during the execution process. At that time, the task node is calculated on the target computing node. The earliest start time also includes dynamic communication delay. The judgment includes the following process: judging the task node. Precursor mission node Is it assigned to the target compute node? Different computing nodes superior; If the predecessor task node Distributed across different computing nodes Therefore, the formula for calculating dynamic communication delay is: ;in, For the precursor mission node To the task node Data transfer volume between them For computing nodes and Communication bandwidth between them Due to network startup delay; If the predecessor task node Assigned to the same computing node If the connection is established, the communication delay is 0. Task Node The data readiness time is determined by the maximum sum of the completion times of all predecessor task nodes and their corresponding communication delays.

8. The method for prioritizing tasks in a directed acyclic graph under a heterogeneous server cluster according to claim 1, characterized in that, The construction of the heuristic search tree in step S4 also includes a pruning strategy for the state space, comprising the following steps: Step S41: Based on the prior probability distribution output by the policy network Sort the current set of ready tasks and retain only the ones with the highest probability. One task node is used as a branch to expand the search tree for candidate actions, and the search branches corresponding to the remaining low-probability task nodes are directly removed. Step S42: Set the maximum capacity of the state priority queue to [value]. When the number of state nodes to be expanded in the queue exceeds At that time, the comprehensive scoring function was forcibly removed. The node with the worst rating.

9. The method for prioritizing tasks in a directed acyclic graph under a heterogeneous server cluster according to claim 1, characterized in that, The progressive training method in step S5 includes the following steps: Step S51: Use the teacher trajectories generated by the static heuristic scheduling algorithm as demonstration data. Each trajectory contains a state sequence and a reference action sequence. Minimize the cross-entropy loss between the policy network output distribution and the teacher reference actions. This updates the policy network parameters, enabling the policy network to quickly learn the basic task dependency processing logic. Step S52: Using a course-based learning strategy, the training task set is divided into several difficulty levels based on the node size and dependency complexity of the directed acyclic graph. Model training starts from the lowest difficulty level. Starting with a task set, the model gradually migrates to a task set with higher difficulty after it converges. In each training iteration, the scheduling trajectory generated by the heuristic search tree is used as a guide to generate sample data that is better than the current policy network, and the policy network parameters are updated using the near-end policy optimization algorithm. Step S53: Policy distillation accelerates and obtains the final policy; the heuristic search tree PHS is used as the teacher model, and the policy network is used as the student model; in each state The following will be the comprehensive score of the candidate actions by the heuristic search tree. Transformed into teacher probability distribution By minimizing the student model output distribution Probability distribution of teachers The KL divergence between the two is used to update the policy network parameters; the policy network trained by distillation is the final policy.

10. A method for prioritizing tasks in a directed acyclic graph under a heterogeneous server cluster according to claim 9, characterized in that, Step S52 also includes the construction and training of the value network, comprising the following processes: The global importance weights of the embedding vectors of each task node output by the graph neural network are calculated using a multilayer perceptron. The embedding vectors of all task nodes are weighted and aggregated based on global importance weights to generate graph-level feature vectors. The calculation formula is: in, For time steps The set of all task nodes in the time graph. For time steps Time node Global importance weights, For time steps Time node The embedding vector; Compare graph-level feature vectors with global feature vectors The data is spliced ​​together and output as a scalar value through a regression network. The estimated value of the current state is calculated as follows: in For parameters The regression network; Compare graph-level feature vectors with global feature vectors The data is spliced ​​together and output as a scalar value through a regression network. As an estimated value of the current state; The training objective of the value network is to minimize the predicted value. Compared to real cumulative returns Mean squared error between; true cumulative return Defined as the difference between the current predicted completion time and the final actual completion time.

11. The method for prioritizing tasks in a directed acyclic graph under a heterogeneous server cluster according to claim 9, characterized in that, The objective function of the mid-range strategy optimization PPO algorithm in step S52 includes a pruning mechanism, specifically: ;in, The ratio of the old to the new strategies. For the estimation of the advantage function, For pruning hyperparameters; The advantage function The generalized advantage estimation (GAE) is used for calculation, and the calculation method is as follows: ;in For timing difference error, For the reward function at each step, This is the time step offset. As a discount factor, This is the attenuation hyperparameter of GAE.

12. The method for prioritizing tasks in a directed acyclic graph under a heterogeneous server cluster according to claim 9, characterized in that, In the process of obtaining the final strategy in step S53, the teacher probability distribution The conversion formula is: Including temperature parameters To achieve a smooth distribution.

13. A directed acyclic graph task priority allocation system for a heterogeneous server cluster, characterized in that, include: The data acquisition module is used to acquire the directed acyclic graph data of the tasks to be scheduled and the resource status information of the heterogeneous server cluster, and parse them into graph structure data that can be processed by a computer. The feature extraction module is used to construct multi-dimensional feature vectors for task nodes and run a graph neural network to aggregate and update the multi-dimensional feature vectors, thereby obtaining task node embedding vectors that contain global topological context information and communication features. The policy network module is used to construct the policy network and perform reasoning, output the prior probability distribution of each task node in the current ready task set, and obtain heuristic information based on the current global state. The heuristic search module is used to construct a heuristic search tree, build a comprehensive scoring function and calculate the priority scores of candidate task nodes, output a state priority queue sorted by priority scores and generate a task scheduling trajectory. The model training module is used for updating and iterating the policy network. It adopts a progressive training method of behavior cloning, course learning and policy distillation to distill the decision logic of the heuristic search tree into the policy network to obtain the final policy with fixed parameters. The priority output module is used to directly output the final task priority allocation sequence based on the final policy during the inference phase.

14. A computer device, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the directed acyclic graph task priority allocation method under a heterogeneous server cluster according to any one of claims 1 to 12.

15. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the directed acyclic graph task priority allocation method under a heterogeneous server cluster as described in any one of claims 1 to 12.

16. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the directed acyclic graph task priority allocation method under a heterogeneous server cluster as described in any one of claims 1 to 12.