Double-class task QoS perception CPU scheduling method based on load prediction
By constructing task six-tuples and using graph neural networks for load prediction, combined with QoS-aware scheduling strategies, and dynamically adjusting task priorities, the problems of low resource utilization and high SLA default rates of traditional scheduling algorithms in cloud computing environments are solved, achieving efficient resource scheduling and task response.
Patent Information
- Application Number
- CN202511468895.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-15
- Publication Date
- 2026-01-27
Smart Images

Figure CN121411892A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of artificial intelligence and cloud computing resource management technology, specifically involving a dual-task QoS-aware CPU scheduling method based on load prediction. It is particularly suitable for task scheduling optimization, service quality assurance and resource utilization improvement in distributed computing environments, and belongs to the technical direction of load prediction modeling and task allocation optimization in intelligent cloud scheduling systems. Background Technology
[0002] With the rapid development of cloud computing and large-scale distributed systems, how to efficiently allocate computing resources in dynamic and complex operating environments has become a core challenge in scenarios such as cloud platforms and data centers. CPU scheduling, as a key module in operating systems and resource scheduling systems, directly affects task execution efficiency, resource utilization, and Quality of Service (QoS) assurance levels. In traditional scheduling systems, commonly used scheduling algorithms include First-Come, First-Served (FCFS), Shortest Job First (SJF), and Round-Robin (RR). These algorithms are simple to implement and suitable for small-scale static scenarios. However, in real-world cluster environments with high task concurrency and drastic fluctuations in resource demands, they often struggle to balance task response time with overall system throughput.
[0003] Especially in cloud service platforms, task types are diverse, with some tasks being extremely sensitive to latency while others allow for flexible scheduling. Faced with task requirements of heterogeneous QoS levels, traditional scheduling algorithms cannot achieve dynamic identification of service priorities and fine-grained allocation of resources, leading to problems such as increased default rates for latency-sensitive tasks and uneven resource utilization.
[0004] In recent years, with the maturation of time series modeling and forecasting technologies, inputting historical task load data into predictive models to anticipate future CPU resource demands has become a new direction for optimizing resource scheduling. However, most existing predictive scheduling research relies on fixed-window statistical methods or simple deep learning models, making it difficult to capture the dynamic correlations between tasks over time. Furthermore, existing methods typically do not deeply integrate the prediction results into the scheduling decision-making process, lacking differentiated management of service quality and flexible optimization of scheduling strategies.
[0005] Therefore, there is an urgent need for a method that integrates time series forecasting and intelligent scheduling strategies to solve the problems of long waiting time, low resource utilization and high SLA default rate of traditional scheduling algorithms under complex loads. Summary of the Invention
[0006] In view of the problems and shortcomings of the prior art, the present invention provides a dual-task QoS-aware CPU scheduling method based on load prediction, which can dynamically sense future resource load changes and perform priority division and scheduling plan generation in combination with task QoS levels, so as to achieve SLA guarantee and resource utilization efficiency improvement in high load scenarios, thereby meeting the actual needs of intelligent scheduling in modern cloud computing platforms.
[0007] The technical solution adopted in this invention is: a dual-task QoS-aware CPU scheduling method based on load prediction, comprising the following steps:
[0008] 1) Collect cluster running status, resource information and task running information, and extract cluster task scheduling related data: task arrival time, task execution time, task CPU requirement, service quality level, task completion time and memory requirement;
[0009] 2) Clean the scheduling-related data of cluster tasks, including removing outliers with missing information;
[0010] 3) Construct a six-tuple of tasks from the cluster task data;
[0011] 4) Construct an input sequence using the processed six-tuple data, and build a prediction module to model the historical task input sequence and predict the CPU resource demand trend at multiple future time steps; wherein the prediction module includes an embedding layer, a dynamic graph modeling unit and a neural network computing unit to capture the temporal dependencies and dynamic correlations between tasks.
[0012] 5) Based on the forecast results, the future time interval is divided into high-load intervals and low-load intervals;
[0013] 6) Differentiated scheduling based on QoS type: Delay-sensitive tasks are prioritized for scheduling in low-load intervals and the shortest task priority strategy is adopted; best-effort tasks are scheduled to the end of low-load intervals or high-load intervals and the time-slice round-robin strategy is adopted.
[0014] 7) When the prediction results show that multiple time steps in the future will be in a high load range, the scheduler will limit the scheduling ratio of best-effort tasks in advance to ensure that resources are allocated preferentially to delay-sensitive tasks.
[0015] The six-tuple takes the form of:
[0016] Task i =(arr i ,bur i CPU i qos i ,fin i mem i )
[0017] Among them arr i Indicates the time of task arrival; bur i Indicates task execution time; CPU i Indicates the CPU requirement of the task; qos i Indicates the level of service quality; fin i Indicates the task completion time; mem i This indicates memory requirements.
[0018] The process of constructing the input sequence using the processed six-tuple data includes: construction through normalization, QoS type encoding, and time feature mapping, wherein CPU and memory requirements are normalized, QoS type is One-Hot encoding or binary encoding, and time features are mapped using sine and cosine functions.
[0019] The neural network computing unit of the prediction module includes a combination of Long Short-Term Memory Network (LSTM) and Graph Neural Network (GNN); it predicts the input sequence of length W by calling the model and outputs prediction data of length h for scheduling.
[0020] It divides the system into high-load and low-load zones based on a threshold of the percentage of predicted CPU requests relative to the total system capacity.
[0021] Delay-sensitive tasks are sorted using the Shortest Task First (SJF) strategy during low-load intervals, while best-effort tasks are sorted using the Round Robin (RR) strategy, and the time slice length can be dynamically adjusted.
[0022] When the forecast results show that multiple time steps will be in a high-load range for several consecutive time steps, the scheduler limits the scheduling ratio of best-effort tasks in advance to ensure that resources are allocated preferentially to latency-sensitive tasks. Specifically, when the total demand of tasks exceeds the forecast capacity, the time slice of best-effort tasks is dynamically reduced to ensure that the service level agreement (SLA) of latency-sensitive tasks is compliant.
[0023] SLA default determination is based on the ratio of task waiting time to execution time. When the waiting time of a delay-sensitive task exceeds α times the execution time, it is determined to be an SLA default, where α is a preset ratio threshold.
[0024] The method further includes a performance evaluation step, which includes calculating average wait time (AWT), average turnaround time (ATT), CPU utilization, and SLA default rate, as follows:
[0025] 1) The formula for calculating the Average Waiting Time (AWT) is defined as follows:
[0026]
[0027] Where: n is the total number of tasks; scheduled_time i `creation_time` is the scheduling time for the i-th task. i Let be the arrival time of the i-th task;
[0028] 2) The formula for calculating the Average Turnover Time (ATT) is defined as follows:
[0029]
[0030] Where: deletion_time i Let be the completion time of the i-th task;
[0031] 3) The CPU utilization rate is calculated using the following formula:
[0032]
[0033] Where: cpu_milli i The length of the output sequence; burst i The execution time is C; the total CPU capacity of the system (millicores) is C; the total experiment duration is T.
[0034] 4) The calculation formula for the SLA default determination method is defined as follows;
[0035]
[0036] Among them: WaitingTime i The waiting time is represented by #{LS}, the number of delay-sensitive tasks is represented by α, and α is the scaling factor.
[0037] The method described is used in actual scheduling processes to execute the following scheduling loop steps:
[0038] Collect newly arrived missions;
[0039] Enter the historical task window into the prediction module to obtain the prediction results;
[0040] A scheduling scheme is generated based on the prediction results and QoS type;
[0041] Perform scheduling and update task and system status.
[0042] The present invention has the following beneficial effects and advantages:
[0043] This invention effectively reduces the average waiting time (AWT) and average turnaround time (ATT) by using multi-time-step prediction-assisted scheduling, while improving the overall CPU utilization.
[0044] 1. The introduction of a QoS-aware scheduling strategy significantly reduced the SLA default rate for latency-sensitive tasks;
[0045] 2. The proposed method is applicable to real-world large-scale cluster data and has good versatility and engineering implementation capabilities;
[0046] 3. The method supports cross-platform adaptation and is suitable for various high-performance computing scenarios such as scientific research, education, and industry. Attached Figure Description
[0047] Figure 1 This is a flowchart illustrating the overall process of model training and scheduling for the dual-task QoS-aware CPU scheduling method based on load prediction as described in this invention.
[0048] Figure 2 This is a diagram of the Reasoning Network structure of the prediction model used in this invention.
[0049] Figure 3 This is a graph showing the evaluation metrics for the same cluster and the same task in the method of this invention. Detailed Implementation
[0050] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the specific implementation methods of the present invention will be described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of the present invention. However, the present invention can be implemented in many ways different from those described herein, and those skilled in the art can make equivalent substitutions and modifications without departing from the spirit and essence of the invention. Therefore, the present invention is not limited to the content disclosed in the following specific embodiments.
[0051] Unless otherwise specified, all technical and scientific terms used herein should be understood in accordance with the meanings commonly understood by those skilled in the art. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the invention.
[0052] The core innovations of this invention are as follows:
[0053] I. Design of Structured Representation and Modeling Methods for Cluster Task Data:
[0054] To address the challenges of diverse task types and significant resource requirements in real-world cloud computing platforms, a task six-tuple structure is proposed. This structure effectively characterizes the operational features of tasks and is suitable for unified data representation in scheduling modeling.
[0055] To improve the scheduler's ability to understand tasks, the task flow is constructed as a multi-time series form, and QoS types are encoded. At the same time, time features (such as periodicity) are integrated as input signals to enhance the model's ability to perceive task evolution trends.
[0056] II. Design of a prediction-driven scheduling auxiliary module:
[0057] A multi-time-step prediction module is introduced to predict resource demand in future time periods based on historical CPU usage sequences and task characteristics. This module is based on the principle of dynamic graph modeling, combining graph neural networks (GNNs) and temporal networks (such as LSTMs) to model the temporal dependencies and dynamic coupling relationships between tasks, thereby achieving a forward-looking perception of future load levels.
[0058] By dynamically dividing the future scheduling window into high-load and low-load intervals based on the prediction results, the auxiliary scheduler formulates differentiated scheduling strategies according to task type and resource trends, effectively improving resource utilization and reducing the SLA default rate of delayed tasks.
[0059] III. QoS-Aware Scheduling Strategy Optimization Mechanism:
[0060] During the scheduling decision-making process, task QoS type is considered for classification and processing:
[0061] For latency-sensitive tasks (LS), they are prioritized for scheduling to low-load intervals, and the shortest task first (SJF) strategy is used to shorten their waiting time.
[0062] For best-effort (BE) tasks, a round-robin (RR) strategy is adopted, and execution is postponed to the end of the high-load interval to ensure fairness.
[0063] The scheduler executes a three-stage task—prediction, planning, and execution—at each time step, dynamically adjusting the time slice length of the BE task. When the prediction indicates a high-load period in the future, the execution ratio of BE is limited in advance to ensure the execution quality of the LS task.
[0064] IV. Design with enhanced interpretability and adaptability:
[0065] To improve the interpretability and deployment adaptability of the system, this invention proposes:
[0066] Based on the causal graph reasoning structure, an inter-graph history-future dependency modeling mechanism is introduced to improve the interpretable predictability of changes in CPU demand.
[0067] The system architecture is highly modular, allowing for flexible integration with different types of prediction networks and scheduling strategies, and supports deployment in multiple scenarios such as education cloud, government cloud, and industrial private cloud.
[0068] Each module can be dynamically tailored according to the platform's computing resources to adapt to different scenarios such as high load / lightweight.
[0069] The following process is illustrated in conjunction with the attached diagram. Figure 1 The present invention will provide a detailed description of the specific implementation of a CPU scheduling method based on time series prediction.
[0070] This invention addresses the practical needs of multi-task scheduling in cloud computing environments by proposing an intelligent CPU resource scheduling method based on time series prediction. This method integrates multi-time series modeling, dynamic graph structure analysis, and QoS-aware scheduling strategies, making it particularly suitable for handling cloud cluster task scenarios with large fluctuations in task load and significant priority differences.
[0071] like Figure 1 The diagram shown is an overall flowchart of the model training and scheduling of the dual-task QoS-aware CPU scheduling method based on load prediction described in this invention. It illustrates the entire process from data collection and cleaning, constructing the input sequence, model training, scheduling of prediction results, and metric evaluation. The overall flow of the method of this invention is as follows:
[0072] Step 1 (Data Collection): This step collects critical task and resource operation status information from a real cloud computing cluster. This mainly includes information such as task arrival time, execution time, CPU request volume, memory requirement, task completion time, and Quality of Service (QoS) at the task layer; CPU utilization, idle rate, task queue length, and historical scheduling logs at each time step at the system layer; and resource distribution status (total CPU capacity, number of idle cores, and occupied resources) at the resource layer for each node.
[0073] Data collection is performed once per second or per minute, flexibly configurable based on system settings. All data is anonymized, and all sensitive identifying information is removed to ensure privacy compliance.
[0074] Step 2 (Data Cleaning): This step preprocesses and removes anomalies from the original task data. This mainly includes deleting records with missing information or abnormal task execution (such as negative actual execution time, incomplete task, etc.), standardizing QoS information to ensure consistency in task classification, synchronizing resource status information, and constructing continuous time series and task execution trajectories.
[0075] The processed dataset yields a high-quality dataset, which serves as input for modeling.
[0076] Step 3 (Constructing Task Six-Tubes): To meet the needs of scheduling modeling, each task is abstracted into a unified six-tuple structure:
[0077] Task i =(arr i ,bur i CPU i qos i,fin i mem i )
[0078] in:
[0079] arr i : The arrival time of the i-th task;
[0080] bur i The actual runtime of the task;
[0081] CPU i: The amount of CPU resources requested by the task (unit: millicores);
[0082] qosi: The service quality level of a task, with values including LS (Latency-Sensitive) and BE (Best-Effort).
[0083] fin i Task completion time;
[0084] mem i The amount of memory resources requested by the task.
[0085] This structure ensures the complete representation of task information, which is beneficial for sequence modeling and QoS classification scheduling.
[0086] Step 4 (Input Sequence Construction): Encode the six-tuple data and construct the time series input for prediction. This step mainly includes three encoding processes:
[0087] 1. Normalization processing: for CPU i With mem i Normalize numerical indicators to improve model stability;
[0088] 2. QoS Coding: The QoS type of the task is encoded using One-Hot coding or a binary mapping method (e.g., LS is 1, BE is 0);
[0089] 3. Time Feature Mapping: Sine and cosine position coding is used to periodically express the arrival time of the task, capturing the temporal context information.
[0090] The constructed input sequence is based on time windows and uses a sliding window mechanism. The input sequence consists of historical time step tw to the current time t, and the CPU load is predicted for the next h time steps.
[0091] Step 5 (Prediction Module Modeling): This is the core module, mainly consisting of three parts: an embedding layer, a dynamic graph construction unit, and a neural network unit. The embedding layer primarily maps multimodal features from the input sequence to a unified vector space, handling numerical, categorical, and temporal features. The dynamic graph construction unit mainly constructs a dynamic dependency graph between tasks, where nodes represent tasks and edges represent resource or scheduling coupling relationships; the graph structure is dynamically adjusted at each time step. The weights of edges in the graph are defined based on indicators such as task similarity and resource conflicts. The neural network unit uses a model including Long Short-Term Memory (LSTM), Graph Neural Network (GNN), or a combination thereof, primarily modeling the input graph sequence and outputting a predicted sequence. The model input window is w = 60 steps, and the output predicts the future CPU load trend for h = 12 steps.
[0092] Step 6 (Prediction Output Generation): The model output is the predicted total CPU demand for the system at each of the next h time steps. This sequence is used to divide the load range and make subsequent scheduling strategy decisions.
[0093] Step 7 (Scheduler Execution): Task scheduling is performed based on the prediction results. The strategies include:
[0094] Load range classification: Predicted values > 80% of system capacity are classified as high load range; values < 60% are classified as low load range.
[0095] QoS-aware scheduling:
[0096] LS tasks are prioritized for scheduling in low-load intervals and sorted using the SJF (Shortest Job First) strategy.
[0097] BE tasks are scheduled to the end of the high-load interval or the remaining resources in the low-load interval, using the RR (Round Robin) strategy, and the time slice supports dynamic reduction;
[0098] SLA guarantee mechanism: When the total system demand exceeds the capacity, the scheduling weight of LS tasks is guaranteed first, and the execution time slice of BE is reduced.
[0099] The scheduler uses a loop execution mechanism to periodically collect tasks, predict load, generate scheduling plans, and update resource status.
[0100] Step 8 (Indicator Evaluation): After the scheduling cycle is completed, the system performs statistical analysis and feedback on scheduling performance. The main evaluation indicators include:
[0101] Average Waiting Time (AWT);
[0102] Average Turnover Time (ATT);
[0103] CPU utilization;
[0104] SLA default rate (for LS tasks).
[0105] The above metrics are used to continuously optimize scheduling strategies or dynamically adjust model parameters.
[0106] Step 5 specifically includes:
[0107] For the input sequence data after the six-tuple is constructed, this invention designs a prediction module, the core of which is a time series prediction model, aiming to capture the trend of task resource requests changing over time. This module consists of an embedding layer, a dynamic graph modeling module, and a neural network prediction unit, as follows: Figure 2 As shown. This step includes the following sub-modules:
[0108] 5.1 Input Sequence Construction and Embedding Processing:
[0109] The constructed task six-tuples are windowed in chronological order to form a fixed-length input sequence w. Each record includes CPU request volume, memory request volume, QoS encoding, and time characteristics.
[0110] The input data is first normalized and mapped to temporal features, and then mapped to low-dimensional vectors through the embedding layer to facilitate subsequent model processing.
[0111] 5.2 Dynamic Graph Modeling Module:
[0112] A dynamic adjacency graph is constructed by leveraging the temporal correlations and resource competition relationships between tasks. Implicit relationships between tasks are modeled through the graph structure, such as similarity in resource request patterns and proximity in submission times, generating a graph structure representation.
[0113] Each node in the graph represents a task, and the weight of each edge is adaptively generated based on the similarity of task features to capture non-Euclidean temporal structures.
[0114] 5.3 Neural Network Computation Module:
[0115] The embedded sequence features are input into a neural network prediction module for modeling. This module includes recurrent neural networks (such as LSTM), graph neural networks (such as GCN / GAT), or combinations thereof, to model time dependencies and graph structure representations.
[0116] The CPU request volume prediction for the next h steps is achieved using the following formula:
[0117] C t+1:t+h =F θ (C t-w+1:t )
[0118] in:
[0119] F θThe trained prediction model has the parameter theta.
[0120] C t-w+1:t This represents the number of CPU requests within the historical window.
[0121] C′ t+1:t+h The predicted future CPU request sequence for the next h steps.
[0122] 5.4 Prediction Loss Optimization Mechanism:
[0123] To train the prediction module to obtain accurate prediction results, the following loss function is defined to minimize the error between the predicted value and the true value:
[0124]
[0125] in:
[0126] N is the batch size;
[0127] h is the prediction step size;
[0128] ||·||1 is the L1 norm, used to measure the average absolute value of the prediction error;
[0129] C t+1:t+h This represents the actual future CPU request sequence.
[0130] 5.5 Model Output Interface:
[0131] Finally, the prediction module outputs the CPU request sequence for the next h time steps. This output will be used directly as a reference for the scheduler to generate subsequent high / low load interval division and task arrangement strategies.
[0132] Step 6 specifically includes:
[0133] Based on the future CPU request trends output by the prediction module in step 5, this invention designs a differentiated scheduler combined with a QoS-aware mechanism to achieve classified scheduling of latency-sensitive tasks (LS) and best-effort tasks (BE). The scheduler mainly includes the following key sub-modules:
[0134] 6.1 Load Range Division:
[0135] Based on the future h-step CPU request sequence C′ output by the prediction module t+1:t+h Based on the system's maximum resource capacity, time intervals for different load levels are defined:
[0136] High Load Interval:
[0137] If the predicted CPU request volume at a certain time step exceeds 80% of the total system capacity, then that time step is marked as high load;
[0138] Low Load Interval:
[0139] If the predicted CPU request volume at a certain time step is less than 60% of the total system capacity, then that time step is marked as low load.
[0140] The remaining intervals can be considered as intermediate load intervals and can be merged according to the strategy.
[0141] 6.2 QoS-aware task classification strategy:
[0142] Tasks are categorized into LS (Latency Sensitive) tasks and BE (Best Effort) tasks based on QoS type, and each employs a different scheduling strategy:
[0143] LS task (high priority) scheduling strategy:
[0144] Schedule them to the predicted low-load range whenever possible;
[0145] Within the interval, tasks are sorted according to the Shortest Task First (SJF) strategy, that is, tasks with shorter estimated execution times are executed first.
[0146] If the low-load range is insufficient, the intermediate-load range will be used first.
[0147] BE task (low priority) scheduling strategy:
[0148] Try to schedule it to the end of the prediction interval to avoid competing for resources with LS tasks;
[0149] The allocation is performed using a round-robin (RR) strategy.
[0150] The time slice length can be dynamically adjusted according to the system load.
[0151] 6.3 Dynamic Time Slice Adjustment Mechanism:
[0152] To address scenarios with persistently high loads during the prediction phase (such as multiple consecutive time steps experiencing high loads), this invention introduces a time-slice compression mechanism for BE tasks in the scheduler:
[0153] If the next k ≥ 3 time steps are all high-load intervals, then reduce the time slice length T of the BE task to free up more CPU for the LS task;
[0154] The adjusted time slice length is denoted as T′=T×β, where β∈(0,1) is the reduction factor, which can be preset or adaptively adjusted by the system;
[0155] The dynamic time-slice scheme ensures that the scheduler prioritizes SLA compliance.
[0156] 6.4 Task Scheduling, Execution, and Status Update:
[0157] The scheduler's scheduling cycle includes the following operation process:
[0158] 1. Collect newly arrived tasks;
[0159] 2. Update the task queue and its QoS type;
[0160] 3. Call the prediction module to output future load trends;
[0161] 4. Divide the time frame and categorize the tasks;
[0162] 5. Generate a scheduling plan and allocate time slices according to the strategy;
[0163] 6. Execute scheduling and update system resource usage status;
[0164] 7. Record the actual scheduling time, completion time, and other indicators of the task.
[0165] The specific definitions of the formulas for each indicator in step 8, the indicator evaluation, are as follows:
[0166] Average Waiting Time (AWT). Defined as:
[0167]
[0168] Where n represents the total number of tasks, and scheduled_time i and creation_time i These are the scheduling time and arrival time of task i, respectively.
[0169] Average Turnaround Time (ATT). Defined as:
[0170]
[0171] Among them, deletion_time i This indicates the completion time of task i.
[0172] CPU utilization is calculated using the following formula:
[0173]
[0174] Among them, cpu_millii This represents the CPU request count (millicores) for task i, burst. i =deletion_time i -scheduled_time i The execution time is represented by C, where C is the total CPU capacity of the system (millicores) and T is the total experiment duration.
[0175] To measure the scheduler's ability to guarantee service for latency-sensitive tasks (QoS = LS), this paper adopts an SLA violation rate based on the proportion of execution time. Since the dataset does not provide specific SLA limits, we combine publicly available research and define an SLA violation as occurring when the waiting time of an LS task exceeds a certain proportion threshold. The specific definition is as follows:
[0176]
[0177] Among them, WaitingTime i =scheduled_time i -creation_time i ,
[0178] BurstTime i =deletion_time i -scheduled_time i ,
[0179] α is a proportionality constant. In this experiment, it is set to 1.
[0180] like Figure 3 As shown, in this experiment, the evaluation metrics for the same cluster and the same task are as follows: Figure 3 As shown, compared with the three traditional scheduling algorithms, First Come First Served (FCFS), Shortest Job First (SJF), and Round Robin (RR), it performs best in both Average Waiting Time (AWT) and Average Turnaround Time (ATT).
[0181] Summary of technical effects:
[0182] The technical solution of this invention achieves the following technical advantages by introducing a prediction-driven mechanism, task QoS hierarchical scheduling, and graph neural network modeling capabilities:
[0183] 1. Accurate prediction: The combination of dynamic graph structure and neural network model can effectively capture complex inter-task dependencies and load change trends;
[0184] 2. SLA Guarantee: Low-latency scheduling for LS tasks significantly reduces waiting time and default rate;
[0185] 3. Improved resource utilization: By using high load forecasting and time-slice control mechanisms, the execution efficiency of BE tasks is improved, and resource idleness is avoided;
[0186] 4. High versatility: Comprehensive input features and flexible structure, suitable for various cluster scenarios and scheduling objectives;
[0187] 5. Modular deployment: The modules are well decoupled, allowing for flexible replacement of prediction models or scheduling strategies, making them easy to implement.
[0188] In summary, this invention provides a highly feasible and accurate intelligent method for solving the "high-load performance bottleneck" problem in cloud computing scheduling, and has broad industrial and scientific research application value.
[0189] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should be considered within the scope of protection of the present invention.
Claims
1. A dual-task QoS-aware CPU scheduling method based on load prediction, characterized in that, Includes the following steps: 1) Collect cluster running status, resource information and task running information, and extract cluster task scheduling related data: task arrival time, task execution time, task CPU requirement, service quality level, task completion time and memory requirement; 2) Clean the scheduling-related data of cluster tasks, including removing outliers with missing information; 3) Construct a six-tuple of tasks from the cluster task data; 4) Construct an input sequence using the processed six-tuple data, and build a prediction module to model the historical task input sequence and predict the CPU resource demand trend at multiple future time steps; wherein the prediction module includes an embedding layer, a dynamic graph modeling unit and a neural network computing unit to capture the temporal dependencies and dynamic correlations between tasks. 5) Based on the forecast results, the future time interval is divided into high-load intervals and low-load intervals; 6) Differentiated scheduling based on QoS type: Delay-sensitive tasks are prioritized for scheduling in low-load intervals and the shortest task priority strategy is adopted; best-effort tasks are scheduled to the end of low-load intervals or high-load intervals and the time-slice round-robin strategy is adopted. 7) When the prediction results show that multiple time steps in the future will be in a high load range, the scheduler will limit the scheduling ratio of best-effort tasks in advance to ensure that resources are allocated preferentially to delay-sensitive tasks.
2. The dual-task QoS-aware CPU scheduling method based on load prediction as described in claim 1, characterized in that, The six-tuple takes the form of: Task i =(arr i ,bur i ,cpu i ,qos i ,fin i ,mem i ) Among them arr i Indicates the time of task arrival; bur i Indicates the task execution time; CPU i Indicates the CPU requirement of the task; qos i Indicates the level of service quality; fin i Indicates the task completion time; mem i This indicates memory requirements.
3. The dual-task QoS-aware CPU scheduling method based on load prediction as described in claim 1, characterized in that, The process of constructing the input sequence using the processed six-tuple data includes: construction through normalization, QoS type encoding, and time feature mapping, wherein CPU and memory requirements are normalized, QoS type is One-Hot encoding or binary encoding, and time features are mapped using sine and cosine functions.
4. The dual-task QoS-aware CPU scheduling method based on load prediction as described in claim 1, characterized in that, The neural network computing unit of the prediction module includes a combination of Long Short-Term Memory Network (LSTM) and Graph Neural Network (GNN); it predicts the input sequence of length w by calling the model and outputs prediction data of length h for scheduling.
5. The dual-task QoS-aware CPU scheduling method based on load prediction as described in claim 1, characterized in that, It divides the system into high-load and low-load zones based on a threshold of the percentage of predicted CPU requests relative to the total system capacity.
6. The dual-task QoS-aware CPU scheduling method based on load prediction as described in claim 1, characterized in that, Delay-sensitive tasks are sorted using the Shortest Task First (SJF) strategy during low-load intervals, while best-effort tasks are sorted using the Round Robin (RR) strategy, and the time slice length can be dynamically adjusted.
7. The dual-task QoS-aware CPU scheduling method based on load prediction as described in claim 1, characterized in that, When the forecast results show that multiple time steps will be in a high-load range for several consecutive time steps, the scheduler limits the scheduling ratio of best-effort tasks in advance to ensure that resources are allocated preferentially to latency-sensitive tasks. Specifically, when the total demand of tasks exceeds the forecast capacity, the time slice of best-effort tasks is dynamically reduced to ensure that the service level agreement (SLA) of latency-sensitive tasks is compliant.
8. A dual-task QoS-aware CPU scheduling method based on load prediction according to claim 7, characterized in that, SLA default determination is based on the ratio of task waiting time to execution time. When the waiting time of a delay-sensitive task exceeds α times the execution time, it is determined to be an SLA default, where α is a preset ratio threshold.
9. A dual-task QoS-aware CPU scheduling method based on load prediction according to any one of claims 1-8, characterized in that, The method further includes a performance evaluation step, which includes calculating average wait time (AWT), average turnaround time (ATT), CPU utilization, and SLA default rate, as follows: 1) The formula for calculating the Average Waiting Time (AWT) is defined as follows: Where: n is the total number of tasks; scheduled_time i `creation_time` is the scheduling time for the i-th task. i Let be the arrival time of the i-th task; 2) The formula for calculating the Average Turnover Time (ATT) is defined as follows: Where: deletion_time i Let be the completion time of the i-th task; 3) The CPU utilization rate is calculated using the following formula: Where: cpu_milli i The length of the output sequence; burst i The execution time is C; the total CPU capacity of the system (millicores) is T; the total experiment duration is T. 4) The calculation formula for the SLA default determination method is defined as follows; Among them: WaitingTime i The waiting time is represented by #{LS}, the number of delay-sensitive tasks is represented by α, and α is the scaling factor.
10. A dual-task QoS-aware CPU scheduling method based on load prediction according to any one of claims 1-8, characterized in that, The method described is used in actual scheduling processes to execute the following scheduling loop steps: Collect newly arrived missions; Enter the historical task window into the prediction module to obtain the prediction results; A scheduling scheme is generated based on the prediction results and QoS type; Perform scheduling and update task and system status.