Resource scheduling strategy optimization method based on AI training task indexes
Constructing an intelligent scheduling framework through deep reinforcement learning technology optimizes the resource scheduling of AI training tasks, solves the problems of unsatisfactory resource utilization efficiency and task execution performance in the existing technology, and achieves efficient and flexible resource scheduling and task allocation, which is suitable for The training process of various deep learning models.
Patent Information
- Application Number
- CN202410932240.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-10-01
AI Technical Summary
Existing resource scheduling strategies are difficult to achieve optimal scheduling effects when faced with complex AI training tasks. Especially in complex task dependencies and heterogeneous computing resource environments, resource utilization efficiency and task execution performance are not ideal.
Adopting an intelligent resource scheduling strategy based on deep reinforcement learning, through task feature extraction, scheduling strategy modeling, deep reinforcement learning training and scheduling decision execution, an intelligent scheduling framework is constructed to optimize the scheduling strategy of computing resources and improve the operating efficiency and efficiency of AI training tasks. Resource utilization.
It significantly improves resource utilization, shortens task completion time, adapts to complex environments, can flexibly schedule in heterogeneous computing environments, adaptively optimizes scheduling strategies, and continuously improves performance.
Smart Images

Figure CN118733274A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of computer science, artificial intelligence and resource scheduling, and in particular to a resource scheduling strategy optimization method based on AI training task indicators. Background Art
[0002] With the rapid development of artificial intelligence technology, deep learning models have been widely used in many fields such as image recognition, speech recognition, and natural language processing. The training process of these deep learning models usually requires a lot of computing resources and time. Therefore, how to efficiently schedule and utilize computing resources has become a key issue.
[0003] Currently, most existing resource scheduling strategies are based on heuristic algorithms, such as FIFO (First Come, First Served) and DRF (Dominant Resource Fairness). Although these algorithms improve resource utilization to a certain extent, it is difficult to achieve the optimal scheduling effect when faced with complex task dependencies and heterogeneous computing resources. Existing scheduling strategies usually focus on optimizing task loading time and execution order, ignoring the correlation between tasks and the dynamic changes of resources, resulting in unsatisfactory resource utilization efficiency and task execution performance.
[0004] In order to solve these problems, academia and industry have proposed a variety of optimization methods, including Min-Min algorithm, Max-Min algorithm, optimization based on genetic algorithm, optimization based on particle swarm algorithm, etc. These methods perform well in certain specific scenarios, but they often lack sufficient flexibility and adaptability in complex and changeable AI training tasks.
[0005] With the development of deep learning and reinforcement learning technologies, researchers have begun to explore intelligent scheduling strategies based on deep reinforcement learning, in order to achieve more efficient resource utilization and better task scheduling in heterogeneous computing environments. By continuously optimizing scheduling strategies, the overall performance of AI training tasks can be significantly improved, and the idleness and waste of computing resources can be reduced. Summary of the invention
[0006] In view of this, the present invention proposes an intelligent resource scheduling strategy optimization method based on deep reinforcement learning, which is used to improve the resource utilization efficiency and training performance of artificial intelligence training tasks. The purpose of the present invention is to construct an intelligent scheduling framework by introducing deep reinforcement learning technology to achieve efficient and flexible resource scheduling and task allocation. This method combines deep learning, reinforcement learning and heterogeneous computing environment, improves the operating efficiency and resource utilization of AI training tasks by optimizing the scheduling strategy of computing resources, and is suitable for the training process of various deep learning models.
[0007] The technical solution adopted by the present invention to achieve the above-mentioned purpose is: a resource scheduling strategy optimization method based on AI training task indicators, comprising the following steps:
[0008] 1) Task feature extraction: extracting task feature information from AI training tasks and converting the task feature information into feature vectors;
[0009] 2) Scheduling strategy modeling: The resource scheduling problem is modeled as a Markov decision process. The state space, action space, and reward function are constructed based on the feature vector. The state space includes the current task queue and resource utilization, the action space includes various possible actions for assigning tasks to a computing node, and the reward function is obtained based on the task completion time and resource utilization.
[0010] 3) Deep reinforcement learning training: Use the deep Q network algorithm to train the scheduling strategy;
[0011] 4) Scheduling decision execution: According to the current task and resource status, the trained Q network is used to select the optimal scheduling action, and the tasks are assigned to the corresponding computing nodes according to the optimal scheduling action to achieve resource scheduling strategy optimization.
[0012] The task characteristic information includes the resource requirements of the task, the task completion time, and the dependency relationship.
[0013] The task feature extraction comprises the following steps:
[0014] (1) Data preprocessing: Clean and standardize AI training task data, remove outliers and noise data, and use normalization to convert data of different scales to the same range;
[0015] (2) Feature selection: extracting important features from the preprocessed data, including task completion time, resource utilization, memory usage, and task priority;
[0016] (3) Feature vector generation: The extracted important features are converted into vector form to obtain the feature vector.
[0017] The scheduling strategy modeling includes the following steps:
[0018] Construct state space: The state space S represents the resource utilization state and task queue state at the current moment, S = {(u 1 ,u 2 ,...,u n ),(q 1 ,q 2 ,...,q m )}, where u i represents the resource utilization of the i-th node, q jRepresents the feature vector of the jth task;
[0019] Constructing action space: The action space A represents the operation of assigning tasks to specified computing nodes, A = {a 1 ,a 2 ,...,a k}, where a i Indicates that a task is assigned to the i-th node;
[0020] Construct reward function: Reward function R = -(w 1 *Task completion time + w 2 * resource utilization), where w 1 and w 2 is the weight coefficient.
[0021] The deep reinforcement learning training comprises the following steps:
[0022] Q network initialization: Initialize the Q network and the target Q network. The Q network uses a multi-layer perceptron structure, with the input being the state vector and the output being the Q value of each action.
[0023] Experience replay mechanism: During the training process, the four-tuple of state, action, reward, and next state is stored, and the data in the experience replay pool is trained by random sampling;
[0024] Training steps: At each time step, select an action based on the current state, execute the action, observe the next state and immediate reward, store experience in the experience replay pool, randomly extract batches of experience from the experience replay pool, update the Q network, and regularly copy the parameters of the Q network to the target Q network.
[0025] The scheduling decision execution includes the following steps:
[0026] Status monitoring: monitor resource usage and task execution status in real time and collect status information;
[0027] Decision execution: According to the current state information and the output of the Q network, the optimal scheduling action is selected and the tasks are assigned to the corresponding nodes;
[0028] Feedback adjustment: Adjust the scheduling strategy in real time according to the changes in task execution results and status.
[0029] A resource scheduling strategy optimization system based on AI training task indicators, including:
[0030] A task feature extraction module, used to extract task feature information from AI training tasks and convert the task feature information into a feature vector;
[0031] The scheduling strategy building module is used to model the resource scheduling problem as a Markov decision process, and construct the state space, action space and reward function based on the feature vector. The state space includes the current task queue and resource utilization, the action space includes various possible actions for assigning tasks to a computing node, and the reward function is obtained based on the task completion time and resource utilization.
[0032] Deep reinforcement learning training module, used to train scheduling strategies using a deep Q-network algorithm;
[0033] The scheduling decision execution module is used to select the optimal scheduling action based on the current task and resource status using the trained Q network, and to allocate tasks to corresponding computing nodes based on the optimal scheduling action to achieve resource scheduling strategy optimization.
[0034] The present invention realizes intelligent resource scheduling for AI training tasks by introducing deep reinforcement learning technology, which has the following advantages:
[0035] 1. Improve resource utilization: Through intelligent scheduling strategy optimization, the utilization efficiency of computing resources can be significantly improved, and resource idleness and waste can be reduced.
[0036] 2. Shorten task completion time: Optimize the scheduling order and allocation of tasks, and significantly shorten the total completion time of AI training tasks.
[0037] 3. Adapt to complex environments: Able to flexibly schedule tasks in heterogeneous computing environments and adapt to different resource configurations and task requirements.
[0038] 4. Adaptive optimization: Through continuous learning and adjustment, the intelligent scheduling system can adaptively optimize the scheduling strategy according to actual conditions and continuously improve performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 Resource scheduling flow chart.
[0040] Figure 2 Flowchart of setting up the experimental environment. DETAILED DESCRIPTION
[0041] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.
[0042] The present invention provides a resource scheduling strategy optimization method based on AI training task indicators, comprising the following steps:
[0043] Task feature extraction: Extract feature information from AI training tasks, including but not limited to the task’s resource requirements, execution time, dependencies, etc. Use this feature information as input to construct a task feature vector.
[0044] Scheduling strategy modeling: The resource scheduling problem is modeled as a Markov decision process (MDP), and the various elements in the scheduling process are described by defining the state space, action space, and reward function. The state space includes information such as the current task queue and resource utilization; the action space includes optional scheduling actions, such as assigning tasks to specific nodes; and the reward function is designed based on indicators such as task completion time and resource utilization.
[0045] Deep reinforcement learning training: The Deep Q Network (DQN) algorithm is used to train the scheduling strategy. Through continuous interaction and learning, the agent gradually optimizes the scheduling strategy to achieve the best resource scheduling effect in a complex computing environment.
[0046] Scheduling decision execution: In the actual scheduling process, the intelligent scheduling system uses the trained DQN model to select the optimal scheduling action based on the current task and resource status, and assigns the task to the corresponding computing node. The system monitors the task execution and resource utilization in real time and dynamically adjusts the scheduling strategy.
[0047] Performance evaluation and optimization: Evaluate the performance of the intelligent scheduling system, including indicators such as task completion time and resource utilization. Based on the evaluation results, further optimize the scheduling strategy to improve the overall performance of the system.
[0048] Example 1: Task feature extraction and scheduling strategy modeling
[0049] Task feature extraction: In the implementation process of the present invention, feature information is extracted from AI training tasks, including but not limited to the resource requirements, execution time, dependencies, etc. of the tasks. Through the data preprocessing step, these feature information are converted into feature vectors to provide data support for subsequent scheduling strategy modeling and optimization.
[0050] 1. Data preprocessing:
[0051] Clean and standardize the task data to remove outliers and noise data to ensure data quality.
[0052] Normalization techniques are used to convert feature values of different scales to the same range to facilitate model processing.
[0053] 2. Feature Selection:
[0054] Extract important features from the preprocessed data, such as the task's CPU usage, memory usage, task priority, etc.
[0055] Use feature selection algorithms (such as PCA, Lasso regression, etc.) to select features that have a significant impact on scheduling decisions, reduce feature dimensions, and improve model training efficiency.
[0056] 3. Feature vector generation:
[0057] Convert the selected features into vector form for input into the deep reinforcement learning model.
[0058] The eigenvector x is expressed as: x = (x 1 ,x 2 ,...,x d ) where x i represents the i-th feature, and d is the number of features.
[0059] Scheduling strategy modeling: The resource scheduling problem is modeled as a Markov decision process (MDP). In this process, the state space, action space, and reward function are defined. The state space includes information such as the current task queue and resource utilization; the action space includes various possible actions for assigning tasks to specific computing nodes; the reward function is designed based on indicators such as task completion time and resource utilization, aiming to minimize task completion time and maximize resource utilization.
[0060] 1. State space definition:
[0061] The state space S can be expressed as the resource utilization state and task queue state at the current moment. For example: S = {(u 1 ,u 2 ,...,u n ),(q 1 ,q 2 ,...,q m )}where u i represents the resource utilization of the i-th node, q j Represents the feature vector of the j-th task.
[0062] 2. Action space definition:
[0063] The action space A represents the operation of assigning tasks to specific computing nodes. For example: A = {a 1 ,a 2 ,...,a k}where a i Indicates that a task is assigned to the i-th node.
[0064] 3. Reward function design:
[0065] The reward function R is calculated according to the following formula: R = -(w 1 *Task completion time + w 2 * Resource utilization) where w 1 and w 2 is the weight coefficient, which represents the importance of task completion time and resource utilization.
[0066] The shorter the task completion time and the higher the resource utilization rate, the greater the reward value, and vice versa.
[0067] Example 2: Deep reinforcement learning training and scheduling decision execution
[0068] Deep reinforcement learning training: The Deep Q Network (DQN) algorithm is used to train the scheduling strategy. By simulating multiple tasks and resource allocation scenarios, a large number of training iterations are performed to optimize the decision-making strategy of the intelligent agent so that it can achieve the best resource scheduling effect in practical applications.
[0069] 1.Q network initialization:
[0070] Initialize the Q network and target Q network, which are used to approximate the Q value function and the target Q value function respectively.
[0071] The Q network uses a multi-layer perceptron structure, with the input being the state vector and the output being the Q value of each action.
[0072] 2. Experience replay mechanism:
[0073] During the training process, the experience replay mechanism is used to improve the training efficiency and stability by storing the four-tuple of state-action-reward-next state.
[0074] The data in the experience replay pool is trained through random sampling to break data correlation and improve the generalization ability of the model.
[0075] 3. Training steps:
[0076] At each time step, an action (i.e., a scheduling decision) is chosen based on the current state.
[0077] Perform actions, observe the next state and immediate reward.
[0078] Store experience (state, action, reward, next state) in the experience replay pool.
[0079] Randomly extract small batches of experience from the experience replay pool and update the Q network.
[0080] Periodically copy the parameters of the Q network to the target Q network.
[0081] The specific steps of the training process are as follows:
[0082] 1. Initialization: Initialize Q network parameters and experience replay pool.
[0083] 2. State acquisition: At each time step, obtain the current state s from the environment t .
[0084] 3. Action selection: Select action a based on ∈-greedy strategyt , that is, randomly select an action with probability ∈, and select the action with the largest current Q value with probability 1_∈.
[0085] 4. Execute action: Execute action a in the environment t , get instant rewards t and the next state s t+1 .
[0086] 5. Storage experience: t ,a t ,r t ,s t+1 ) is stored in the experience replay pool.
[0087] 6. Experience replay: Randomly extract a small batch of experience from the experience replay pool and calculate the target Q value y t =r t +γmax a' Q(s t+1 ,a'). γ represents the learning coefficient and a' represents the selected action.
[0088] 7. Gradient descent: Minimize the mean square error between the target Q value and the predicted Q value, and update the Q network parameters.
[0089] 8. Update the target network: Periodically copy the parameters of the Q network to the target Q network.
[0090] Scheduling decision execution: In the actual scheduling process, the intelligent scheduling system uses the trained DQN model to select the optimal scheduling action based on the current task and resource status, and assigns the task to the corresponding computing node. The system monitors the task execution and resource utilization in real time, and dynamically adjusts the scheduling strategy based on feedback to ensure the efficient operation of the system.
[0091] Status monitoring: monitor resource usage and task execution status in real time, and collect status information.
[0092] Decision execution: According to the current state information and the output of the DQN model, the optimal scheduling action is selected and the task is assigned to the corresponding node.
[0093] Feedback adjustment: According to the task execution results and changes in system status, the scheduling strategy is adjusted in real time to optimize system performance.
[0094] Example 3: Experimental environment construction and performance evaluation
[0095] Experimental environment construction Figure 1 , Figure 2): The experimental environment uses a heterogeneous computing cluster consisting of multiple types of GPU nodes to ensure the universality and complexity of the environment. In terms of task setting, training workloads of different scales were simulated, with the number of tasks ranging from 15 to 120, to test the scheduling efficiency and stability of the algorithm under different pressures.
[0096] 1. Hardware configuration:
[0097] The cluster consists of multiple types of GPU nodes, including high-performance computing nodes and ordinary computing nodes, covering different computing capabilities and resource configurations.
[0098] High-performance computing nodes use NVIDIA V100 GPUs, and ordinary computing nodes use NVIDIA P100 GPUs.
[0099] 2. Task settings:
[0100] Simulate AI training tasks of different scales, including small-scale tasks (15-30 tasks) and large-scale tasks (100-120 tasks), to test the performance of the algorithm under different loads.
[0101] The tasks include image classification, target detection, natural language processing and other AI model training tasks.
[0102] Experimental results and performance evaluation: Experimental results show that the dynamic adjustment algorithm proposed in this invention outperforms traditional scheduling algorithms in tasks of all scales.
[0103] The execution time comparison is shown in Table 1:
[0104] Table 1
[0105]
[0106] The execution time is shortened by 8.34% on average compared with the Min-Min algorithm.
[0107] The execution time is shortened by 16.84% compared with the greedy algorithm.
[0108] The execution time is shortened by 12.12% compared with the priority-based algorithm.
[0109] The execution time is shortened by 27.98% compared with the FCFS algorithm.
[0110] The system throughput comparison is shown in Table 2:
[0111] Table 2
[0112]
[0113] In terms of system throughput, the dynamic adjustment algorithm also shows obvious advantages. The throughput of the dynamic adjustment algorithm is significantly improved compared with other algorithms.
[0114] Example 4: System Integration and Practical Application
[0115] The intelligent scheduling system of the present invention can be integrated into the existing cloud computing platform and AI training framework to provide efficient resource scheduling services. The practical application of the present invention is described below in conjunction with specific application scenarios.
[0116] Cloud computing platform integration:
[0117] System architecture:
[0118] The intelligent scheduling system is used as the scheduling module of the cloud computing platform and integrated with the existing task management system and resource management system.
[0119] The system architecture includes task submission module, task scheduling module, resource monitoring module and feedback adjustment module.
[0120] Integration process:
[0121] Users submit AI training tasks through the task submission module, and the system automatically extracts task features and generates feature vectors.
[0122] The task scheduling module uses a deep reinforcement learning model to select the optimal scheduling strategy based on the current resource status and task characteristics.
[0123] The resource monitoring module monitors task execution and resource usage in real time and provides feedback data.
[0124] The feedback adjustment module dynamically adjusts the scheduling strategy based on the feedback data to optimize system performance.
[0125] Practical application scenarios:
[0126] Various AI training tasks including image classification tasks, natural language processing tasks, and target detection tasks.
Claims
1. A resource scheduling strategy optimization method based on AI training task indicators, characterized by , including the following steps: 1) Task feature extraction: extracting task feature information from AI training tasks and converting the task feature information into feature vectors; 2) Scheduling strategy modeling: The resource scheduling problem is modeled as a Markov decision process. The state space, action space, and reward function are constructed based on the feature vector. The state space includes the current task queue and resource utilization, the action space includes various possible actions for assigning tasks to a computing node, and the reward function is obtained based on the task completion time and resource utilization. 3) Deep reinforcement learning training: Use the deep Q network algorithm to train the scheduling strategy; 4) Scheduling decision execution: According to the current task and resource status, the trained Q network is used to select the optimal scheduling action, and the tasks are assigned to the corresponding computing nodes according to the optimal scheduling action to achieve resource scheduling strategy optimization.
2. According to claim 1, a resource scheduling strategy optimization method based on AI training task indicators is characterized in that: The task characteristic information includes the resource requirements of the task, the task completion time, and the dependency relationship.
3. According to claim 1, a resource scheduling strategy optimization method based on AI training task indicators is characterized in that: The task feature extraction comprises the following steps: (1) Data preprocessing: Clean and standardize AI training task data, remove outliers and noise data, and use normalization to convert data of different scales to the same range; (2) Feature selection: extracting important features from the preprocessed data, including task completion time, resource utilization, memory usage, and task priority; (3) Feature vector generation: The extracted important features are converted into vector form to obtain the feature vector.
4. According to claim 1, a resource scheduling strategy optimization method based on AI training task indicators is characterized in that: The scheduling strategy modeling includes the following steps: Construct state space: The state space S represents the resource utilization state and task queue state at the current moment, S = {(u1,u2,...,u n ),(q1,q2,...,q m )}, where u i represents the resource utilization of the i-th node, q j Represents the feature vector of the jth task; Constructing action space: The action space A represents the operation of assigning tasks to specified computing nodes, A = {a1, a2, ..., a k }, where a i Indicates that a task is assigned to the i-th node; Construct a reward function: Reward function R = -(w1*task completion time + w2*resource utilization), where w1 and w2 are weight coefficients.
5. According to claim 1, a resource scheduling strategy optimization method based on AI training task indicators is characterized in that: The deep reinforcement learning training comprises the following steps: Q network initialization: Initialize the Q network and the target Q network. The Q network uses a multi-layer perceptron structure, with the input being the state vector and the output being the Q value of each action. Experience replay mechanism: During the training process, the four-tuple of state, action, reward, and next state is stored, and the data in the experience replay pool is trained by random sampling; Training steps: At each time step, select an action based on the current state, execute the action, observe the next state and immediate reward, store experience in the experience replay pool, randomly extract batches of experience from the experience replay pool, update the Q network, and regularly copy the parameters of the Q network to the target Q network.
6. According to claim 1, a resource scheduling strategy optimization method based on AI training task indicators is characterized in that: The scheduling decision execution includes the following steps: Status monitoring: monitor resource usage and task execution status in real time and collect status information; Decision execution: According to the current state information and the output of the Q network, the optimal scheduling action is selected and the tasks are assigned to the corresponding nodes; Feedback adjustment: Adjust the scheduling strategy in real time according to the changes in task execution results and status.
7. A resource scheduling strategy optimization system based on AI training task indicators, characterized by ,include: A task feature extraction module, used to extract task feature information from AI training tasks and convert the task feature information into a feature vector; The scheduling strategy building module is used to model the resource scheduling problem as a Markov decision process, and construct the state space, action space and reward function based on the feature vector. The state space includes the current task queue and resource utilization, the action space includes various possible actions for assigning tasks to a computing node, and the reward function is obtained based on the task completion time and resource utilization. Deep reinforcement learning training module, used to train scheduling strategies using a deep Q-network algorithm; The scheduling decision execution module is used to select the optimal scheduling action based on the current task and resource status using the trained Q network, and to allocate tasks to corresponding computing nodes based on the optimal scheduling action to achieve resource scheduling strategy optimization.
8. A resource scheduling strategy optimization device based on AI training task indicators, characterized in that: It includes a memory and a processor; the memory is used to store a computer program; the processor is used to implement a resource scheduling strategy optimization method based on AI training task indicators as described in any one of claims 1-6 when executing the computer program.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program. When the computer program is executed by the processor, a resource scheduling strategy optimization method based on AI training task indicators as described in any one of claims 1 to 6 is implemented.
Citation Information
Cited By
Service resource scheduling method based on self-distillation hierarchical reinforcement learning
CN119271422A
Service network scheduling method based on deep reinforcement learning
CN119342102A
Computing power scheduling strategy optimization system based on reinforcement learning
CN119356824A
A computing power scheduling strategy optimization system based on reinforcement learning
CN119356824B
Telemetry data processing task allocation method and device and storage medium
CN119356825A
