A task scheduling method and device, a storage medium and an electronic device

By constructing a heterogeneous task graph and a heterogeneous device status graph, and combining graph neural networks to update computing nodes in real time, task allocation is optimized, solving the problem that traditional task scheduling algorithms cannot fully utilize heterogeneous computing platforms, and improving resource utilization and task completion efficiency.

CN120973545BActive Publication Date: 2026-01-27INSPUR (SHANDONG) COMPUTER TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511499893.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-21
Publication Date
2026-01-27
Estimated Expiration
2045-10-21

AI Technical Summary

Technical Problem

Traditional task scheduling algorithms cannot fully utilize the performance of heterogeneous computing platforms and fail to effectively manage and schedule computing tasks, especially when considering platform heterogeneity and task dependencies.

Method used

Construct a heterogeneous task graph and a heterogeneous device status graph, extract and stitch features, dynamically aggregate global resource features through a graph convolutional network, combine a graph neural network to capture changes in computing nodes in real time, and adopt strategies to optimize task allocation.

Benefits of technology

It improved resource utilization and overall system performance, shortened task completion time, and enhanced the accuracy of matching task types with equipment characteristics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120973545B_ABST
    Figure CN120973545B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a task scheduling method and device, a storage medium and an electronic device, and relate to the technical field of computers. The method comprises: constructing a task heterogeneous graph according to the state of a computing task to be processed by a heterogeneous computing system; constructing a device state heterogeneous graph according to the state of the device of the heterogeneous computing system; performing task type discrimination according to the task heterogeneous graph and the device state heterogeneous graph to obtain a discrimination result; selecting a strategy according to the discrimination result to determine the priority order of the task; generating a first task allocation scheme and a plurality of second task allocation schemes according to the priority order; and performing at least one round of iteration operation to obtain a target task allocation scheme. In this way, the computing node changes are updated in real time, the task allocation is accurately matched with the current resource state, and the resource utilization rate is improved. By discriminating the task type and using the first strategy or the second strategy to determine the priority of the task allocation, the adaptation accuracy of the task type and the device characteristics is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a task scheduling method, apparatus, storage medium and electronic device. Background Technology

[0002] With the rapid development of information technology, heterogeneous computing platforms are gaining increasing attention due to their superior performance and energy efficiency in handling high-performance computing tasks. Heterogeneous computing environments combine different types of computing nodes, such as CPUs, GPUs, and FPGAs, to provide more flexible and efficient computing capabilities. However, effectively managing and scheduling computing tasks in these complex environments has become a challenge, especially when faced with the diverse computational requirements of various tasks and the characteristics of different computing nodes.

[0003] Traditional task scheduling algorithms often fail to fully utilize the performance of heterogeneous computing platforms because they do not adequately consider the platform's heterogeneity and the dependencies between tasks. Therefore, developing an efficient algorithm to optimize task scheduling on heterogeneous computing platforms is of great significance for improving computing resource utilization and overall system performance. Summary of the Invention

[0004] This application provides a task scheduling method, apparatus, storage medium, and electronic device to at least solve the above-mentioned technical problems existing in the prior art.

[0005] The technical solution of this application embodiment is implemented as follows:

[0006] In a first aspect, embodiments of this application provide a task scheduling method, the method comprising:

[0007] Based on the computing task status required to be processed by the heterogeneous computing system, a task heterogeneity graph is constructed. The task heterogeneity graph is used to record the task information required to be processed by the heterogeneous computing system. The heterogeneous computing system includes multiple types of computing nodes.

[0008] Based on the device status of the heterogeneous computing system, a device status heterogeneity diagram is constructed; the device status heterogeneity diagram is used to record the real-time status of different computing nodes in the heterogeneous computing system.

[0009] Extract the first feature of the task heterogeneity graph and the second feature of the device state heterogeneity graph, and concatenate the first feature and the second feature to obtain the system feature;

[0010] Based on the system characteristics, the task type is determined to obtain a determination result, which is either computationally intensive or communication-intensive.

[0011] A strategy is selected based on the discrimination result, and the priority order of task nodes is determined based on the selected strategy; the selected strategy is either the first strategy or the second strategy.

[0012] A first task allocation scheme is generated according to the priority order, and multiple second task allocation schemes are generated based on the first task allocation scheme.

[0013] At least one round of iterative operations is performed based on the first task allocation scheme and the plurality of second task allocation schemes to obtain the target task allocation scheme; the iterative operations are used to adjust each task allocation scheme to obtain the target task allocation scheme.

[0014] Secondly, embodiments of this application provide a task scheduling apparatus, the apparatus comprising:

[0015] The first processing module is used to construct a task heterogeneity graph based on the computing task status required to be processed by the heterogeneous computing system. The task heterogeneity graph is used to record the task information required to be processed by the heterogeneous computing system. The heterogeneous computing system includes multiple types of computing nodes.

[0016] The second processing module is used to construct a device state heterogeneity graph based on the device status of the heterogeneous computing system; the device state heterogeneity graph is used to record the real-time status of different computing nodes in the heterogeneous computing system.

[0017] The third processing module is used to extract the first feature of the task heterogeneity graph and the second feature of the device state heterogeneity graph, and to concatenate the first feature and the second feature to obtain the system feature.

[0018] The fourth processing module is used to determine the task type based on the system characteristics and obtain a determination result, wherein the determination result is either computationally intensive or communication-intensive.

[0019] The fifth processing module is used to select a strategy based on the discrimination result and determine the priority order of task nodes based on the selected strategy; the selected strategy is either the first strategy or the second strategy.

[0020] The sixth processing module is used to generate a first task allocation scheme according to the priority order, generate multiple second task allocation schemes according to the first task allocation scheme, and perform at least one round of iterative operation according to the first task allocation scheme and the multiple second task allocation schemes to obtain a target task allocation scheme; the iterative operation is used to adjust each task allocation scheme to obtain the target task allocation scheme.

[0021] Thirdly, embodiments of this application provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the task scheduling method.

[0022] Fourthly, embodiments of this application provide a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the task scheduling method.

[0023] The embodiments of this application have the following beneficial effects:

[0024] The task scheduling method, apparatus, storage medium, and electronic device provided in this application include: constructing a task heterogeneity graph based on the state of computing tasks to be processed by the heterogeneous computing system, wherein the task heterogeneity graph is used to record task information to be processed by the heterogeneous computing system; the heterogeneous computing system includes multiple types of computing nodes; constructing a device state heterogeneity graph based on the device state of the heterogeneous computing system; the device state heterogeneity graph is used to record the real-time state of different computing nodes in the heterogeneous computing system; extracting a first feature of the task heterogeneity graph and a second feature of the device state heterogeneity graph, and concatenating the first feature and the second feature to obtain system features; Based on the system characteristics, task types are determined to obtain a determination result, which is either computationally intensive or communication-intensive. A strategy is selected based on the determination result, and the priority order of task nodes is determined according to the selected strategy. The selected strategy is either a first strategy or a second strategy. A first task allocation scheme is generated according to the priority order, and multiple second task allocation schemes are generated based on the first task allocation scheme. At least one round of iteration is performed based on the first task allocation scheme and the multiple second task allocation schemes to obtain a target task allocation scheme. The iteration operation is used to adjust each task allocation scheme to obtain the target task allocation scheme. Thus, by constructing a task heterogeneity graph and a device state heterogeneity graph, updating computing nodes in real time, and dynamically aggregating global resource features using a graph convolutional network, changes in computing nodes are captured in real time, enabling precise matching of task allocation with the current resource state and improving resource utilization. By determining the task type and using the first or second strategy to determine the priority of task allocation, the accuracy of matching task type with device characteristics is improved.

[0025] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description

[0026] Figure 1 A flowchart illustrating a task scheduling method provided in an embodiment of this application;

[0027] Figure 2 A schematic diagram of a task heterogeneity graph provided for an application embodiment of this application;

[0028] Figure 3 A schematic diagram illustrating the extraction of a first feature from a task heterogeneous graph, provided as an application embodiment of this application;

[0029] Figure 4 A schematic diagram of a device state heterogeneity diagram provided for an application embodiment of this application;

[0030] Figure 5 This is a schematic diagram of the structure of a task scheduling device provided in an embodiment of this application;

[0031] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0032] To make the objectives, features, and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0033] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0034] If the application documents contain similar descriptions such as "first / second", the following explanation shall be added: In the following description, the terms "first / second / third" are used only to distinguish similar objects and do not represent a specific order of objects. It is understood that "first / second / third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0036] Figure 1This is a flowchart illustrating a task scheduling method provided in an embodiment of this application, as shown below. Figure 1 As shown, the method is applied to an electronic device, and the task scheduling method includes:

[0037] Step 101: Based on the computing task status required by the heterogeneous computing system, construct a task heterogeneity graph. The task heterogeneity graph is used to record the task information required by the heterogeneous computing system. The heterogeneous computing system includes multiple types of computing nodes.

[0038] Step 102: Construct a device state heterogeneity diagram based on the device status of the heterogeneous computing system; the device state heterogeneity diagram is used to record the real-time status of different computing nodes in the heterogeneous computing system.

[0039] Step 103: Extract the first feature of the task heterogeneity graph and the second feature of the device state heterogeneity graph, and concatenate the first feature and the second feature to obtain the system feature;

[0040] Step 104: Based on the system characteristics, determine the task type and obtain the determination result, which is either computationally intensive or communication-intensive.

