Scheduling method and system based on resource prediction utilization rate

By constructing a resource utilization prediction model and an improved ant colony algorithm, the problem of resource allocation imbalance was solved, efficient resource scheduling was achieved, and system performance and task response time were improved.

CN121233332APending Publication Date: 2025-12-30SOFT BUILDING BLOCKS (BEIJING) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511435621.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-09
Publication Date
2025-12-30

AI Technical Summary

Technical Problem

Existing scheduling systems suffer from resource allocation imbalances when faced with resource demands from different types of models. This leads to CPU overload when the GPU is idle or vice versa, affecting system performance and resource utilization.

Method used

By acquiring multi-dimensional feature data of resources, a resource utilization prediction model is constructed. Based on the prediction and real-time utilization, tasks are classified. An improved ant colony algorithm and CATR algorithm are used to generate resource allocation strategies and perform resource scheduling to avoid resource idleness and overload.

Benefits of technology

It improved the system's resource utilization, reduced energy consumption, and improved task response time and model inference quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121233332A_ABST
    Figure CN121233332A_ABST
Patent Text Reader

Abstract

The invention relates to a scheduling method and system based on a resource prediction utilization rate. The scheduling method based on the resource prediction utilization rate comprises the steps of obtaining multi-dimensional feature data of resources; constructing a resource utilization rate prediction model; performing prediction based on multi-dimensional feature data and the resource utilization rate prediction model to obtain a predicted utilization rate of the resource; acquiring the real-time utilization rate of the resources; classifying the tasks based on the predicted utilization rate and the real-time utilization rate of the resources to obtain a task classification result; obtaining a resource allocation strategy based on the predicted utilization rate of the resources, the real-time utilization rate and the task classification result; and performing resource scheduling based on the resource allocation strategy. According to the method and the device, the situations of idle resources and overload existence can be avoided, the problem of unbalanced resource allocation can be avoided, the resource utilization rate of the system can be improved, the energy consumption of the system can be reduced, and the response time of tasks and the model reasoning quality can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of resource scheduling technology, and in particular to a scheduling method and system based on resource prediction utilization. Background Technology

[0002] In the field of resource scheduling, current resource demands are characterized by fragmentation. Different types of models have vastly different resource requirements. For example, lightweight traditional machine learning models (like decision trees) can run with only a small amount of CPU resources; while large language models (LL) and diffusion models rely on high-performance GPU clusters and have high requirements for memory bandwidth and video memory capacity.

[0003] Existing scheduling systems commonly suffer from resource allocation imbalances when faced with both "small and fast" and "large and heavy" resource demands. For example, in actual operation, there might be situations where the GPU is idle while the CPU is overloaded, resulting in a significant waste of GPU resources while the CPU operates at high load, impacting overall system performance. Conversely, there might be situations where the CPU is idle while the GPU is overloaded, leaving CPU resources idle and underutilized. This resource allocation imbalance severely reduces system resource utilization, increases energy consumption, and also affects task response time and model inference quality. Summary of the Invention

[0004] Therefore, it is necessary to provide a scheduling method and system based on resource prediction utilization to address the problems in related technologies.

[0005] To achieve the above objectives, firstly, this application provides a scheduling method based on predicted resource utilization, the scheduling method based on predicted resource utilization comprising: Acquire multi-dimensional feature data of resources; Construct a resource utilization rate prediction model; make predictions based on the multi-dimensional feature data and the resource utilization rate prediction model to obtain the predicted resource utilization rate; Obtain the real-time utilization rate of resources; Tasks are classified based on predicted and real-time resource utilization to obtain task classification results; Resource allocation strategies are derived based on predicted resource utilization, real-time utilization, and task classification results. Resource scheduling is performed based on the resource allocation strategy.

[0006] In some embodiments, the multidimensional feature data includes model features, input features, and runtime features; the model features include model type, model parameter magnitude, and model layer structure; the input features include data batch size and input dimension; and the runtime features include historical CPU utilization, historical GPU utilization, and historical memory utilization.

[0007] In some embodiments, a gradient boosting decision tree is used to construct a multi-output regression model as the resource utilization prediction model, and the expression of the multi-output regression model is:

[0008] in, For the multi-output regression model on the samples The predicted value; For the i-th base learner, pair the sample The prediction; The number of base learners; These are the weight coefficients of the i-th base learner; The function space consisting of all possible decision trees; After prediction using the multi-dimensional feature data and the resource utilization prediction model, the resource utilization prediction model outputs a three-dimensional vector. for:

