Method and system for dynamic scheduling of resources of a computing center based on reinforcement learning
By constructing a directed computation graph and dynamically generating scheduling strategy topology, the efficiency and accuracy issues of computing center resource scheduling methods in the face of task changes are solved, and rapid adaptation to the semantics of new tasks and efficient resource allocation are achieved.
Patent Information
- Application Number
- CN202610808767.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-05
- Publication Date
- 2026-08-25
AI Technical Summary
Existing resource scheduling methods for computing centers gradually lose efficiency in the face of an environment where task types are constantly expanding and the scale of the computing graph is dynamically scaling. The accuracy of resource allocation is also affected by the lag in the response of the policy network to changes in task semantics, making it difficult to take into account both existing scheduling experience and the rapid adaptation to new task semantics.
By parsing the cluster of tasks to be scheduled into a directed computation graph, configuring semantic labels for nodes, and mapping operator nodes one-to-one to decision units, an initial scheduling strategy topology is generated. Subnetworks are generated based on scheduling probability distributions, redundant connections are pruned through uncertainty metrics, and new decision units are generated by capturing the semantics of newly added tasks, thus realizing the dynamic evolution of the scheduling strategy.
It improves the semantic rationality of scheduling decisions and the accuracy of resource allocation, maintains the efficiency and robustness of the scheduling network, and can continuously adapt to changes in task semantics, achieving an end-to-end reinforcement learning scheduling closed loop.
Smart Images