[0041] Step 105: Select a strategy based on the discrimination result, and determine the priority order of tasks based on the selected strategy; the selected strategy is either the first strategy or the second strategy.

[0042] Step 106: Generate a first task allocation scheme according to the priority order, and generate multiple second task allocation schemes based on the first task allocation scheme;

[0043] Step 107: Perform at least one round of iterative operations according to the first task allocation scheme and the plurality of second task allocation schemes to obtain the target task allocation scheme; the iterative operations are used to adjust each task allocation scheme to obtain the target task allocation scheme.

[0044] Here, heterogeneous computing systems include various types of computing nodes; the computing nodes can also be described as computing units, computing nodes, processing devices, processors, etc.

[0045] The computing node can be at least one of the following types: central processing unit (CPU), graphics processing unit (GPU), neural network processing unit (NPU), tensor processing unit (TPU), data processing unit (DPU), application-specific integrated circuit (ASIC), or field-programmable gate array (FPGA), etc. Of course, other types of computing nodes are also possible, which will not be listed here.

[0046] In some embodiments, the task heterogeneity graph is used to record task information that the heterogeneous computing system needs to process, specifically the real-time task status of each task. Specifically, the information recorded by the task heterogeneity graph includes at least one of the following:

[0047] The set of tasks, the task execution dependencies between tasks, the set of task computation volume, the set of task communication volume, the set of task computation preferences, the set of all computing nodes of the heterogeneous computing system, the current remaining memory of the heterogeneous computing system, and the current set of interconnect bandwidth of all computing nodes of the heterogeneous computing system.

[0048] For example, the task heterogeneity graph is used to record at least one of the following information:

[0049] , represents a set of tasks; here, the number of tasks the system needs to process can be one or more, for example, a project or function needs to consist of multiple tasks, which can be assigned to different computing nodes. Here, n represents the total number of tasks.

[0050] This indicates the dependency relationship between tasks in terms of task execution. For example, in an image recognition project, featureization is required first to construct an image vector, and then the vector is input into a classifier for classification. Featureization and classification are two separate tasks that are processed sequentially, and this is called a dependency relationship.

[0051] , represents the set of computational costs for each task; here, the computational cost is different for each task. For example, the above-mentioned feature-based task corresponds to one computational cost, and the classification task corresponds to another computational cost.

[0052] , representing the set of communication traffic for a task; here, data needs to be transferred between the processing of each task. For example, after the image is normalized, it needs to be passed to the computing node to execute the subsequent processing of the next task. The normalized processing result is the communication traffic of a task.

[0053] , represents the set of computational preferences for the task; here, computational preference can refer to which type of computing node to use for computation. For example, its value can be {0, 1, 2, 3}, where 0 represents CPU, 1 represents GPU, 2 represents FPGA, and 3 represents other types of computing devices such as GPU. The earlier the value is in the order, the more suitable it is for the task.

[0054] , represents the set of all computing nodes in a heterogeneous computing system, including CPUs, GPUs, FPGAs, etc.; m represents the total number of computing nodes;

[0055] , representing the current remaining memory of each computing node in the heterogeneous computing system; where m, as a subscript, indicates the quantity. The value in represents the remaining memory of the m-th computing node;

[0056] , representing the current set of interconnect bandwidth for each computing node in a heterogeneous computing system.

[0057] like Figure 2 As shown, this is a schematic diagram of a task heterogeneity graph; Figure 2 This describes a task scheduling relationship in a heterogeneous computing system. For a given task, it is split into seven tasks: V1, V2, V3, V4, V5, V6, and V7. Directed edges represent the execution dependencies between tasks, such as the dependency between V1 and V2 (denoted as e). 12 There are dependencies between V2 and V5, and between V5 and V7, which will not be listed here. Task V1 is the entry task. The computational characteristics of task V1 help determine how the task should be processed in the heterogeneous system, including: the computational load, communication load, and computational preferences of task V1 (referring to each task's preference for different computing resources, such as CPU, GPU, FPGA).

[0058] Each task in the diagram is called a task node, and each task node records the computational characteristics of that task. For example, the computational characteristics recorded in V1 in the diagram include: c1 (representing computational complexity), t 12 + t 13 + t 14(represents the communication volume with task V2 + communication volume with task V3 + communication volume with task V4), y1 (represents computational preference). Additionally, each task also has its own computational characteristics, which are not all shown in the diagram.

[0059] In some embodiments, the task heterogeneous graph includes: a feature matrix and an adjacency matrix;

[0060] The step of constructing a task heterogeneity graph based on the computing task states required by the heterogeneous computing system includes:

[0061] Based on the task information to be processed by the heterogeneous computing system, a feature matrix and an adjacency matrix are constructed. The feature matrix is ​​used to characterize the computational characteristics of each task node; the adjacency matrix is ​​used to characterize the dependencies between task nodes.

[0062] Calculate the degree of each task node based on the adjacency matrix, and determine the degree matrix based on the degree of each task node;

[0063] The adjacency matrix is ​​normalized using the degree matrix to obtain the processed adjacency matrix.

[0064] Here, by creating a task heterogeneous graph, the task scheduling relationship is represented in a way that graph neural networks can handle. The adjacency matrix (denoted as A) can be used to represent the connection relationship between tasks, and the feature matrix (denoted as X) can be used to represent the characteristics of each task (such as computational load, communication load, and computational preference).

[0065] By combining the two matrices, a structured representation of the graph can be effectively achieved, enabling each task node in the graph neural network to obtain information from its neighboring nodes and gradually learn the deep representation of the task node through multi-layer processing.

[0066] In some embodiments, the step of identifying the task heterogeneous graph using a task heterogeneous graph network to obtain the first feature includes:

[0067] The graph neural network is used to propagate features of the heterogeneous task graph, update the features of each task node in the heterogeneous task graph layer by layer, and introduce the dependencies between tasks into the features of the task nodes to obtain the updated feature vector of the task nodes.

[0068] Aggregate and update the feature vectors of all the task nodes;

[0069] Determine the local contribution of each task node; the local contribution is determined based on at least one of the degree centrality, proximity centrality, and betweenness centrality of the task node.

[0070] Based on the dependencies between task nodes, the feature vectors of all task nodes are sorted according to their local contribution.

[0071] The feature vectors of all sorted task nodes are input into a Long Short-Term Memory (LSTM) network, and the first feature of the task heterogeneous graph is obtained based on the LSTM.

[0072] Here, the temporal dependencies between tasks and the impact of the critical path on the overall execution time are considered. For example, if task V1→V2→V5→V7 constitutes the critical path, but V2 is assigned to a low-performance CPU, it will cause subsequent tasks to be collectively delayed. This application proposes a task heterogeneous graph, quantifies the influence of nodes through a centrality index, and designs an LSTM network to extract temporal dependency features, prioritizing the allocation of high-performance devices to critical path tasks, which can significantly shorten the overall task completion time (by 15%-25%).

[0073] Specifically, the following combination Figure 3 Provide detailed instructions on the construction of the task heterogeneity graph and the extraction of the first feature. The specific steps include:

[0074] Step 1: Construct the feature matrix X: for each task node Construct a vector of its computational features. The vector can include one-hot encoding of computational cost, communication cost, and computational preference. If there are n tasks, then the feature matrix X is a... The matrix is ​​given by n and m, where n and m represent the quantity, m is the dimension of the feature of each task node, and m represents the feature length of the task's computational cost, communication cost, and computational preference.

[0075] Step 2: Construct the adjacency matrix A: For each pair of task nodes with a dependency relationship, for the dependency relationship... Set in adjacency matrix A If there is no dependency, 0. Because a directed graph is constructed, A is not symmetric.

[0076] Step 3: Calculate the degree matrix D: For each task node Calculate its degree based on the adjacency matrix A. (i.e., from the task node) The number of edges pointing to other tasks is calculated, and a degree matrix D is constructed on the diagonal based on the calculated degree.

[0077] Step 4: Calculate the normalized adjacency matrix Normalize the adjacency matrix A using the degree matrix D to obtain: , where I is the identity matrix.

[0078] Step 5, Feature Propagation: Based on the normalized adjacency matrix The task node features are updated using a graph neural network (specifically, a graph convolutional layer) according to the following formula:

[0079]

[0080] Wherein, the first layer H is denoted as , This is the normalized adjacency matrix. Let be the weight matrix of the l-th layer. It is an activation function, such as ReLU.

[0081] Step 6, Recursive Feature Propagation: For l=1,2,…,L, repeatedly apply the feature propagation step (i.e., step 5) to learn deeper node features and obtain the feature propagation result of the i-th task node. L represents the total number of layers. After feature propagation, the connections between task nodes remain unchanged, but the features of each task node are updated.

[0082] Step 7: Aggregate the features of all task nodes to obtain the temporally joint graph features; here, an output function R is defined to aggregate the feature vectors of all task nodes and obtain the representation of the entire task heterogeneous graph: Where R is the temporally coupled graph feature output function.

[0083] Step 8: Determine the local contribution of each task node; the local contribution can be defined as its importance in the graph structure and connectivity, and is usually related to the centrality of the nodes in the graph. For example, the "centrality" metric can be used to reflect the importance of a node in the entire network.

[0084] Specifically, the local contribution of each node is determined, including:

[0085] Compute task node V i Degree centrality : ;

[0086] Degree centrality represents the number of direct neighbor nodes of a task node. For task nodes The corresponding feature vector; It is a task node The total number of neighboring nodes, This represents the total number of task nodes.

[0087] Compute task node V i proximity centrality : ;

[0088] Closeness centrality measures the average distance from a task node to all other task nodes in the graph. It is a task node eigenvectors To the task node eigenvectors The shortest path length.

[0089] Compute node V i betweenness centrality :

[0090] Betweenness centrality represents the frequency with which a task node appears on the shortest path between all pairs of task nodes. It is a task node To the task node The number of all shortest paths, It is through the task node The number of paths.

[0091] The local contribution index is determined based on at least one of degree centrality, proximity centrality, and betweenness centrality. The determination method may be to select one based on graph characteristics, or to take the median value of degree centrality, proximity centrality, and betweenness centrality, etc.

[0092] Step 9: Sort the feature vectors of each task node according to their local contribution to further mine graph logical connection information.

[0093] The sorting method can employ a temporal dependency sorting approach to identify the temporal dependencies of each task node (this may require pre-timestamping each node or defining the node order according to specific rules). Since V1 is the entry node, the access order of each node is determined starting from V1 and following the directed edges. The specific process is as follows:

[0094] 1) Establish a dependency list: For each task node V i Create a dependency list D i This list includes all direct references to V. i The node (i.e., V) i (direct predecessor node).