[0009] in, This refers to the predicted utilization of the CPU. This represents the predicted utilization rate of the GPU. Predicted memory utilization; This indicates the matrix transpose.

[0010] In some embodiments, obtaining the real-time utilization of resources includes: The real-time CPU utilization is obtained based on the following formula: ; in, Let be the CPU utilization at time t; This represents the total number of CPU cores. Let i be the time the i-th core spends running in user mode; Let i be the time that the i-th core spends running in kernel mode; The total monitoring time during the process of obtaining real-time CPU utilization; For the utilization rate of a single core; The real-time utilization of the GPU is obtained based on the following formula:

[0011] in, Let be the GPU utilization at time t; This represents the total number of GPUs. The number of active stream processors in the k-th GPU; The total number of stream processors on a single GPU; The number of active stream processors across all GPUs; the total number of stream processors across all GPUs; The real-time memory pressure index is obtained based on the following formula:

[0012] in, The memory pressure index at time t; This refers to the utilization rate of physical memory; This represents the amount of memory already used. This represents the total amount of memory. For the utilization rate of the swap partition; This represents the amount of swap partitions already used. To exchange the total number of partitions; , For the weighting coefficients, satisfying .

[0013] In some embodiments, an improved CATR algorithm is used to construct a classification model, and tasks are classified based on predicted resource utilization, real-time utilization, and the classification model to obtain task classification results; including: Tasks are categorized into heavyweight and lightweight tasks based on predicted resource utilization. The urgency factor is obtained based on the following formula. : ; in, The deadline for the task; The current time; Estimated execution time for the task:

[0014] in, The baseline execution time; Let be the predicted utilization rate of the i-th type of resource; The influence weight of the i-th type of resource; Let be the real-time utilization rate of the i-th type of resource; I is the number of resource categories. Urgent tasks are identified from the tasks based on the urgency factor.

[0015] In some embodiments, an improved CATR algorithm is used to construct a classification model. After classifying tasks based on predicted resource utilization, real-time utilization, and the classification model to obtain the task classification results, the method further includes: dynamically adjusting the Gini coefficient based on the following formula. To dynamically optimize the classification model:

[0016] Where Q represents the number of task categories; The set of samples in the current decision tree node; For sample set The number of tasks in the middle; It is a subset of the q-th type of task; Let q be the number of tasks of type q. These are the weighting coefficients. >0; , which is the resource balance reward for the q-th task, measures the degree of resource balance when task q is divided into task classes.

[0017] In some embodiments, a resource allocation strategy is obtained using an improved ant colony algorithm based on the predicted utilization rate of resources, the real-time utilization rate, and the task classification results, including: Pheromones are updated based on the following formula;

[0018] in, Let pheromone concentration be the concentration of task i at time t from node j. Let pheromone concentration be the concentration of task i at time t+1 to node j. The pheromone volatility coefficient, 0 < <1; The pheromone increment left by the k-th task on the path from task i to node j; The number of tasks participating in this update;

[0019] in, Score the node resource balance; To achieve maximum balance; The total amount of pheromones is a constant; Let $\mathbf{k}$ be the path cost for the $k$-th task. The path selection probability is obtained based on the following formula. :

[0020] in, Let be the pheromone concentration along the path from task i to node j at time t; Let be the heuristic function for task i to reach node j at time t; Let k be the set of nodes that can be selected for task k. Let be the pheromone concentration along the path from task i to node l at time t; Let be the heuristic function for task i to reach node l at time t; The weighting coefficient for pheromones; These are the weighting coefficients of the heuristic function; The resource allocation strategy is derived based on the path selection probability.

[0021] In some embodiments, resource scheduling based on the resource allocation strategy includes: For urgent tasks, a preemptive scheduling strategy is used for scheduling. For non-urgent tasks, time-slice round-robin scheduling is used, and the time slices are dynamically adjusted based on the following formula:

[0022] in, This is the adjusted time slice; Based on time slices; Predicted utilization rate of resources required for the task; This refers to the actual utilization rate of resources required for the task.

[0023] In some embodiments, after resource scheduling based on the resource allocation strategy, the method further includes: Perform resource allocation checks on running tasks; A sliding window algorithm is used to monitor for resource discrepancies. If resource discrepancies exist, a migration assessment is triggered to evaluate the migration costs and benefits of resource migration. When the migration benefit is greater than the migration cost, the resource matching degree between the node and the task is calculated. Based on the resource matching degree, a hot migration mechanism is used to schedule resources.

