Distributed single-node scheduling method based on multi-layer perceptron decision
By using multi-layer perceptron decision network in the data center to analyze scheduling status and historical information, optimize scheduling decisions, the problems of throughput and latency in the centralized scheduling architecture are solved, and the throughput and scheduling quality of the distributed scheduling system are improved.
Patent Information
- Application Number
- CN202411173117.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-08-26
AI Technical Summary
In modern large-scale data center scheduling systems, centralized scheduling architecture is difficult to meet the needs of high throughput and low latency, resulting in the problem of degradation of scheduling quality and excessive long-tail tasks.
Using a distributed single-node scheduling method based on multi-layer perceptron (MLP) decision-making, a decision network of advantages and disadvantages scheduling strategies is built by collecting and analyzing scheduling status and historical information, scheduling decision prediction and optimization are carried out, reducing task delay and improving throughput quantity.
It effectively improves the throughput of the distributed scheduling system, reduces the delay of long-tail tasks, optimizes the scheduling effect, and reduces the pressure on node decisions.
Smart Images

Figure CN119071292A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of task scheduling, and relates to a distributed single-node scheduling method based on multi-layer perceptron decision in a distributed cluster environment. Background Art
[0002] Most modern large-scale data center scheduling systems are centralized scheduling architectures, that is, all resource allocation and service orchestration in the cluster are calculated and decided through a central scheduling component. They face two problems: a single central scheduling component cannot afford large-scale scheduling and cannot meet the high throughput and scheduling delay requirements of a large number of serverless feature services.
[0003] In response to the above problems, a team proposed a high-throughput scheduling architecture based on distributed node independent decision-making based on detection queues, including: (1) a central controller that stores cluster status information (2) distributed nodes with independent decision-making modules and scheduling detection queues (3) node scheduling basic logic module, including the following steps: S01: Task distribution stage: The central controller node will receive external task requests and distribute tasks to cluster nodes in a random manner. At the same time, the central controller node will write task-related information into the database for subsequent task status tracking. S02: Node self-scheduling stage: An algorithm within the node determines whether the task is executed locally or forwarded to other nodes. S03: Task forwarding stage: If S02 decides to forward the task to certain nodes, these nodes will become receiving nodes, and the receiving nodes will put the forwarded tasks into their own detection queues for storage and processing. S04: Forwarding task scheduling stage: The receiving node detects the forwarding task in the queue and first performs a timeout judgment. If the task waits for a timeout, a timeout error will be returned to the scheduling node; if it does not time out, the receiving node will review its own resources. If the resources are sufficient, it will send a confirmation request to the scheduling node; if the resources are insufficient, the task will be added to the delayed binding queue. S05: Task feedback processing stage: After receiving the feedback from the receiving node, the scheduling node will perform feedback processing. If the feedback is an error, the error count will be performed. When the error count reaches the set threshold, the task will be retried, that is, steps S02-S05 will be retried; if the feedback is a confirmation request, it will check whether the task has been preempted by other nodes. If not, a confirmation message will be returned. If it has been preempted, a cancellation message will be returned. S06: Task execution recording stage: After receiving the confirmation message, the receiving node will execute the task; and the scheduling node will periodically report the confirmed task information and its own node resource information to the central controller node according to the heartbeat mechanism.
[0004] In the above high-throughput scheduling architecture, step S02 uses the simplest heuristic scheduling algorithm, that is, when a task arrives at a scheduling node, it will self-check whether the local resources are sufficient for the task to run. If they are sufficient, it will self-schedule the node; if they are not sufficient, it will forward the task. The task forwarding logic is a two-time random selection strategy, which selects a suitable forwarding node address from the cluster's neighbor node table. This simple heuristic scheduling algorithm affects the throughput of the overall solution, resulting in a decrease in scheduling quality and the problem of too many long-tail tasks running in the cluster. Summary of the invention
[0005] In view of the above, the purpose of the present invention is to provide a distributed single-node scheduling method based on multi-layer perceptron (MLP) decision-making. This method finds relatively optimal decisions according to the status of the cluster and historical simulation results, further gives play to the advantages of single-node parallel scheduling, improves the cluster throughput of the distributed scheduling system, reduces the delay of long-tail tasks, and optimizes the scheduling effect.
[0006] To achieve the above-mentioned purpose of the invention, an embodiment provides a distributed single-node scheduling method based on multi-layer perceptron decision, comprising the following steps: Collect the scheduling status information and scheduling decision information of each distributed node in the distributed scheduling system at each step, and evaluate the scheduling results according to the scheduling log record information to obtain the evaluation results containing the best scheduling strategy or the worst scheduling strategy; Construct a scheduling decision recommendation model that includes two multi-layer perceptron decision networks corresponding to the optimal scheduling strategy and the inferior scheduling strategy, and a linear fusion layer. Use the scheduling status information as sample data and divide it according to the evaluation results, then input it into the corresponding multi-layer perceptron decision network for scheduling decision prediction. Use the scheduling decision information as supervision data and construct a loss function with the scheduling decision prediction results to train the multi-layer perceptron decision network. Each distributed node uses the trained scheduling strategy recommendation model to make scheduling decision recommendations based on scheduling status information, and uses the recommended scheduling decisions for scheduling.
[0007] In the method of the present invention, the scheduling status information includes the current time T when the decision is made, the task submission time t c 、Resources required for the task res req , the remaining resources localres of this node when making a decision, the neighboring node information known to this node when making a decision, and the state update time of each neighboring node n , and the remaining resource information of the neighborhood when making decisions res n .
[0008] In the method of the present invention, the scheduling decision information includes three types of scheduling decisions, namely: Local waiting: Add the scheduled task to the waiting queue of the local node and wait for the next cycle of scheduling; Neighborhood forwarding: select two neighboring nodes and send task detection information to them. If the neighboring nodes have surplus resources, they will reserve them for the task and return acceptance information. If there are no surplus resources in the neighboring nodes, they will return rejection information. If both neighboring nodes have surplus resources, they will choose to send the task to the neighboring node that sends the acceptance information first, and the reserved resources of the other neighboring node will be released. Neighborhood multi-hop: Select a neighboring node and send a multi-hop request to it to directly transfer the task ownership to the neighboring node. After the transfer is successful, the task will be scheduled by the new node to which it is transferred.
[0009] In the method of the present invention, the scheduling decision information needs to be encoded before participating in the multi-layer perceptron decision network training as supervisory data. Specifically, each node has n neighboring nodes, that is, there are n*2+1 scheduling decisions. Therefore, the encoding vector of the scheduling decision information of each node is an n*2+1-dimensional vector. In the n*2+1-dimensional vector, the vector value corresponding to the selected scheduling decision is 1, otherwise the vector value is 0.
[0010] In the method of the present invention, the scheduling result is evaluated according to the scheduling log record information to obtain an evaluation result including an optimal scheduling strategy or an inferior scheduling strategy, including: If the scheduling result determined based on the scheduling log record information meets one of the following conditions, it is evaluated as an optimal scheduling strategy, otherwise it is an inferior scheduling strategy: Condition 1: The task is executed within two decision time units after the local waiting action is selected; Condition 2: The message is received by the node after the forwarding schedule is selected and the forwarding node is determined; Condition 3: The task is executed within two decision time units after selecting the multi-hop action.
[0011] In the method of the present invention, the loss function of the training strategy network adopts the cross entropy loss function.
[0012] In the method of the present invention, each distributed node uses the trained scheduling strategy recommendation model to make scheduling decision recommendations based on scheduling status information, including: The scheduling status information of each distributed node at each step is input into two decision networks respectively. After forward reasoning, two scheduling decision prediction probability vectors are obtained. The two scheduling decision prediction probability vectors are fused through a linear fusion layer to obtain a comprehensive scheduling decision probability vector. The comprehensive scheduling decision probability vector selects the recommended scheduling decision after a softmax activation operation. The fusion coefficient in the linear fusion layer is set based on experience.
[0013] The method of the present invention also includes: regularly collecting scheduling status information and scheduling decision information when the scheduling strategy recommendation model makes scheduling decision recommendations and executes, and using this information to retrain the scheduling decision recommendation model, and using the newly trained scheduling decision recommendation model to replace the original scheduling decision recommendation model, and executing subsequent scheduling decision recommendations until the long-tail task delay is reduced to meet the requirements.
[0014] Compared with the prior art, the present invention has the following beneficial effects: Compared with the centralized scheduling framework and other scheduling frameworks, each node in the distributed scheduling architecture has an independent decision-making module, and the scheduling decision is moved down to the cluster node to relieve the decision-making pressure and improve the throughput. When the node makes a decision based on the scheduling status information, the scheduling decision based on the multi-layer perceptron will reduce the task delay and the long-tail task delay compared with the naive heuristic algorithm, effectively improving the overall cluster throughput. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0016] Figure 1 is a flow chart of a distributed single-node scheduling method based on multi-layer perceptron decision-making provided by an embodiment; Figure 2 is a schematic diagram of the structure of distributed nodes in a distributed scheduling system provided by an embodiment; Figure 3 It is a structural diagram of the scheduling decision recommendation model provided in the embodiment. DETAILED DESCRIPTION
[0017] To make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific implementation methods described herein are only used to explain the present invention and do not limit the scope of protection of the present invention.
[0018] The inventive concept of the present invention is: the present invention provides a distributed single-node scheduling method based on multi-layer perceptron decision-making. The method is applied to a distributed scheduling system. Each distributed node abandons the naive heuristic algorithm and adopts a scheduling decision recommendation model built based on a multi-layer perceptron to make scheduling decisions, which can reduce task delays, reduce long-tail task delays, and effectively improve the overall cluster throughput.
[0019] like Figure 1As shown, the distributed single-node scheduling method based on multi-layer perceptron decision-making provided in the embodiment includes the following steps: S1, collects the scheduling status information and scheduling decision information of each distributed node in the distributed scheduling system at each step, and evaluates the scheduling results according to the scheduling log record information to obtain an evaluation result containing an optimal scheduling strategy or an inferior scheduling strategy.
[0020] like Figure 2 As shown, in a distributed node system, node A includes a task queue, neighborhood status information and a decision module. The scheduling method of the present invention is applied to the decision module in each distributed node in the distributed scheduling system, and the decision information of the present invention is based on the scheduling status information provided by the node. There are a fixed number of neighborhood nodes for each node in the architecture. The node can send information to the neighborhood node and record the resource information of the neighborhood in the node. The neighborhood nodes can be unidirectional neighborhoods or bidirectional neighborhoods. The neighborhood network of the overall framework is a small-world network. The scheduling status information obtained is a record obtained when the scheduling node and the neighborhood node information interact, not the neighborhood real-time resource information. The neighborhood node is a node-schedulable interaction node, and the scheduling node can choose to forward the task to any neighborhood node or perform multi-hop operations.
[0021] Specifically, the scheduling status information includes the current time T when the decision is made, the task submission time t c 、Resources required for the task res req , the remaining resources localres of this node when making a decision, the neighboring node information known to this node when making a decision, assuming there are n neighboring nodes (usually n=6 or 8), record the state update time time of each neighboring node n , and the remaining resource information of the neighborhood when making decisions res n (Due to communication delays, this information is not accurate resource information of neighboring nodes).
[0022] At the same time, the scheduling decision information of each step should be collected. The scheduling decision information includes three types of scheduling decisions, namely: Local waiting: Add the scheduled task to the waiting queue of the local node and wait for the next cycle of scheduling; Neighborhood forwarding: Select two neighboring nodes and send task detection information to them. If the neighboring nodes have surplus resources, they reserve them for the task and return an accept message. If there are no surplus resources in the neighboring nodes, they return a reject message. If both neighboring nodes have surplus resources, they choose to send the task to the neighboring node that sends the accept message first, and the reserved resources of the other neighboring node will be released. Neighborhood multi-hop: Select a neighboring node and send a multi-hop request to it to directly transfer the task ownership to the neighboring node. After the transfer is successful, the task will be scheduled by the new node to which it is transferred.
[0023] In the method of the present invention, the scheduling result is also evaluated according to the scheduling log record information to obtain an evaluation result including an optimal scheduling strategy or an inferior scheduling strategy, and the evaluation result is used to divide the scheduling state information to be input into different multi-layer perceptron decision networks. Specifically, the evaluation process includes: The scheduling result determined according to the scheduling log record information is evaluated as an excellent scheduling strategy if it meets one of the following conditions: i) the task is executed within two decision time units after the local waiting action is selected; ii) the task is received by the node after the forwarding scheduling is selected and the forwarding node is determined; iii) the task is executed within two decision time units after the multi-hop action is selected, otherwise it is an inferior scheduling strategy: S2. Construct a scheduling decision recommendation model that includes two multi-layer perceptron decision networks corresponding to the best scheduling strategy and the worst scheduling strategy, and a linear fusion layer. Use the scheduling status information as sample data and divide it according to the evaluation results, then input it into the corresponding multi-layer perceptron decision network for scheduling decision prediction. Use the scheduling decision information as supervision data and construct a loss function with the scheduling decision prediction results to train the multi-layer perceptron decision network.
[0024] In the method of the present invention, two identical multilayer perceptron decision networks are constructed, corresponding to the optimal scheduling strategy and the inferior scheduling strategy respectively. The multilayer perceptron decision network comprises three layers, namely, two hidden layers and one output layer, each of which is a fully connected layer. The input data first passes through the first fully connected layer fc1, corresponding to the following formula: ; Then, the activation function ReLU is applied to obtain the activation value of the first hidden layer: ; Next, the data passes through the dropout layer, randomly shuts down some neurons, and then passes through the second fully connected layer fc2, which corresponds to the following formula: ; Apply the activation function ReLU to get the activation value of the second hidden layer: ; The data passes through the dropout layer again, randomly shutting down some neurons, and then passes through three fully connected layers fc3, corresponding to the following formula: ; Get the output vector of the output layer .
[0025] The present invention constructs a scheduling decision recommendation model based on two constructed multi-layer perceptron decision networks, such as Figure 3 As shown in the figure, the scheduling decision recommendation model includes not only two multi-layer perceptron decision networks, but also a linear fusion layer. Among them, the fusion parameters of the linear fusion layer are set based on experience. The parameters of the two multi-layer perceptron decision networks need to be trained and optimized. Specifically, the scheduling status information is used as sample data and divided according to the evaluation results and then input into the corresponding multi-layer perceptron decision network for scheduling decision prediction. Specifically, the scheduling status information corresponding to the optimal scheduling strategy is input into a multi-layer perceptron decision network corresponding to the optimal scheduling strategy in batches, and the scheduling status information corresponding to the inferior scheduling strategy is input into another multi-layer perceptron decision network corresponding to the inferior scheduling strategy in batches. After forward reasoning, the respective scheduling decision prediction results output by the two networks can be obtained.
[0026] When training two multi-layer perceptron decision networks, the scheduling decision information is also used as supervisory data. Before these supervisory data participate in the training of the multi-layer perceptron decision network, they need to be encoded. Specifically, each node has n neighboring nodes, that is, there are n*2+1 scheduling decisions. Therefore, the encoding vector of the scheduling decision information of each node is an n*2+1-dimensional vector. In the n*2+1-dimensional vector, the vector value corresponding to the selected scheduling decision is 1, otherwise the vector value is 0.
[0027] For each multi-layer perceptron decision network, a loss function is constructed based on the encoding vector of the node's scheduling decision information and the scheduling decision prediction result. The loss function can adopt the cross-entropy loss function, and the network is trained by minimizing the cross-entropy loss so that the decision prediction values of the two networks are close to the optimal value and the worst value. After training, they can be used for subsequent scheduling decision predictions.
[0028] S3. Each distributed node uses the trained scheduling strategy recommendation model to make scheduling decision recommendations based on the scheduling status information, and uses the recommended scheduling decisions for scheduling.
[0029] In the method of the present invention, when the scheduling strategy recommendation model is used to make scheduling decision recommendations based on scheduling status information, the scheduling status information of each distributed node at each step is respectively input into a multi-layer perceptron decision network corresponding to the optimal scheduling strategy and another multi-layer perceptron decision network corresponding to the inferior scheduling strategy, and two scheduling decision prediction probability vectors are obtained through forward reasoning. and , two scheduling decision prediction probability vectors and After fusion through the linear fusion layer, the comprehensive scheduling decision probability vector is obtained ,in, and is the fusion coefficient in the linear fusion layer. The fusion parameters corresponding to different tasks are different. For a large number of short-time tasks, k1 / k2 takes the value in the range of [-2, -1]. After the softmax activation operation, the recommended scheduling decision is selected.
[0030] In the method of the present invention, the scheduling state information and scheduling decision information of the scheduling strategy recommendation model during scheduling decision recommendation and execution are regularly collected, and the scheduling decision recommendation model is retrained using this information, and the original scheduling decision recommendation model is replaced by the newly trained scheduling decision recommendation model to execute subsequent scheduling decision recommendations until the long-tail task delay is reduced to meet the requirements. Such continuous iteration can optimize the model, improve the decision accuracy of the model, thereby reducing task delays, reducing long-tail task delays, and effectively improving the overall cluster throughput.
[0031] The specific implementation methods described above provide a detailed description of the technical solutions and beneficial effects of the present invention. It should be understood that the above is only the most preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, supplements and equivalent substitutions made within the scope of the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A distributed single-node scheduling method based on multi-layer perceptron decision making, It is characterized in that The following steps are involved: Collect the scheduling status information and scheduling decision information of each distributed node in the distributed scheduling system at each step, and evaluate the scheduling results according to the scheduling log record information to obtain the evaluation results containing the best scheduling strategy or the worst scheduling strategy; Construct a scheduling decision recommendation model that includes two multi-layer perceptron decision networks corresponding to the optimal scheduling strategy and the inferior scheduling strategy, and a linear fusion layer. Use the scheduling status information as sample data and divide it according to the evaluation results, then input it into the corresponding multi-layer perceptron decision network for scheduling decision prediction. Use the scheduling decision information as supervision data and construct a loss function with the scheduling decision prediction results to train the multi-layer perceptron decision network. Each distributed node uses the trained scheduling strategy recommendation model to make scheduling decision recommendations based on scheduling status information, and uses the recommended scheduling decisions for scheduling.
2. The distributed single-node scheduling method based on multi-layer perceptron decision according to claim 1, It is characterized in that Scheduling status information includes the current time T when the decision is made and the task submission time t c 、Resources required for the task res req , the remaining resources localres of this node when making a decision, the neighboring node information known to this node when making a decision, and the state update time of each neighboring node n , and the remaining resource information of the neighborhood when making decisions res n .
3. The distributed single-node scheduling method based on multi-layer perceptron decision according to claim 1, It is characterized in that Scheduling decision information includes three types of scheduling decisions, namely: Local waiting: Add the scheduled task to the waiting queue of the local node and wait for the next cycle of scheduling; Neighborhood forwarding: select two neighboring nodes and send task detection information to them. If the neighboring nodes have surplus resources, they will reserve them for the task and return acceptance information. If there are no surplus resources in the neighboring nodes, they will return rejection information. If both neighboring nodes have surplus resources, they will choose to send the task to the neighboring node that sends the acceptance information first, and the reserved resources of the other neighboring node will be released. Neighborhood multi-hop: Select a neighboring node and send a multi-hop request to it to directly transfer the task ownership to the neighboring node. After the transfer is successful, the task will be scheduled by the new node to which it is transferred.
4. The distributed single-node scheduling method based on multi-layer perceptron decision making according to claim 3, It is characterized in that Before the scheduling decision information participates in the multi-layer perceptron decision network training as supervisory data, it needs to be encoded. Specifically, each node has n neighboring nodes, that is, there are n*2+1 scheduling decisions. Therefore, the encoding vector of the scheduling decision information of each node is an n*2+1-dimensional vector. In the n*2+1-dimensional vector, the vector value corresponding to the selected scheduling decision is 1, otherwise the vector value is 0.
5. The distributed single-node scheduling method based on multi-layer perceptron decision according to claim 1, It is characterized in that The scheduling results are evaluated according to the scheduling log record information to obtain an evaluation result including an optimal scheduling strategy or an inferior scheduling strategy, including: If the scheduling result determined based on the scheduling log record information meets one of the following conditions, it is evaluated as an optimal scheduling strategy, otherwise it is an inferior scheduling strategy: Condition 1: The task is executed within two decision time units after the local waiting action is selected; Condition 2: The message is received by the node after the forwarding schedule is selected and the forwarding node is determined; Condition 3: The task is executed within two decision time units after selecting the multi-hop action.
6. The distributed single-node scheduling method based on multi-layer perceptron decision according to claim 1, It is characterized in that The loss function for training the policy network adopts the cross entropy loss function.
7. The distributed single-node scheduling method based on multi-layer perceptron decision according to claim 1, It is characterized in that Each distributed node uses the trained scheduling strategy recommendation model to make scheduling decision recommendations based on scheduling status information, including: The scheduling status information of each distributed node at each step is input into two decision networks respectively. After forward reasoning, two scheduling decision prediction probability vectors are obtained. The two scheduling decision prediction probability vectors are fused through a linear fusion layer to obtain a comprehensive scheduling decision probability vector. The comprehensive scheduling decision probability vector selects the recommended scheduling decision after a softmax activation operation. The fusion coefficient in the linear fusion layer is set based on experience.
8. The distributed single-node scheduling method based on multi-layer perceptron decision making according to claim 1, It is characterized in that Also includes: Regularly collect the scheduling status information and scheduling decision information when the scheduling strategy recommendation model makes scheduling decision recommendations and executes them, and use this information to retrain the scheduling decision recommendation model, and use the newly trained scheduling decision recommendation model to replace the original scheduling decision recommendation model, and execute subsequent scheduling decision recommendations until the long-tail task delay is reduced to meet the requirements.
Citation Information
Patent Citations
Cluster distributed scheduling method and system for delaying conflict resolution
CN115904655A
Storage visual supervision system and method based on multilayer perceptron and RBF (Radial Basis Function)
CN116703303A
Distributed job shop scheduling method based on end-to-end deep reinforcement learning
CN117057528A
Task scheduling method and device based on distributed cloud platform and related equipment
CN117707797A
Hybrid collaborative scheduling decision-making method for heterogeneous sensors
CN118071119A