[0095] 2) Determine the temporal hierarchy of each task node: Starting from the entry node (e.g., V1), determine the temporal hierarchy of each node, i.e., which nodes must be completed before the computation of the current node can begin. The entry node has the lowest temporal hierarchy, usually 0.

[0096] 3) Use breadth-first search (BFS) to traverse the graph and update the temporal hierarchy of each task node.

[0097] 4) Collect peer nodes: Some task nodes are in the same time sequence level. All task nodes in the same time sequence level can be regarded as peer nodes. Collect each peer node to form a peer node set.

[0098] 5) Output a set of peer nodes: For each time series level, output a set of nodes, and the task nodes in these sets are peer nodes.

[0099] 6) Calculate the centrality metric: Calculate the centrality metric for each task node in the graph. For example, betweenness centrality can be chosen. This serves as the basis for sorting, so as to better reflect the influence of nodes in the entire graph.

[0100] 7) Sort peer nodes: For each group of peer task nodes, sort them according to the centrality index of each task node, and put the node with higher centrality first.

[0101] 8) Generate a sorted sequence: Nodes sorted by time dependency and peer nodes sorted by centrality are combined into a complete sorted sequence.

[0102] This sorted sequence will be input into a feature encoding network for sequence feature encoding. The sequence feature encoding consists of... ,in, , This represents the Q task nodes in the sorted sequence (the actual number is the same as the number of tasks), and ins represents the feature encoding.

[0103] Step 10, Sequence Feature Encoding: The sorted sequence of task nodes is input into the sequence feature encoding network (specifically, a Long Short-Term Memory network (LSTM)) to extract graph features from the entry point V1 to the exit point V7.

[0104] For example, BiLSTM (Bidirectional Long Short-Term Memory Neural Network) can be used to extract dependency features from all sorted nodes. The formula is as follows:

[0105] ,

[0106] The left and right arrows represent the directions of LSTM encoding, i.e., the forward and reverse encoding of node dependency features. This represents the output of the q-th unit in the BiLSTM. Different arrow directions indicate forward and backward feature aggregation according to the node sorting order, resulting in BiLSTM encoded outputs in different directions. Similarly, This represents the output of the (q-1)th unit in the BiLSTM, which is also the output of the previous node state.

[0107] Assume the sorted sequence dependency features have Q steps. This represents the feature of the q-th node in the T-th layer of the graph neural network. Following the order and reverse order of the generated sorted sequence information, these features are sequentially input into their corresponding BiLSTM networks, ultimately yielding the BiLSTM encodings of all task nodes, as shown in the following formula: .

[0108] In some embodiments, the information recorded in the device state heterogeneity graph includes at least one of the following: the state of all computing nodes in the heterogeneous computing system, and the connection relationships and communication rates between computing nodes.

[0109] Here, the nodes in the device state heterogeneity graph represent computing nodes (denoted as...). The state of each computing node can be represented as a vector, which contains the state information of the computing node, such as CPU utilization and memory usage.

[0110] In some embodiments, the device state heterogeneity graph includes: an adjacency matrix and a feature matrix;

[0111] Based on the device states of the heterogeneous computing system, a device state heterogeneity diagram is constructed, including:

[0112] Based on the device status of the heterogeneous computing system, a feature matrix and an adjacency matrix are constructed. The feature matrix is ​​used to characterize the state characteristics of each computing node; the adjacency matrix is ​​used to characterize the connection relationship and / or communication rate between computing nodes.

[0113] The degree of each computing node is calculated based on the adjacency matrix, and the degree matrix is ​​determined based on the degree of each computing node.

[0114] The adjacency matrix is ​​normalized using the degree matrix to obtain the processed adjacency matrix.

[0115] Here, each edge in the device state heterogeneous graph This indicates a connection between two computing nodes, and the communication rate can be represented by weights. To indicate;

[0116] An adjacency matrix (denoted as A) can be used to represent the connections between all computing nodes using an N×N matrix, where N is the number of computing nodes. If the computing nodes... and computing nodes If there is direct communication between them, then ,otherwise, .

[0117] The state vectors of each computing node can be set into a feature matrix (denoted as X), where each row corresponds to the state vector of a computing node.

[0118] like Figure 4 As shown, a schematic diagram of a device state heterogeneity diagram is provided, such as... Figure 4 As shown, the device state heterogeneity diagram is used to record the real-time state of different computing nodes. The state includes each computing node (e.g., P1, P2, P3, P4) and the connection relationships between computing nodes (e.g., b0, b1, b2, ... b...). 11 Each compute node contains its status information (such as M1, M2, M3, M4), including CPU utilization and memory usage. The device status heterogeneity diagram represents the current compute load and resource utilization, as well as optimizations for task scheduling and resource allocation.

[0119] In some embodiments, the device state heterogeneity graph is identified using a device state heterogeneity graph network to obtain the second feature, including:

[0120] The device state heterogeneous graph is subjected to feature aggregation at least one layer using graph convolutional networks (GCNs) to obtain the feature aggregation results for each layer.

[0121] Based on the feature aggregation results of each layer, calculate the average value of the feature vector of each computing node;

[0122] The average value of the feature vectors of each computing node is aggregated to obtain the second feature of the device state heterogeneity graph.

[0123] This involves using graph neural networks to aggregate features at each layer, including:

[0124] Based on the feature matrix and the adjacency matrix, the feature vectors of all neighboring nodes are aggregated to obtain the feature vector of each computing node; feature transformation and nonlinear activation are performed on the feature vector of each computing node to obtain the processed feature vector of each computing node.

[0125] Here, a graph neural network is used in both the task heterogeneous graph network and the device state heterogeneous graph network. The structure, design, and training of the two graph neural networks can be the same or different. They can be used for feature propagation or feature aggregation. There is no restriction on the specific graph neural network used.

[0126] Here, considering that traditional methods rely on static task partitioning rules, they cannot perceive the real-time status of processors (such as CPUs, GPUs, and FPGAs) (e.g., memory usage, load fluctuations, and interconnect bandwidth changes). For example, when the GPU load suddenly increases to 90%, the static strategy still allocates tasks according to the preset rules, leading to resource contention and latency. This application constructs a heterogeneous device state graph, updates the node state every 5 seconds, and combines it with a graph convolutional network (GCN) to dynamically aggregate global resource features, capturing device changes in real time. This enables task allocation to accurately match the current resource state, greatly improving resource utilization (approximately 30%-50%).

[0127] Specifically, the device state heterogeneity diagram can be represented as: G = (V, E, A, X).

[0128] Where V represents the set of computing nodes, corresponding to each computing node in the graph. , E is the set of edges, corresponding to each edge in the graph. , This represents the directed edges from the source computation node to the target computation node and their corresponding weights. As the source node, For the destination node, The values ​​represent weights. A is the adjacency matrix, which defines the connections between computing nodes and their communication rates. X is the feature matrix, where each row corresponds to the state vector of a computing node.

[0129] Furthermore, a degree matrix D is defined to represent the connectivity of each computation node. The degree matrix D is a diagonal matrix whose diagonal elements are... It is a computing node The sum of the out-degrees, i.e. .

[0130] Normalization is performed based on the degree matrix: When processing directed graphs, the in-degree matrix D is calculated, and the adjacency matrix is ​​normalized using the degree matrix. This allows for a balance in the total amount of information during the dissemination process.

[0131] The following section provides a detailed explanation of extracting the second feature using a device state heterogeneity graph. This may include:

[0132] 1) Aggregate neighbor information: For each computing node Graph Neural Networks (GCNs) aggregate the feature vectors of all their neighboring nodes. This is typically achieved by weighting the feature vectors of the neighboring nodes, with the weights determined by the edge weights. For computation nodes... Its updated feature vector It can be calculated as:

[0133]

[0134] in, It is a non-linear activation function. It is a learnable weight matrix. It is a computing node The degree, It is a computing node and The connection weight between them can be 0 (if there is no connection) or the communication rate.

[0135] 2) Feature transformation: The feature vectors of the computed nodes may be further processed through a linear transformation, usually by multiplying them by a learnable weight matrix.

[0136] 3) Nonlinear activation: After feature transformation, nonlinear activation functions can be applied to increase the expressive power of the model. Common activation functions include ReLU, tanh, etc.