[0024] Secondly, this application also provides a scheduling system based on resource prediction utilization, the scheduling system based on resource prediction utilization comprising: The multi-dimensional feature data acquisition module is used to acquire multi-dimensional feature data of resources; A resource utilization prediction model construction module is used to construct a resource utilization prediction model; the resource utilization prediction model makes predictions based on the multi-dimensional feature data to obtain the predicted resource utilization rate. The real-time utilization acquisition module is used to obtain the real-time utilization of resources; The task classification module is used to classify tasks based on the predicted and real-time utilization of resources to obtain task classification results. The resource allocation strategy generation module is used to generate resource allocation strategies based on the predicted utilization rate, real-time utilization rate and task classification results. The resource scheduling module is used to perform resource scheduling based on the resource allocation strategy.

[0025] The aforementioned scheduling method and system based on predicted resource utilization involves: acquiring multi-dimensional feature data of resources; constructing a resource utilization prediction model; performing predictions based on the multi-dimensional feature data and the resource utilization prediction model to obtain the predicted resource utilization; acquiring the real-time resource utilization; classifying tasks based on the predicted and real-time resource utilization to obtain task classification results; obtaining a resource allocation strategy based on the predicted resource utilization, real-time utilization, and task classification results; and performing resource scheduling based on the resource allocation strategy. This approach can avoid the coexistence of resource idleness and overload, prevent resource allocation imbalance, improve system resource utilization, reduce system energy consumption, and improve task response time and model inference quality. Attached Figure Description

[0026] To more clearly illustrate the technical solutions in the embodiments of this application or the conventional technology, the drawings used in the description of the embodiments or the conventional technology will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 This is a flowchart of a scheduling method based on resource prediction utilization provided in one embodiment of this application; Figure 2 The diagram shows the structural block diagram of the scheduling system based on resource prediction utilization provided in different embodiments of this application.

[0028] Figure labeling: 10, Multi-dimensional feature data module; 20, Resource utilization prediction model construction module; 30, Real-time utilization acquisition module; 40, Task classification module; 50, Resource allocation strategy generation module; 60, Resource scheduling module. Detailed Implementation

[0029] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0030] In one embodiment, see Figure 1 This application provides a scheduling method based on resource prediction utilization, which includes the following steps: S10~S60.

[0031] S10: Obtain multi-dimensional feature data of resources.

[0032] S20: Construct a resource utilization rate prediction model; make predictions based on the multi-dimensional feature data and the resource utilization rate prediction model to obtain the predicted resource utilization rate.

[0033] S30: Obtain the real-time utilization rate of resources.

[0034] S40: Classify tasks based on predicted and real-time resource utilization to obtain task classification results.

[0035] S50: Resource allocation strategy is derived based on predicted resource utilization, real-time utilization, and task classification results.

[0036] S60: Perform resource scheduling based on the resource allocation strategy.

[0037] The scheduling method based on predicted resource utilization in this application involves: acquiring multi-dimensional feature data of resources; constructing a resource utilization prediction model; making predictions based on the multi-dimensional feature data and the resource utilization prediction model to obtain the predicted resource utilization; acquiring the real-time resource utilization; classifying tasks based on the predicted and real-time resource utilization to obtain task classification results; obtaining a resource allocation strategy based on the predicted resource utilization, real-time utilization, and task classification results; and performing resource scheduling based on the resource allocation strategy. This method can avoid the coexistence of resource idleness and overload, prevent resource allocation imbalance, improve system resource utilization, reduce system energy consumption, and improve task response time and model inference quality.

[0038] In step S10, please refer to step S10 in 1 to obtain multi-dimensional feature data of the resource.

[0039] As an example, the multidimensional feature data may include model features, input features, and runtime features; the model features include model type (e.g., decision tree / CNN / Transformer, etc.), model parameter magnitude (e.g., 10...). 3 ~10 11 The model layer structure; the input features include the batch size and input dimension (e.g., ...). The runtime characteristics include historical CPU utilization (); ), GPU historical utilization ( ) and historical memory utilization ( ).

[0040] As an example, after obtaining the multi-dimensional feature data, the process may further include: standardizing the continuous data to obtain continuous features; and using one-hot encoding on the categorical variables to generate a sparse feature matrix.