Figure CN122633408A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and more specifically, to a method and system for dynamic scheduling of computing center resources based on reinforcement learning. Background Technology
[0002] Computing centers handle the scheduling and execution of large-scale heterogeneous computing tasks. In reinforcement learning-driven resource scheduling schemes, task queues are typically modeled as computation graphs, and the scheduling policy network generates resource allocation actions for each computation operator based on the computation graph structure.
[0003] Existing methods often employ graph neural networks or attention mechanisms to encode static computation graphs, then output scheduling decisions through a fixed policy network. Graph neural networks aggregate neighborhood information by passing messages layer by layer along the computation graph topology, while attention mechanisms globally calculate the association weights between operator nodes. In this framework, the structure of the scheduling policy network remains fixed after training, and the number of decision nodes and their connections do not adjust with changes in task load characteristics. When computing centers face an operational environment where task types are constantly expanding and the computation graph size is dynamically scaling, the fixed-structure policy network struggles to balance preserving existing scheduling experience with rapidly adapting to new task semantics. Furthermore, redundant connection paths continuously participate in inference computation, leading to a gradual decline in scheduling decision efficiency, and resource allocation accuracy also gradually decreases due to the policy network's delayed response to changes in task semantics. Summary of the Invention
[0004] In order to at least overcome the above-mentioned shortcomings in the prior art, one of the objectives of the present invention is to provide a method and system for dynamic scheduling of computing center resources based on reinforcement learning, which can improve the problem that the efficiency of scheduling decisions gradually declines and the accuracy of resource allocation gradually decreases due to the lag in the response of the policy network to changes in task semantics.
[0005] This invention provides a method for dynamic scheduling of computing center resources based on reinforcement learning, comprising:
[0006] Obtain the cluster of tasks to be scheduled, parse the cluster of tasks to be scheduled into a directed computation graph with operator nodes and data dependency edges, and configure node semantic labels for each operator node;
[0007] The operator nodes in the directed computation graph are mapped one-to-one to decision units, and each decision unit is connected according to the data dependency edge to generate an initial scheduling strategy topology. Within each decision unit, a sub-network is created based on the scheduling probability distribution of the node semantic label.
[0008] The uncertainty measure of each decision unit is determined based on the degree of concentration of the probability distribution of the scheduling actions output by each decision unit. The connection path between decision units is frozen and pruned according to the uncertainty measure and the pruning decision boundary to obtain the pruned scheduling strategy topology.
[0009] Monitor the semantic change events of the cluster of tasks to be scheduled. When a new task semantic is captured, extract the new task semantic label. In the post-pruning scheduling strategy topology, determine the existing decision units that meet similar conditions with the new task semantic label as growth base points. Based on the parameters of the sub-network generated by the scheduling probability distribution of the growth base points, generate new decision units through mutation. Establish the connection between the new decision units and the existing decision units according to the new data dependency relationship to obtain the post-grown scheduling strategy topology.
[0010] Traverse all decision units corresponding to the operator nodes of the directed computation graph in the topology of the growth scheduling strategy, sequentially perform scheduling action sampling, select the computing power resource type and allocation amount for each operator node, and combine them into a computing power center resource scheduling instruction.
[0011] This invention also provides a dynamic scheduling system for computing center resources, including a processor, a memory and a bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; the processor is used to call program instructions in the memory to execute the above-described dynamic scheduling method for computing center resources based on reinforcement learning.
[0012] This invention also provides a computer-readable storage medium storing a program that, when executed by a processor, implements the above-described reinforcement learning-based dynamic scheduling method for computing center resources.
[0013] This invention provides a method and system for dynamic resource scheduling in computing centers based on reinforcement learning. By constructing a mapping mechanism from a directed computation graph to the initial scheduling strategy topology and integrating operator node semantic labels into the scheduling probability distribution to generate a sub-network, scheduling decisions are deeply coupled with computational semantics, improving the semantic rationality of scheduling action generation. Uncertainty measurement and connection path pruning based on the concentration of scheduling action probability distribution continuously streamline the redundant structure of the scheduling strategy topology, maintaining the efficiency and robustness of the decision network. When the semantics of a cluster of tasks to be scheduled change, growth base points are located through semantic similarity and new decision units are generated through mutation, adaptively expanding the scheduling strategy topology, enabling the scheduling structure to dynamically evolve to adapt to incremental updates in task types. Finally, the grown scheduling strategy topology is traversed to sample scheduling actions and generate resource instructions, realizing an end-to-end reinforcement learning scheduling closed loop from task parsing, topology construction, structural optimization, dynamic growth to instruction output. Overall, this approach balances the accuracy and compactness of the scheduling strategy with its continuous adaptability to new task semantics. Attached Figure Description
[0014] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 This is a flowchart illustrating a dynamic resource scheduling method for a computing center based on reinforcement learning, provided in an embodiment of the present invention.
[0016] Figure 2 This is a block diagram of a dynamic scheduling system for computing center resources provided in an embodiment of the present invention.
[0017] icon:
[0018] 100-Computing Center Resource Dynamic Scheduling System;
[0019] 101 - Processor; 102 - Memory; 103 - Bus. Detailed Implementation
[0020] Exemplary embodiments of the present invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this invention will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
[0021] To better understand the above technical solutions, the technical solutions of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present invention and the specific features in the embodiments are detailed descriptions of the technical solutions of the present invention, rather than limitations on the technical solutions of the present invention. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.
[0022] Figure 1 The flowchart of a dynamic scheduling method for computing center resources based on reinforcement learning according to an embodiment of the present invention is applied to a dynamic scheduling system for computing center resources, including steps 110-150.
[0023] Step 110: Obtain the cluster of tasks to be scheduled, parse the cluster of tasks to be scheduled into a directed computation graph with operator nodes and data dependency edges, and configure node semantic labels for each operator node.
[0024] The computing center's dynamic resource scheduling system extracts a batch of computational tasks from the task queue, forming a cluster of tasks to be scheduled. The scheduling system parses the metadata of each computational subtask within the cluster, including the operation type, input data source, output data destination, and execution dependencies. Based on the operation type in the metadata, each computational subtask is mapped to an operator node. Semantic keywords are extracted from the textual description of the operation type, and encoded into node semantic labels using a predefined semantic category mapping table.
[0025] Node semantic labels are used to identify the computational semantic category of the operator node. For example, convolution operations are mapped to convolution labels, matrix multiplication operations to matrix multiplication labels, data rearrangement operations to data shuffling labels, and distributed gradient synchronization operations to gradient reduction labels. After mapping all operator nodes for all computational subtasks, data dependency edges are constructed based on the data flow relationships between the computational subtasks. Each data dependency edge points from the operator node corresponding to the data producer to the operator node corresponding to the data consumer.
[0026] The scheduling system treats all operator nodes as a set of vertices and all data-dependent edges as a set of directed edges, generating a directed computation graph. Each operator node in the directed computation graph is bound to three attribute fields: a unique identifier, a node semantic label, and a computational resource requirement description. The unique identifier is a globally unique string used to accurately locate the operator node in subsequent decision-making processes. The node semantic label stores the semantic category code corresponding to the operator node. The computational resource requirement description is a structured data object that records the resource consumption characteristics required for the execution of the operator node, such as the number of processor cores, memory capacity, and accelerator type.
[0027] Step 120: Map the operator nodes in the directed computation graph one-to-one to decision units, and connect each decision unit according to the data dependency edge to generate an initial scheduling strategy topology. Create a sub-network in each decision unit based on the scheduling probability distribution of the node semantic label.
[0028] After constructing the directed computation graph, the next stage is building the scheduling strategy topology. For each operator node in the directed computation graph, the scheduling system creates a unique corresponding decision unit. The decision unit is the basic carrier for scheduling decision reasoning; each decision unit encapsulates a scheduling probability distribution generation subnetwork and the representation information of the operator node. Mapping operator nodes one-to-one to decision units completes the transformation from a static computation graph description to a scheduling decision network. After all decision units are created, directed connections are established between decision units based on the pointing relationships of data dependency edges in the directed computation graph. Specifically, if there is a data dependency edge from operator node OpSrc to operator node OpDst, a directed connection is established between decision units DuSrc and DuDst. Through this mapping and connection, an initial scheduling strategy topology is generated. This topology is structurally isomorphic to the original directed computation graph topology, and each decision unit has an added scheduling strategy generation capability.
[0029] The implementation of this step is described in two branches. The first branch includes steps 1211 to 1214, and the second branch includes steps 1221 to 1229.
[0030] Step 1211: Semantically encode the node semantic label of each operator node to generate a semantic embedding vector. Extract the computing resource demand description of each operator node and perform multi-attribute fusion encoding on the computing resource demand description to obtain a demand embedding vector. Perform a concatenation operation on the semantic embedding vector and the demand embedding vector to generate the operator node representation vector.
[0031] Before mapping operator nodes to decision units, the scheduling system needs to construct a comprehensive representation vector for each operator node. For the semantic labels of operator nodes, these are input into a pre-trained semantic encoder. This encoder, based on a word embedding lookup table and a bidirectional long short-term memory (LSS) network structure, first segments the node semantic labels to obtain a word sequence. Then, each word is mapped to a word vector of a set length using a word embedding matrix. The forward and reverse LSS networks then recursively scan the sequence in two directions, respectively. At each time step, the forward LSS network inputs the current word vector and the previous hidden state into three gating units: the forget gate, the input gate, and the output gate. The gating signals adjust the update magnitude of the unit states, ultimately outputting a forward hidden state sequence. The reverse LSS network processes the word sequence in reverse order, also outputting a reverse hidden state sequence. The forward and reverse terminal hidden states are concatenated and passed through a fully connected mapping layer to obtain a semantic embedding vector of dimension Ds.
[0032] Simultaneously, a computing resource requirement description is extracted from the operator node attributes. This description includes three attribute fields: processor core count requirement, memory capacity requirement, and accelerator type requirement. The processor core count requirement is logarithmically normalized and then linearly mapped to obtain a processor core count encoding vector of length Lc. The memory capacity requirement is similarly logarithmically normalized and linearly mapped to obtain a memory capacity encoding vector of length Lc. For the accelerator type requirement, it is first converted from category labels into a one-hot encoded vector, the length of which is equal to the total number of accelerator type categories. Then, a linear mapping layer is used to convert this one-hot encoded vector into an accelerator type encoding vector of length Lc. The processor core count encoding vector, memory capacity encoding vector, and accelerator type encoding vector are concatenated along the feature dimension to form an intermediate requirement vector of length 3Lc. The intermediate demand vector is input into a demand fusion encoder, which consists of two fully connected layers. The first fully connected layer maps the 3Lc-dimensional input to Ds-dimensional and performs non-linear activation processing. The second fully connected layer maps the Ds-dimensional features to Ds-dimensional output, and finally obtains the demand embedding vector.
[0033] Subsequently, the semantic embedding vector and the demand embedding vector are concatenated end to end along the feature dimension to generate an operator node representation vector with a dimension of 2×Ds. This operator node representation vector integrates the semantic attributes of the operator and the resource demand attributes.
[0034] Step 1212: Initialize a decision unit for each operator node, and build a scheduling probability distribution generation sub-network inside the decision unit. The scheduling probability distribution generation sub-network consists of an input mapping layer, an intermediate transformation layer and a probability output layer connected in sequence.
[0035] For each operator node, the scheduling system allocates an independent decision unit instance. These decision units are managed as containers, each maintaining its own independent storage space and network parameters. Within each decision unit, a scheduling probability distribution generation subnetwork consisting of three layers is constructed. The first layer is the input mapping layer, composed of a fully connected linear layer and a nonlinear activation layer connected in series. The fully connected linear layer contains a weight matrix of dimension 2×Ds rows and Dh columns, and a bias vector of length Dh, where Dh is the dimension of the intermediate hidden layer. The weight matrix is randomly initialized using a truncated normal distribution, and the bias vector is initialized to all zeros. The nonlinear activation layer uses a linear unit with leakage correction as the activation function.
[0036] The second layer is an intermediate transformation layer, composed of Kres stacked residual blocks. Each residual block contains two parallel processing paths: the main path consists of two consecutive fully connected linear layers, each with an output dimension of Dh. The first fully connected linear layer is followed by a leakage-corrected linear unit activation, while the second fully connected linear layer is not followed by an activation. The bypass path transmits the input features of the residual block to the output. The output of the main path is element-wise added to the input features of the bypass path to form a residual connection. The result of the addition is then subjected to layer normalization.
[0037] The third layer is the probabilistic output layer, a fully connected linear layer without a bias term. Its weight matrix has Dh rows and Nact columns, where Nact represents the total number of possible scheduling actions. Each output node corresponds to a combination of candidate computing resource types and resource quotas. After the network is built, an orthogonal initialization strategy is used to initialize the weight matrices of the intermediate transformation layers, while the weight matrices of the input mapping layer and the probabilistic output layer are initialized using a truncated normal distribution.
[0038] Step 12121: Input the operator node representation vector into the input mapping layer and perform linear transformation and nonlinear activation processing to obtain the intermediate representation.
[0039] The operator node representation vector generated in step 1211 is used as the initial input to the scheduling probability distribution generation subnetwork. This operator node representation vector has a dimension of 2×Ds and first enters the fully connected linear layer of the input mapping layer. The weight matrix of the fully connected linear layer multiplies the operator node representation vector on the left, resulting in a Dh-dimensional column vector. This, along with the bias vector, yields the linear response vector. Each component of the linear response vector is the result of the inner product of each dimension of the operator node representation vector with the corresponding weight column, plus the bias term. This linear response vector is then passed through an element-wise nonlinear mapping using a linear unit activation function with leakage correction. The activation function processes each component of the linear response vector one by one. If the component value is positive, the original value is output; if the component value is negative, the result of multiplying the component value by a preset small slope constant is output. The output vector after activation processing maintains a dimension of Dh, and this output vector is the intermediate representation. Each component of the intermediate representation is a nonlinear abstraction of the original operator node representation in a high-dimensional space, carrying a nonlinear combination of semantic information and resource demand information.
[0040] Step 12122: The intermediate representation input to the intermediate transformation layer is processed by a fully connected transformation through multiple residual connections to output the scheduling action space descriptor.
[0041] The intermediate representation is fed into the first residual block of the intermediate transform layer. Within the residual block, the intermediate representation is copied twice, one copy is passed along the main path, and the other copy is retained along the bypass path. The first fully connected linear layer of the main path maps the Dh-dimensional features to the Dh-dimensional space. After activation by linear units with leakage correction, it is then mapped back to the Dh-dimensional space by the second fully connected linear layer to obtain the main path output.
[0042] The bypass path directly passes the original input of the residual block to the output. The main path output is added element-wise to the original input passed from the bypass path. For each component of the sum, the value of that component is directly added to the corresponding component of the original input to obtain the output of the residual block. This output then undergoes layer normalization, which calculates the mean and variance of all Dh components of the output. The calculated mean and variance are then used to standardize each component of the output, multiplied by a learnable scaling parameter, and a learnable translation parameter is added. The output of the first residual block is fed into the second residual block, and the above residual mapping and layer normalization process is repeated. After Kres residual blocks are stacked step-by-step, the intermediate representation is gradually refined into a deep hidden layer representation, which significantly improves both semantic abstraction and resource awareness compared to the initial intermediate representation. The output of the last residual block is the scheduling action space descriptor, with the dimension maintained at Dh.
[0043] Step 12123: Import the scheduling action space descriptor into the probability output layer, perform an exponentialization operation on each component of the scheduling action space descriptor, calculate the proportion of each component to the total exponentialization, and generate the scheduling action probability distribution.
[0044] The scheduling action space descriptor enters the probability output layer. The weight matrix of the probability output layer has dimensions Dh rows and Nact columns. The scheduling action space descriptor and the weight matrix are multiplied to obtain the original score vector with dimension Nact. The matrix multiplication calculation is as follows: for the j-th output node, the sum of the products of each component of the scheduling action space descriptor and the corresponding element in the j-th column of the weight matrix is calculated. The sum is the j-th component in the original score vector. After calculating all Nact components, the original score vector is obtained. Then, probability normalization is performed on the original score vector. First, an exponential transformation is performed on each component of the original score vector. The exponential transformation takes each component value as the input of the natural exponential function and outputs the corresponding exponential score of the component. The sum of all Nact exponential scores is calculated. Then, the exponential score of each component is divided by the sum to obtain the probability value corresponding to that component. The meaning of this division is: take the exponential score as the numerator and the sum as the denominator. The quotient is the probability value, and the probability value takes the range between 0 and 1. All Nact probability values constitute the scheduling action probability distribution, which naturally satisfies the constraint that the sum of all probability values equals 1. Each probability value in the scheduling action probability distribution corresponds to a candidate scheduling action composed of a combination of computing resource type and resource quota.
[0045] Step 1213: Determine the connection relationship between each decision unit based on the data dependency edge. For each data dependency edge, establish a connection path between the decision unit corresponding to the source operator node and the decision unit corresponding to the target operator node, and bind the edge representation to the connection path. The edge representation is formed by concatenating the output data dimension code of the source operator node and the input data dimension code of the target operator node.
[0046] In the process of generating the initial scheduling strategy topology, the construction of edge representations and the binding of connection paths are performed synchronously. The scheduling system first reads each data dependency edge from the directed computation graph, resolving the source operator node and the target operator node. From the attribute description of the source operator node, the shape description of the output data tensor is read. The shape description is a dimensional tuple, recording the size of the tensor in each axis direction. The values of each dimension of this tuple are sequentially serialized and encoded, with each dimension value independently mapped to a floating-point code block of a set length. These code blocks are concatenated end-to-end in dimensional order to form the output data dimension code. The same serialization and encoding process is performed on the target operator node, reading the shape description of its input data tensor to generate the input data dimension code.
[0047] The output and input data dimension codes are concatenated sequentially to form the initial edge representation vector. An additional learnable edge offset parameter is configured for each connection path. This parameter has the exact same dimension length as the initial edge representation vector and is randomly sampled from a Gaussian distribution with a mean of 0 during topology initialization. Each component of the initial edge representation vector is element-wise added to the corresponding component of the edge offset parameter; the result is the final edge representation. The final edge representation is then bound as an attribute field to the metadata area of the corresponding directed connection path, completing the edge representation binding operation.
[0048] Step 12131: Traverse each data dependency edge in the directed computation graph and obtain the source operator node identifier and target operator node identifier of the data dependency edge.
[0049] The scheduling system retrieves data dependency edge objects one by one from the edge set container of the directed computation graph in storage order. Each data dependency edge object is a structure containing a source operator node field and a target operator node field. The scheduling system reads the value of the source operator node field and assigns the string value to the variable IdSrcOp, and reads the value of the target operator node field and assigns the string value to the variable IdTgtOp. These two identifiers are used as index keys in subsequent steps to locate the corresponding decision unit in the index mapping table.
[0050] Step 12132: Query the source decision unit identifier corresponding to the source operator node identifier and the target decision unit identifier corresponding to the target operator node identifier through the index mapping table.
[0051] During the initialization of decision units, the scheduling system synchronously constructs a hash index mapping table from operator node identifiers to decision unit identifiers. This table uses the operator node identifier as the hash key and the decision unit identifier as the hash value. The scheduling system inputs IdSrcOp as the key to the hash function to calculate the slot, and retrieves the source decision unit identifier IdSrcDu from the corresponding slot. Similarly, it inputs IdTgtOp into the hash function to retrieve the target decision unit identifier IdTgtDu.
[0052] Step 12133: Determine whether a connection path already exists between the source decision unit identifier and the target decision unit identifier. If not, create a directed connection path from the source decision unit to the target decision unit.
[0053] The scheduling system retrieves the set of all directed edges in the current topology graph. For each edge in this set, it checks its start and end fields. If no edge record exists with a start field of IdSrcDu and an end field of IdTgtDu, a new directed edge object is instantiated, with its start and end fields set to IdSrcDu and its direction field set to unidirectional. If a matching edge record already exists, the creation process is skipped to avoid duplicate connections.
[0054] Step 12134: Generate an edge representation vector based on the shape description of the output data tensor of the source operator node and the shape description of the input data tensor of the target operator node. Combine the edge offset parameter to determine the final edge representation and perform directed connection path binding and message passing callback function registration.
[0055] The shape description of the output data tensor is read from the attribute description of the source operator node. The shape description is a dimension tuple. A numerical-to-floating-point encoding conversion is performed on each component of this dimension tuple. The encoded results of each component are concatenated end-to-end in dimensional order to generate the output data dimension encoding. The shape description of the input data tensor is read from the attribute description of the target operator node, and the input data dimension encoding is generated using the same process. The output data dimension encoding and the input data dimension encoding are concatenated end-to-end along the vector dimension direction to generate the initial edge representation vector. The edge offset parameter vector specific to this connection path is obtained from the parameter storage area. This parameter vector has the same length as the initial edge representation vector. Each element of the initial edge representation vector is added element-wise to the corresponding element of the edge offset parameter vector. The result is the final edge representation. The final edge representation is written as an attribute to the metadata area of the directed edge object.
[0056] Simultaneously, a message passing callback function is registered for this directed edge object. The processing logic of the message passing callback function is as follows: when the source decision unit transmits the output feature tensor to the target decision unit along the connection path, before the feature tensor enters the transmission path, the final edge representation is automatically read from the directed edge metadata area, and the final edge representation is concatenated with the output feature tensor along the feature dimension direction. The concatenated enhanced transmission feature is sent out along the path, and the target decision unit receives the enhanced feature that integrates the edge structure information.
[0057] Step 1214: Store the parameters of the scheduling probability distribution generating subnetwork and the operator node representation vector in each decision unit, and integrate the decision units and their connection paths to obtain the initial scheduling strategy topology.
[0058] The scheduling system uniformly summarizes and assembles all decision unit instances and their interconnections. For each decision unit, its built-in scheduling probability distribution generation subnetwork's input mapping layer weight matrix and bias vector, intermediate transformation layer residual block weight matrix and layer normalization parameters, probability output layer weight matrix, along with the corresponding operator node representation vector, are persistently written to the decision unit's storage area as a key-value pair data structure. Subsequently, a global topology graph data structure is constructed. The vertex set of the graph consists of all decision unit identifiers, and the directed edge set consists of all interconnections. The metadata area of each directed edge is attached with its corresponding edge representation. This global topology graph is the initial scheduling strategy topology. The initial scheduling strategy topology also derives two data views: a topology node list and a topology edge list, for use in subsequent pruning and growth steps.
[0059] The above describes the first branch. The description of the second branch is as follows:
[0060] Step 1221: Semantically encode the node semantic label of each operator node to generate a semantic embedding vector, and extract the computing resource requirement description of the operator node, which includes the processor core number requirement, memory capacity requirement, and accelerator type requirement.
[0061] For each operator node, the scheduling system first performs semantic encoding on its node semantic label. A semantic encoder based on a word embedding lookup table and a bidirectional long short-term memory network is used to segment the node semantic label string into words, resulting in a word sequence composed of several word elements. The word embedding lookup table stores the mapping relationship between each word element and a word vector of a preset length. Each word element in the word sequence is replaced one by one with its corresponding word vector, forming a word vector sequence, which is then sequentially fed into the bidirectional long short-term memory network.
[0062] The forward Long Short-Term Memory (LSTM) network processes the word vector sequence step-by-step from beginning to end. The internal computation process at each time step involves concatenating the hidden state from the previous time step with the word vector of the current time step. Three gate structures—the forget gate, the input gate, and the output gate—are used to calculate their respective gate signals. The forget gate outputs a forgetting scaling factor (0-1), the input gate outputs the input modulation signal and the candidate unit state, and the output gate outputs the output modulation signal. The unit state of the LSM network is updated by adding the product of the forgetting scaling factor and the previous unit state to the product of the input modulation signal and the candidate unit state. The hidden state is updated by the product of the output modulation signal and the nonlinearly mapped unit state. The reverse LSM network processes the word vector sequence from end to beginning using the same internal computation logic. The forward last hidden state vector and the reverse last hidden state vector are concatenated, then passed through a fully connected mapping layer, outputting a semantic embedding vector of dimension Ds.
[0063] Next, the computing resource requirement description is extracted from the operator node attributes. The processor core number requirement field, memory capacity requirement field, and accelerator type requirement field are obtained in a structured data reading method. The values of the three fields are either floating-point numbers or category enumeration identifiers.
[0064] Step 1222: Perform multi-attribute fusion encoding on the description of computing resource requirements to obtain the requirement embedding vector, and concatenate the semantic embedding vector and the requirement embedding vector according to the channel dimension to generate the operator node representation vector.
[0065] For the processor core count requirement field, logarithmic normalization is first applied to convert the original value into a relative value on a logarithmic scale. Then, a single-layer fully connected embedding layer maps the normalized value into a processor core count encoding vector of length Lr. For the memory capacity requirement field, similar logarithmic normalization is applied, followed by another single-layer fully connected embedding layer to map it into a memory capacity encoding vector of length Lr. For the accelerator type requirement field, an integer index is first generated based on a mapping table of accelerator types enumerated to integers. Then, a dictionary lookup is used to convert it into a one-hot encoding vector, the length of which is equal to the total number of candidate accelerator types. Finally, a linear mapping layer compresses this one-hot encoding vector into an accelerator type encoding vector of length Lr. The processor core count encoding vector, memory capacity encoding vector, and accelerator type encoding vector are then fed into a three-channel attention-weighted fusion module.
[0066] The three-channel attention weighted fusion module calculates attention scores for each of the three input vectors. Specifically, each input vector passes through a small, independent scoring network consisting of a single fully connected layer with non-linear activation, outputting a scalar score. These three scalar scores are then normalized using a softmax function to become three attention weights. The attention weight for each channel is multiplied by the encoding vector for that channel, and the three weighted vectors are then summed element-wise to obtain the demand embedding vector of dimension Lr. The semantic embedding vector and the demand embedding vector are then concatenated along the feature dimension, i.e., the elements of the semantic embedding vector of dimension Ds and the demand embedding vector of dimension Lr are linked together in the order of semantics first, then demand, to generate an operator node representation vector of dimension Ds+Lr.
[0067] Step 1223: Assign a decision unit container to each operator node, and build a policy network skeleton within the decision unit container. The policy network skeleton includes a gated embedding layer, a conditional computation layer, and a decision output layer arranged in sequence.
[0068] For each operator node, the scheduling system instantiates a decision unit container object. Within the container's memory space, storage areas for three network layers are allocated sequentially. The first area stores the parameters and buffers of the gated embedding layer. The gated embedding layer contains a learnable parameter matrix and corresponding bias terms; its input dimension is the same as the dimension of the operator node's representation vector, and its output dimension is the same as the input dimension. The second area stores the parameters of the conditional computation layer. The conditional computation layer contains B parallel computation branches, each storing an independent weight matrix. The dimensionality configuration of the weight matrix for each branch differs, depending on the branch's inflation factor parameter, but the output dimension is uniformly Dc. The third area stores the parameters of the decision output layer, containing a fully connected weight matrix with B×Dc rows and Nact columns. During initialization, the weight parameters of each layer are filled with random values sampled from a truncated normal distribution.
[0069] Step 1224: Configure a learnable parameter matrix in the gated embedding layer, input the operator node representation vector into the gated embedding layer and process it through linear mapping and gated activation to obtain the gated adjustment signal.
[0070] The parameter matrix of the gated embedding layer has the dimensions of input rows and columns, and the input dimension is equal to the dimension Ds + Lr of the operator node representation vector. The operator node representation vector is used as the input vector, and matrix multiplication is performed with the parameter matrix. Specifically, each component of the input vector is multiplied by the corresponding column of the parameter matrix, and the resulting components form a linear mapping vector. This linear mapping vector is then transformed by a gated activation function. The specific calculation process of the gated activation function is as follows: first, the Sigmoid function value is calculated for each component of the linear mapping vector; the output value of the Sigmoid function is between 0 and 1. Then, the Sigmoid function value is multiplied element-wise with the corresponding component of the linear mapping vector. This calculation generates a gating adjustment signal with the same dimension as the operator node representation vector. The amplitude of each component is selectively scaled under the gating mechanism.
[0071] Step 1225: Perform element-wise multiplication of the gating adjustment signal and the operator node representation vector to generate a conditional input representation.
[0072] The scheduling system performs element-wise multiplication on the gating control signal vector and the operator node representation vector. Specifically, for the p-th index position, the p-th component of the gating control signal is directly multiplied by the p-th component of the operator node representation vector. The product is used as the p-th component of the conditional input representation. This operation iterates through every index position of the vector until all elements have been calculated. The dimension of the conditional input representation is exactly the same as that of the operator node representation vector. When the component in the gating control signal approaches 1, the original features pass through almost without loss; when the component approaches 0, the original features are significantly attenuated.
[0073] Step 1226: The conditional input representation is fed into the conditional computation layer, which consists of multiple parallel computation branches and a fusion and splicing module. Each parallel computation branch contains a hollow fully connected sublayer with different dilation factors, which is used to transform and extract features within different receptive fields.
[0074] After receiving the conditional input representation, the conditional computation layer copies the input into B identical copies. Each copy is fed into a parallel computation branch. The core of each parallel computation branch is a hollow fully connected sublayer. While structurally a standard fully connected linear layer, this sublayer skips the consecutive use of adjacent weights during matrix multiplication according to the dilation factor parameter, thus creating a larger receptive field coverage in the implicit feature space. The dilation factors for different branches are configured in ascending order, for example, taking values from the DilFct sequence, resulting in a progressive relationship between the receptive field radii of each branch.
[0075] Step 1227: In the conditional computation layer, the conditional input representation is input into each parallel computation branch to obtain the output features of each parallel computation branch. Then, the output features of each parallel computation branch are spliced along the channel direction by the fusion splicing module to obtain multi-view fusion features.
[0076] Each parallel computing branch independently receives the conditional input representation and performs a linear transformation within its own hollow fully connected sublayer. Taking the b-th branch as an example, the conditional input representation is multiplied by the weight matrix of that branch. Under the constraint of the inflation factor, the elements in the weight matrix participating in the calculation at this position change from a continuous arrangement to an intermittent arrangement, with the interval step size determined by the inflation factor. After calculation, the output feature vector of the b-th branch is obtained, with dimension Dc. After all B branches have been calculated, the B output feature vectors are sent to the fusion and splicing module. The fusion and splicing module splices the output feature vectors of each branch sequentially along the channel dimension according to the branch number order, forming a joint vector of length B×Dc. This joint vector is the multi-view fusion feature, with the first half being the output of the branch with the small inflation factor, carrying fine-grained local features; and the second half being the output of the branch with the large inflation factor, carrying coarse-grained global features.
[0077] Step 1228: Input the multi-view fusion features into the decision output layer and map them into a scheduling action space descriptor through the decision weight matrix. Each element of the scheduling action space descriptor corresponds to a candidate combination of computing power resource type and resource quota.
[0078] The decision output layer holds a decision weight matrix with dimensions B×Dc rows and Nact columns. Multiplication is performed between the multi-view fusion features and the decision weight matrix, with the multi-view fusion features acting as row vectors multiplied by the decision weight matrix. The matrix multiplication operation is expanded as follows: the j-th column vector of the decision weight matrix is inner-producted with the multi-view fusion features; the result of this inner product is the j-th component of the output vector. After traversing Nact column vectors, a vector of dimension Nact is generated, and each component value of this vector is the corresponding element of the scheduling action space descriptor. Each element of the scheduling action space descriptor corresponds to a scheduling action in the candidate scheduling action space, which is composed of a combination of computing resource type and resource quota. Computing resource types include general-purpose processor types, graphics accelerator types, and tensor accelerator types, etc., and resource quotas are represented in discrete hierarchical manner.
[0079] Step 1229: Perform probability normalization processing based on the scheduling action space descriptor to obtain the scheduling action probability distribution. Combine the scheduling action probability distribution with the data dependency edges to encapsulate and integrate the decision unit container to obtain the initial scheduling strategy topology.
[0080] Step 12291: Input the scheduling action space descriptor into the probability normalization module, perform an exponential transformation on each element of the scheduling action space descriptor, and divide by the sum of the exponential transformations of all elements to obtain the scheduling action probability distribution.
[0081] A probability normalization module is chained after the decision output layer. This module first transforms each element of the scheduling action space descriptor using the natural exponential function, mapping each element value to a positive real number. All Nact positive real numbers form an exponentialized vector. Next, the sum of all elements in this exponentialized vector is calculated, and this sum is used as the denominator. Each element in the exponentialized vector is divided by this denominator to obtain its corresponding probability value. This division operation is performed independently for each element, generating Nact probability values that together form the scheduling action probability distribution.
[0082] Step 12292: Based on the data dependency edges, determine the connection relationship between each decision unit container. For each data dependency edge, establish a connection path between the corresponding two decision unit containers and bind an edge representation to the connection path. The edge representation is formed by concatenating the output data dimension code of the source operator node and the input data dimension code of the target operator node.
[0083] The scheduling system reads data dependency edges one by one from the set of data dependency edges in the directed computation graph. For each data dependency edge, a directed connection path is established between the decision unit containers, and an edge representation is bound to this connection path. The edge representation is generated as follows: dimension tuples are extracted from the shape description of the output data tensor of the source operator node, and the values of each dimension are serialized and encoded to obtain the output data dimension code; dimension tuples are extracted from the shape description of the input data tensor of the target operator node, and the same serialization and encoding is performed to obtain the input data dimension code; the output data dimension code and the input data dimension code are concatenated end to end along the vector dimension direction to form the edge representation; the edge representation is attached to the metadata area of the connection path as an attribute.
[0084] Step 12293: Encapsulate the parameters of the policy network skeleton, the operator node representation vector, and the scheduling action probability distribution in the decision unit container, integrate all decision unit containers and their connection paths, generate the initial scheduling policy topology, and establish an index mapping table from operator node identifier to decision unit container identifier.
[0085] For each decision unit container, the scheduling system compactly arranges the parameter matrix and bias terms of the gating embedding layer, the weight matrices of each branch of the condition calculation layer, the weight matrix of the decision output layer, the operator node representation vector, and the scheduling action probability distribution vector according to a preset serialization format and writes them into the container's persistent storage area. Subsequently, it aggregates all decision unit container identifiers to construct a topology node set, aggregates all directed connection paths to construct a topology edge set, and combines the node set and edge set into the initial scheduling strategy topology.
[0086] Simultaneously, a hash index mapping table is established. Each record in the table contains two fields: the key field stores the operator node identifier, and the value field stores the reference handle of the corresponding decision unit container identifier. This index mapping table is used for bidirectional fast positioning between operator nodes and decision units in subsequent steps.
[0087] Step 130: Determine the uncertainty measure of each decision unit based on the concentration of the probability distribution of the scheduling actions output by each decision unit, and perform freezing and pruning processing on the connection paths between decision units according to the uncertainty measure and the pruning decision boundary to obtain the pruned scheduling strategy topology.
[0088] In this embodiment of the invention, step 130 is a freezing and pruning process for the connection path between decision units, which is specifically implemented through the following sub-steps:
[0089] Step 131: Traverse each decision unit in the initial scheduling strategy topology and collect the probability distribution of the current output scheduling action of the decision unit.
[0090] The scheduling system accesses the storage area of each decision unit sequentially according to the decision unit identifier list in the initial scheduling strategy topology. It reads the scheduling action probability distribution vector generated by the decision unit after the most recent forward propagation. This vector contains Nact probability value components. During the acquisition process, the source decision unit identifier of the vector is recorded for subsequent topology location association.
[0091] Step 132: The difference between the maximum probability value and the second maximum probability value in the probability distribution of scheduling actions is used as the concentration index, and the reciprocal of the concentration index is mapped to an uncertainty measure.
[0092] For each collected probability distribution vector of a scheduling action, the scheduling system performs a comparison and sorting process. It iterates through all components of the vector to find the element with the largest value, recording its position index and probability value (ProbMax). Then, it temporarily masks the probability value at that position and iterates through the remaining components again to find the element with the largest value, recording its probability value (ProbSec). The concentration index Conf = ProbMax - ProbSec is calculated. Conf reflects the degree of concentration of the decision-making unit's scheduling tendency; a larger Conf indicates a more definite preference for a specific scheduling action. The uncertainty measure Uncert for this decision-making unit is set as: DivFactor / (Conf + Eps), where DivFactor is an adjustment factor, and the smoothing term Eps is a very small positive constant used only to prevent the abnormal case of division by zero. Uncert is smaller when Conf is larger, and larger when Conf is smaller.
[0093] Step 133: Extract a list of all connection paths in the initial scheduling strategy topology, and record the identifiers of the decision units connected to both ends of each connection path.
[0094] The scheduling system reads information on all directed connection paths from the edge list of the initial scheduling strategy topology. Each path information includes a path identifier, a source decision unit identifier (IdSrc), and a destination decision unit identifier (IdDst). All path information entries are then compiled into a connection path list.
[0095] Step 134: For each connection path in the connection path list, read the uncertainty measures corresponding to the decision units at both ends of the connection path and add them together to obtain the cumulative uncertainty value of the connection path.
[0096] Process each connection path sequentially according to the list. For the current path, use IdSrc as the key to find the Uncert value UncertSrc corresponding to the source decision unit, and use IdDst as the key to find the Uncert value UncertDst corresponding to the destination decision unit. Calculate the cumulative uncertainty value UncertSum for this path, which is equal to the sum of UncertSrc and UncertDst, and temporarily store UncertSum in the processing record for this path.
[0097] Step 135: Obtain the pre-configured pruning decision boundary, which is determined by the lower quantile of the statistical distribution of the survival rate of connection paths in historical scheduling tasks.
[0098] The scheduling system reads the pruning decision threshold ThrPrn from the parameter storage area. The ThrPrn determination mechanism is as follows: Collect topology pruning logs from past scheduling cycles. For each connection path that appears in the historical record, calculate the proportion of rounds in which it was retained relative to the total number of rounds it participated in, obtaining the historical survival rate of that path. Collect the historical survival rates of all paths to form a survival rate sample set. Sort this sample set in ascending order of value, and take the survival rate value corresponding to a preset lower quantile as ThrPrn. The value of ThrPrn reflects the statistical boundary for whether or not to retain a connection path in historical pruning.
[0099] Step 136: Compare the accumulated uncertainty value of each connection path with the pruning decision threshold, mark the connection path with the accumulated uncertainty value below the pruning decision threshold as a frozen path, perform a deactivation operation on the frozen path, and block the gradient signal and feature signal transmitted along the frozen path.
[0100] The scheduling system retrieves the UncertSum corresponding to each path in the connection path list and compares it with ThrPrn. If UncertSum is less than ThrPrn, it indicates that the scheduling determinism of the decision units at both ends of the path is high, the structural contribution of the path is low, and it is determined to be a path that can be pruned. The scheduling system changes the status flag field of the path from active to frozen and writes the path's identifier into the frozen path list.
[0101] For each path in the frozen path list, perform a deactivation operation one by one: in the message passing engine of the topology graph, cancel the callback function reference of the path from the scheduling table so that messages are no longer sent along the path during subsequent forward propagation; at the same time, in the gradient computation graph of back propagation, remove the edge corresponding to the path from the computation graph to prevent the gradient from propagating back along this path.
[0102] Step 137: Traverse all decision units and check if there are any isolated decision units that have no connection path to other decision units after the deactivation operation. Remove the isolated decision units from the topology.
[0103] For each decision unit, check the number of active connection paths. This is done by iterating through the entire list of connection paths, filtering for paths with an active status flag and whose source or destination is identified by the decision unit, and counting the results. If the count is 0, it indicates that the decision unit has no active connections, is considered an isolated decision unit, and its identifier is added to the deletion list. Iterate through the deletion list, remove the corresponding decision unit from the topology node set, and clear the storage resources it occupies.
[0104] Step 138: Perform connectivity component detection on the topology after completing the deactivation of frozen paths and deletion of isolated decision units, so that the remaining decision units form a connected topology, and obtain the topology of the pruned scheduling strategy.
[0105] The scheduling system employs a depth-first search (DFS) algorithm to analyze the connectivity of the remaining topology after pruning. Starting from any remaining decision unit, it recursively visits all reachable decision units along active connections, marking a connected component after each DFS cycle. If there are still unvisited decision units, the system starts the next DFS cycle from the unvisited node, marking another connected component, until all remaining decision units have been visited. If multiple connected components are detected, the scheduling system selects the decision unit with the lowest uncertainty metric within each connected component as the core to be retained. This core and its adjacent active connections are preserved, while decision units and connections in other connected components are removed to restore the overall topology to a single connected state. The final retained decision units and active connections together constitute the topology of the pruned scheduling strategy.
[0106] Step 139: Generate a topology snapshot of the scheduling strategy topology after pruning. The topology snapshot records the identifiers of each retained decision unit and their valid connection paths.
[0107] The scheduling system serializes the current state of the pruned topology into a topology snapshot. The snapshot contains a list of retained decision unit identifiers and a list of valid connection paths. Each record in the valid connection path list includes a source decision unit identifier and a destination decision unit identifier. The topology snapshot is stored in an immutable data structure and serves as the baseline reference topology for subsequent growth operations.
[0108] Step 140: Monitor the semantic change events of the cluster of tasks to be scheduled. When a new task semantic is captured, extract the new task semantic label. In the post-pruning scheduling strategy topology, determine the existing decision units that meet similar conditions with the new task semantic label as growth base points. Based on the parameters of the sub-network generated by the scheduling probability distribution of the growth base points, generate new decision units through mutation. Establish the connection between the new decision units and the existing decision units according to the new data dependency relationship to obtain the post-grown scheduling strategy topology.
[0109] In step 140, specifically, the task type list of the task cluster to be scheduled is continuously scanned to capture semantic change events. New task semantic labels are extracted from the semantics of the new tasks and encoded as semantic embedding vectors. The semantic direction cosine similarity with each existing decision unit is calculated in the post-pruned scheduling strategy topology, and the point with the highest similarity is selected as the growth base point. A parameter copy of the subnetwork is generated by copying the scheduling probability distribution within the growth base point. A Gaussian perturbation modulated by the inverse of similarity is applied to the weights of the intermediate transformation layer to obtain the mutated parameters and generate new decision units. New data dependencies are extracted based on the calculation logic of the semantic association of the new tasks. Directed connection paths are established between the new decision units and existing decision units. The new decision units and new connection paths are incorporated into the post-pruned scheduling strategy topology. After topology sorting and verification, the post-grown scheduling strategy topology is obtained. An exemplary implementation is as follows:
[0110] Step 141: Continuously scan the task type list of the task cluster to be scheduled. When an unknown task type that has not been previously recorded is detected in the task type list, a semantic change event is triggered.
[0111] The scheduling system maintains a global task type record set, which stores all task type identifiers that have appeared within the current scheduling cycle. The scheduling system initiates a background monitoring process that scans the task type list of the task clusters to be scheduled at fixed intervals. During each scan, the task type identifiers in the list are compared item by item with those in the global task type record set. If a task type identifier appears in the list but is not registered in the record set, an unknown task type is detected. The scheduling system immediately triggers a semantic change event, generating an event object whose payload contains complete metadata about the unknown task type.
[0112] Step 142: Extract core business semantic terms from the description metadata of unknown task types, and concatenate the core business semantic terms into new task semantic tags.
[0113] The scheduling system parses the metadata describing unknown task types in the semantic change event payload. It performs word segmentation and part-of-speech tagging on the metadata text. Word segmentation breaks the text into a sequence of words, and part-of-speech tagging assigns a part-of-speech tag to each word. Based on the part-of-speech tags, words belonging to semantic nouns or action verbs are selected, while function words and stop words are filtered out. The remaining core business semantic words are concatenated according to their original order of appearance in the metadata text, using spaces as delimiters, to form a string that serves as the semantic tag for the new task.
[0114] Step 143: Input the newly added task semantic label into the semantic encoder to generate the new semantic embedding vector.
[0115] The scheduling system inputs the newly added task semantic label string into the semantic encoder. The semantic encoder uses the same set of encoder weight parameters as in step 1211. The encoder performs word segmentation and word vector mapping on the newly added task semantic label, then performs sequential and reverse encoding through a bidirectional long short-term memory network, concatenates the forward and reverse terminal hidden states and maps them through a fully connected layer, and outputs a newly added semantic embedding vector with dimension Ds.
[0116] Step 144: In the post-pruning scheduling strategy topology, extract the semantic embedding vector of the node semantic label of the operator node bound to each existing decision unit.
[0117] The scheduling system reads the list of reserved decision unit identifiers recorded in the topology snapshot. For each reserved decision unit identifier in the list, it accesses the persistent storage area of that decision unit and reads the operator node representation vector from it. The operator node representation vector is the result of concatenating the semantic embedding vector and the demand embedding vector. Taking its first Ds components yields the semantic embedding vector corresponding to that decision unit. The correspondence between all semantic embedding vectors and decision unit identifiers is recorded in a temporary lookup structure.
[0118] Step 145: Calculate the semantic direction cosine similarity between the newly added semantic embedding vector and the semantic embedding vectors corresponding to each existing decision unit, and select the existing decision unit with the highest similarity as the growth base point.
[0119] For each existing decision unit, the scheduling system calculates the direction cosine similarity between the newly added semantic embedding vector and the semantic embedding vector of that existing decision unit. The calculation process is as follows: The inner product value is obtained by summing the element-wise products of the newly added semantic embedding vector and the semantic embedding vector; the L2 norm of the newly added semantic embedding vector (i.e., the square root of the sum of squares of its components) and the L2 norm of the semantic embedding vector (i.e., the square root of the sum of squares of its components) are calculated separately; the inner product value is divided by the product of the two L2 norms, and the quotient is the direction cosine similarity. After traversing all existing decision units and completing the direction cosine similarity calculation, all direction cosine similarity values are compared, and the existing decision unit with the largest value is selected as the growth base point, denoted as IdBase.
[0120] Step 146: Copy the scheduling probability distribution inside the growth base point to generate all parameters of the sub-network and generate parameter copies.
[0121] The scheduling system accesses the storage area of the growth base point and traverses it to read the complete parameter set of the sub-network generated by its scheduling probability distribution. The parameter set includes the weight matrix and bias vector of the input mapping layer, the weight matrices of the two fully connected layers of the main path of each residual block in the intermediate transformation layer, the scaling and offset parameters for layer normalization, and the weight matrix of the probability output layer. The scheduling system allocates an equal-sized parameter copy area in memory and copies each read parameter byte-by-byte to the copy area, generating parameter copies. The parameter copies are numerically identical to the original parameters but are independent in memory address.
[0122] Step 147: Apply Gaussian perturbation to the intermediate transformation layer weight matrix in the parameter copy to obtain the mutated parameters. The magnitude of the Gaussian perturbation is modulated by the inverse of the semantic direction cosine similarity between the semantic label of the newly added task and the semantic label of the growth base point.
[0123] The scheduling system performs a perturbation operation on all weight matrices belonging to the intermediate transformation layer in the parameter replica. For each element in each weight matrix, the scheduling system independently samples a perturbation offset from a Gaussian distribution with a mean of 0. The standard deviation of this Gaussian distribution is determined by the following rule: the base perturbation amplitude value BasePert divided by the direction cosine similarity SimCosBase calculated in step 145, i.e., standard deviation = BasePert / SimCosBase. When SimCosBase is small, the standard deviation is large, and the perturbation amount increases; when SimCosBase is large, the standard deviation is small, and the perturbation amount decreases. The perturbation offset of each sampled element is added to the original value of the corresponding weight matrix element, completing the mutation of the intermediate transformation layer parameters. The parameters of the input mapping layer and the probability output layer remain unchanged. All mutated parameters are packaged into a mutated parameter set.
[0124] Step 148: Generate new decision units and load the mutated parameters into the scheduling probability distribution generation subnetwork of the new decision units.
[0125] The scheduling system instantiates a new decision unit container. Inside the new container, a scheduling probability distribution generation subnetwork skeleton is built according to the same network structure as in step 1212, including placeholder storage areas for the input mapping layer, intermediate transformation layer, and probability output layer. Subsequently, the corresponding parameters from the mutated parameter set are written layer by layer into the storage areas of each layer of the new network, so that the scheduling probability distribution generation subnetwork of the new decision unit obtains the initial weights modulated by the mutation. The internal network of the new decision unit is structurally isomorphic to the growth base point, but there is a directional difference in the weights of the intermediate transformation layer.
[0126] Step 149: Extract the new data dependencies based on the computational logic associated with the new task semantics, determine the source decision unit and target decision unit that the new decision unit should connect to based on the new data dependencies, and add the corresponding new connection paths in the post-pruning scheduling strategy topology.
[0127] The scheduling system reads the computational logic description of the new task from the semantic change event payload. This description includes the input data source and output data destination for the new task. The scheduling system parses these descriptions and extracts a set of new data dependencies. Each new data dependency specifies an existing operator node corresponding to a data source and an existing operator node corresponding to a data destination. The scheduling system locates the decision units mapped to these existing operator nodes in the pruned scheduling strategy topology, identifying them as the source and destination decision units for the new decision unit. A directed connection path is created between the source and new decision units, and another directed connection path is created between the new and destination decision units. The edges of the connection paths are generated and bound in the same manner as in step 1213.
[0128] Step 1410: Incorporate the new decision-making unit and the new connection path into the pruned scheduling strategy topology, and perform topology sorting verification on the incorporated topology to obtain the grown scheduling strategy topology.
[0129] The scheduling system adds the new decision unit identifier to the node set of the pruned scheduling strategy topology and adds the newly created connection paths to the edge set. A topology sorting check is performed on the complete topology after the merging operation. The topology sorting check uses a depth-first loop detection algorithm. If a directed loop is found, the uncertainty measure of each edge along the loop is checked, and the edge with the lowest uncertainty measure is pruned to break the loop. After the check passes and all loops are broken, the topology snapshot is updated to obtain the grown scheduling strategy topology.
[0130] Step 150: Traverse all decision units corresponding to the operator nodes in the directed computation graph in the growth scheduling strategy topology, and sequentially perform scheduling action sampling. Select the computing power resource type and allocation amount for each operator node and combine them into a computing power center resource scheduling instruction.
[0131] Step 151: Obtain the topological sorting sequence of all decision units in the growth-after-scheduling strategy topology, and traverse each decision unit sequentially according to the topological sorting sequence.
[0132] The scheduling system executes a topology sorting algorithm on the grown scheduling strategy topology. The algorithm starts with an in-degree list, counting the number of directed connections from other decision units to each decision unit as its in-degree. Decision units with an in-degree of 0 are added to a processing queue. A decision unit is retrieved from the queue and output to the sorted sequence. The in-degree of all adjacent decision units pointed to by this decision unit is decremented by one. If the in-degree becomes 0 after decrementing, the adjacent decision unit is added to the processing queue. This process is repeated until the queue is empty. The final linear sorted sequence is the topology sorted sequence. The scheduling system traverses each decision unit sequentially according to this sequence.
[0133] Step 152: For the currently traversed decision unit, extract the scheduling action probability distribution stored in the decision unit. The scheduling action probability distribution is generated by the sub-network of the decision unit's scheduling probability distribution and output after forward propagation based on the corresponding operator node representation vector.
[0134] For the current decision unit, the scheduling system reads the operator node representation vector from its storage area and sends this vector into the scheduling probability distribution generation subnetwork within that decision unit for forward propagation. The forward propagation calculation passes through each network layer sequentially. After generating the original score vector at the probability output layer, it is converted into a scheduling action probability distribution vector through probability normalization. The scheduling system then reads this scheduling action probability distribution vector into a temporary buffer.
[0135] Step 153: Random sampling is performed based on the probability distribution of scheduling actions to obtain scheduling action identifiers. Each scheduling action identifier corresponds to a candidate scheduling action consisting of computing resource type and resource quota.
[0136] The scheduling system uses the probability distribution vector of scheduling actions as the category probability parameter of a multinomial distribution and calls a random sampling function to perform one sampling. Internally, the random sampling function divides the sampling interval according to the probability distribution, generating a random number uniformly distributed between 0 and 1. The category index is determined based on the interval in which the random number falls; this category index is the scheduling action identifier, and its value is an integer between 1 and Nact. Each scheduling action identifier uniquely corresponds to a candidate scheduling action consisting of a computing resource type field and a resource quota field.
[0137] Step 154: Query the preset scheduling action mapping table according to the scheduling action identifier to determine the selected computing resource type and the corresponding number of processor cores, memory capacity and accelerator type allocation.
[0138] The scheduling system maintains a scheduling action mapping table. Each row in the table corresponds to a scheduling action identifier, and the row records the resource details corresponding to that action. The scheduling system uses the scheduling action identifier as the row index to look up the values of the computing resource type field TypeRes, the processor core allocation field AllocCore, the memory capacity allocation field AllocMem, and the accelerator type allocation field AllocAcc stored in that row.
[0139] Step 155: Determine whether the current available resources in the computing center resource pool meet the allocation requirements. If they do, lock the corresponding resources for the operator node and update the available resource quantity. If they do not meet the requirements, remove the action from the scheduling action probability distribution and resample.
[0140] The scheduling system reads a snapshot of the currently available resources in the computing center's resource pool. This snapshot records the remaining number of processor cores, memory capacity, and the number of available accelerators of each type. It compares AllocCore with the number of available processor cores, AllocMem with the available memory capacity, and AllocAcc with the number of available accelerators of the corresponding type. If all three comparisons result in an available quantity greater than or equal to the allocated quantity, the condition is met, and the corresponding resource for that operator node is locked. The allocated quantity is then subtracted from the available quantity in the resource pool snapshot. If any available quantity is insufficient, the scheduling system temporarily sets the probability value corresponding to the scheduling action identifier to 0 in the scheduling action probability distribution vector. It then re-normalizes the remaining non-zero probability values and repeats steps 153 to 155 with the new normalized probability distribution until a scheduling action that satisfies the available resource conditions is sampled.
[0141] Step 156: Summarize the selected computing resource types and allocation amounts of each operator node, generate resource scheduling details including operator node identifiers, resource types and allocation amounts, and combine them into computing center resource scheduling instructions.
[0142] Following the topological sorting sequence, the scheduling system collects the resource details of the final selected scheduling action for each operator node. Each resource scheduling detail record includes the operator node identifier IdOp, the computing resource type TypeRes, the processor core allocation AllocCore, the memory capacity allocation AllocMem, and the accelerator type allocation AllocAcc. The resource scheduling details of all operator nodes are compiled into a scheduling detail table. The scheduling system packages the scheduling detail table together with the cluster identifier of the task to be scheduled and the timestamp to generate a computing center resource scheduling instruction, which is then sent to the computing center's resource allocation execution module for physical resource binding.
[0143] Based on steps 110-150, steps 210-260 are also included:
[0144] Step 210: During the execution of the computing power center resource scheduling instructions, the runtime status parameters of each computing power resource node are captured by continuous tracking, and a resource load distribution map representing the real-time load status of each computing power resource node is generated based on the runtime status parameters.
[0145] After the resource scheduling instructions from the computing center are issued and executed, the scheduling system continuously monitors the runtime status parameters reported by each computing resource node. These runtime status parameters include multi-dimensional indicators such as processor utilization, memory utilization, accelerator utilization, network throughput, and input / output wait queue depth. The scheduling system organizes the collected multi-dimensional status parameters into a sequence of state vectors according to the resource node dimension, with each component of each state vector corresponding to a state parameter indicator. A sliding window process is applied to each state vector sequence on the time axis, calculating the mean and standard deviation of each indicator within the window to form a load feature vector within that window. The distance between each resource node and the full-load reference vector in the feature space is calculated. This distance value is combined with the resource node's position coordinates in the physical topology, and a heat-filling algorithm is used to generate a resource load distribution map. The resource load distribution map is stored in the form of a two-dimensional matrix or a three-dimensional tensor, where each element of the matrix corresponds to a resource node region, and the element value reflects the comprehensive load intensity of that region.
[0146] Step 220: Identify abnormal resource nodes whose load offset exceeds the preset offset tolerance range from the resource load distribution map, and locate the associated decision units that have a scheduling action mapping relationship with the abnormal resource nodes in the post-grown scheduling strategy topology.
[0147] The scheduling system performs anomaly detection and analysis on the resource load distribution map. It calculates the global load mean and standard deviation for each resource node. For each resource node, the load intensity offset is calculated as the difference between the load intensity and the global load mean, divided by the global load standard deviation. A preset offset tolerance range is defined by a lower and upper threshold, which are adaptively determined using the quantiles of the empirical distribution of historical load fluctuations. If the offset of any resource node exceeds the upper threshold, it is identified as an overloaded abnormal resource node; if it is below the lower threshold, it is identified as an underloaded abnormal resource node. The identifiers of all abnormal resource nodes are aggregated into an abnormal node set. In the grown scheduling strategy topology, the system searches backward along the mapping link of scheduling actions to locate the associated decision units that allocate resources to these abnormal resource nodes, generating an associated decision unit set.
[0148] Step 230: Extract the message transmission path maintained by the associated decision-making unit, extract the historical edge representation sequence transmitted along the message transmission path, and determine the path disturbance level by analyzing the representation drift amplitude of the historical edge representation sequence within the time window.
[0149] For each decision unit in the set of associated decision units, identify the active connection paths in the post-growth scheduling strategy topology that originate from or are destined for that decision unit, and extract the historical edge representation sequence transmitted by these paths within the most recent time window. The historical edge representation sequence is a set of edge representation vectors arranged in temporal order. For edge representation vectors at adjacent time points, calculate the L2 norm of the vector difference as the instantaneous drift amount for that adjacent time step. Take the average of the instantaneous drift amounts for all adjacent time steps within the time window to obtain the representation drift amplitude of the path. Compare the representation drift amplitude with a preset multi-level perturbation threshold interval one by one; assign the corresponding perturbation level to the interval it falls into.
[0150] Step 240: Based on the perturbation level, select the set of paths to be reconstructed whose perturbation transmission intensity is higher than the perturbation transmission threshold, and include the decision units that are directly connected to each path in the set of paths to be reconstructed into the scope of local reconstruction.
[0151] The scheduling system evaluates the disturbance propagation strength of each connection path. The disturbance propagation strength is a weighted combination of the disturbance level and the uncertainty measure of the decision-making unit associated with the path. The weighting coefficients are configured so that paths with high disturbance levels and large uncertainties in associated decision-making units have higher disturbance propagation strengths. The scheduling system obtains a disturbance propagation threshold, which is quantiles on the empirical probability distribution of paths included in the reconstruction scope during historical reconstruction operations. The disturbance propagation strength of each path is compared with the disturbance propagation threshold, and paths with disturbance propagation strengths higher than the threshold are selected to form a set of paths to be reconstructed. The source decision-making unit identifier and destination decision-making unit identifier of each path in the set of paths to be reconstructed are extracted, and all these decision-making units are assigned to a local reconstruction scope.
[0152] Step 250: While keeping the connection relationship between the local reconstruction range and the non-reconstruction range unchanged, freeze the intermediate transformation layer weights of the subnetwork of the scheduling probability distribution of each decision unit in the local reconstruction range, and apply directional perturbation to the bias term of the probability output layer to generate a modified scheduling probability distribution.
[0153] For each decision unit within the local reconstruction range, the scheduling system maintains the connection path between it and decision units outside the reconstruction range. Within the local reconstruction range, the weights of the later residual blocks in the intermediate transformation layer of the scheduling probability distribution generation subnetwork for each decision unit are frozen, meaning these weights are set to an untrainable state in subsequent updates. The weights of the unfrozen earlier residual blocks remain trainable. For the probability output layer of each decision unit, the scheduling system calculates the consistency deviation direction between the current scheduling action probability distribution of that decision unit and the optimal resource allocation direction indicated by the resource load distribution map. A perturbation bias vector in the same direction as the scheduling action space descriptor is generated along this deviation direction. This perturbation bias vector is added to the original bias term of the probability output layer, causing the output score during forward propagation to shift towards the expected scheduling action direction, thus obtaining the corrected scheduling probability distribution.
[0154] Step 260: Resample the scheduling actions within the local reconstruction range using the corrected scheduling probability distribution, and output the adjusted resource scheduling instructions to correct the load status of abnormal resource nodes.
[0155] For each decision unit within the local reconstruction scope, the scheduling system reads its corrected scheduling probability distribution and performs random sampling in the same manner as in step 153 to obtain a new scheduling action identifier. Based on the new scheduling action identifier, the corrected computing resource type and allocation amount are determined. The corrected resource allocations of all decision units within the local reconstruction scope are aggregated into an adjusted resource scheduling instruction and sent to the computing center's resource allocation module to trigger online correction of the load status of abnormal resource nodes.
[0156] Based on steps 110-150, steps 310-350 are also included:
[0157] Step 310: After the scheduling strategy topology has undergone multiple scheduling tasks, extract the decision base membrane vector reflecting the scheduling preference tendency from the parameters of the subnetwork generated by the scheduling probability distribution of each decision unit, and organize the decision base membrane vectors of each decision unit into a scheduling decision base membrane map according to the connection relationship in the scheduling strategy topology after growth.
[0158] After multiple rounds of iterative updates to the scheduling tasks, the network parameters within each decision unit in the grown scheduling strategy topology implicitly encode its scheduling behavior preferences. The scheduling system performs parameter extraction on the subnetwork generated by the scheduling probability distribution of each decision unit. The extracted object is the layer normalized scaling parameter vector of the last residual block of the intermediate transformation layer. This vector is a learnable vector of length Dh, and the magnitude of each component reflects the importance weight of the corresponding feature dimension in the scheduling decision. This scaling parameter vector is used as the decision base membrane vector of this decision unit. After traversing all decision units in the grown scheduling strategy topology to obtain all decision base membrane vectors, the decision unit identifier is used as a node, the decision base membrane vector is used as a node attribute, and the connecting paths are used as edges to construct the scheduling decision base membrane graph.
[0159] Step 320: Perform time-series alignment of the evolution trajectory of the scheduling decision base membrane map under different scheduling cycles to generate the scheduling base membrane evolution manifold.
[0160] The scheduling system records a snapshot of the scheduling decision base membrane map at the end of each scheduling cycle, forming a sequence of map snapshots. For map snapshots of two adjacent scheduling cycles, the change vector between the decision base membrane vectors of the corresponding decision units is calculated. The change vectors of all decision units at all time steps are aligned along the time axis, and a manifold learning algorithm is used to perform dimensionality reduction embedding on the high-dimensional change vector sequence. The dimensionality-reduced low-dimensional trajectory constitutes the scheduling base membrane evolution manifold. Each point in the manifold represents the base membrane state of one decision unit at the corresponding time step, and the spatial proximity of the points reflects the similarity of decision preferences.
[0161] Step 330: Detect clusters of decision-making units with convergent decision-making patterns from the scheduling base membrane evolution manifold, and extract the divergence direction vector of each decision-making unit in the scheduling base membrane evolution manifold for each decision-making unit within the cluster.
[0162] The scheduling system runs a density-based clustering algorithm on the scheduling base membrane evolution manifold to identify high-density agglomeration regions in the manifold space, each corresponding to a cluster of decision-making units. Within each cluster, the scheduling preferences of the decision-making units gradually converge during evolution. For each decision-making unit within a cluster, the direction vector from that point to the geometric center of the cluster is calculated in the embedding space; this vector represents the divergence direction vector of that decision-making unit. The direction of the divergence direction vector indicates the differentiated evolutionary direction that causes the decision-making unit to deviate from the convergence trend.
[0163] Step 340: Perturb the parameters of the intermediate transformation layer weights in the subnetwork that generates the scheduling probability distribution of the corresponding decision unit along the divergence direction vector, thereby increasing the decision differentiation between the decision unit and other decision units in the scheduling action probability distribution space.
[0164] For each decision unit within the condensed cluster, the scheduling system applies a directional perturbation to the weights of the intermediate transformation layer of the strategy subnetwork along its divergence direction vector. Specifically, the divergence direction vector is reconstructed to a high-dimensional parameter space via inverse manifold mapping, resulting in a perturbation matrix of the same dimension as the intermediate transformation layer weight matrix. This perturbation matrix is multiplied by a preset perturbation coefficient and then added element-wise to the original intermediate transformation layer weight matrix to complete the directional parameter perturbation. After forward propagation, the perturbed weight matrix exhibits increased decision differentiation from other decision units in the output of the scheduling action probability distribution.
[0165] Step 350: The subnetwork generated by the parameter perturbation scheduling probability distribution is redeployed into the grown scheduling strategy topology. In subsequent scheduling tasks, scheduling actions are sampled based on the increased decision heterogeneity, so that each decision unit in the decision unit cluster is differentiated into a differentiated scheduling strategy branch.
[0166] The scheduling system writes the perturbed weight matrix back to the storage area of the corresponding decision unit and replaces the original network with a sub-network generated by the perturbed scheduling probability distribution. In subsequent rounds of scheduling tasks, each decision unit within the cluster independently performs scheduling action sampling according to the scheduling action probability distribution generated by its own perturbed network, thus differentiating into differentiated scheduling strategy branches that execute different resource allocation strategies for the same type of operators, thereby improving the diversity of scheduling strategies.
[0167] In this embodiment of the invention, to facilitate those skilled in the art to clearly and completely implement the above technical solutions, the following supplementary explanations are provided regarding the scheduling probability distribution generation sub-network, semantic encoder, demand fusion encoder, gated embedding layer, conditional computation layer, three-channel attention weighted fusion module, decision output layer, probability normalization module, and density clustering-based algorithm:
[0168] (1) The semantic encoder is a text encoding model based on a combination of a word embedding lookup table and a bidirectional long short-term memory network. The word embedding lookup table is a trainable embedding matrix, with the number of rows equal to the vocabulary size and the number of columns equal to the word vector dimension. The bidirectional long short-term memory network consists of one forward long short-term memory network and one backward long short-term memory network. Each direction of the network is composed of two stacked long short-term memory unit layers, and the hidden state dimension of each long short-term memory unit layer is consistent with the word vector dimension.
[0169] Within the Long Short-Term Memory (LSTM) unit, there are four gating structures: a forget gate, an input gate, a unit state update gate, and an output gate. Each gating structure is implemented by a combination of a fully connected linear transformation and a nonlinear activation function. The forget gate and input gate use the Sigmoid function, the unit state update gate uses the hyperbolic tangent function, and the output gate uses a combination of the Sigmoid and hyperbolic tangent functions. The forward network processes the input at each time step sequentially from front to back along the sequence, and the backward network processes it sequentially from back to front using the same mechanism. After concatenating the last hidden state of the forward network and the last hidden state of the backward network, the concatenated vector is mapped to a semantic embedding vector through a fully connected mapping layer. The training data for this semantic encoder comes from the task description corpus accumulated in the historical task logs of the computing center. The corpus consists of tens of thousands of task type description texts, each text is accompanied by a corresponding standardized semantic category label.
[0170] During training, the word segmentation sequence of the task type description text is used as input, and standardized semantic category labels are used as supervision signals. The cross-entropy loss function is used to measure the difference between the class prediction output of the encoder and the true class label after mapping by the classifier. The Adam optimizer is selected, and the initial learning rate is scaled proportionally according to the vocabulary size and batch size. The batch size is set according to the available GPU memory capacity. The training epochs are stopped early when the classification accuracy on the validation set no longer improves for several consecutive epochs. In inference applications, the semantic label string of the node to be encoded is directly fed into the trained semantic encoder, and the semantic embedding vector output by the encoder can be directly used for downstream vector concatenation or similarity calculation.
[0171] (2) The specific structure of the demand fusion encoder is a feedforward neural network consisting of two fully connected layers stacked together.
[0172] The first fully connected layer has an input dimension of 3 times Lc and an output dimension of Ds. It is followed by a linear unit activation function with leakage correction. This activation function outputs the input value for each component of the input vector in the positive interval and multiplies the input value by a preset negative slope constant in the negative interval. The second fully connected layer has an input dimension of Ds and an output dimension of Ds. This layer is not followed by a non-linear activation function. The weight matrices of both fully connected layers are randomly initialized using a truncated normal distribution, and the bias vector is initialized to 0. This requires end-to-end training of the fusion encoder, semantic encoder, and scheduling probability distribution generation subnetwork.
[0173] Each training sample in the training data contains structured data describing the computing resource requirements of one operator node and its corresponding ideal scheduling action label. The input is an intermediate demand vector concatenated from the processor core number encoding vector, memory capacity encoding vector, and accelerator type encoding vector, and the output is a demand embedding vector. During training, the joint loss function is a weighted sum of the cross-entropy loss term for the final scheduling action classification and the mutual information maximization regularization term between the demand embedding vector and the semantic embedding vector. The optimizer and training epoch settings are synchronized with the training of the overall scheduling policy network.
[0174] (3) The structure of the three-channel attention weighted fusion module consists of three parallel scoring network branches and one weighted summation unit. Each scoring network branch independently receives the corresponding resource encoding vector as input. The branch contains a single fully connected layer that maps the encoding vector of length Lr to a scalar score. The weight vector of the fully connected layer has dimensions of Lr rows and 1 column. The scalar scores output by the three scoring branches are normalized by the Softmax function to generate three attention weights. The values of the three attention weights are all between 0 and 1 and their sum is 1. The weighted summation unit performs element-wise scalar multiplication of the attention weights belonging to each channel with the encoding vector of that channel, and then performs element-wise addition of the three weighted vectors at the corresponding component positions to obtain the final demand embedding vector. This three-channel attention weighted fusion module serves as a pre-component of the demand fusion encoder, and its parameters are updated synchronously with the demand fusion encoder during joint training.
[0175] (4) The core structure of the hollow fully connected sublayer in the conditional computation layer is a linear fully connected layer, but it differs from the standard fully connected layer in how its weight matrix elements are used. In the standard fully connected layer, when performing matrix multiplication of the input vector and the weight matrix, the elements of each column of the weight matrix are used sequentially. However, when the hollow fully connected sublayer performs matrix multiplication, it introduces equally spaced sampling at the column indices of the weight matrix according to the setting of the inflation factor. The sampling interval is equal to the value of the inflation factor, which is an integer greater than or equal to 1.
[0176] When the inflation factor is 1, the hollow fully connected sublayer degenerates into a standard fully connected layer, and the column weights participate in the inner product calculation sequentially. When the inflation factor is greater than 1, adjacent columns participating in the inner product calculation skip a fixed number of column indices in the original weight matrix, thereby expanding the equivalent receptive field in the implicit feature space. The inflation factors of each parallel computing branch are configured exponentially, with the specific value sequence increasing according to a power of 2. The inflation factor of the b-th branch is 2 to the power of b minus 1. The weight matrix of each branch has a uniform dimension of Ds rows and Dc columns, with a bias vector length of Dc. Each branch is initialized with weights filled using a truncated normal distribution, and the parameters of each branch are updated independently during training.
[0177] (5) The structure of the scheduling probability distribution generation subnetwork in the first branch consists of three layers stacked sequentially: the input mapping layer, the intermediate transformation layer, and the probability output layer.
[0178] The input mapping layer consists of a fully connected linear layer followed by a linear unit activation layer with leakage correction.
[0179] The intermediate transformation layer consists of six stacked residual blocks. Each residual block contains two information channels: a main path and a bypass path. The main path comprises two consecutive fully connected linear layers. The first fully connected linear layer is followed by a linear unit activation with leakage correction, while the second fully connected linear layer is not followed by an activation function. The bypass path is an identity mapping channel. The main path output and the bypass input are added element-wise, and then subjected to layer normalization. Layer normalization calculates the mean and variance of all components of the input vector. The input is then standardized using the mean and variance, and finally subjected to an affine transformation using learnable scaling and offset parameters.
[0180] The probability output layer is a single unbiased fully connected linear layer with a weight matrix of Dh rows and Nact columns. In the second branch, this sub-network consists of three stacked layers: a gated embedding layer, a conditional computation layer, and a decision output layer. The gated embedding layer contains a learnable parameter matrix and a gated activation function. The gated activation function is calculated by first calculating the Sigmoid function value for each component of the linear mapping output, and then multiplying the Sigmoid function value element-wise with the corresponding component of the linear mapping output. The conditional computation layer consists of five parallel computation branches and one fusion and concatenation module. The decision output layer is a single fully connected linear layer with a weight matrix of B×Dc rows and Nact columns. The training of this scheduling probability distribution generation sub-network aims to maximize the expected reward of the scheduling action and employs a policy gradient algorithm.
[0181] The training data comes from historical scheduling trajectories of the computing center. Each trajectory includes a sequence of operator node representation vectors, a corresponding sequence of scheduling actions, and a cumulative reward signal calculated from dimensions such as resource utilization and task completion time. The optimizer used is the Adam optimizer. During training, a batch training method is adopted. Each batch randomly samples several trajectory segments from the trajectory pool, estimates the policy gradient using the Monte Carlo method, and updates the network parameters along the gradient ascent direction.
[0182] (6) The probability normalization module internally implements the standard Softmax normalization algorithm and is a parameterless forward computation module. The input is the original score vector of dimension Nact, and the output is the normalized probability distribution vector of dimension Nact. The calculation process is as follows: perform an exponential function transformation on each element of the input vector to obtain an exponential vector; calculate the sum of all components in the exponential vector; divide each component in the exponential vector by the sum. The computational logic of this module is completely consistent in the training and inference phases.
[0183] (7) The density-based clustering algorithm uses DBSCAN, a density-based spatial clustering algorithm with noise. The DBSCAN algorithm takes the low-dimensional embedded coordinates of each data point in the scheduling base membrane evolution manifold as input, and automatically identifies high-density clustering regions in space by setting two core parameters: the neighborhood radius parameter and the minimum number of points in the neighborhood parameter. The algorithm starts from unvisited data points in the manifold space, counts the number of data points contained in the hypersphere centered on the data point and with the neighborhood radius parameter as the radius. If the number is greater than or equal to the minimum number of points in the neighborhood parameter, the data point is marked as a core point, and a cluster is formed by expanding to other data points in the neighborhood using the core point as the seed; if the number is less than the minimum number of points in the neighborhood parameter, it is temporarily marked as a noise point. The largest set of all core points connected by density reachability relations constitutes a decision unit cluster. Data points that do not belong to any cluster in the clustering results are judged as outliers. The values of the neighborhood radius parameter and the minimum number of points in the neighborhood parameter are determined by analyzing the inflection point of the distance distribution statistical curve of each data point in the scheduling base membrane evolution manifold, and the parameter combination that maximizes the clustering silhouette coefficient is selected.
[0184] This invention constructs a mapping mechanism from a directed computation graph to the initial scheduling strategy topology and integrates operator node semantic labels into the scheduling probability distribution to generate a sub-network. This deeply couples scheduling decisions with computational semantics, improving the semantic rationality of scheduling action generation. Uncertainty measurement and connection path pruning based on the concentration of scheduling action probability distribution continuously streamline the redundant structure of the scheduling strategy topology, maintaining the efficiency and robustness of the decision network. When the semantics of the task cluster to be scheduled change, growth base points are located through semantic similarity and new decision units are generated through mutation, adaptively expanding the scheduling strategy topology. This enables the scheduling structure to dynamically evolve to adapt to incremental updates in task types. Finally, the grown scheduling strategy topology is traversed to sample scheduling actions and generate resource instructions, achieving an end-to-end reinforcement learning scheduling closed loop from task parsing, topology construction, structural optimization, dynamic growth to instruction output. Overall, this approach balances the accuracy, compactness, and continuous adaptability to newly added task semantics of the scheduling strategy.
[0185] This invention provides a computer-readable storage medium storing a program that, when executed by a processor, implements the reinforcement learning-based dynamic scheduling method for computing center resources.
[0186] This invention provides a processor for running a program, wherein the program executes the reinforcement learning-based dynamic scheduling method for computing center resources.
[0187] In embodiments of the present invention, such as Figure 2 As shown, the computing center resource dynamic scheduling system 100 includes at least one processor 101, and at least one memory 102 and bus 103 connected to the processor 101; wherein, the processor 101 and the memory 102 communicate with each other through the bus 103; the processor 101 is used to call the program instructions in the memory 102 to execute the above-mentioned reinforcement learning-based computing center resource dynamic scheduling method.
[0188] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, dynamic resource scheduling systems (systems) for computing centers, and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable electronic device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable electronic device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0189] In a typical configuration, a dynamic resource scheduling system for a computing center includes one or more processors (CPUs), memory, and a bus. The system may also include input / output interfaces, network interfaces, etc.
[0190] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, like read-only memory (ROM) or flash RAM, and memory includes at least one memory chip. Memory is an example of computer-readable media.
[0191] Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage. Computer-readable storage media or any other non-transferable media can be used to store information that can be accessed by a computing center's dynamic resource scheduling system. As defined herein, computer-readable media does not include transient media, such as modulated data signals and carrier waves.
[0192] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or computer-readable storage medium that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or computer-readable storage medium. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or computer-readable storage medium that includes that element.
[0193] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0194] The above are merely embodiments of the present invention and are not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of the present invention should be included within the scope of the claims of the present invention.
Claims
1. A method for dynamic scheduling of computing center resources based on reinforcement learning, characterized in that, include: Obtain the cluster of tasks to be scheduled, parse the cluster of tasks to be scheduled into a directed computation graph with operator nodes and data dependency edges, and configure node semantic labels for each operator node; The operator nodes in the directed computation graph are mapped one-to-one to decision units, and each decision unit is connected according to the data dependency edge to generate an initial scheduling strategy topology. Within each decision unit, a sub-network is created based on the scheduling probability distribution of the node semantic label. The uncertainty measure of each decision unit is determined based on the degree of concentration of the probability distribution of the scheduling actions output by each decision unit. The connection path between decision units is frozen and pruned according to the uncertainty measure and the pruning decision boundary to obtain the pruned scheduling strategy topology. Monitor the semantic change events of the cluster of tasks to be scheduled. When a new task semantic is captured, extract the new task semantic label. In the post-pruning scheduling strategy topology, determine the existing decision units that meet similar conditions with the new task semantic label as growth base points. Based on the parameters of the sub-network generated by the scheduling probability distribution of the growth base points, generate new decision units through mutation. Establish the connection between the new decision units and the existing decision units according to the new data dependency relationship to obtain the post-grown scheduling strategy topology. Traverse all decision units corresponding to the operator nodes of the directed computation graph in the topology of the growth scheduling strategy, sequentially perform scheduling action sampling, select the computing power resource type and allocation amount for each operator node, and combine them into a computing power center resource scheduling instruction.
2. The method according to claim 1, characterized in that, The step of mapping operator nodes in the directed computation graph one-to-one to decision units, and connecting each decision unit according to the data dependency edges to generate an initial scheduling strategy topology, and creating a scheduling probability distribution generation sub-network based on the node semantic labels within each decision unit, includes: Semantic encoding is performed on the node semantic label of each operator node to generate a semantic embedding vector. The computing power resource requirement description of each operator node is extracted and multi-attribute fusion encoding is performed on the computing power resource requirement description to obtain a requirement embedding vector. The semantic embedding vector and the requirement embedding vector are concatenated to generate an operator node representation vector. A decision unit is initialized for each operator node, and a scheduling probability distribution generation subnetwork is built inside the decision unit. The scheduling probability distribution generation subnetwork consists of an input mapping layer, an intermediate transformation layer and a probability output layer connected in sequence. The operator node representation vector is input into the input mapping layer and subjected to linear transformation and nonlinear activation processing to obtain an intermediate representation. The intermediate representation is input into the intermediate transformation layer and processed by a fully connected transformation through multiple residual connections to output a scheduling action space descriptor. The scheduling action space descriptor is imported into the probability output layer. After performing an exponentialization operation on each component of the scheduling action space descriptor, the proportion of each component to the total exponentialization is calculated to generate the scheduling action probability distribution. The connection relationship between each decision unit is determined based on the data dependency edge. For each data dependency edge, a connection path is established between the decision unit corresponding to the source operator node and the decision unit corresponding to the target operator node, and an edge representation is bound to the connection path. The edge representation is formed by concatenating the output data dimension code of the source operator node and the input data dimension code of the target operator node. The parameters of the scheduling probability distribution generating subnetwork and the operator node representation vector are stored in each decision unit. The decision units and their connection paths are integrated to obtain the initial scheduling strategy topology.
3. The method according to claim 2, characterized in that, The step of determining the connection relationship between each decision unit based on the data dependency edge includes establishing a connection path between the decision unit corresponding to the source operator node and the decision unit corresponding to the target operator node for each data dependency edge, and binding an edge representation to the connection path, including: Traverse each data dependency edge in the directed computation graph and obtain the source operator node identifier and target operator node identifier of the data dependency edge; The source decision unit identifier corresponding to the source operator node identifier and the target decision unit identifier corresponding to the target operator node identifier are retrieved by querying the index mapping table. Determine whether a connection path already exists between the source decision unit identifier and the target decision unit identifier. If not, create a directed connection path from the source decision unit to the target decision unit. Based on the shape description of the output data tensor of the source operator node and the shape description of the input data tensor of the target operator node, an edge representation vector is generated. The final edge representation is determined by combining the edge offset parameter, and directed connection path binding and message passing callback function registration are performed.
4. The method according to claim 3, characterized in that, The process of generating an edge representation vector based on the shape description of the output data tensor of the source operator node and the shape description of the input data tensor of the target operator node, determining the final edge representation by combining the edge offset parameter, and performing directed connection path binding and message passing callback function registration includes: Obtain the shape description of the output data tensor of the source operator node, and serialize and encode the values of each dimension of the shape description to obtain the output data dimension code; Obtain the shape description of the input data tensor of the target operator node, and serialize and encode the numerical values of each dimension of the shape description to obtain the input data dimension encoding; The output data dimension encoding and the input data dimension encoding are concatenated sequentially to generate an edge representation vector; Learnable edge offset parameters are added to the edge representation vector, and the edge offset parameters have the same dimension as the edge representation vector to obtain the final edge representation; The final edge representation is bound to the directed connection path, and a message passing callback function is registered in the directed connection path. When the message passing callback function uses the connection path to transmit features, it automatically merges the edge representation with the output features of the source decision unit. Record the establishment timestamp of the directed connection path and the corresponding data dependency edge identifier, and add them to the connection path list; After all data dependency edges have been traversed, the list of connection paths is checked to identify and remove duplicate connection paths, so that the connection relationships between decision units correspond one-to-one with the data dependency edges of the directed computation graph.
5. The method according to claim 1, characterized in that, The step of mapping operator nodes in the directed computation graph one-to-one to decision units, and connecting each decision unit according to the data dependency edges to generate an initial scheduling strategy topology, and creating a scheduling probability distribution generation sub-network based on the node semantic labels within each decision unit, includes: Semantic embedding vectors are generated by semantically encoding the node semantic labels of each operator node, and the computing power resource requirement description of the operator node is extracted. The computing power resource requirement description includes processor core number requirement, memory capacity requirement, and accelerator type requirement. The computing resource demand description is fused and encoded with multiple attributes to obtain a demand embedding vector. The semantic embedding vector and the demand embedding vector are concatenated along the channel dimension to generate an operator node representation vector. Each operator node is assigned a decision unit container, and a policy network skeleton is built within the decision unit container. The policy network skeleton includes a gated embedding layer, a conditional computation layer, and a decision output layer arranged in sequence. A learnable parameter matrix is configured in the gated embedding layer, and the operator node representation vector is input into the gated embedding layer and subjected to linear mapping and gated activation processing to obtain a gated adjustment signal; The conditional input representation is generated by performing an element-wise multiplication operation between the gating adjustment signal and the operator node representation vector. The conditional input representation is fed into the conditional computation layer, which consists of multiple parallel computation branches and a fusion and splicing module. Each parallel computation branch contains a holed fully connected sub-layer with different inflation factors, which is used to transform and extract features within different receptive fields. In the conditional computation layer, the conditional input representation is input into each parallel computation branch to obtain the output features of each parallel computation branch. Then, the output features of each parallel computation branch are spliced along the channel direction by the fusion and splicing module to obtain multi-view fusion features. The multi-view fusion features are input into the decision output layer and mapped to a scheduling action space descriptor through a decision weight matrix. Each element of the scheduling action space descriptor corresponds to a candidate combination of computing power resource type and resource quota. The scheduling action probability distribution is obtained by performing probability normalization on the scheduling action space descriptor. The decision unit container is then encapsulated and integrated with the scheduling action probability distribution and the data dependency edge to obtain the initial scheduling strategy topology.
6. The method according to claim 5, characterized in that, The process of obtaining a scheduling action probability distribution by performing probability normalization based on the scheduling action space descriptor, and then combining the scheduling action probability distribution with the data dependency edges to encapsulate and integrate the decision unit container, yields the initial scheduling strategy topology, including: The scheduling action space descriptor is input into the probability normalization module. After performing an exponential transformation on each element of the scheduling action space descriptor, the result is divided by the sum of the exponential transformations of all elements to obtain the scheduling action probability distribution. Based on the data dependency edges, the connection relationship between each decision unit container is determined. For each data dependency edge, a connection path is established between the corresponding two decision unit containers and an edge representation is bound to the connection path. The edge representation is formed by concatenating the output data dimension code of the source operator node and the input data dimension code of the target operator node. The parameters of the policy network skeleton, the operator node representation vector, and the scheduling action probability distribution are encapsulated in the decision unit container. All decision unit containers and their connection paths are integrated to generate the initial scheduling policy topology, and an index mapping table from operator node identifiers to decision unit container identifiers is established.
7. The method according to claim 1, characterized in that, The uncertainty metric of each decision unit is determined based on the concentration of the probability distribution of scheduling actions output by each decision unit. Then, based on the uncertainty metric and pruning decision boundaries, the connection paths between decision units are frozen and pruned to obtain the pruned scheduling strategy topology, including: Traverse each decision unit in the initial scheduling strategy topology and collect the probability distribution of the scheduling action currently output by that decision unit; The difference between the maximum and second-highest probability values in the probability distribution of the scheduling action is used as a concentration index, and the reciprocal of the concentration index is mapped to an uncertainty measure. Extract a list of all connection paths from the initial scheduling strategy topology, and record the decision unit identifiers connected to both ends of each connection path; For each connection path in the connection path list, the uncertainty measures corresponding to the decision units at both ends of the connection path are read and added together to obtain the cumulative uncertainty value of the connection path; Obtain a pre-configured pruning decision threshold, which is determined by the lower quantile of the statistical distribution of the survival rate of connection paths in historical scheduling tasks; The accumulated uncertainty value of each connection path is compared with the pruning decision threshold. Connection paths with accumulated uncertainty values lower than the pruning decision threshold are marked as frozen paths. Deactivation operations are performed on the frozen paths to block gradient signals and feature signals transmitted along the frozen paths. Traverse all decision units and check if there are any isolated decision units that have no connection path to other decision units after the deactivation operation. Delete the isolated decision units from the topology. Connectivity component detection is performed on the topology after the frozen path deactivation and isolated decision unit deletion are completed, so that the remaining decision units form a connected topology, and the pruned scheduling strategy topology is obtained. Generate a topology snapshot of the pruned scheduling strategy topology, wherein the topology snapshot records the identifier of each retained decision unit and its valid connection path relationship.
8. The method according to claim 1, characterized in that, The process involves monitoring semantic change events of the task cluster to be scheduled, extracting semantic labels for newly added tasks when they are detected, identifying existing decision units in the post-pruned scheduling strategy topology that meet similar conditions to the newly added task semantic labels as growth base points, generating sub-network parameters based on the scheduling probability distribution of the growth base points, generating new decision units through mutation, and establishing connections between the new decision units and existing decision units based on the new data dependencies to obtain the post-grown scheduling strategy topology, including: The task type list of the task cluster to be scheduled is continuously scanned. When an unknown task type that has not been previously recorded is detected in the task type list, a semantic change event is triggered. Extract core business semantic terms from the description metadata of the unknown task type, and concatenate the core business semantic terms to form new task semantic tags; The newly added task semantic labels are input into the semantic encoder to generate new semantic embedding vectors; In the post-pruning scheduling strategy topology, the semantic embedding vector of the node semantic label of each existing decision unit bound to the operator node is extracted; Calculate the semantic direction cosine similarity between the newly added semantic embedding vector and the semantic embedding vectors corresponding to each existing decision unit, and select the existing decision unit with the highest similarity as the growth base point; Copy the scheduling probability distribution within the growth base point to generate all parameters of the sub-network and generate parameter copies; Gaussian perturbation is applied to the intermediate transformation layer weight matrix in the parameter copy to obtain the mutated parameters. The magnitude of the Gaussian perturbation is modulated by the inverse of the semantic direction cosine similarity between the newly added task semantic label and the semantic label of the growth base point. A new decision-making unit is generated and the mutated parameters are loaded into the scheduling probability distribution generation subnetwork of the new decision-making unit; Based on the computational logic associated with the newly added task semantics, new data dependencies are extracted. Based on the new data dependencies, the source decision unit and target decision unit that the new decision unit should connect to are determined, and corresponding new connection paths are added to the topology of the pruned scheduling strategy. The new decision-making unit and the new connection path are incorporated into the post-pruning scheduling strategy topology, and the merged topology is sorted and verified to obtain the post-growth scheduling strategy topology.
9. The method according to any one of claims 1-6, characterized in that, The process involves traversing all decision units corresponding to the operator nodes in the directed computation graph within the post-growth scheduling strategy topology, sequentially performing scheduling action sampling, selecting the computing resource type and allocation for each operator node, and combining them into a computing center resource scheduling instruction, including: Obtain the topological sorting sequence of all decision units in the post-growth scheduling strategy topology, and traverse each decision unit sequentially according to the topological sorting sequence; For the decision unit currently being traversed, the scheduling action probability distribution stored in the decision unit is extracted. The scheduling action probability distribution is generated by the sub-network of the scheduling probability distribution of the decision unit and output after forward propagation based on the representation vector of the corresponding operator node. Random sampling is performed based on the probability distribution of the scheduling action to obtain a scheduling action identifier, and the scheduling action identifier corresponds to a candidate scheduling action consisting of computing resource type and resource quota; The selected computing resource type and the corresponding number of processor cores, memory capacity and accelerator type allocation are determined by querying the preset scheduling action mapping table based on the scheduling action identifier. Determine whether the current available resources in the computing center resource pool meet the allocation amount. If they do, lock the corresponding resources for the operator node and update the available resource amount. If they do not meet the allocation amount, remove the action from the scheduling action probability distribution and resample. The selected computing resource types and allocation amounts of each operator node are aggregated to generate a resource scheduling detail that includes the operator node identifier, resource type, and allocation amount, which is then combined into a computing center resource scheduling instruction.
10. A dynamic resource scheduling system for a computing center, characterized in that, The system includes a processor, a memory, and a bus connected to the processor; wherein the processor and the memory communicate with each other via the bus; the processor is used to call program instructions in the memory to execute the dynamic scheduling method for computing center resources based on reinforcement learning as described in any one of claims 1-9.