[0137] 4) Hierarchical processing: In actual GCN models, the above process can be performed in multiple layers, with each layer capturing different feature abstractions and complex relationships between computation nodes.

[0138] 5) Use a global average aggregation method to achieve global aggregation of device status diagram features:

[0139] Calculate the average of the feature vectors of all computation nodes, if If the output feature of the i-th compute node in the last layer of the GCN is the second feature of the device state heterogeneity graph. It could be:

[0140] .

[0141] By extracting features from the device state graph and task heterogeneity graph, this application extracts feature vectors from both. The device state graph includes features such as CPU load, memory usage, and communication rate, while the task heterogeneity graph includes features such as dependencies between tasks and resource requirements of tasks. These features are then concatenated. These are called system characteristics.

[0142] In some embodiments, extracting a first feature of the task heterogeneity graph and a second feature of the device state heterogeneity graph includes:

[0143] The first feature is obtained by identifying the task heterogeneous graph using a task heterogeneous graph network.

[0144] The second feature is obtained by identifying the device state heterogeneity graph using a device state heterogeneity graph network;

[0145] The step of determining the task type based on the system characteristics and obtaining the determination result includes: using a task classification network to identify the system characteristics and obtaining the determination result.

[0146] The task heterogeneous graph network, device state heterogeneous graph network, and task classification network can be pre-trained. Training methods may include:

[0147] Step 1: Construct the dataset; specifically including:

[0148] The above method is used to extract global features from the device state heterogeneity graph and the task heterogeneity graph (specifically, for each device or task, an execution graph neural network can be used to obtain node-level features, and then a summarization layer can be used to obtain graph-level global features).

[0149] The global features of the device state heterogeneity graph and the global features of the task heterogeneity graph are concatenated to form a system feature vector;

[0150] Based on the actual operation of the system, a label is assigned to each system feature vector, which is either computationally intensive or task-intensive.

[0151] The dataset is divided into training, validation, and test sets, with a common ratio of 70% training set, 15% validation set, and 15% test set.

[0152] Step 2, Model Design: The system features are processed through two fully connected layers. The number of neurons in the last fully connected layer is set to two to enable the identification of computationally intensive and task-intensive system features.

[0153] Step 3: Train the neural network; specifically including:

[0154] 1. Optimizer and Loss Function: Choose an appropriate optimizer, such as Adam or SGD. For classification problems, use a loss function such as cross-entropy.

[0155] 2. Hyperparameter tuning:

[0156] By adjusting the network's hyperparameters, including learning rate and batch size, using a validation set, the training of the two graph neural networks (i.e., the task heterogeneous graph network and the device state heterogeneous graph network) and the fully connected network for system feature judgment (i.e., the task classification network) is completed. Through these steps, an effective system feature judgment network is constructed, integrating three networks: the task heterogeneous graph network, the device state heterogeneous graph network, and the task classification network. The network is trained using a self-built dataset. During inference, system features of real-time tasks are collected to determine whether a task is computationally intensive or communication-intensive.

[0157] In practical applications, the above-mentioned task heterogeneous graph network and device state heterogeneous graph network are used to extract features from the device state heterogeneous graph and task heterogeneous graph, and the task classification network is used to determine the task type of the real-time task under the current device state.

[0158] In some embodiments, selecting a strategy based on the discrimination result and determining the priority order of task nodes based on the selected strategy includes:

[0159] If the discrimination result is communication intensive, the first strategy is selected, and the first strategy is to determine the priority order based on the average computing time and communication overhead.

[0160] If the discrimination result is computationally intensive, the second strategy is selected, which determines the priority order based on the average computation time and the standard deviation of computation cost.

[0161] The priority of each task node is calculated based on the selected strategy, and the task nodes are sorted according to their priorities to obtain the priority order of the task nodes.

[0162] Here, the heterogeneous task graph is divided into computationally intensive or communication-intensive tasks.

[0163] For communication-intensive tasks, the priority calculation for each task mainly considers: task Its own costs (as follows) ), Longest subsequent path cost (as follows) Structural importance costs (as follows) ).

[0164] The priority calculation formula for the first strategy is as follows:

[0165] +

[0166] in, Represents task node Priority; For task nodes The average computation time across multiple computing nodes (this value can be estimated based on the status of the computing nodes, the task content, and the amount of task data; multiple computing nodes can refer to multiple random nodes or all computing nodes, which is not limited here). Represents task nodes There is a prerequisite dependency (i.e., completion) A set of task nodes that can only be executed after the task node is completed; For task nodes and task nodes Communication overhead between tasks (communication overhead can be determined and recorded when tasks are split). Represents task node Degree centrality; Represents task node Betweenness centrality; Represents task node The proximity centrality.

[0167] The above formula enables the priority of communication-intensive task nodes to be mainly determined by average computing time and communication overhead. Here, it is considered that task nodes with high communication requirements should be given higher priority so that they can be allocated to high-bandwidth links first.

[0168] Here, for computationally intensive tasks, the calculation of task allocation priorities mainly considers: computational cost and maximum communication bottleneck (as follows). The most crucial follow-up tasks (as follows) Local connectivity (as follows) At the same time, by introducing This is to better identify and prioritize tasks that maximize the advantages of heterogeneous computing.

[0169] The priority calculation formula for the second strategy is as follows:

[0170] +

[0171] in, Represents task node priority, For task nodes Average computation time across multiple computing nodes; For task nodes The standard deviation of computation cost across multiple processors (computation cost can be resource consumption or energy consumption, and this value can be estimated based on the state of the computing nodes, the task content, and the amount of task data; multiple computing nodes can refer to multiple random nodes or all computing nodes, without limitation here). Using the standard deviation of computation cost, a sorting method suitable for computationally intensive tasks can be obtained, and the result of sorting the tasks in descending order of their ordinal values ​​will be used as the final scheduling order. For task nodes and task nodes Inter-communication overhead; Represents task nodes A set of task nodes that have prerequisite dependencies; Represents task node Degree centrality.

[0172] The above formula enables the priority of computationally intensive tasks to be determined primarily by the average computation time and the standard deviation of computation cost. This is because the standard deviation can reflect the differences in execution time of tasks on different processors, and the system will prioritize tasks that perform better on a specific processor.

[0173] The formula for calculating degree centrality is as follows:

[0174] ,in, For task nodes The corresponding feature vector, It is a task node The total number of neighboring task nodes, The total number of task nodes;

[0175] The formula for calculating the betweenness centrality is as follows:

[0176] ,in, For task nodes To the task node The number of all shortest paths, For passing through task nodes The number of paths;

[0177] The formula for calculating proximity centrality is as follows:

[0178] ,in, For task nodes eigenvectors To the task node eigenvectors The shortest path length.

[0179] Here, considering the different resource requirements of different tasks, a uniform allocation strategy cannot achieve reasonable allocation. For example, if a communication-intensive task is incorrectly allocated to a high-performance but low-bandwidth FPGA, it will affect processing efficiency. This application introduces a dynamic task priority sorting function to match computationally stable devices (such as GPUs) for computationally intensive tasks and to prioritize high-bandwidth nodes (such as interconnected GPU clusters) for communication-intensive tasks, thereby improving FPGA allocation efficiency by 20%-40% and reducing inter-GPU communication latency by 35%.

[0180] In some embodiments, generating a first task allocation scheme according to the priority order includes:

[0181] Based on the priority order, with the goal of completing the task as quickly as possible, computing nodes are assigned to each task node in sequence.

[0182] Here, a task node in the task heterogeneity graph actually represents a task, and a computing node in the device state heterogeneity graph actually represents a computing unit or processor. Therefore, allocating a computing node to each task node means assigning the task to the corresponding computing unit or processor.

[0183] For any of the above task types, the calculation is as follows: (That is, obtaining the priority order of the tasks, which indicates which task should be considered first), thus obtaining a sorted task list. Then, using a greedy strategy, an initial scheme with the highest current quality can be generated based on the task list, namely the first task allocation scheme. Specifically, the first task allocation scheme is generated by assigning each task to the computing node that can "complete it the fastest" according to its priority.

[0184] In some embodiments, generating multiple second task allocation schemes based on the first task allocation scheme includes:

[0185] The first task allocation scheme is fine-tuned to obtain the optimal candidate scheme, the following scheme, and the warning scheme corresponding to the first task allocation scheme, which are used as the plurality of second task allocation schemes.

[0186] Here, the first task allocation scheme is taken as the initial optimal scheme for subsequent schemes (such as the second task allocation scheme). Subsequent methods can be generated by adding some random perturbations based on it, thereby ensuring the quality of the entire initial population.

[0187] Thus, by prioritizing the generation of solutions, the convergence speed of the algorithm is greatly accelerated, enabling it to find excellent solutions (i.e., optimal target task solutions) more quickly.

[0188] In some embodiments, the first round of iteration includes:

[0189] Each scheme is evaluated using a scheduling simulator to obtain an evaluation result for each scheme; wherein, the scheme is either a first task allocation scheme or a second task allocation scheme; the evaluation result is related to the load balancing index and scheduling length of the task allocation scheme;

[0190] Based on the evaluation results of each scheme, select the optimal scheme for the current round of iteration.

[0191] In some embodiments, the iterative operations from the second round to the last round include:

[0192] Fine-tune the optimal solution obtained in the previous iteration to obtain the optimal candidate solution, the following solution, and the warning solution corresponding to the optimal solution.