[0041] As an example, after standardization and one-hot encoding, the process also includes a feature matrix assembly step, specifically: concatenating the standardized continuous features and the one-hot encoded sparse features to form an input feature vector, which can be used as the input to the resource utilization prediction model in step S20.

[0042] In step S20, please refer to Figure 1 In step S20, a resource utilization prediction model is constructed; based on the multi-dimensional feature data and the resource utilization prediction model, a prediction is made to obtain the predicted resource utilization rate.

[0043] As an example, a gradient boosting decision tree can be used to construct a multi-output regression model as the resource utilization prediction model. The expression of the multi-output regression model is as follows:

[0044] in, For the multi-output regression model on the samples The predicted value; For the i-th base learner, pair the sample The prediction; The number of base learners; These are the weight coefficients of the i-th base learner; The function space consisting of all possible decision trees; After prediction using the multi-dimensional feature data and the resource utilization prediction model, the resource utilization prediction model outputs a three-dimensional vector. for:

[0045] in, This refers to the predicted utilization of the CPU. This represents the predicted utilization rate of the GPU. Predicted memory utilization; This indicates the matrix transpose.

[0046] As an example, in step S20, the corresponding loss function can be the Huber loss, and the corresponding expression can be as follows:

[0047] in, To ensure the true utilization rate of resources; The predicted utilization rate of resources obtained from the resource utilization prediction model; This is a threshold parameter used to distinguish between normal and abnormal errors.

[0048] In step S30, please refer to Figure 1 In step S30, the real-time utilization rate of resources is obtained.

[0049] As an example, in step S30, obtaining the real-time utilization of resources may include obtaining the real-time utilization of the CPU, the real-time utilization of the GPU, and the real-time pressure index of the memory.

[0050] As an example, the real-time CPU utilization is obtained based on the following formula: ; in, Let be the CPU utilization at time t; The total number of CPU cores (including logical cores); Let i be the time the i-th core spends running in user mode; Let i be the time that the i-th core spends running in kernel mode; The total monitoring time during the process of obtaining real-time CPU utilization; This refers to the utilization rate of a single core.

[0051] As an example, the real-time utilization of the GPU is obtained based on the following formula:

[0052] in, Let be the GPU utilization at time t; This represents the total number of GPUs. The number of active stream processors in the k-th GPU; The total number of stream processors on a single GPU; is the number of active stream processors across all GPUs; is the total number of stream processors across all GPUs.

[0053] As an example, the real-time memory pressure index is obtained based on the following formula:

[0054] in, Let be the memory pressure index at time t, normalized to the range [0,1]. This refers to the utilization rate of physical memory; This represents the amount of memory already used. This represents the total amount of memory. For the utilization rate of the swap partition; This represents the amount of swap partitions already used. To exchange the total number of partitions; , The weighting coefficients can be dynamically adjusted through historical data analysis to meet the following requirements. .

[0055] In step S40, please refer to Figure 1 In step S40, tasks are classified based on predicted and real-time resource utilization to obtain task classification results.

[0056] As an example, in step S40, an improved CATR algorithm is used to construct a classification model, and the task is classified based on the predicted utilization rate of resources, the real-time utilization rate, and the classification model to obtain the task classification result; specifically, it may include the following steps: S401~S403.

[0057] S401: Based on the predicted utilization of resources, tasks are divided into heavyweight tasks (e.g., the predicted GPU utilization is >50%, meaning the GPU demand is >50%) and lightweight tasks (e.g., the predicted CPU utilization is <30% and the predicted GPU utilization is <10%, meaning the CPU demand is <30% and the GPU demand is <10%).

[0058] S402: The urgency factor is obtained based on the following formula. : ; in, The deadline for the task; The current time; Estimated execution time for the task:

[0059] in, The baseline execution time; Let be the predicted utilization rate of the i-th type of resource; The influence weight of the i-th type of resource; Let be the real-time utilization rate of the i-th type of resource; I is the number of resource types.

[0060] S403: Identify urgent tasks from the tasks based on the urgency factor.

[0061] As an example, the value of I can be 3, meaning the resources can be divided into three categories: GPU, CPU, and memory; for instance, if i=1, for That is, the predicted utilization of the CPU. for This refers to the real-time utilization of the CPU; i=2, for That is, the predicted utilization of the GPU. for This refers to the real-time utilization of the GPU; i=3, for That is, the predicted memory utilization rate. for This refers to the real-time utilization rate of memory.

[0062] As an example, urgency factor It is a standard used to classify whether a task is urgent, directly determining the urgency label of the task; the smaller the value, the more urgent the task, for example, the urgency factor. Tasks with a value <0.5 are classified as emergency tasks.

[0063] As an example, a classification model is constructed using an improved CATR algorithm. Tasks are classified based on predicted resource utilization, real-time utilization, and the classification model itself. After obtaining the task classification results, the process may further include: dynamically adjusting the Gini coefficient based on the following formula. To dynamically optimize the classification model:

[0064] Where Q represents the number of task categories; The set of samples in the current decision tree node; For sample set The number of tasks in the middle; It is a subset of the q-th type of task; Let q be the number of tasks of type q. These are the weighting coefficients. >0; , which is the resource balance reward for the q-th task, measures the degree of resource balance when task q is divided into task classes.

[0065] As an example, the resource balance reward item for task type q. The formula can be expressed as follows: Where std(.) is used to calculate the standard deviation. The more balanced the resources, The closer it is to 1, the more unbalanced the resources become. The closer it is to 0.

[0066] As an example, the Gini coefficient Its core function is to quantify the adaptability of task classification results to the system's resource balance, providing a quantitative indicator of global resource adaptability for task classification.

[0067] As an example, in dynamically adjusting the Gini coefficient The goal in the process is to reduce the Gini coefficient. Minimum; Gini coefficient The smaller the Gini coefficient, the better the task classification method matches the resource requirements of tasks with the remaining resources of nodes, resulting in a more balanced resource allocation; The larger the task size, the more likely the task classification method will lead to resource conflicts, requiring adjustments to the classification strategy.

[0068] As an example, as shown above, tasks can be categorized into heavyweight tasks, lightweight tasks, and urgent tasks. In other examples, task categorization can also include hybrid tasks, which are tasks that fall between heavyweight and lightweight tasks. All tasks other than urgent tasks can be non-urgent tasks.

[0069] In step S50, please refer to Figure 1 In step S50, a resource allocation strategy is derived based on the predicted utilization rate of resources, the real-time utilization rate, and the task classification results.

[0070] As an example, in step S50, based on the predicted utilization rate of resources, the real-time utilization rate, and the task classification results, an improved ant colony algorithm can be used to obtain a resource allocation strategy, which may specifically include the following steps; S501: Pheromone updates are performed based on the following formula;

[0071] in, Let pheromone concentration be the concentration of task i at time t from node j. Let pheromone concentration be the concentration of task i at time t+1 to node j. The pheromone volatility coefficient, 0 < <1; The increment of pheromone left by the k-th task (ant) on the path from task i to node j; The number of tasks participating in this update;

[0072] in, Score the node resource balance; This represents the maximum equilibrium (theoretically, the maximum value is 1, used for normalization to ensure that the reward term is within the range of [0, 1]). The total amount of pheromones is a constant; The path cost of the k-th task (i.e., the execution cost of the k-th task on the node, such as execution time, resource consumption, etc.). Ants represent tasks to be assigned (such as lightweight tasks, heavyweight tasks, urgent tasks, etc.); paths represent the allocation relationship between tasks and nodes, such as path ij for task i to node l; pheromone concentration on the path. The historical fit of task i to node j is considered; the higher the pheromone concentration, the better this allocation method.

[0073] S502: The path selection probability is obtained based on the following formula. :

[0074] in, Let be the pheromone concentration along the path from task i to node j at time t; Let be the heuristic function for task i to reach node j at time t; Let k be the set of nodes that can be selected for task k. Let be the pheromone concentration along the path from task i to node l at time t; Let be the heuristic function for task i to reach node l at time t; For pheromone importance factors; This represents the importance factor of the heuristic function. Path selection probability. The higher the value, the higher the priority for allocation.

[0075] S503: Obtain a resource allocation strategy based on the path selection probability.

[0076] As an example, in step S501, the node resource balance score is calculated. The formula is as follows:

[0077] Where n is the number of resource categories; For resources To Resources The standard deviation of current utilization rate; for resources To Resources The average current utilization rate.

[0078] As an example, in step S502, each heuristic function includes a prediction bias correction term, which is the heuristic function from task i to node j at time t. For example, the corresponding formula can be as follows:

[0079] in, Resource weight; The real-time utilization rate of resource r; The predicted utilization rate of resource r; Let be the resource prediction bias for task i, and let be the difference between the predicted resource utilization rate and the actual resource utilization rate. This is the deviation penalty coefficient; This is a prediction bias correction term.