[0193] Each scheme is evaluated using the scheduling simulator to obtain an evaluation result for each scheme; wherein, the scheme is the optimal candidate scheme, the following scheme, or the alert scheme;

[0194] Based on the evaluation results of each scheme, select the optimal scheme for the current round of iteration.

[0195] Determine whether the iteration termination adjustment has been reached. If the iteration termination condition has been met, determine the optimal solution as the target task allocation solution.

[0196] If the iteration termination condition is not met, proceed to the next iteration.

[0197] In some embodiments, the optimal solution obtained from the previous iteration is fine-tuned to obtain the optimal candidate solution, the following solution, and the warning solution corresponding to the optimal solution, including:

[0198] Based on the task dependency relationship of the task heterogeneous graph, the task nodes are layered to obtain the layering result; in the layering result, task nodes in the same layer have no dependency relationship, and task nodes with a prerequisite dependency relationship belong to the same layer.

[0199] Based on the principle of fine-tuning only the lowest-level task nodes, the optimal solution is fine-tuned to obtain the optimal candidate solution;

[0200] Based on the principle of fine-tuning only the task nodes in the intermediate layer, the optimal solution is fine-tuned to obtain the following solution;

[0201] Based on the principle of only fine-tuning the upper-level task nodes, the optimal solution is fine-tuned to obtain the warning solution.

[0202] To obtain the optimal task allocation scheme (i.e., the target task allocation scheme), this application proposes a dynamic cooperative allocation and scheduling method based on elite iteration and multi-strategy perturbation. The core idea of ​​this method is: starting from a high-quality initial allocation scheme (i.e., the first task allocation scheme), in each iteration, a set of new candidate schemes (i.e., multiple second task allocation schemes) are generated around the currently found optimal scheme through three perturbation strategies of different levels and magnitudes. Then, these candidate schemes are evaluated, a new optimal scheme is selected, and the scheme is compared and updated with the historical optimal scheme. This process is repeated until a final solution that meets the requirements is found.

[0203] The above method of fine-tuning the first task allocation scheme to obtain the optimal candidate scheme, follow-up scheme, and warning scheme corresponding to the first task allocation scheme is the same as the method of fine-tuning the optimal scheme obtained in the previous iteration to obtain the optimal candidate scheme, follow-up scheme, and warning scheme corresponding to the optimal scheme, and will not be repeated here.

[0204] Here, this application uses a designed normalized fitness function, combined with the scheduling length (makespan) and load balancing index (pld), to generate a three-level allocation scheme of "optimal-follow-alert" through the Sparrow Search Algorithm (SSA). This achieves Pareto optimality of task completion time and load balancing in 5G edge computing scenarios, improving the overall system performance by 25%-30%.

[0205] In addition, this application can also detect task insertion or device abnormalities (such as GPU memory overflow) in real time through a dynamic collaborative allocation mechanism, trigger an alert scheme to reallocate tasks within 50ms, and predict resource bottlenecks by combining device status heterogeneity graphs, supporting millisecond-level adaptive adjustment, and shortening the task interruption recovery time to less than 200ms in smart city IoT scenarios.

[0206] The following example illustrates the steps to obtain the target task allocation scheme based on the first task allocation scheme:

[0207] Step 1: Based on the task heterogeneity graph or task dependency relationship, layer the task dependencies;

[0208] Here, based on the dependencies in the task heterogeneity graph, all tasks are topologically layered. Using a breadth-first search (BFS) algorithm, starting from the entry task (e.g., V1, level 1), all tasks are traversed and divided into different levels, for example... Figure 2 In this hierarchy, V1 belongs to the first layer, V2, V3, and V4 belong to the second layer, V5 and V6 belong to the third layer, and V7 belongs to the fourth layer (the bottom layer). Tasks within the same layer have no direct dependencies and can be executed in parallel. If the entire task graph is divided into N layers, then:

[0209] Level 1: Contains all entry tasks (tasks with an in-degree of 0); for example... Figure 2 V1 in the middle;

[0210] Level k: Contains all tasks whose direct predecessors are in level k-1 and earlier; for example, Figure 2 V2, V3, and V4 are the second layer; V5 and V6 are the third layer.

[0211] Level N: Contains all exit tasks (tasks with an out-degree of 0); for example... Figure 2 V7 in the middle.

[0212] Step 2: Perform at least one round of iterations;

[0213] Here, in each iteration, firstly, starting from the current optimal solution (such as the first task allocation solution or the optimal solution determined in each round of iteration), multiple new candidate solutions (let's call them z, where z can be a multiple of 3) are generated.

[0214] This z-scheme is a combination of the following three different generation strategies:

[0215] 1. Fine-tuning strategy for the optimal solution (Leader): This strategy aims to perform a fine-grained local search on the current optimal solution. Several copies of the current optimal solution are made, and each copy is modified as follows:

[0216] Adjustment range: Adjustments are only allowed at the lowest level of the task heterogeneous graph (e.g., the Nth and N-1th layers).

[0217] Adjustment range: Perform small-scale random redistribution of nodes within the range. For example, randomly select 5% to 10% of the tasks in these levels and redistribute them to different computing nodes.

[0218] 2. Follower-based regional exploration strategy: This strategy aims to simulate and improve the core structure of the current optimal solution for regional exploration. Several copies of the current optimal solution are made, and each copy is modified as follows:

[0219] Adjustment range: Adjustments can be made at intermediate levels of the task heterogeneity graph (e.g., from level L to level N-2).

[0220] Adjustment magnitude: Make a moderate adjustment to the node allocation. For example, randomly select 20% to 30% of the tasks within this range and allocate them according to the current optimal scheme or perform random reallocation.

[0221] 3. Global Search Strategy of the Scout Algorithm: This strategy aims to introduce high diversity by making radical changes to the early levels that are crucial for task scheduling, helping the algorithm escape local optima. Several copies of the current optimal solution are made, and each is modified as follows:

[0222] Adjustment scope: Mainly targets the upper or initial levels of the task heterogeneous graph (e.g., level 2 to level L-1).

[0223] Adjustment magnitude: Perform a high proportion of random redistribution. For example, randomly select 40% to 50% of the tasks within this range and distribute them completely randomly to new computing nodes.

[0224] Step 3: After obtaining multiple new candidate solutions, evaluate and update each candidate method, specifically including:

[0225] Fitness calculation: After generating all new candidate solutions, call the scheduling simulator to calculate the allocation priority function value (denoted as fitness(z)) for each solution.

[0226] Select the optimal allocation scheme for this generation of operations: From z candidate schemes, select the one with the smallest fitness value (optimal) as the optimal scheme for this iteration.

[0227] Update the historical best: Compare the current best solution with the historical best solution. If the current best solution has a lower fitness value, use it to update the historical best solution. The historical best solution only records the globally optimal solution discovered so far.

[0228] The current best solution is set as the new current best solution, serving as the starting point and template for the next iteration.

[0229] Step 4: Repeat steps 2 and 3 until any of the following conditions are met, at which point the algorithm terminates:

[0230] The maximum number of iterations, max_iter, has been reached.

[0231] The fitness value of the historically optimal solution did not improve significantly in consecutive iterations;

[0232] The fitness value of the historically optimal solution has reached or fallen below the preset target threshold.

[0233] Step 5: Output the final historical best solution, which is the optimal task allocation strategy under the current system state and task requirements.

[0234] Here, the scheduling simulator is used to evaluate each scheme, and the evaluation results for each scheme are obtained, including:

[0235] Calculate the load balancing index and scheduling duration for each scheme, and determine the allocation priority function value based on the load balancing index and scheduling duration as the evaluation result.

[0236] Specifically, the allocation priority function value (fitness) for each scheme The calculation process for ) is as follows:

[0237] = .

[0238] After obtaining the final allocation priority function value, sort it in descending order as the basis for task allocation in the z-th task allocation scheme.

[0239] Specifically, to address the issue of uneven load distribution among heterogeneous processors, this application's embodiments design an optimization objective based on the processor load balancing index (pld), calculated as follows:

[0240]

[0241] in, The cumulative number of tasks for the i-th computing node in the z-th scheme; The average number of tasks assigned to each computing node; p is the total number of computing nodes; the smaller the pld value, the better.

[0242] The ultimate goal of task scheduling algorithms is to minimize overall completion time, balance the load across processors, and shorten the scheduling length as much as possible. The formula for calculating the scheduling length (makespan) is:

[0243]

[0244] Here, EFT stands for Earliest Finish Time. This represents the earliest completion time of the exit task in the z-th task allocation scheme, and max(makespan) is the maximum value of the scheduling length in this iteration. The smaller the scheduling length value, the better.

[0245] This application uses a combination of scheduling length and processor load balancing index as the final allocation priority function, but the two values ​​differ significantly and therefore cannot be directly added. To ensure that they are at the same level of evaluation, normalization is first performed. The formula for calculating pld is:

[0246]

[0247] in, This represents the maximum value of the load balancing index in this iteration. This represents the load balancing index after normalization of the z-th task allocation scheme.

[0248] The formula for calculating makespan is:

[0249]

[0250] Where max(makespan) is the maximum scheduling length in this iteration, representing the normalized scheduling length of the z-th task allocation scheme.