[0080] As an example, in step S503, a resource allocation strategy is obtained based on the path selection probability. Since the path selection probability... The higher the probability, the higher the priority for allocation; therefore, it can be based on path selection probability. The resource allocation strategy is derived from the corresponding path selection strategy. Based on the resource allocation strategy, it can be determined which node the task should be assigned to.

[0081] In step S60, please refer to Figure 1 In step S60, resource scheduling is performed based on the resource allocation strategy.

[0082] As an example, in step S60, resource scheduling based on the resource allocation strategy may include the following: For urgent tasks, a preemptive scheduling strategy can be used; the response time of preemptive scheduling can be less than 100ms. For non-urgent tasks, time-slice round-robin scheduling can be used, and the time slices can be dynamically adjusted based on the following formula:

[0083] in, This is the adjusted time slice; Based on time slices; Predicted utilization rate of resources required for the task; This represents the actual utilization rate of resources required for the task. The greater the prediction deviation in step S20, the longer the time slice; by dynamically adjusting the time slice, the overhead of frequent switching caused by fluctuations in resource demand can be reduced, thereby improving scheduling efficiency.

[0084] As an example, after step S60, the following steps may also be included: After resource scheduling is performed based on the resource allocation strategy, the method further includes: checking the resource allocation of running tasks; using a sliding window algorithm to monitor for resource deviations; if resource deviations exist, triggering a migration assessment to evaluate the migration cost and benefits of resource migration; when the migration benefits are greater than the migration cost, calculating the resource matching degree between nodes and tasks; and scheduling resources using a hot migration mechanism based on the resource matching degree.

[0085] As an example, the formula for using the sliding window algorithm to monitor for resource discrepancies can be as follows:

[0086] in, The average resource deviation at time t is used to measure the long-term mismatch between task resource requirements and actual consumption. To adjust the sliding window size; This represents the actual utilization rate of resources required by the task at time i (i.e., the actual resource consumption of the task at time i). This represents the predicted utilization rate of resources required by the task at time i (i.e., the predicted resource requirements of the task at time i). The L2 norm (i.e., Euclidean distance) is used to calculate the overall deviation between the actual utilization rate and the predicted utilization rate of resources.

[0087] As an example, this can be seen when the average resource deviation... If this occurs, a resource discrepancy is determined, triggering a migration assessment; among which, The deviation threshold can be set based on experience.

[0088] As an example, the migration cost of resource migration can be evaluated based on the following formula. :

[0089] in, This refers to the downtime during task migration; The amount of data that needs to be transferred for task migration; Weighting of downtime importance. Importance weights for data volume; 0 ≤ ≤1, 0≤ ≤1, .

[0090] As an example, the migration benefits of resource migration can be evaluated based on the following formula. :

[0091] Among them, the increase in node resource utilization after migration; the reduction in task execution time after migration; Assigning importance weight to resource utilization rate Weighting the importance of time reduction; 0 ≤ ≤1, 0≤ ≤1, .