[0251] Here, while adhering to the priority order, it is necessary to further determine which processor should execute each task to achieve the best overall performance. This application achieves this goal through a lightweight, ultra-fast "scheduling simulator" or "mathematical model." In each algorithm iteration, when the fitness value of a new scheme needs to be calculated, the system does not call the actual processor to execute the task, but instead calculates it through a mathematical simulation in memory.

[0252] The specific workflow of the scheduling simulator is as follows:

[0253] Input the following data into the scheduling simulator:

[0254] The first task allocation scheme, for example, [P2, P3, P5, ...], means that task 1 is assigned to P2, task 2 is assigned to P1, etc.

[0255] Task dependency graph (used to indicate task dependencies);

[0256] The estimated computation time of each task on each processor (a known two-dimensional table can be obtained in advance, where each element represents the time of task i on processor j).

[0257] Estimated communication time between computing nodes (known parameters that can be calculated in advance).

[0258] The simulation process of the scheduling simulator includes: virtually scheduling each task sequentially according to task dependencies; and calculating... .

[0259] The entire simulation process only involves table lookup, comparison, and addition operations; it does not involve any actual computational tasks. Calculating a scheme's... It may only take a few milliseconds or even less. Therefore, evaluation within one second allows the algorithm to explore a huge solution space in a short time, thereby finding a high-quality allocation scheme.

[0260] As shown above, the dynamic collaborative allocation and scheduling method of this application integrates hierarchical strategies and collaborative update rules to form a complete iterative optimization process until the optimal solution that meets the conditions is found.

[0261] The method provided in this application prioritizes tasks based on task type (communication-intensive or computation-intensive), considers dependencies between tasks to determine the states of critical task nodes and computing nodes, and finally uses an earliest completion time strategy and a computing node task allocation balancing strategy for dynamic processor allocation. To accurately implement this process, two heterogeneous graph networks are constructed: a task heterogeneous graph and a device state heterogeneous graph. Graph neural network technology is used to capture detailed information about computing devices in different states, thereby achieving optimal matching between tasks and resources. This method not only improves the efficiency of task scheduling and system efficiency but also enhances the scheduling system's responsiveness to changes in heterogeneous computing environments through the dynamic collaborative allocation scheduling method of this application, providing an efficient, dynamic, and intelligent solution for task scheduling on heterogeneous processing platforms.

[0262] Figure 5 This is a schematic diagram of the structure of a task scheduling device provided in an embodiment of this application; as shown below. Figure 5 As shown, the device includes:

[0263] The first processing module is used to construct a task heterogeneity graph based on the computing task status required to be processed by the heterogeneous computing system. The task heterogeneity graph is used to record the task information required to be processed by the heterogeneous computing system. The heterogeneous computing system includes multiple types of computing nodes.

[0264] The second processing module is used to construct a device state heterogeneity graph based on the device status of the heterogeneous computing system; the device state heterogeneity graph is used to record the real-time status of different computing nodes in the heterogeneous computing system.

[0265] The third processing module is used to extract the first feature of the task heterogeneity graph and the second feature of the device state heterogeneity graph, and to concatenate the first feature and the second feature to obtain the system feature.

[0266] The fourth processing module is used to determine the task type based on the system characteristics and obtain a determination result, wherein the determination result is either computationally intensive or communication-intensive.

[0267] The fifth processing module is used to select a strategy based on the discrimination result and determine the priority order of task nodes based on the selected strategy; the selected strategy is either the first strategy or the second strategy.

[0268] The sixth processing module is used to generate a first task allocation scheme according to the priority order, generate multiple second task allocation schemes according to the first task allocation scheme, and perform at least one round of iterative operation according to the first task allocation scheme and the multiple second task allocation schemes to obtain a target task allocation scheme; the iterative operation is used to adjust each task allocation scheme to obtain the target task allocation scheme.

[0269] In some embodiments, the fifth processing module is configured to select a first strategy if the discrimination result is communication intensive, wherein the first strategy is to determine the priority order based on average computing time and communication overhead;

[0270] If the discrimination result is computationally intensive, the second strategy is selected, which determines the priority order based on the average computation time and the standard deviation of computation cost.

[0271] The priority of each task node is calculated based on the selected strategy, and the task nodes are sorted according to their priorities to obtain the priority order of the task nodes.

[0272] In some embodiments, the priority calculation formula for the first strategy is as follows:

[0273] + ;

[0274] in, Represents task node Priority; For task nodes Average computation time across multiple computing nodes; Represents task nodes A set of task nodes that have prerequisite dependencies; For task nodes and task nodes Inter-communication overhead; Represents task node Degree centrality; Represents task node Betweenness centrality; Represents task node The proximity centrality.

[0275] In some embodiments, the priority calculation formula for the second strategy is as follows:

[0276] + ;

[0277] in, Represents task node Priority; For task nodes Average computation time across multiple computing nodes; For task nodes The standard deviation of computation cost across multiple computing nodes; For task nodes and task nodes Inter-communication overhead; Represents task nodes A set of task nodes that have prerequisite dependencies; Represents task node Degree centrality.

[0278] In some embodiments, the degree centrality is calculated using the following formula:

[0279] ,in, For task nodes The corresponding feature vector, It is a task node The total number of neighboring task nodes, The total number of task nodes;

[0280] The formula for calculating the betweenness centrality is as follows:

[0281] ,in, For task nodes To the task node The number of all shortest paths, For passing through task nodes The number of paths;

[0282] The formula for calculating proximity centrality is as follows:

[0283] ,in, For task nodes eigenvectors To the task node eigenvectors The shortest path length.

[0284] In some embodiments, the sixth processing module is configured to allocate computing nodes to each task node sequentially according to the priority order, with the goal of completing the task as quickly as possible.

[0285] In some embodiments, the sixth processing module is used to fine-tune the first task allocation scheme to obtain the optimal candidate scheme, the following scheme, and the warning scheme corresponding to the first task allocation scheme, as the plurality of second task allocation schemes.

[0286] In some embodiments, the sixth processing module is used to evaluate each scheme using a scheduling simulator to obtain an evaluation result for each scheme; wherein the scheme is a first task allocation scheme or a second task allocation scheme; and the evaluation result is related to the load balancing index and scheduling length of the task allocation scheme.

[0287] Based on the evaluation results of each scheme, the optimal scheme for the current round of iteration is selected.

[0288] In some embodiments, the sixth processing module is used to fine-tune the optimal solution obtained in the previous iteration operation to obtain the optimal candidate solution, the following solution, and the warning solution corresponding to the optimal solution;

[0289] Each scheme is evaluated using the scheduling simulator to obtain an evaluation result for each scheme; wherein, the scheme is the optimal candidate scheme, the following scheme, or the alert scheme;

[0290] Based on the evaluation results of each scheme, select the optimal scheme for the current round of iteration.

[0291] Determine whether the iteration termination adjustment has been reached. If the iteration termination condition has been met, determine the optimal solution as the target task allocation solution.

[0292] If the iteration termination condition is not met, proceed to the next iteration.

[0293] In some embodiments, the sixth processing module is used to layer the task nodes according to the task dependency relationship of the task heterogeneous graph to obtain a layering result; in the layering result, task nodes in the same layer have no dependency relationship and task nodes with a prerequisite dependency relationship belong to the same layer.

[0294] Based on the principle of fine-tuning only the lowest-level task nodes, the optimal solution is fine-tuned to obtain the optimal candidate solution;

[0295] Based on the principle of fine-tuning only the task nodes in the intermediate layer, the optimal solution is fine-tuned to obtain the following solution;

[0296] Based on the principle of only fine-tuning the upper-level task nodes, the optimal solution is fine-tuned to obtain the warning solution.

[0297] In some embodiments, the sixth processing module is used to calculate the load balancing index and scheduling length of each scheme, and determine the allocation priority function value of each scheme based on the load balancing index and scheduling length, as the evaluation result;

[0298] The formula for calculating the load balancing index is as follows:

[0299] ;

[0300] in, ; Let be the cumulative number of tasks at the i-th computing node in the z-th scheme; The average number of tasks assigned to each computing node; p is the total number of computing nodes; This represents the maximum value of the load balancing index during this iteration.

[0301] The formula for calculating the scheduling length is as follows:

[0302] ;

[0303] in, , This represents the completion time of the exit task in the z-th scheme; max(makespan) is the maximum value of the scheduling length in this iteration.

[0304] In some embodiments, the third processing module is configured to use a task heterogeneous graph network to identify the task heterogeneous graph and obtain the first feature;

[0305] The second feature is obtained by identifying the device state heterogeneity graph using a device state heterogeneity graph network;

[0306] The fourth processing module is used to identify the system features using a task classification network to obtain the discrimination result.

[0307] In some embodiments, the task heterogeneous graph includes: a feature matrix and an adjacency matrix;

[0308] The first processing module is used to construct a feature matrix and an adjacency matrix based on the task information to be processed by the heterogeneous computing system. The feature matrix is ​​used to characterize the computational characteristics of each task node, and the adjacency matrix is ​​used to characterize the dependency relationships between task nodes.

[0309] Calculate the degree of each task node based on the adjacency matrix, and determine the degree matrix based on the degree of each task node;

[0310] The adjacency matrix is ​​normalized using the degree matrix to obtain the processed adjacency matrix.

[0311] In some embodiments, the third processing module is used to perform feature propagation on the task heterogeneous graph through a graph neural network, update the features of each task node in the task heterogeneous graph layer by layer, and introduce the dependencies between tasks into the features of the task nodes to obtain the updated feature vector of the task nodes.