[0092] As an example, when the migration benefits exceed the migration costs (i.e. When [the resource migration occurs], resource migration is performed.

[0093] As an example, the resource matching degree between computing nodes and tasks can include the following: selecting target nodes based on an improved Hungarian algorithm; specifically, it includes constructing a resource matching degree matrix based on the following formula:

[0094] in, The resource matching degree between node i and task j, with a value range of [0,1]. The remaining resources of node i; The current resource requirements for task j; Let i be the total resources of node i.

[0095] As an example, a migration cost correction item can be added to the list. The correction is made, and the specific formula is as follows:

[0096] in, The corrected resource matching degree between node i and task j; The network latency from the current node of the task to the target node i; The delay effect coefficient, 0 < ≤0.1.

[0097] As an example, the resource matching matrix can be filtered to retain only... Nodes with a resource matching degree greater than a preset value (e.g., 0.7) are designated as target nodes; it should be noted that if a migration overhead correction item is added... To make corrections, you can choose... The node corresponding to the resource matching degree greater than the preset value (e.g., 0.7) is used as the target node.

[0098] As an example, a hierarchical matching strategy can be adopted, prioritizing matching GPU-related needs.

[0099] As an example, scheduling resources based on the resource matching degree using a hot migration mechanism may include the following: implementing differential transmission of state snapshots, dynamically adjusting checkpoint intervals, and adaptively adjusting network bandwidth.

[0100] As an example, the formula for implementing differential transmission of state snapshots can be as follows:

[0101] in, This is data on the differences in task status; This is a snapshot of the current state of the task. This is a snapshot of the task's previous state. This is the XOR operator. State snapshot differential transfer can further compress the difference data and reduce transfer time.

[0102] As an example, checking point (snapshot) intervals that are too close will frequently consume resources, while those that are too far apart will result in excessive differential data. The formula for dynamically adjusting the checkpoint interval in this application can be as follows:

[0103] in, The time interval between two snapshots; Minimum checkpoint interval; The rate of change in task resource consumption; For the maximum permissible deviation, This represents the current deviation.

[0104] As an example, migrating data consumes network resources, requiring bandwidth allocation based on actual conditions. The formula for adaptive network bandwidth adjustment can be as follows:

[0105] in, Network bandwidth allocated to the migration task; This represents the remaining available network bandwidth of the system. This represents the remaining amount of migration data; To estimate the remaining migration time.

[0106] In another embodiment, please refer to Figure 2 This application also provides a scheduling system based on predicted resource utilization. The system may include: a multi-dimensional feature data acquisition module 10, a resource utilization prediction model construction module 20, a real-time utilization acquisition module 30, a task classification module 40, a resource allocation strategy generation module 50, and a resource scheduling module 60. Specifically, the multi-dimensional feature data acquisition module 10 acquires multi-dimensional feature data of resources; the resource utilization prediction model construction module 20 constructs a resource utilization prediction model; the resource utilization prediction model makes predictions based on the multi-dimensional feature data to obtain the predicted resource utilization; the real-time utilization acquisition module 30 acquires the real-time resource utilization; the task classification module 40 classifies tasks based on the predicted and real-time resource utilization to obtain task classification results; the resource allocation strategy generation module 50 generates a resource allocation strategy based on the predicted utilization, real-time utilization, and task classification results; and the resource scheduling module 60 performs resource scheduling based on the resource allocation strategy.

[0107] As an example, the scheduling system based on resource prediction utilization in this embodiment can be used to perform tasks such as... Figure 1And the scheduling method based on resource prediction utilization described in the relevant embodiments.

[0108] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features of the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0109] The above embodiments merely illustrate several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for scheduling based on resource predicted utilization, characterized in that, The method comprises the following steps: obtaining multi-dimensional feature data of a resource; constructing a resource utilization rate prediction model; predicting based on the multi-dimensional feature data and the resource utilization rate prediction model to obtain a predicted utilization rate of the resource; obtaining a real-time utilization rate of the resource; classifying tasks based on the predicted utilization rate and the real-time utilization rate of the resource to obtain a task classification result; obtaining a resource allocation strategy based on the predicted utilization rate, the real-time utilization rate and the task classification result of the resource; scheduling resources based on the resource allocation strategy.

2. The method of claim 1, wherein, The multi-dimensional feature data comprises model features, input features and runtime features; the model features comprise model type, model parameter magnitude and model layer structure; the input features comprise data batch size and input dimension; and the runtime features comprise CPU historical utilization rate, GPU historical utilization rate and memory historical utilization rate.

3. The method of claim 2, wherein, A gradient boosting decision tree is used to construct a multi-output regression model as the resource utilization rate prediction model, and an expression of the multi-output regression model is as follows: wherein, is the predicted value of the multi-output regression model for sample ; is the prediction of the i-th base learner for sample ; is the number of base learners; is the weight coefficient of the i-th base learner; is the function space consisting of all possible decision trees; After prediction is performed on the multi-dimensional feature data and the resource utilization prediction model, the resource utilization prediction model outputs a three-dimensional vector, the three-dimensional vector is: wherein, is the predicted utilization of the CPU; is the predicted utilization of the GPU; is the predicted utilization of the memory; denotes matrix transpose.

4. The method of claim 1, wherein, The real-time utilization rate of the resource is obtained by the following steps: the real-time utilization rate of the CPU is obtained based on the following formula: ; wherein, is the utilization rate of the CPU at time t; is the total number of cores of the CPU; is the time of the i-th core running in user mode; is the time of the i-th core running in kernel mode; is the total monitoring time in the process of obtaining the real-time utilization rate of the CPU; is the utilization rate of a single core; the real-time utilization rate of the GPU is obtained based on the following formula: wherein, is the utilization of the GPU at time t; is the total number of GPUs; is the number of active stream processors in the kth GPU; is the total number of stream processors in a single GPU; is the number of active stream processors across all GPUs; is the total number of stream processors across all GPUs; the real-time pressure index of the memory is obtained based on the following formula: wherein, is a pressure index of memory at time t; is a usage rate of physical memory; is a used memory amount; is a total memory amount; is a usage rate of swap partition; is a used swap partition amount; is a total swap partition amount; , is a weighting coefficient, satisfying .