[0312] Aggregate and update the feature vectors of all the task nodes;

[0313] Determine the local contribution of each task node; the local contribution is determined based on at least one of the degree centrality, proximity centrality, and betweenness centrality of the task node.

[0314] Based on the dependencies between task nodes, the feature vectors of all task nodes are sorted according to their local contribution.

[0315] The feature vectors of all sorted task nodes are input into a Long Short-Term Memory (LSTM) network, and the first feature of the task heterogeneous graph is obtained based on the LSTM.

[0316] In some embodiments, the first processing module is configured to construct a feature matrix and an adjacency matrix based on the device states of the heterogeneous computing system, wherein the feature matrix is ​​used to characterize the state characteristics of each computing node; and the adjacency matrix is ​​used to characterize the connection relationships and / or communication rates between computing nodes.

[0317] The degree of each computing node is calculated based on the adjacency matrix, and the degree matrix is ​​determined based on the degree of each computing node.

[0318] The adjacency matrix is ​​normalized using the degree matrix to obtain the processed adjacency matrix.

[0319] In some embodiments, the third processing module is configured to perform feature aggregation of at least one layer on the device state heterogeneous graph using a graph neural network to obtain the feature aggregation result of each layer;

[0320] Based on the feature aggregation results of each layer, calculate the average value of the feature vector of each computing node;

[0321] The average value of the feature vectors of each computing node is aggregated to obtain the second feature of the device state heterogeneity graph.

[0322] In some embodiments, the information recorded in the task heterogeneity graph includes at least one of the following:

[0323] The set of tasks, the task execution dependencies between tasks, the set of task computation volume, the set of task communication volume, the set of task computation preferences, the set of all computing nodes of the heterogeneous computing system, the current remaining memory of the heterogeneous computing system, and the current set of interconnect bandwidth of all computing nodes of the heterogeneous computing system.

[0324] The information recorded in the heterogeneous device status graph includes at least one of the following: the status of all computing nodes in the heterogeneous computing system, and the connection relationships and communication rates between computing nodes.

[0325] It is understood that the task scheduling device provided in the above embodiments, when implementing the corresponding task scheduling method, can allocate the above processing to different program modules as needed to complete all or part of the processing described above. Furthermore, the device and the corresponding method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process is detailed in the method embodiments, which will not be repeated here.

[0326] This application provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform a task scheduling method.

[0327] This application provides a computer-readable storage medium storing executable instructions, wherein the executable instructions are stored and when executed by a processor, they will cause the processor to execute the task scheduling method provided in this application.

[0328] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.

[0329] In some embodiments, executable instructions may take the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0330] As an example, executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple collaborating files (e.g., a file that stores one or more modules, subroutines, or code sections).

[0331] As an example, executable instructions can be deployed to execute on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.

[0332] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application; as shown below. Figure 6 As shown, the electronic device 60 includes: a processor 601, and a memory 602 communicatively connected to the processor 601; the memory 602 stores instructions executable by the processor 601. The instructions are executed by the processor 601 to enable the processor 601 to perform:

[0333] Based on the computing task status required to be processed by the heterogeneous computing system, a task heterogeneity graph is constructed. The task heterogeneity graph is used to record the task information required to be processed by the heterogeneous computing system. The heterogeneous computing system includes multiple types of computing nodes.

[0334] Based on the device status of the heterogeneous computing system, a device status heterogeneity diagram is constructed; the device status heterogeneity diagram is used to record the real-time status of different computing nodes in the heterogeneous computing system.

[0335] Extract the first feature of the task heterogeneity graph and the second feature of the device state heterogeneity graph, and concatenate the first feature and the second feature to obtain the system feature;

[0336] Based on the system characteristics, the task type is determined to obtain a determination result, which is either computationally intensive or communication-intensive.

[0337] A strategy is selected based on the discrimination result, and the priority order of task nodes is determined based on the selected strategy; the selected strategy is either the first strategy or the second strategy.

[0338] A first task allocation scheme is generated according to the priority order, and multiple second task allocation schemes are generated based on the first task allocation scheme.

[0339] At least one round of iterative operations is performed based on the first task allocation scheme and the plurality of second task allocation schemes to obtain the target task allocation scheme; the iterative operations are used to adjust each task allocation scheme to obtain the target task allocation scheme.

[0340] The electronic devices and corresponding task scheduling methods provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.

[0341] In practical applications, the electronic device 60 may further include at least one network interface 603. The various components of the electronic device 60 are coupled together via a bus system 604. It is understood that the bus system 604 is used to implement communication between these components. In addition to a data bus, the bus system 604 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 6 All buses are labeled as bus system 604. The number of processors 601 and the number of memories 602 can be at least one. The network interface 603 is used for wired or wireless communication between the electronic device 60 and other devices.

[0342] The memory 602 in this embodiment is used to store various types of data to support the operation of the electronic device 60.

[0343] The methods disclosed in the embodiments of this application can be applied to or implemented by processor 601. Processor 601 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuit of the hardware in processor 601 or by instructions in software form. The processor 601 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 601 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, which is located in memory 602. Processor 601 reads the information in memory 602 and, in conjunction with its hardware, completes the steps of the aforementioned task scheduling method.

[0344] In some embodiments, the electronic device 60 may be implemented by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to perform the aforementioned methods.

[0345] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this application can be achieved, and this is not limited herein.

[0346] In the above description, the term "some embodiments" refers to a subset of all possible embodiments. However, it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0347] Unless otherwise defined, all technical and scientific terms used in this application have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. The terminology used in this application is for the purpose of describing embodiments of this application only and is not intended to be limiting of this application.

[0348] It should be understood that in the various embodiments of this application, the sequence number of each implementation process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0349] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "a plurality of" means two or more, unless otherwise explicitly specified.

[0350] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A task scheduling method, characterized in that, The method includes: Based on the computing task status required to be processed by the heterogeneous computing system, a task heterogeneity graph is constructed; the task heterogeneity graph is used to record the task information required to be processed by the heterogeneous computing system; the heterogeneous computing system includes multiple types of computing nodes. Based on the device status of the heterogeneous computing system, a device status heterogeneity diagram is constructed; the device status heterogeneity diagram is used to record the real-time status of different computing nodes in the heterogeneous computing system. Extract the first feature of the task heterogeneity graph and the second feature of the device state heterogeneity graph, and concatenate the first feature and the second feature to obtain the system feature; Based on the system characteristics, the task type is determined to obtain a determination result, which is either computationally intensive or communication-intensive. A strategy is selected based on the discrimination result, and the priority order of task nodes is determined based on the selected strategy; the selected strategy is either the first strategy or the second strategy. A first task allocation scheme is generated according to the priority order, and multiple second task allocation schemes are generated based on the first task allocation scheme. At least one round of iterative operations is performed based on the first task allocation scheme and the plurality of second task allocation schemes to obtain the target task allocation scheme; the iterative operations are used to adjust each task allocation scheme to obtain the target task allocation scheme. Extracting the first feature of the task heterogeneity graph and the second feature of the device state heterogeneity graph includes: The first feature is obtained by identifying the task heterogeneous graph using a task heterogeneous graph network. The second feature is obtained by identifying the device state heterogeneity graph using a device state heterogeneity graph network; The step of selecting a strategy based on the discrimination result and determining the priority order of task nodes based on the selected strategy includes: If the discrimination result is communication intensive, the first strategy is selected, and the first strategy is to determine the priority order based on the average computing time and communication overhead. If the discrimination result is computationally intensive, the second strategy is selected, which determines the priority order based on the average computation time and the standard deviation of computation cost. The priority of each task node is calculated according to the selected strategy, and the task nodes are sorted according to their priorities to obtain the priority order of the task nodes. The first task allocation scheme is generated according to the aforementioned priority order, including: Based on the priority order, with the goal of completing the task as quickly as possible, computing nodes are assigned to each task node in sequence; Multiple second task allocation schemes are generated based on the first task allocation scheme, including: The first task allocation scheme is fine-tuned to obtain the optimal candidate scheme, the following scheme, and the warning scheme corresponding to the first task allocation scheme, which are used as the plurality of second task allocation schemes. The iterative operations from the second to the last round include: Fine-tune the optimal solution obtained in the previous iteration to obtain the optimal candidate solution, the following solution, and the warning solution corresponding to the optimal solution. Each scheme is evaluated using a scheduling simulator to obtain an evaluation result for each scheme; wherein, the scheme is the optimal candidate scheme, the following scheme, or the alert scheme; Based on the evaluation results of each scheme, select the optimal scheme for the current round of iteration. Determine whether the iteration termination adjustment has been reached. If the iteration termination condition has been met, determine the optimal solution as the target task allocation solution. If the iteration termination condition is not met, proceed to the next iteration. Fine-tuning the optimal solution obtained in the previous iteration yields the optimal candidate solution, the following solution, and the warning solution corresponding to the optimal solution, including: Based on the task dependency relationship of the task heterogeneous graph, the task nodes are layered to obtain the layering result; in the layering result, task nodes in the same layer have no dependency relationship, and task nodes with a prerequisite dependency relationship belong to the same layer. Based on the principle of fine-tuning only the lowest-level task nodes, the optimal solution is fine-tuned to obtain the optimal candidate solution; Based on the principle of fine-tuning only the task nodes in the intermediate layer, the optimal solution is fine-tuned to obtain the following solution; Based on the principle of only fine-tuning the upper-level task nodes, the optimal solution is fine-tuned to obtain the warning solution.