5. The method of claim 1, wherein, An improved CATR algorithm is used to construct a classification model, and tasks are classified based on the predicted utilization rate, the real-time utilization rate and the classification model of the resource to obtain a task classification result; the method comprises the following steps: tasks are divided into heavy tasks and light tasks based on the predicted utilization rate of the resource; The urgency factor is obtained based on the following equation : ; wherein, is the deadline of the task; is the current time; is the estimated execution time of the task: wherein, is the reference execution time; is the predicted utilization of the i-th resource class; is the impact weight of the i-th resource class; is the real-time utilization of the i-th resource class; I is the number of resource classes. emergency tasks are identified from the tasks based on the urgency factor.

6. The method of claim 5, wherein, The improved CATR algorithm is used to construct a classification model, and the tasks are classified based on the predicted utilization rate of resources, the real-time utilization rate and the classification model to obtain a task classification result, and then the following formula is used to dynamically adjust the Gini coefficient to dynamically optimize the classification model: wherein Q is the number of classes of tasks; is a set of samples in the current decision tree node; is a set of samples is the number of tasks in the current decision tree node; is a subset of the qth class of tasks; is the number of the qth class of tasks; is a weight coefficient, > 0; is a resource balance reward item of the qth class of tasks, which measures the balance degree of resources when the task q is divided into class tasks.

7. The method of claim 1, wherein, An improved ant colony algorithm is used to obtain a resource allocation strategy based on the predicted utilization rate, the real-time utilization rate and the task classification result of the resource; the method comprises the following steps: pheromone is updated based on the following formula: wherein, is the pheromone concentration of task i to node j at time t; is the pheromone concentration of task i to node j at time t+1; is the pheromone evaporation coefficient, 0 < < 1; < 1; is the pheromone increment left by the kth task on the path of task i to node j; is the number of tasks participating in this update; wherein, is a node resource balance score; is a maximum balance; is a pheromone total constant; is a path cost of the kth task; The path selection probability is obtained based on the following formula : wherein, is the pheromone concentration on the path from task i to node j at time t; is the heuristic function from task i to node j at time t; is the set of nodes that task k can choose from; is the pheromone concentration on the path from task i to node l at time t; is the heuristic function from task i to node l at time t; is the weight coefficient of pheromone; is the weight coefficient of heuristic function; the resource allocation strategy is obtained based on the path selection probability.

8. The method of claim 1, wherein, Resources are scheduled based on the resource allocation strategy; the method comprises the following steps: for emergency tasks, a preemption scheduling strategy is used for scheduling; for non-emergency tasks, time slice round robin scheduling is used, and the time slice is dynamically adjusted based on the following formula: wherein, is the adjusted time slice; is the base time slice; is the predicted utilization of resources required by the task; is the actual utilization of resources required by the task.

9. The method according to any one of claims 1 to 8, characterized in that, after the resources are scheduled based on the resource allocation strategy, the method further comprises the following steps: resource allocation of running tasks is checked; whether there is resource deviation is monitored by using a sliding window algorithm; if there is resource deviation, migration evaluation is triggered to evaluate migration cost and migration benefit of resource migration; when the migration benefit is greater than the migration cost, a resource matching degree of a computing node and a task is calculated; resources are scheduled by using a live migration mechanism based on the resource matching degree.

10. A resource prediction utilization rate based scheduling system, characterized by, The method comprises the following steps: a multi-dimensional feature data obtaining module is used to obtain multi-dimensional feature data of a resource; a resource utilization rate prediction model constructing module is used to construct a resource utilization rate prediction model; the resource utilization rate prediction model is used to predict based on the multi-dimensional feature data to obtain a predicted utilization rate of the resource; a real-time utilization rate obtaining module is used to obtain a real-time utilization rate of the resource; a task classification module is used to classify tasks based on the predicted utilization rate and the real-time utilization rate of the resource to obtain a task classification result; The resource allocation strategy generation module is configured to obtain a resource allocation strategy based on the predicted utilization rate of the resource, the real-time utilization rate, and the task classification result. The resource scheduling module is configured to perform resource scheduling based on the resource allocation strategy.