2. The method according to claim 1, characterized in that, The priority calculation formula for the first strategy is as follows: + ; in, Represents task node Priority; For task nodes Average computation time across multiple computing nodes; Represents task nodes A set of task nodes that have prerequisite dependencies; For task nodes and task nodes Communication overhead between them; Represents task node Degree centrality; Represents task node Betweenness centrality; Represents task node The proximity centrality.

3. The method according to claim 1, characterized in that, The priority calculation formula for the second strategy is as follows: + ; in, Represents task node Priority; For task nodes Average computation time across multiple computing nodes; For task nodes The standard deviation of computation cost across multiple computing nodes; For task nodes and task nodes Communication overhead between them; Represents task nodes A set of task nodes that have prerequisite dependencies; Represents task node Degree centrality.

4. The method according to claim 2, characterized in that, The formula for calculating the degree centrality is as follows: ,in, For task nodes The corresponding feature vector, It is a task node The total number of neighboring task nodes, The total number of task nodes; The formula for calculating the betweenness centrality is as follows: ,in, For task nodes To the task node The number of all shortest paths, For passing through task nodes The number of paths; The formula for calculating proximity centrality is as follows: ,in, For task nodes eigenvectors To the task node eigenvectors The shortest path length.

5. The method according to claim 1, characterized in that, The first round of iterative operations includes: Each scheme is evaluated using a scheduling simulator to obtain an evaluation result for each scheme; wherein, the scheme is either a first task allocation scheme or a second task allocation scheme; the evaluation result is related to the load balancing index and scheduling length of the task allocation scheme; Based on the evaluation results of each scheme, the optimal scheme for the current round of iteration is selected.

6. The method according to claim 1, characterized in that, Each scheme is evaluated using a scheduling simulator, and the evaluation results for each scheme are obtained, including: Calculate the load balancing index and scheduling length for each scheme, and determine the allocation priority function value for each scheme based on the load balancing index and scheduling length, as the evaluation result; The formula for calculating the load balancing index is as follows: ; in, ; Let be the cumulative number of tasks at the i-th computing node in the z-th scheme; The average number of tasks assigned to each computing node; p is the total number of computing nodes; This represents the maximum value of the load balancing index during this iteration. The formula for calculating the scheduling length is as follows: ; in, , This represents the completion time of the exit task in the z-th scheme; max(makespan) is the maximum value of the scheduling length in this iteration.

7. The method according to claim 1, characterized in that, The step of determining the task type based on the system characteristics and obtaining the determination result includes: using a task classification network to identify the system characteristics and obtaining the determination result.

8. The method according to claim 1, characterized in that, The task heterogeneous graph includes: a feature matrix and an adjacency matrix; The step of constructing a task heterogeneity graph based on the computing task states required by the heterogeneous computing system includes: Based on the task information to be processed by the heterogeneous computing system, a feature matrix and an adjacency matrix are constructed. The feature matrix is ​​used to characterize the computational characteristics of each task node; the adjacency matrix is ​​used to characterize the dependencies between task nodes. Calculate the degree of each task node based on the adjacency matrix, and determine the degree matrix based on the degree of each task node; The adjacency matrix is ​​normalized using the degree matrix to obtain the processed adjacency matrix.

9. The method according to claim 1, characterized in that, The step of using a task heterogeneous graph network to identify the task heterogeneous graph and obtain the first feature includes: The graph neural network is used to propagate features of the heterogeneous task graph, update the features of each task node in the heterogeneous task graph layer by layer, and introduce the dependencies between tasks into the features of the task nodes to obtain the updated feature vector of the task nodes. Aggregate and update the feature vectors of all the task nodes; Determine the local contribution of each task node; the local contribution is determined based on at least one of the degree centrality, proximity centrality, and betweenness centrality of the task node. Based on the dependencies between task nodes, the feature vectors of all task nodes are sorted according to their local contribution. The feature vectors of all sorted task nodes are input into a Long Short-Term Memory (LSTM) network, and the first feature of the task heterogeneous graph is obtained based on the LSTM.

10. The method according to claim 1, characterized in that, Based on the device states of the heterogeneous computing system, construct a device state heterogeneity diagram, including: Based on the device status of the heterogeneous computing system, a feature matrix and an adjacency matrix are constructed. The feature matrix is ​​used to characterize the state characteristics of each computing node; the adjacency matrix is ​​used to characterize the connection relationship and / or communication rate between computing nodes. Calculate the degree of each computing node based on the adjacency matrix, and determine the degree matrix based on the degree of each computing node; The adjacency matrix is ​​normalized using the degree matrix to obtain the processed adjacency matrix.

11. The method according to claim 1, characterized in that, The second feature is obtained by identifying the device state heterogeneity graph using a device state heterogeneity graph network, including: The device state heterogeneous graph is subjected to feature aggregation at least one layer using a graph neural network to obtain the feature aggregation result of each layer. Based on the feature aggregation results of each layer, calculate the average value of the feature vector of each computing node; The average value of the feature vectors of each computing node is aggregated to obtain the second feature of the device state heterogeneity graph.

12. The method according to claim 1, characterized in that, The information recorded in the task heterogeneity graph includes at least one of the following: The set of tasks, the task execution dependencies between tasks, the set of task computation volume, the set of task communication volume, the set of task computation preferences, the set of all computing nodes of the heterogeneous computing system, the current remaining memory of the heterogeneous computing system, and the current set of interconnect bandwidth of all computing nodes of the heterogeneous computing system. The information recorded in the heterogeneous device status graph includes at least one of the following: the status of all computing nodes in the heterogeneous computing system, and the connection relationships and communication rates between computing nodes.

13. A task scheduling device, characterized in that, The device includes: The first processing module is used to construct a task heterogeneity graph based on the computing task status required to be processed by the heterogeneous computing system. The task heterogeneity graph is used to record the task information required to be processed by the heterogeneous computing system. The heterogeneous computing system includes multiple types of computing nodes. The second processing module is used to construct a device state heterogeneity graph based on the device status of the heterogeneous computing system; the device state heterogeneity graph is used to record the real-time status of different computing nodes in the heterogeneous computing system. The third processing module is used to extract the first feature of the task heterogeneity graph and the second feature of the device state heterogeneity graph, and to concatenate the first feature and the second feature to obtain the system feature. The fourth processing module is used to determine the task type based on the system characteristics and obtain a determination result, wherein the determination result is either computationally intensive or communication-intensive. The fifth processing module is used to select a strategy based on the discrimination result and determine the priority order of tasks based on the selected strategy; the selected strategy is either the first strategy or the second strategy. The sixth processing module is used to generate a first task allocation scheme according to the priority order, generate multiple second task allocation schemes according to the first task allocation scheme, and perform at least one round of iterative operation according to the first task allocation scheme and the multiple second task allocation schemes to obtain a target task allocation scheme; the iterative operation is used to adjust each task allocation scheme to obtain the target task allocation scheme. The third processing module is used to identify the task heterogeneous graph using a task heterogeneous graph network to obtain the first feature; and to identify the device state heterogeneous graph using a device state heterogeneous graph network to obtain the second feature. The fifth processing module is used to select a first strategy if the discrimination result is communication intensive, wherein the first strategy is to determine the priority order based on the average computing time and communication overhead. If the discrimination result is computationally intensive, the second strategy is selected, which determines the priority order based on the average computation time and the standard deviation of computation cost. The priority of each task node is calculated according to the selected strategy, and the task nodes are sorted according to their priorities to obtain the priority order of the task nodes. The sixth processing module is used to allocate computing nodes to each task node in sequence according to the priority order, with the goal of completing the task as quickly as possible; The sixth processing module is used to fine-tune the first task allocation scheme to obtain the optimal candidate scheme, the following scheme, and the warning scheme corresponding to the first task allocation scheme, as the plurality of second task allocation schemes. The iterative operations from the second to the last round include: Fine-tune the optimal solution obtained in the previous iteration to obtain the optimal candidate solution, the following solution, and the warning solution corresponding to the optimal solution. Each scheme is evaluated using a scheduling simulator to obtain an evaluation result for each scheme; wherein, the scheme is the optimal candidate scheme, the following scheme, or the alert scheme; Based on the evaluation results of each scheme, select the optimal scheme for the current round of iteration. Determine whether the iteration termination adjustment has been reached. If the iteration termination condition has been met, determine the optimal solution as the target task allocation solution. If the iteration termination condition is not met, proceed to the next iteration. Fine-tuning the optimal solution obtained in the previous iteration yields the optimal candidate solution, the following solution, and the warning solution corresponding to the optimal solution, including: Based on the task dependency relationship of the task heterogeneous graph, the task nodes are layered to obtain the layering result; in the layering result, task nodes in the same layer have no dependency relationship, and task nodes with a prerequisite dependency relationship belong to the same layer. Based on the principle of fine-tuning only the lowest-level task nodes, the optimal solution is fine-tuned to obtain the optimal candidate solution; Based on the principle of fine-tuning only the task nodes in the intermediate layer, the optimal solution is fine-tuned to obtain the following solution; Based on the principle of only fine-tuning the upper-level task nodes, the optimal solution is fine-tuned to obtain the warning solution.

14. An electronic device, characterized in that, include: At least one processor; And a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 12.

15. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Training architecture, method and system of graph neural network model and server

    CN117785490A

  • Heterogeneous multitask computing power dynamic scheduling method and system

    CN120469784A